Results 1 
8 of
8
Interactive Functional Programs: A Method and a Formal Semantics
 Research Topics in Functional Programming
, 1992
"... In this paper we present a model of interactive programs in a purely functional style. We exploit lazy evaluation in the modelling of streams as lazy lists. We show how programs may be constructed in an ad hoc way, and then present a small set of interactions and combinators which form the basis fo ..."
Abstract

Cited by 18 (2 self)
 Add to MetaCart
(Show Context)
In this paper we present a model of interactive programs in a purely functional style. We exploit lazy evaluation in the modelling of streams as lazy lists. We show how programs may be constructed in an ad hoc way, and then present a small set of interactions and combinators which form the basis for a disciplined approach to writing such programs. One of the difficulties of the ad hoc approach is that the way in which input and output are interleaved by the functions can be unpredictable. In the second half of the paper we use traces, i.e. partial histories of behaviour, to explain the interleaving of input and output, and give a formal explanation of our combinators. We argue that this justifies our claim that the combinators have the intuitively expected behaviour, and finally contrast our approach with another. 1 Introduction This paper explains an approach to describing interactive processes in the lazy functional programming language Miranda 1 [6]. Functional programming is ba...
What is a Universal HigherOrder Programming Language?
 In Proc. International Conference on Automata, Languages, and Programming. Lecture Notes in Computer Science
, 1993
"... . In this paper, we develop a theory of higherorder computability suitable for comparing the expressiveness of sequential, deterministic programming languages. The theory is based on the construction of a new universal domain T and corresponding universal language KL. The domain T is universal for ..."
Abstract

Cited by 6 (2 self)
 Add to MetaCart
(Show Context)
. In this paper, we develop a theory of higherorder computability suitable for comparing the expressiveness of sequential, deterministic programming languages. The theory is based on the construction of a new universal domain T and corresponding universal language KL. The domain T is universal for observably sequential domains; KL can define all the computable elements of T, including the elements corresponding to computable observably sequential functions. In addition, domain embeddings in T preserve the maximality of finite elementspreserving the termination behavior of programs over the embedded domains. 1 Background and Motivation Classic recursion theory [7, 13, 18] asserts that all conventional programming languages are equally expressive because they can define all partial recursive functions over the natural numbers. This statement, however, is misleading because real programming languages support and enforce a more abstract view of data than bitstrings. In particular, mo...
On the Uniquely Converging Property of Nonlinear Term Rewriting Systems
, 1989
"... A uniquely converging (UC) property for a possibly nonlinear term rewriting system (TRS) is investigated. UC, which is an intermediate property between conventional ChurchRosser (CR) and uniquely normalizing (UN), is newly proposed in connection with the consistency of continuous semantics. Cont ..."
Abstract

Cited by 2 (1 self)
 Add to MetaCart
(Show Context)
A uniquely converging (UC) property for a possibly nonlinear term rewriting system (TRS) is investigated. UC, which is an intermediate property between conventional ChurchRosser (CR) and uniquely normalizing (UN), is newly proposed in connection with the consistency of continuous semantics. Continuous semantics is defined by constructing freecontinuous algebra which is required in algebraic specification on a lazy space. In fact, freecontinuous algebra can specify a lazy space, whereas neither initial algebra nor final algebra can. This paper also clarifies a sufficient condition for UC. The statement is, an !nonoverlapping TRS is UC (irrespective of linearlity). This makes the contrast with the wellknown facts that a nonoverlapping TRS is possibly nonUN when nonlinear, although CR when left linear. The difference between !nonoverlapping and usual nonoverlapping is that unification with infinite terms is applied instead of usual unification with occurcheck. 1 Introduction ...
How Daisy is Lazy: Suspending Construction at Target Levels
"... This paper develops a virtual machine description supporting the programming language Daisy, a lazy descendent of Pure Lisp. The derivation isolates the sequential task entity for concurrent graph reduction based on suspending construction, a demanddriven scheme in which task creation is a transpar ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
This paper develops a virtual machine description supporting the programming language Daisy, a lazy descendent of Pure Lisp. The derivation isolates the sequential task entity for concurrent graph reduction based on suspending construction, a demanddriven scheme in which task creation is a transparent byproduct of record creation. This development carries the slogan, "lazy machines make languages lazy," from the level of metainterpretation to the level of a compilation target. Key instructions are developed, and scheduling is abstractly considered from the task entity's point of view. The treatment is a prelude, both to a future compiler definition, and to an orthogonal study of scheduling. Here, the main purpose is description, and the motive is to propose a modeling framework for comparing related constructs, such as delays, futures, and engines. 1. Survey Daisy exists to explore concurrent graph reduction based on suspending construction. In this paper, its underlying task model ...
Lawful functions and program verification in Miranda
, 1992
"... Laws in the Miranda programming language provide a means of implementing nonfree algebraic types, by means of term rewriting. In this paper we investigate program verification in such a context. Specifically, we look at how to deduce properties of functions over these `lawful' types. After exa ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
(Show Context)
Laws in the Miranda programming language provide a means of implementing nonfree algebraic types, by means of term rewriting. In this paper we investigate program verification in such a context. Specifically, we look at how to deduce properties of functions over these `lawful' types. After examining the general problem, we look at a particular class of functions, the faithful functions. For such functions we are able, in a direct manner, to transfer properties of functions from free types to nonfree types. We introduce sufficient model theory to explain these transfer results, and then find characterisations of various classes of faithful functions. Then we investigate an application of this technique to general, unfaithful, situations. In conclusion we survey Wadler's work on views and assess the utility of laws and views. Contents 1 Introduction 2 2 Mathematical Preliminaries 5 3 The Miranda language  an overview 7 4 Algebraic types in Miranda 9 5 Explaining the laws mechani...
Universal Domains For Sequential Computation
, 1995
"... Classical recursion theory asserts that all conventional programming languages are equally expressive because they can define all partial recursive functions over the natural numbers. However, most real programming languages support some form of higherorder data such as potentially infinite streams ..."
Abstract
 Add to MetaCart
Classical recursion theory asserts that all conventional programming languages are equally expressive because they can define all partial recursive functions over the natural numbers. However, most real programming languages support some form of higherorder data such as potentially infinite streams, lazy trees, and functions. Since these objects do not have finite canonical representations, computations over these objects cannot be accurately modeled as ordinary computations over the natural numbers. In my thesis, I develop a theory of higher order computability based on a new formulation of domain theory. This new formulation interprets elements of any data domain as lazy trees. Like classical domain theory, it provides a universal domain T and a universal language KL. A rich class of domains called observably sequential domains can be specified in T with functions definable in KL. Such an embedding of a data domain enables the operations on the domain to be defined in the universa...
A Typical Synergy Dynamic Types and Generalised Algebraic Datatypes
"... Abstract. We present a typical synergy between dynamic types (dynamics) and generalised algebraic datatypes (GADTs). The former provides a clean approach to integrating dynamic typing in a statically typed language. It allows values to be wrapped together with their type in a uniform package, deferr ..."
Abstract
 Add to MetaCart
(Show Context)
Abstract. We present a typical synergy between dynamic types (dynamics) and generalised algebraic datatypes (GADTs). The former provides a clean approach to integrating dynamic typing in a statically typed language. It allows values to be wrapped together with their type in a uniform package, deferring type unification until run time using a pattern match annotated with the desired type. The latter allows for the explicit specification of constructor types, as to enforce their structural validity. In contrast to ADTs, GADTs are heterogeneous structures since each constructor type is implicitly universally quantified. Unfortunately, pattern matching only enforces structural validity and does not provide instantiation information on polymorphic types. Consequently, functions that manipulate such values, such as a typesafe update function, are cumbersome due to boilerplate type representation administration. In this paper we focus on improving such functions by providing a new GADT annotation via a natural synergy with dynamics. We formally define the semantics of the annotation and touch on novel other applications of this technique such as type dispatching and enforcing type equality invariants on GADT values. 1
Interpretations of Recursively Defined Types
"... We consider a type system where types are labeled, regular trees. ..."
(Show Context)