Results 11  20
of
48
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 7 (1 self)
 Add to MetaCart
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.
Taming Selective Strictness
"... Abstract: Free theorems establish interesting properties of parametrically polymorphic functions, solely from their types, and serve as a nice proof tool. For pure and lazy functional programming languages, they can be used with very few preconditions. Unfortunately, in the presence of selective str ..."
Abstract

Cited by 5 (3 self)
 Add to MetaCart
Abstract: Free theorems establish interesting properties of parametrically polymorphic functions, solely from their types, and serve as a nice proof tool. For pure and lazy functional programming languages, they can be used with very few preconditions. Unfortunately, in the presence of selective strictness, as provided in languages like Haskell, their original strength is reduced. In this paper we present an approach for restrengthening them. By a refined type system which tracks the use of strict evaluation, we rule out unnecessary restrictions that otherwise emerge from the general suspicion that strict evaluation may be used at any point. Additionally, we provide an implemented algorithm determining all refined types for a given term. 1
Proof Pearl: Defining Functions Over Finite Sets. volume 3603 of LNCS
 Information and Computation
, 2005
"... Abstract. Structural recursion over sets is meaningful only if the result is independent of the order in which the set’s elements are enumerated. This paper outlines a theory of function definition for finite sets, based on the fold functionals often used with lists. The fold functional is introduce ..."
Abstract

Cited by 5 (2 self)
 Add to MetaCart
Abstract. Structural recursion over sets is meaningful only if the result is independent of the order in which the set’s elements are enumerated. This paper outlines a theory of function definition for finite sets, based on the fold functionals often used with lists. The fold functional is introduced as a relation, which is then shown to denote a function under certain conditions. Applications include summation and maximum. The theory has been formalized using Isabelle/HOL. 1
Collecting graphical abstract views of Mercury program executions
 Proceedings of the International Workshop on Automated Debugging (AADEBUG2000), Munich, August 2000. Refereed proceedings, the COmputer Research Repository (CORR) cs.SE/0010038
"... A program execution monitor is a program that collects and abstracts information about program executions. The collect operator is a high level, general purpose primitive which lets users implement their own monitors. Collect is built on top of the Mercury trace. In previous work, we have demonstrat ..."
Abstract

Cited by 3 (0 self)
 Add to MetaCart
A program execution monitor is a program that collects and abstracts information about program executions. The collect operator is a high level, general purpose primitive which lets users implement their own monitors. Collect is built on top of the Mercury trace. In previous work, we have demonstrated how this operator can be used to efficiently collect various kinds of statistics about Mercury program executions. In this article we further demonstrate the expressive power and effectiveness of collect by providing more monitor examples. In particular, we show how to implement monitors that generate graphical abstractions of program executions such as proof trees, control flow graphs and dynamic call graphs. We show how those abstractions can be easily modified and adapted, since those monitors only require several dozens of lines of code. Those abstractions are intended to serve as frontends of software visualization tools. Although collect is currently implemented on top of the Mercury trace, none of its underlying concepts depend of Mercury and it can be implemented on top of any tracer for any programming language.
Constructively characterizing fold and unfold
 In 13th International Symposium on Logicbased Program Synthesis and Transformation (LOPSTR 2003), held August 2527 in
, 2003
"... Abstract. In this paper we formally state and prove theorems characterizing when a function can be constructively reformulated using the recursion operators fold and unfold, i.e. given a function h, when can a function g be constructed such that h = fold g or h = unfold g? These results are refineme ..."
Abstract

Cited by 3 (2 self)
 Add to MetaCart
Abstract. In this paper we formally state and prove theorems characterizing when a function can be constructively reformulated using the recursion operators fold and unfold, i.e. given a function h, when can a function g be constructed such that h = fold g or h = unfold g? These results are refinements of the classical characterization of fold and unfold given by Gibbons, Hutton and Altenkirch in [6]. The proofs presented here have been formalized in Nuprl’s constructive type theory [5] and thereby yield program transformations which map a function h (accompanied by the evidence that h satisfies the required conditions), to a function g such that h = fold g or, as the case may be, h = unfold g. 1
Accurate Step Counting
 In Proceedings of the 17th International Workshop on the Implementation and Application of Functional Languages
, 2005
"... Abstract Starting with an evaluator for a language, an abstract machine for the same language can be mechanically derived using successive program transformations. This has relevance to studying both the space and time properties of programs because these can be estimated by counting transitions of ..."
Abstract

Cited by 2 (1 self)
 Add to MetaCart
Abstract Starting with an evaluator for a language, an abstract machine for the same language can be mechanically derived using successive program transformations. This has relevance to studying both the space and time properties of programs because these can be estimated by counting transitions of the abstract machine and measuring the size of the additional data structures needed, such as environments and stacks. In this paper we will use this process to derive a function that accurately counts the number of steps required to evaluate expressions in a simple language. 1
Costing Nested Array Codes
"... We discuss a languagebased cost model for array programs build on the notions of work complexity and parallel depth. The programs operate over data structures comprising nested arrays and recursive productsum types. In a purely functional setting, such programs can be implemented by way of the fla ..."
Abstract

Cited by 2 (0 self)
 Add to MetaCart
We discuss a languagebased cost model for array programs build on the notions of work complexity and parallel depth. The programs operate over data structures comprising nested arrays and recursive productsum types. In a purely functional setting, such programs can be implemented by way of the flattening transformation that converts codes over nested arrays into vectorised code over flat arrays.
Formal Methods within A Totally Functional Approach to Programming”, to appear
 Formal Methods at the Crossroads: from Panacea to Foundational Support”, Proc. 10th Anniversary Colloquium of UNU/IIST, the International Institute for Software Technology of The United Nations
"... Abstract. Taking functional programming to its extremities in search of simplicity still requires integration with other development (e.g. formal) methods. Induction is the key to deriving and verifying functional programs, but can be simplified through packaging proofs with functions, particularly ..."
Abstract

Cited by 2 (2 self)
 Add to MetaCart
Abstract. Taking functional programming to its extremities in search of simplicity still requires integration with other development (e.g. formal) methods. Induction is the key to deriving and verifying functional programs, but can be simplified through packaging proofs with functions, particularly “folds”, on data (structures). “Totally Functional Programming ” avoids the complexities of interpretation by directly representing data (structures) as “platonic combinators ” the functions characteristic to the data. The link between the two simplifications is that platonic combinators are a kind of partiallyapplied fold, which means that platonic combinators inherit foldtheoretic properties, but with some apparent simplifications due to the platonic combinator representation. However, despite observable behaviour within functional programming that suggests that TFP is widelyapplicable, significant work remains before TFP as such could be widely adopted. 1 Programming is Too Hard There can be little doubt that “programming ” (both as metaphor for and essence of the
Programming techniques for partial evaluation
 Foundations of Secure Computation, NATO Science series
, 2000
"... Abstract These lecture notes describe how to write generating extensions,i.e., dedicated program specializers. The focus is on compositional programs and their associated fold functions. Each generating extension is expressed as an instance of this fold function. A number of examples are considered ..."
Abstract

Cited by 2 (1 self)
 Add to MetaCart
Abstract These lecture notes describe how to write generating extensions,i.e., dedicated program specializers. The focus is on compositional programs and their associated fold functions. Each generating extension is expressed as an instance of this fold function. A number of examples are considered and pointers to related work are provided. *Lecture notes for Marktoberdorf'99, extended version.
Church numerals, twice!
, 2002
"... This paper explains Church numerals, twice. The first explanation links Church numerals to Peano numerals via the wellknown encoding of data types in the polymorphic λcalculus. This view suggests that Church numerals are folds in disguise. The second explanation, which is more elaborate, but also ..."
Abstract

Cited by 2 (0 self)
 Add to MetaCart
This paper explains Church numerals, twice. The first explanation links Church numerals to Peano numerals via the wellknown encoding of data types in the polymorphic λcalculus. This view suggests that Church numerals are folds in disguise. The second explanation, which is more elaborate, but also more insightful, derives Church numerals from first principles, that is, from an algebraic specification of addition and multiplication. Additionally, we illustrate the use of the parametricity theorem by proving exponentiation as reverse application correct. 1