Results 1 
9 of
9
Observable sharing for functional circuit description
 In Asian Computing Science Conference
, 1999
"... Pure functional programming languages have been proposed as a vehicle to describe, simulate and manipulate circuit specifications. We propose an extension to Haskell to solve a standard problem when manipulating data types representing circuits in a lazy functional language. The problem is that cir ..."
Abstract

Cited by 43 (3 self)
 Add to MetaCart
Pure functional programming languages have been proposed as a vehicle to describe, simulate and manipulate circuit specifications. We propose an extension to Haskell to solve a standard problem when manipulating data types representing circuits in a lazy functional language. The problem is that circuits are finite graphs  but viewing them as an algebraic (lazy) datatype makes them indistinguishable from potentially infinite regular trees. However, implementations of Haskell do indeed represent cyclic structures by graphs. The problem is that the sharing of nodes that creates such cycles is not observable by any function which traverses such a structure. In this paper we propose an extension to callbyneed languages which makes graph sharing observable. The extension is based on non updatable reference cells and an equality test (sharing detection) on this type. We show that this simple and practical extension has wellbehaved semantic properties, which means that many typical sourcetosource program transformations, such as might be performed by a compiler, are still valid in the presence of this extension.
Improvement in a Lazy Context: An Operational Theory for CallByNeed
 Proc. POPL'99, ACM
, 1999
"... Machine The semantics presented in this section is essentially Sestoft's \mark 1" abstract machine for laziness [Sestoft 1997]. In that paper, he proves his abstract machine 6 A. K. Moran and D. Sands h fx = Mg; x; S i ! h ; M; #x : S i (Lookup) h ; V; #x : S i ! h fx = V g; V; S i (Update) h ; ..."
Abstract

Cited by 40 (7 self)
 Add to MetaCart
Machine The semantics presented in this section is essentially Sestoft's \mark 1" abstract machine for laziness [Sestoft 1997]. In that paper, he proves his abstract machine 6 A. K. Moran and D. Sands h fx = Mg; x; S i ! h ; M; #x : S i (Lookup) h ; V; #x : S i ! h fx = V g; V; S i (Update) h ; M x; S i ! h ; M; x : S i (Unwind) h ; x:M; y : S i ! h ; M [ y = x ]; S i (Subst) h ; case M of alts ; S i ! h ; M; alts : S i (Case) h ; c j ~y; fc i ~x i N i g : S i ! h ; N j [ ~y = ~x j ]; S i (Branch) h ; let f~x = ~ Mg in N; S i ! h f~x = ~ Mg; N; S i ~x dom(;S) (Letrec) Fig. 1. The abstract machine semantics for callbyneed. semantics sound and complete with respect to Launchbury's natural semantics, and we will not repeat those proofs here. Transitions are over congurations consisting of a heap, containing bindings, the expression currently being evaluated, and a stack. The heap is a partial function from variables to terms, and denoted in an identical manner to a coll...
Total Correctness by Local Improvement in Program Transformation
 In Proceedings of the 22nd Annual ACM SIGPLANSIGACT Symposium on Principles of Programming Languages (POPL
, 1995
"... The goal of program transformation is to improve efficiency while preserving meaning. One of the best known transformation techniques is Burstall and Darlington's unfoldfold method. Unfortunately the unfoldfold method itself guarantees neither improvement in efficiency nor totalcorrectness. The c ..."
Abstract

Cited by 20 (3 self)
 Add to MetaCart
The goal of program transformation is to improve efficiency while preserving meaning. One of the best known transformation techniques is Burstall and Darlington's unfoldfold method. Unfortunately the unfoldfold method itself guarantees neither improvement in efficiency nor totalcorrectness. The correctness problem for unfoldfold is an instance of a strictly more general problem: transformation by locally equivalencepreserving steps does not necessarily preserve (global) equivalence. This paper presents a condition for the total correctness of transformations on recursive programs, which, for the first time, deals with higherorder functional languages (both strict and nonstrict) including lazy data structures. The main technical result is an improvement theorem which says that if the local transformation steps are guided by certain optimisation concerns (a fairly natural condition for a transformation), then correctness of the transformation follows. The improvement theorem make...
HigherOrder Expression Procedures
 In Proceedings of the ACM SIGPLAN Symposium on Partial Evaluation and SemanticsBased Program Manipulation (PEPM
, 1995
"... We investigate the soundness of a specialisation technique due to Scherlis, expression procedures, in the context of a higherorder nonstrict functional language. An expression procedure is a generalised procedure construct providing a contextually specialised definition. The addition of expression ..."
Abstract

Cited by 8 (2 self)
 Add to MetaCart
We investigate the soundness of a specialisation technique due to Scherlis, expression procedures, in the context of a higherorder nonstrict functional language. An expression procedure is a generalised procedure construct providing a contextually specialised definition. The addition of expression procedures thereby facilitates the manipulation and specialisation of programs. In the expression procedure approach, programs thus generalised are transformed by means of three key transformation rules: composition, application and abstraction. Arguably, the most notable, yet most overlooked feature of the expression procedure approach to transformation, is that the transformation rules always preserve the meaning of programs. This is in contrast to the unfoldfold transformation rules of Burstall and Darlington. In Scherlis' thesis, this distinguishing property was shown to hold for a strict firstorder language. Rules for callbyname evaluation order were stated but not proved correct....
Possibilities and limitations of callbyneed space improvement
 In Proceedings of the sixth ACM SIGPLAN International Conference on Functional Programming
, 2001
"... ..."
On Typed Calculi with a Merge Operator
 In 14th Conference on Foundations of Software Technology and Theoretical Computer Science, LNCS 880
, 1994
"... . Extensions of the simply typed lambda calculus with a merge operator are defined and investigated. A merge of functions denotes a function which can be applied to more than one type and computes the result by merging the results of the component functions. We propose first two calculi in which the ..."
Abstract

Cited by 5 (3 self)
 Add to MetaCart
. Extensions of the simply typed lambda calculus with a merge operator are defined and investigated. A merge of functions denotes a function which can be applied to more than one type and computes the result by merging the results of the component functions. We propose first two calculi in which the inconsistency between the return values of the component functions is solved using a nonsymmetric rule, and show that they do not have good prooftheoretic properties: one does not have the Strong Normalization Property, and the other does not have the Transitivity of Coercions Property. Then, using the type system, we restrict the two calculi in a way that terms which may cause inconsistency are excluded, and show that the two calculi become equivalent and have all the desired properties. A merge of functions in object oriented programming corresponds to writing a method in a subclass by modifying those in superclasses, and the above restriction corresponds to only allowing adding some be...
Natural Semantics for NonDeterminism
, 1993
"... We present a natural semantics for the untyped lazy calculus plus McCarthy's amb, a nondeterministic choice operator. The natural semantics includes rules for both convergent behaviour (dened inductively) and divergent behaviour (dened coinductively). This semantics is equivalent to a small ste ..."
Abstract

Cited by 2 (0 self)
 Add to MetaCart
We present a natural semantics for the untyped lazy calculus plus McCarthy's amb, a nondeterministic choice operator. The natural semantics includes rules for both convergent behaviour (dened inductively) and divergent behaviour (dened coinductively). This semantics is equivalent to a small step reduction semantics that corresponds closely to our operational intuitions about McCarthy's amb. We present equivalences for convergent and divergent behaviour based on the natural semantics and prove a Context Lemma for the convergence equivalence. We then give a theory l 8 , based on the equivalences for convergent and divergent behaviour. Since it is able to distinguish between programs that dier only in their divergent behaviour, the theory is more discriminating than equational theories based on current domaintheoretic models. It is therefore more suitable for reasoning about functional programs containing McCarthy's amb. Contents 1 Introduction 2 2 Related Work 3 3 ...
On Extensions of. . . : SecondOrder LambdaCalculus with Subtyping
, 1994
"... F was an extension of a secondorder calculus F which has parametric polymorphism with subtyping and bounded quantification, introduced by Ghelli to apply secondorder calculi to the framework of objectoriented languages. However, it is impossible to know the amount of information of a typeche ..."
Abstract
 Add to MetaCart
F was an extension of a secondorder calculus F which has parametric polymorphism with subtyping and bounded quantification, introduced by Ghelli to apply secondorder calculi to the framework of objectoriented languages. However, it is impossible to know the amount of information of a typechecked term before evaluation since the subsumption rules are included in F . To overcome this problem, we provided new calculi cF + and cF ++ as extensions of F , and investigated their prooftheoretic properties. cF + includes a new type Range(X) , and cF ++ includes two new types Range(X) and Inst(X; T ) . For example, the type Range(X) is provided for a type variable X whose upper bound is a function type, as a codomain type of X . When a function type S ! T is substituted for X , Range(S ! T ) is reduced to T . For a type variable X whose upper bound is a universal type, the type Inst(X; U) is provided. When a universal type 8Y S:T is substituted for X , Inst(8Y S:T;U) is re...