Results 21 - 30
of
56
Polytypic Pattern Matching
- In Conference Record of FPCA '95, SIGPLAN-SIGARCH-WG2.8 Conference on Functional Programming Languages and Computer Architecture
, 1995
"... The (exact) pattern matching problem can be informally specified as follows: given a pattern and a text, find all occurrences of the pattern in the text. The pattern and the text may both be lists, or they may both be trees, or they may both be multi-dimensional arrays, etc. This paper describes a g ..."
Abstract
-
Cited by 28 (8 self)
- Add to MetaCart
The (exact) pattern matching problem can be informally specified as follows: given a pattern and a text, find all occurrences of the pattern in the text. The pattern and the text may both be lists, or they may both be trees, or they may both be multi-dimensional arrays, etc. This paper describes a general pattern-matching algorithm for all datatypes definable as an initial object in a category of F -algebras, where F is a regular functor. This class of datatypes includes mutual recursive datatypes and lots of different kinds of trees. The algorithm is a generalisation of the Knuth, Morris, Pratt like pattern-matching algorithm on trees first described by Hoffmann and O'Donnell. 1 Introduction Most editors provide a search function that takes a string of symbols and returns the first position in the text being edited at which this string of symbols occurs. The string of symbols is called a pattern, and the algorithm that detects the position at which a pattern occurs is called a (exa...
Semantic Essence of AsmL
, 2004
"... The Abstract State Machine Language, AsmL, is a novel executable specification language based on the theory of Abstract State Machines. AsmL is object-oriented, provides high-level mathematical data-structures, and is built around the notion of synchronous updates and finite choice. AsmL is full ..."
Abstract
-
Cited by 26 (4 self)
- Add to MetaCart
The Abstract State Machine Language, AsmL, is a novel executable specification language based on the theory of Abstract State Machines. AsmL is object-oriented, provides high-level mathematical data-structures, and is built around the notion of synchronous updates and finite choice. AsmL is fully integrated into the .NET framework and Microsoft development tools. In this paper, we explain the design rationale of AsmL and provide static and dynamic semantics for a kernel of the language.
Controlling Search in Declarative Programs
- In Principles of Declarative Programming (Proc. Joint International Symposium PLILP/ALP’98
, 1998
"... Logic languages can deal with non-deterministic computations via built-in search facilities. However, standard search methods like global backtracking are often not sufficient and a source of many programming errors. Therefore, we propose the addition of a single primitive to logic-oriented language ..."
Abstract
-
Cited by 25 (19 self)
- Add to MetaCart
Logic languages can deal with non-deterministic computations via built-in search facilities. However, standard search methods like global backtracking are often not sufficient and a source of many programming errors. Therefore, we propose the addition of a single primitive to logic-oriented languages to control non-deterministic computation steps. Based on this primitive, a number of different search strategies can be easily implemented. These search operators can be applied if the standard search facilities are not successful or to encapsulate search. The latter is important if logic programs interact with the (non-backtrackable) outside world. We define the search control primitive based on an abstract notion of computation steps so that it can be integrated into various logic-oriented languages, but to provide concrete examples we also present the integration of such a control primitive into the multi-paradigm declarative language Curry. The lazy evaluation strategy of Curr...
Lightweight GUIs for Functional Programming
- In Proceedings of the Seventh International Symposium on Programming Languages, Implementations, Logics and Programs
, 1995
"... . Graphical user interfaces (GUIs) are hard to combine with functional programming. Using a suitable combination of monads, we are able to tame the imperative aspects of graphical I/O in a straightforward and elegant way. We present a concept to integrate lightweight GUIs into the functional framewo ..."
Abstract
-
Cited by 18 (1 self)
- Add to MetaCart
. Graphical user interfaces (GUIs) are hard to combine with functional programming. Using a suitable combination of monads, we are able to tame the imperative aspects of graphical I/O in a straightforward and elegant way. We present a concept to integrate lightweight GUIs into the functional framework, together with a library of basic functions and layout combinators to manipulate the GUI. An implementation of this library, using a set of high-level graphical I/O routines, is outlined. Examples demonstrate the simple way in which applications can be written. 1 Introduction Everybody wants to use graphical user interfaces. And everybody wants to use functional programming languages. Unfortunately, these concepts are hard to combine: I/O, and graphical I/O in particular, is imperative in nature, and thus contradictory to the functional paradigm. Our goal is to reconcile these two concepts, by developing a framework in which a functional programmer smoothly can provide his program with a...
Partial Evaluation for Dictionary-free Overloading
, 1993
"... It has long been suggested that parametric polymorphism might be implemented by generating a distinct version of the code for each monomorphic instance of a function that is used in a given program. However, most implementations avoid this approach for fear that it could lead to a substantial increa ..."
Abstract
-
Cited by 17 (2 self)
- Add to MetaCart
It has long been suggested that parametric polymorphism might be implemented by generating a distinct version of the code for each monomorphic instance of a function that is used in a given program. However, most implementations avoid this approach for fear that it could lead to a substantial increase in the size of the compiled program -- a so-called code explosion -- and that it would complicate the process of separate compilation. An alternative, used in many systems, is to have a single implementation of each polymorphic function and use a uniform (or boxed) representation for all values. This avoids the risk of code explosion but makes it more difficult to support parametric overloading. In addition, the use of boxed representations for even the most primitive values may carry a significant run-time cost. This paper presents a new approach that lies between these two extremes. The resulting system can be used to obtain an efficient implementation of overloading and to avoid the ...
Relational Properties of Recursively Defined Domains
- In 8th Annual Symposium on Logic in Computer Science
, 1993
"... This paper describes a mixed induction/co-induction property of relations on recursively defined domains. We work within a general framework for relations on domains and for actions of type constructors on relations introduced by O'Hearn and Tennent [20], and draw upon Freyd's analysis [7] of recurs ..."
Abstract
-
Cited by 15 (2 self)
- Add to MetaCart
This paper describes a mixed induction/co-induction property of relations on recursively defined domains. We work within a general framework for relations on domains and for actions of type constructors on relations introduced by O'Hearn and Tennent [20], and draw upon Freyd's analysis [7] of recursive types in terms of a simultaneous initiality/finality property. The utility of the mixed induction/co-induction property is demonstrated by deriving a number of families of proof principles from it. One instance of the relational framework yields a family of induction principles for admissible subsets of general recursively defined domains which extends the principle of structural induction for inductively defined sets. Another instance of the framework yields the co-induction principle studied by the author in [22], by which equalities between elements of recursively defined domains may be proved via `bisimulations'. 1 Introduction A characteristic feature of higher-order functional lan...
An Abstract Machine for Curry and its Concurrent Implementation in Java
- Journal of Functional and Logic Programming
, 1999
"... Curry is a multi-paradigm declarative language aiming to amalgamate functional, logic, and concurrent programming paradigms. Curry combines in a seamless way features from functional programming and (concurrent) logic programming. Curry’s operational semantics is based on the combination of lazy red ..."
Abstract
-
Cited by 15 (11 self)
- Add to MetaCart
Curry is a multi-paradigm declarative language aiming to amalgamate functional, logic, and concurrent programming paradigms. Curry combines in a seamless way features from functional programming and (concurrent) logic programming. Curry’s operational semantics is based on the combination of lazy reduction of expressions together with a possibly non-deterministic binding of free variables occurring in expressions. Moreover, (equational) constraints can be executed concurrently which provides for passive constraints and concurrent computation threads that are synchronized on logical variables. machine for executing Curry programs. The machine is designed to provide a link for compiling Curry programs into Java but it can also be a basis for implementations of Curry in other (object-oriented) languages. The main emphasis of the Java-based implementation is the exploitation of Java threads to implement the concurrent and nondeterministic features of Curry.
The Design of a Functional GUI Library Using Constructor Classes
- In Perspectives of System Informatics, LNCS 1181
, 1996
"... . We present the design rationale of a constructor class-based implementation of a graphical user interface library. This library, named TkGofer, provides a convenient way to write window-oriented applications in the pure, functional programming language Gofer, using the user interface toolkit Tcl/T ..."
Abstract
-
Cited by 12 (2 self)
- Add to MetaCart
. We present the design rationale of a constructor class-based implementation of a graphical user interface library. This library, named TkGofer, provides a convenient way to write window-oriented applications in the pure, functional programming language Gofer, using the user interface toolkit Tcl/Tk. The principal contribution of the approach embodied in the library is its flexibility and its type security to specify the appearance and behaviour of individual widgets and their composition. 1 Introduction Functional programming languages offer many advantages to programmers. Using functional languages often results in faster development times and shorter code compared with imperative languages. Furthermore, reasoning about and reusing programs is easier. Recent research in the field of functional programming resulted in new concepts such as monads to tame the imperative aspects of IO and state [12], and constructor classes to deal with higher order polymorphism [7]. Today, the specific...
A Logic for Miranda, Revisited
, 1994
"... . This paper expands upon work begun in the author's [Tho89], in building a logic for the Miranda functional programming language. After summarising the work in that paper, a translation of Miranda definitions into logical formulas is presented, and illustrated by means of examples. This work expand ..."
Abstract
-
Cited by 11 (4 self)
- Add to MetaCart
. This paper expands upon work begun in the author's [Tho89], in building a logic for the Miranda functional programming language. After summarising the work in that paper, a translation of Miranda definitions into logical formulas is presented, and illustrated by means of examples. This work expands upon [Tho89] in giving a complete treatment of sequences of equations, and by examining how to translate the local definitions introduced by where clauses. The status of the logic is then examined, and it is argued that the logic extends a natural operational semantics of Miranda, given by the translations of definitions into conditional equations. Finally it is shown how the logic can be implemented in the Isabelle proof tool. 1. Introduction `Functional programming languages are the best hope for formally-verified programming ' is article of faith for many. That it remains an article of faith, rather than a fact is because of the lack of any experimental evidence. In this paper we conti...
ML typing, explicit polymorphism and qualified types
- In TACS '94: Conference on theoretical aspects of computer software
, 1994
"... Abstract. The ML type system was originally introduced as a means of identifying a class of terms in a simple untyped language, often referred to as core-ML, whose evaluation could be guaranteed not to “go wrong”. In subsequent work, the terms of core-ML have also been viewed as a ‘convenient shorth ..."
Abstract
-
Cited by 10 (1 self)
- Add to MetaCart
Abstract. The ML type system was originally introduced as a means of identifying a class of terms in a simple untyped language, often referred to as core-ML, whose evaluation could be guaranteed not to “go wrong”. In subsequent work, the terms of core-ML have also been viewed as a ‘convenient shorthand ’ for programs in typed languages. Notable examples include studies of ML polymorphism and investigations of overloading, motivated by the use of type classes in Haskell. In this paper, we show how qualified types, originally developed to study type class overloading, can be used to explore the relationship between core-ML programs and their translations in an explicitly typed language. Viewing these two distinct applications as instances of a single framework has obvious advantages; many of the results that have been established for one can also be applied to the other. We concentrate particularly on the issue of coherence, establishing sufficient conditions to guarantee that all possible translations of a given core-ML term are equivalent. One of the key features of this work is the use of conversions, similar to Mitchell’s retyping functions, to provide an interpretation of the ordering between type schemes in the target language. 1

