Results 11  20
of
23
Mixed Lazy/Strict Graph Semantics
"... Abstract. Explicitly enforcing strictness is often used by functional programmers as an important tool for making applications fit time and space efficiency requirements. Few functional programmers however, are familiar with the consequences of explicitly enforcing strictness for formal reasoning ab ..."
Abstract

Cited by 3 (0 self)
 Add to MetaCart
Abstract. Explicitly enforcing strictness is often used by functional programmers as an important tool for making applications fit time and space efficiency requirements. Few functional programmers however, are familiar with the consequences of explicitly enforcing strictness for formal reasoning about their programs. Some “folklore ” knowledge has emerged but this is based on experience rather than on rigid proof. Up to now no formal model has been available for reasoning about enforcing strictness in denotational and operational semantics. This greatly hampered formal reasoning on mixed lazy/strict programs. This paper presents a model for formal reasoning with enforced strictness based on John Launchbury’s lazy graph semantics. Lazy graph semantics are widely considered to be essential for lazy functional programming languages. In this paper Launchbury’s semantics are extended with an explicit strict let construct. Correctness and adequacy of our mixed lazy/strict graph semantics is proven. Using these mixed semantics we formalise and prove some of the available “folklore ” knowledge. 1 Introduction and
Proof Tool Support for Explicit Strictness
"... Abstract. In programs written in lazy functional languages such as for example Clean and Haskell, the programmer can choose freely whether particular subexpressions will be evaluated lazily (the default) or strictly (must be specified explicitly). It is widely known that this choice affects program ..."
Abstract

Cited by 2 (1 self)
 Add to MetaCart
Abstract. In programs written in lazy functional languages such as for example Clean and Haskell, the programmer can choose freely whether particular subexpressions will be evaluated lazily (the default) or strictly (must be specified explicitly). It is widely known that this choice affects program behavior, resource consumption and semantics in several ways. However, not much experience is available about the impact on logical program properties and formal reasoning. This paper aims to give a better understanding of the concept of explicit strictness. The impact of explicit strictness on formal reasoning will be investigated. It will be shown that this impact is bigger than expected and that tool support is needed for formal reasoning in the context of explicit strictness. We introduce the various ways in which strictness specific support is offered by the proof assistant Sparkle. 1
Automatically Generating Counterexamples to Naive Free Theorems
, 2009
"... Disproof can be as important as proof in studying programs and programming languages. In particular, a somehow conditioned statement about program behavior is sometimes best understood and explored by trying to exhibit a falsifying example in the absence of a condition in question. Automation is as ..."
Abstract

Cited by 1 (1 self)
 Add to MetaCart
Disproof can be as important as proof in studying programs and programming languages. In particular, a somehow conditioned statement about program behavior is sometimes best understood and explored by trying to exhibit a falsifying example in the absence of a condition in question. Automation is as desirable for such falsification as it is for verification tasks. We develop formal and implemented tools for counterexample generation in the context of free theorems, i.e., statements derived from polymorphic types à la relational parametricity. The machinery we employ is rooted in constraining the type system and intuitionistic proof search.
Modeldriven engineering from modular monadic semantics: Implementation techniques targeting hardware and software
 in Proceedings of the IFIP Working Conference on Domain Specific Languages (DSL09
, 2009
"... Abstract. Recent research has shown how the formal modeling of concurrent systems can benefit from monadic structuring. With this approach, a formal system model is really a program in a domain specific language defined by a monad for sharedstate concurrency. Can these models be compiled into effic ..."
Abstract

Cited by 1 (1 self)
 Add to MetaCart
Abstract. Recent research has shown how the formal modeling of concurrent systems can benefit from monadic structuring. With this approach, a formal system model is really a program in a domain specific language defined by a monad for sharedstate concurrency. Can these models be compiled into efficient implementations? This paper addresses this question and presents an overview of techniques for compiling monadic concurrency models directly into reasonably efficient software and hardware implementations. The implementation techniques described in this article form the basis of a semanticsdirected approach to modeldriven engineering. 1
Reasoning about Selective Strictness  Operational Equivalence, Heaps and CallbyNeed Evaluation, New Inductive Principles
, 2009
"... Many predominantly lazy languages now incorporate strictness enforcing primitives, for example a strict let or sequential composition seq. Reasons for doing this include gains in time or space efficiencies, or control of parallel evaluation. This thesis studies how to prove equivalences between pro ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
Many predominantly lazy languages now incorporate strictness enforcing primitives, for example a strict let or sequential composition seq. Reasons for doing this include gains in time or space efficiencies, or control of parallel evaluation. This thesis studies how to prove equivalences between programs in languages with selective strictness, specifically, we use a restricted core lazy functional language with a selective strictness operator seq whose operational semantics is a variant of one considered by van Eckelen and de Mol, which itself was derived from Launchbury’s natural semantics for lazy evaluation. The main research contributions are as follows: We establish some of the first ever equivalences between programs with selective strictness. We do this by manipulating operational semantics derivations, in
Improvements for Free
"... “Theorems for Free! ” (Wadler 1989) is a slogan for a technique that allows to derive statements about functions just from their types. So far, the statements considered have always had a purely extensional flavor: statements relating the value semantics of program expressions, but not statements re ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
“Theorems for Free! ” (Wadler 1989) is a slogan for a technique that allows to derive statements about functions just from their types. So far, the statements considered have always had a purely extensional flavor: statements relating the value semantics of program expressions, but not statements relating their runtime (or other) cost. Here we study an extension of the technique that allows precisely statements of the latter flavor, by deriving quantitative theorems for free. After developing the theory, we walk through a number of example derivations. Probably none of the statements derived in those simple examples will be particularly surprising to most readers, but what is maybe surprising, and at the very least novel, is that there is a general technique for obtaining such results on a quantitative level in a principled way. And, of course, there is good potential to bring that technique to bear on more complex examples as well. 1
Bidirectionalization for free! (Perl)
, 2009
"... A bidirectional transformation consists of a function get that takes a source (document or value) to a view and a function put that takes an updated view and the original source back to an updated source, governed by certain consistency conditions relating the two functions. Both the database and pr ..."
Abstract
 Add to MetaCart
A bidirectional transformation consists of a function get that takes a source (document or value) to a view and a function put that takes an updated view and the original source back to an updated source, governed by certain consistency conditions relating the two functions. Both the database and programming language communities have studied techniques that essentially allow a user to specify only one of get and put and have the other inferred automatically. All approaches so far to this bidirectionalization task have been syntactic in nature, either proposing a domainspecific language with limited expressiveness but builtin (and composable) backward components, or restricting get to a simple syntactic form from which some algorithm can synthesize an appropriate definition for put. Here we present a semantic approach instead. The idea is to take a generalpurpose language, Haskell, and write a higherorder function that takes (polymorphic) getfunctions as arguments and returns appropriate putfunctions. All this on the level of semantic values, without being willing, or even able, to inspect the definition of get, and thus liberated from syntactic restraints. Our solution is inspired by relational parametricity and uses free theorems for proving the consistency conditions. It works beautifully.
Free Theorems Involving . . .
, 2009
"... Free theorems are a charm, allowing the derivation of useful statements about programs from their (polymorphic) types alone. We show how to reap such theorems not only from polymorphism over ordinary types, but also from polymorphism over type constructors restricted by class constraints. Our prime ..."
Abstract
 Add to MetaCart
Free theorems are a charm, allowing the derivation of useful statements about programs from their (polymorphic) types alone. We show how to reap such theorems not only from polymorphism over ordinary types, but also from polymorphism over type constructors restricted by class constraints. Our prime application area is that of monads, which form the probably most popular type constructor class of Haskell. To demonstrate the broader scope, we also deal with a transparent way of introducing difference lists into a program, endowed with a neat and general correctness proof.
Acta Informatica manuscript No. (will be inserted by the editor) Refined Typing to Localize the Impact of Forced Strictness on Free Theorems ⋆
, 2011
"... 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 stri ..."
Abstract
 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 overcoming this weakness in specific situations. Employing a refined type system which tracks the use of enforced strict evaluation, we rule out unnecessary restrictions that otherwise emerge. Additionally, we provide (and implement) an algorithm determining all refined types for a given term. 1
Minimally Strict Polymorphic Functions
"... In this paper we show how to efficiently check whether a polymorphic function is minimally strict. A function is minimally strict if it is the minimal element of a specific lessstrict ordering. We prove that we can check whether two polymorphic functions are related by the lessstrict ordering by e ..."
Abstract
 Add to MetaCart
In this paper we show how to efficiently check whether a polymorphic function is minimally strict. A function is minimally strict if it is the minimal element of a specific lessstrict ordering. We prove that we can check whether two polymorphic functions are related by the lessstrict ordering by either checking it a) for an arbitrary monomorphic instance of the functions or b) for all shapes of the functions ’ argument type. A shape is a value of a monomorphic instance of a polymorphic data type where each polymorphic component is replaced by an element that identifies its position in the data structure. In contrast to recent publications that characterize polymorphic functions by monomorphic instances we consider nontermination and selective strictness, i.e., a language closer to