Results 1 
4 of
4
Free Theorems for Functional Logic Programs
 SUBMITTED TO PLPV’10
, 2010
"... Typebased reasoning is popular in functional programming. In particular, parametric polymorphism constrains functions in such a way that statements about their behavior can be derived without consulting function definitions. Is the same possible in a strongly, and polymorphically, typed functional ..."
Abstract

Cited by 3 (3 self)
 Add to MetaCart
Typebased reasoning is popular in functional programming. In particular, parametric polymorphism constrains functions in such a way that statements about their behavior can be derived without consulting function definitions. Is the same possible in a strongly, and polymorphically, typed functional logic language? This is the question we study in this paper. Logical features like nondeterminism and free variables cause interesting effects, which we examine based on examples and address by identifying appropriate conditions that guarantee standard free theorems or inequational versions thereof to hold.
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.
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
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.