Results 1  10
of
17
Finally Tagless, Partially Evaluated  Tagless Staged Interpreters for Simpler Typed Languages
 UNDER CONSIDERATION FOR PUBLICATION IN J. FUNCTIONAL PROGRAMMING
"... We have built the first family of tagless interpretations for a higherorder typed object language in a typed metalanguage (Haskell or ML) that require no dependent types, generalized algebraic data types, or postprocessing to eliminate tags. The statically typepreserving interpretations include an ..."
Abstract

Cited by 53 (9 self)
 Add to MetaCart
(Show Context)
We have built the first family of tagless interpretations for a higherorder typed object language in a typed metalanguage (Haskell or ML) that require no dependent types, generalized algebraic data types, or postprocessing to eliminate tags. The statically typepreserving interpretations include an evaluator, a compiler (or staged evaluator), a partial evaluator, and callbyname and callbyvalue CPS transformers. Our principal technique is to encode de Bruijn or higherorder abstract syntax using combinator functions rather than data constructors. In other words, we represent object terms not in an initial algebra but using the coalgebraic structure of the λcalculus. Our representation also simulates inductive maps from types to types, which are required for typed partial evaluation and CPS transformations. Our encoding of an object term abstracts uniformly over the family of ways to interpret it, yet statically assures that the interpreters never get stuck. This family of interpreters thus demonstrates again that it is useful to abstract over higherkinded types.
A polymorphic modal type system for Lisplike multistaged languages
 In The 33rd ACM SIGPLANSIGACT Symposium on Principles of Programming Languages
, 2006
"... This article presents a polymorphic modal type system and its principal type inference algorithm that conservatively extend ML by all of Lisp’s staging constructs (the quasiquotation system). The combination is meaningful because ML is a practical higherorder, impure, and typed language, while Lis ..."
Abstract

Cited by 24 (4 self)
 Add to MetaCart
(Show Context)
This article presents a polymorphic modal type system and its principal type inference algorithm that conservatively extend ML by all of Lisp’s staging constructs (the quasiquotation system). The combination is meaningful because ML is a practical higherorder, impure, and typed language, while Lisp’s quasiquotation system has long evolved complying with the demands from multistaged programming practices. Our type system supports open code, unrestricted operations on references, intentional variablecapturing substitution as well as captureavoiding substitution, and lifting values into code, whose combination escaped all the previous systems.
Static analysis of multistaged programs via unstaging translation
 In POPL
, 2011
"... Static analysis of multistaged programs is challenging because the basic assumption of conventional static analysis no longer holds: the program text itself is no longer a fixed static entity, but rather a dynamically constructed value. This article presents a semanticpreserving translation of mul ..."
Abstract

Cited by 13 (1 self)
 Add to MetaCart
(Show Context)
Static analysis of multistaged programs is challenging because the basic assumption of conventional static analysis no longer holds: the program text itself is no longer a fixed static entity, but rather a dynamically constructed value. This article presents a semanticpreserving translation of multistaged callbyvalue programs into unstaged programs and a static analysis framework based on this translation. The translation is semanticpreserving in that every smallstep reduction of a multistaged program is simulated by the evaluation of its unstaged version. Thanks to this translation we can analyze multistaged programs with existing static analysis techniques that have been developed for conventional unstaged programs: we first apply the unstaging translation, then we apply conventional static analysis to the unstaged version, and finally we cast the analysis results back in terms of the original staged program. Our translation handles staging constructs that have been evolved to be useful in practice (typified in Lisp’s quasiquotation): open code as values, unrestricted operations on references and intentional variablecapturing substitutions. This article omits references for which we refer the reader to our companion technical report.
A logical foundation for environment classifiers
 P.L. CURIEN (ED.), PROCEEDINGS OF THE 9TH INTERNATIONAL CONFERENCE ON TYPED LAMBDACALCULI AND APPLICATIONS (TLCA’09
"... Taha and Nielsen have developed a multistage calculus λ α with a sound type system using the notion of environment classifiers. They are special identifiers, with which code fragments and variable declarations are annotated, and their scoping mechanism is used to ensure statically that certain cod ..."
Abstract

Cited by 3 (1 self)
 Add to MetaCart
(Show Context)
Taha and Nielsen have developed a multistage calculus λ α with a sound type system using the notion of environment classifiers. They are special identifiers, with which code fragments and variable declarations are annotated, and their scoping mechanism is used to ensure statically that certain code fragments are closed and safely runnable. In this paper, we investigate the CurryHoward isomorphism for environment classifiers by developing a typed λcalculus λ ⊲. It corresponds to multimodal logic that allows quantification by transition variables—a counterpart of classifiers—which range over (possibly empty) sequences of labeled transitions between possible worlds. This interpretation will reduce the “run” construct—which has a special typing rule in λ α —and embedding of closed code into other code fragments of different stages— which would be only realized by the crossstage persistence operator in λ α —to merely a special case of classifier application. We prove that λ ⊲ enjoys basic properties including subject reduction, confluence, and strong normalization and that the execution of a welltyped λ ⊲ program is properly staged. Finally, we show that the proof system augmented with a classical axiom is sound and complete with respect to a Kripke semantics of the logic.
Constructive LinearTime Temporal Logic: Proof Systems and Kripke Semantics
"... In this paper we study a version of constructive lineartime temporal logic (LTL) with the “next ” temporal operator. The logic is originally due to Davies, who has shown that the proof system of the logic corresponds to a type system for bindingtime analysis via the CurryHoward isomorphism. Howev ..."
Abstract

Cited by 2 (0 self)
 Add to MetaCart
(Show Context)
In this paper we study a version of constructive lineartime temporal logic (LTL) with the “next ” temporal operator. The logic is originally due to Davies, who has shown that the proof system of the logic corresponds to a type system for bindingtime analysis via the CurryHoward isomorphism. However, he did not investigate the logic itself in detail; he has proved only that the logic augmented with negation and classical reasoning is equivalent to (the “next ” fragment of) the standard formulation of classical lineartime temporal logic. We give natural deduction, sequent calculus and Hilbertstyle proof systems for constructive LTL with conjunction, disjunction and falsehood, and show that the sequent calculus enjoys cut elimination. Moreover, we also consider Kripke semantics and prove soundness and completeness. One distinguishing feature of this logic is that distributivity of the “next ” operator over disjunction “○(A ∨ B) ⊃ ○A ∨ ○B” is rejected in view of a typetheoretic interpretation. Key words: constructive lineartime temporal logic, Kripke semantics, sequent calculus, cut elimination 1.
A MultiStage Language with Intensional Analysis
"... This paper presents the definition of a language with reflection primitives. The language is a homogeneous multistage language that provides the capacity of code analysis by the inclusion of a pattern matching mechanism that permits inspection of the structure of quoted expressions and their destr ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
(Show Context)
This paper presents the definition of a language with reflection primitives. The language is a homogeneous multistage language that provides the capacity of code analysis by the inclusion of a pattern matching mechanism that permits inspection of the structure of quoted expressions and their destruction into component subparts. Quoted expressions include an explicit annotation of their context which is used for dynamic inference of type, where a dynamic typing discipline based on Hinze and Cheney’s approach is used for typing quoted expressions. This paper follows the approach of Sheard and Pasalic about the use of the metalanguage Ωmega as a tool for language design. In this sense, it is shown how to represent the syntax, the static as well as the dynamic semantics of the proposed language in terms of Ωmega constructs.
Frameworks for reasoning about syntax that utilize quotation and evaluation
, 2013
"... It is often useful, if not necessary, to reason about the syntactic structure of an expression in an interpreted language (i.e., a language with a semantics). This paper introduces a mathematical structure called a syntax framework that is intended to be an abstract model of a system for reasoning a ..."
Abstract

Cited by 1 (1 self)
 Add to MetaCart
(Show Context)
It is often useful, if not necessary, to reason about the syntactic structure of an expression in an interpreted language (i.e., a language with a semantics). This paper introduces a mathematical structure called a syntax framework that is intended to be an abstract model of a system for reasoning about the syntax of an interpreted language. Like many concrete systems for reasoning about syntax, a syntax framework contains a mapping of expressions in the interpreted language to syntactic values that represent the syntactic structures of the expressions; a language for reasoning about the syntactic values; a mechanism called quotation to refer to the syntactic value of an expression; and a mechanism called evaluation to refer to the value of the expression represented by a syntactic value. A syntax framework provides a basis for integrating reasoning about the syntax of the expressions with reasoning about what the expressions mean. The notion of a syntax framework is used to discuss how quotation and evaluation can be built into a language and to define what quasiquotation is. Several examples of syntax frameworks are presented.
A Logical Foundation for Environment Classi¯ers
"... Abstract. Taha and Nielsen have developed a multistage calculus ¸® with a sound type system using the notion of environment classi¯ers. They are special identi¯ers, with which code fragments and variable declarations are annotated, and their scoping mechanism is used to ensure statically that cert ..."
Abstract
 Add to MetaCart
(Show Context)
Abstract. Taha and Nielsen have developed a multistage calculus ¸® with a sound type system using the notion of environment classi¯ers. They are special identi¯ers, with which code fragments and variable declarations are annotated, and their scoping mechanism is used to ensure statically that certain code fragments are closed and safely runnable. In this paper, we investigate the CurryHoward isomorphism for environment classi¯ers by developing a typed ¸calculus ¸.. It corresponds to multimodal logic that allows quanti¯cation by transition variablesa counterpart of classi¯erswhich range over (possibly empty) sequences of labeled transitions between possible worlds. This interpretation will reduce the \run " constructwhich has a special typing rule in ¸®and embedding of closed code into other code fragments of di®erent stages which would be only realized by the crossstage persistence operator in ¸®to merely a special case of classi¯er application. We prove that ¸. enjoys basic properties including subject reduction, con°uence, and strong normalization and that the execution of a welltyped ¸. program is properly staged. Finally, we show that the proof system augmented with a classical axiom is sound and complete with respect to a Kripke semantics of the logic. 1
Abstract Parsing for Twostaged Languages with Concatenation
, 2009
"... This article, based on Doh, Kim, and Schmidt’s “abstract parsing ” technique, presents an abstract interpretation for statically checking the syntax of generated code in twostaged programs. Abstract parsing is a static analysis technique for checking the syntax of generated strings. We adopt this t ..."
Abstract
 Add to MetaCart
(Show Context)
This article, based on Doh, Kim, and Schmidt’s “abstract parsing ” technique, presents an abstract interpretation for statically checking the syntax of generated code in twostaged programs. Abstract parsing is a static analysis technique for checking the syntax of generated strings. We adopt this technique for twostaged programming languages and formulate it in the abstract interpretation framework. We parameterize our analysis with the abstract domain so that one can choose the abstract domain as long as it satisfies the condition we provide. We also present an instance of the abstract domain, namely an abstract parse stack and its widening with kcutting.