Results 1  10
of
13
Metatheory à la carte
 In POPL ’13
, 2013
"... Formalizing metatheory, or proofs about programming languages, in a proof assistant has many wellknown benefits. However, the considerable effort involved in mechanizing proofs has prevented it from becoming standard practice. This cost can be amortized by reusing as much of an existing formalizat ..."
Abstract

Cited by 14 (4 self)
 Add to MetaCart
(Show Context)
Formalizing metatheory, or proofs about programming languages, in a proof assistant has many wellknown benefits. However, the considerable effort involved in mechanizing proofs has prevented it from becoming standard practice. This cost can be amortized by reusing as much of an existing formalization as possible when building a new language or extending an existing one. Unfortunately reuse of components is typically adhoc, with the language designer cutting and pasting existing definitions and proofs, and expending considerable effort to patch up the results. This paper presents a more structured approach to the reuse of formalizations of programming language semantics through the composition of modular definitions and proofs. The key contribution is the development of an approach to induction for extensible Church encodings which uses a novel reinterpretation of the universal property of folds. These encodings provide the foundation for a framework, formalized in Coq, which uses type classes to automate the composition of proofs from modular components. Several interesting language features, including binders and general recursion, illustrate the capabilities of our framework. We reuse these features to build fully mechanized definitions and proofs for a number of languages, including a version of miniML. Bounded induction enables proofs of properties for noninductive semantic functions, and mediating type classes enable proof adaptation for more featurerich languages. 1.
Extensibility for the masses: Practical extensibility with object algebras
 IN: ECOOP’12
, 2012
"... This paper presents a new solution to the expression problem (EP) that works in OO languages with simple generics (including Java or C#). A key novelty of this solution is that advanced typing features, including Fbounded quantification, wildcards and variance annotations, are not needed. The solu ..."
Abstract

Cited by 8 (4 self)
 Add to MetaCart
This paper presents a new solution to the expression problem (EP) that works in OO languages with simple generics (including Java or C#). A key novelty of this solution is that advanced typing features, including Fbounded quantification, wildcards and variance annotations, are not needed. The solution is based on object algebras, which are an abstraction closely related to algebraic datatypes and Church encodings. Object algebras also have much in common with the traditional forms of the Visitor pattern, but without many of its drawbacks: they are extensible, remove the need for accept methods, and do not compromise encapsulation. We show applications of object algebras that go beyond toy examples usually presented in solutions for the expression problem. In the paper we develop an increasingly more complex set of features for a miniimperative language, and we discuss a realworld application of object algebras in an implementation of remote batches. We believe that object algebras bring extensibility to the masses: object algebras work in mainstream OO languages, and they significantly reduce the conceptual overhead by using only features that are used by everyday programmers.
Modular TypeSafety Proofs in Agda
"... Methods for reusing code are widespread and well researched, but methods for reusing proofs are still emerging. We consider the use of dependent types for this purpose, introducing a modular approach for composing mechanized proofs. We show that common techniques for abstracting algorithms over data ..."
Abstract

Cited by 7 (0 self)
 Add to MetaCart
(Show Context)
Methods for reusing code are widespread and well researched, but methods for reusing proofs are still emerging. We consider the use of dependent types for this purpose, introducing a modular approach for composing mechanized proofs. We show that common techniques for abstracting algorithms over data structures naturally translate to abstractions over proofs. We introduce a language composed of a series of smaller language components, each defined as functors, and tie them together by taking the fixed point of their sum [Malcom, 1990]. We then give proofs of type preservation for each language component and show how to compose these proofs into a proof for the entire language, again by taking the fixed point of a sum of functors.
Building compilers by combining algebras
 IN: ECBS, IEEE COMPUTER SOCIETY
, 2005
"... Embedded systems present a wide variety of challenges for developers of language tools. Verification of correctness, flexibility for adding new language features, and retargeting new architectures all present significant problems when developing a compiler for embedded systems. In this paper we pres ..."
Abstract

Cited by 4 (1 self)
 Add to MetaCart
(Show Context)
Embedded systems present a wide variety of challenges for developers of language tools. Verification of correctness, flexibility for adding new language features, and retargeting new architectures all present significant problems when developing a compiler for embedded systems. In this paper we present a domainspecific language based on modular monadic semantics which addresses many of these challenges.
A Modular, AlgebraSequenced Paramorphic . . .
, 2007
"... The objective of this thesis is to demonstrate the feasibility of performing static analysis, specifically type checking, in a particularly modular way. We use a term space of fixpoints of sums of functors so that, by writing individual type checkers for each portion of the entire language, we can t ..."
Abstract
 Add to MetaCart
The objective of this thesis is to demonstrate the feasibility of performing static analysis, specifically type checking, in a particularly modular way. We use a term space of fixpoints of sums of functors so that, by writing individual type checkers for each portion of the entire language, we can then combine those algebras into an algebra that functions over the entire target language. The overall computational style employed uses a sequenced paramorphism to reduce the terms to the value space of types. As a proof of concept, this thesis presents a nominal typechecker in Haskell for the language Rosetta. It relies heavily on InterpreterLib, a Haskell library for designing interpreters in exactly the style described.
Modular Language Specifications in Haskell
, 2000
"... A framework for speci cation of programming language semantics, abstract and concrete syntax, and lexical structure is proposed. The framework is based on Modular Monadic Semantics and allows independent specification of various language features. Features such as arithmetics, conditionals, exceptio ..."
Abstract
 Add to MetaCart
A framework for speci cation of programming language semantics, abstract and concrete syntax, and lexical structure is proposed. The framework is based on Modular Monadic Semantics and allows independent specification of various language features. Features such as arithmetics, conditionals, exceptions, state and nondeterminism can be freely combined into working interpreters, facilitating experiments in language design. A prototype implementation of this system in Haskell is described and possibilities for more sophisticated interpreter generator are outlined.
Modular Interpreters for the Masses Implicit Context Propagation using Object Algebras
"... Modular interpreters have the potential to achieve componentbased language development: instead of writing language interpreters from scratch, they can be assembled from reusable, semantic building blocks. Unfortunately, traditional language interpreters are hard to extend because different languag ..."
Abstract
 Add to MetaCart
(Show Context)
Modular interpreters have the potential to achieve componentbased language development: instead of writing language interpreters from scratch, they can be assembled from reusable, semantic building blocks. Unfortunately, traditional language interpreters are hard to extend because different language constructs may require different interpreter signatures. For instance, arithmetic interpreters produce a value without any context information, whereas binding constructs require an additional environment. In this paper, we present a practical solution to this problem based on implicit context propagation. By structuring denotationalstyle interpreters as Object Algebras [25], base interpreters can be retroactively lifted into new interpreters that have an extended signature. The additional parameters are implicitly propagated behind the scenes, through the evaluation of the base interpreter. Interpreter lifting enables a flexible style of componentbased language development. The technique works in mainstream objectoriented languages, does not sacrifice type safety or separate compilation, and can be easily automated. We illustrate implicit context propagation using a modular definition of Featherweight Java and its extension to support sideeffects.
A Modular Interpreter In Scheme With Objects
, 2000
"... The problem of writing modular interpreters for functional languages has largely been studied from the perspective of statically typed languages. This paper explores the use of an objectoriented extension of Scheme for this purpose, and nds it to be largely successful. Use of a dynamically typed la ..."
Abstract
 Add to MetaCart
The problem of writing modular interpreters for functional languages has largely been studied from the perspective of statically typed languages. This paper explores the use of an objectoriented extension of Scheme for this purpose, and nds it to be largely successful. Use of a dynamically typed language has the advantages of greater uniformity and exibility. 1 The Problem of Extensibility, the Test Case of Modular Interpreters and the Search for a Solution in ObjectOriented Programming Extensibility is the ability of a program to be adapted to new tasks without accessing its source code [7]. Interpreters make an interesting extensibility problem, because in the terminology of Duponcheel [4], there are both syntactic and semantic aspects. By syntax, here, he means abstract syntax, i.e., the logical structure of expressions. By semantics, he means the computations and values engendered by those expressions. This extensibility problem should be contrasted with another that has also...
●data Com = Assign String Exp
"... based on papers provided by the Haskell community and some other resources Morning: The BackEnd 1)Declare the AST (expressions, commands) 2)Prepare a small program including commands (for testing purpose) refered as “the s1 program” 3)Declare the datastructures of the environment and some function ..."
Abstract
 Add to MetaCart
based on papers provided by the Haskell community and some other resources Morning: The BackEnd 1)Declare the AST (expressions, commands) 2)Prepare a small program including commands (for testing purpose) refered as “the s1 program” 3)Declare the datastructures of the environment and some functions to manipulate it 4)Replace the virtual machine with a monad 5)Define some basic operations with monadic values 6)Write the expressioninterpreter in donotation 7)Write the commandinterpreter in donotation You may test the backend now! Afternoon: The FrontEnd 1)Prepare the grammare of the language 2)Use a parser combinators library(or write a new one) 3)Combine simple parsers until you get a parser of the entier language. (Parsers are producing AST) 4)Parse the source of the “the s1 program ”. You should get the same tree which was handwritten in the morning 5)Combine: Frontend, Backend and an eventual tree rewriter (if needed) to get the interpreter 1) Declare the AST
The University of Kansas Composing Specifications Using Algebra Combinators
, 2006
"... Project Sponsor: National Science Foundation The need to understand effects of crosscutting concerns defines the essence of systemslevel design. Understanding the impacts of local design decisions on global requirements such as power consumption or security is mandatory for constructing correct sy ..."
Abstract
 Add to MetaCart
(Show Context)
Project Sponsor: National Science Foundation The need to understand effects of crosscutting concerns defines the essence of systemslevel design. Understanding the impacts of local design decisions on global requirements such as power consumption or security is mandatory for constructing correct systems. Unfortunately, domain specific models may be defined using different semantics making analysis difficulty. We define an algebra combinator that provide semantics for syntax, an algebra combinator defines a single model that embodies the composition of those specifications. Such composite models can then be used to understand the interaction of models from the original specification domains. 1