Results 1  10
of
14
Declarative Programming in Escher
, 1995
"... ion) If t is a term of type fi and x ff is a variable of type ff, then x ff :t is a term of type ff ! fi. 4. (Application) If s is a term of type ff ! fi and t is a term of type ff, then (s t) is a term of type fi. 5. (Tupling) If t 1 ; : : : ; t n are terms of type ff 1 ; : : : ; ff n , respectivel ..."
Abstract

Cited by 56 (2 self)
 Add to MetaCart
ion) If t is a term of type fi and x ff is a variable of type ff, then x ff :t is a term of type ff ! fi. 4. (Application) If s is a term of type ff ! fi and t is a term of type ff, then (s t) is a term of type fi. 5. (Tupling) If t 1 ; : : : ; t n are terms of type ff 1 ; : : : ; ff n , respectively, for some n 0, then ! t 1 ; : : : ; t n ? is a term of type ff 1 \Theta : : : \Theta ff n . If n = 1, ! t 1 ? is defined to be t 1 . If n = 0, the term obtained is the empty tuple, !?, which is a term of type 1. A.1. MONOMORPHIC TYPE THEORY 93 A term of type o is called a formula. An occurrence of a variable x ff in a term is bound if it occurs within a subterm of the form x ff :t. Otherwise, the occurrence is free. A variable in a term is free if it has a free occurrence. Similarly, a variable in a term is bound if it has a bound occurrence. Of course, a variable can be both bound and free in a term. A term is closed if it contains no free variable. I adopt various standard synta...
Explaining Type Inference
 Science of Computer Programming
, 1995
"... Type inference is the compiletime process of reconstructing missing type information in a program based on the usage of its variables. ML and Haskell are two languages where this aspect of compilation has enjoyed some popularity, allowing type information to be omitted while static type checking is ..."
Abstract

Cited by 53 (0 self)
 Add to MetaCart
Type inference is the compiletime process of reconstructing missing type information in a program based on the usage of its variables. ML and Haskell are two languages where this aspect of compilation has enjoyed some popularity, allowing type information to be omitted while static type checking is still performed. Type inference may be expected to have some application in the prototyping and scripting languages which are becoming increasingly popular. A difficulty with type inference is the confusing and sometimes counterintuitive diagnostics produced by the type checker as a result of type errors. A modification of the HindleyMilner type inference algorithm is presented, which allows the specific reasoning which led to a program variable having a particular type to be recorded for type explanation. This approach is close to the intuitive process used in practice for debugging type errors. 1 Introduction Type inference refers to the compiletime process of reconstructing missing t...
Fusion of Recursive Programs with Computational Effects
 Theor. Comp. Sci
, 2000
"... Fusion laws permit to eliminate various of the intermediate data structures that are created in function compositions. The fusion laws associated with the traditional recursive operators on datatypes cannot in general be used to transform recursive programs with effects. Motivated by this fact, t ..."
Abstract

Cited by 14 (4 self)
 Add to MetaCart
Fusion laws permit to eliminate various of the intermediate data structures that are created in function compositions. The fusion laws associated with the traditional recursive operators on datatypes cannot in general be used to transform recursive programs with effects. Motivated by this fact, this paper addresses the definition of two recursive operators on datatypes that capture functional programs with effects. Effects are assumed to be modeled by monads. The main goal is thus the derivation of fusion laws for the new operators. One of the new operators is called monadic unfold. It captures programs (with effects) that generate a data structure in a standard way. The other operator is called monadic hylomorphism, and corresponds to programs formed by the composition of a monadic unfold followed by a function defined by structural induction on the data structure that the monadic unfold generates. 1 Introduction A common approach to program design in functional programmin...
Multiparadigm programming in Oz
 WORKSHOP ON THE FUTURE OF LOGIC PROGRAMMING, INTERNATIONAL LOGIC PROGRAMMING SYMPOSIUM (ILPS 95
, 1995
"... The foundation of Prolog's success is the high abstraction level of its declarative subset, namely firstorder Horn clause logic with SLDNF resolution. What's missing from Prolog is that little attempt is made to give the same foundation to anything outside the declarative subset. We argue that mult ..."
Abstract

Cited by 12 (2 self)
 Add to MetaCart
The foundation of Prolog's success is the high abstraction level of its declarative subset, namely firstorder Horn clause logic with SLDNF resolution. What's missing from Prolog is that little attempt is made to give the same foundation to anything outside the declarative subset. We argue that multiparadigmprogramming can remedy this lack. We give a foundation for multiparadigmprogramming and we show how it is realized in the Oz language and system. Oz naturally encompasses multiple styles of programming, including (constraint) logic, functional, and concurrent objectoriented programming, by providing a common underlying foundation for these styles through a simple formal model in the concurrent constraint paradigm. We illustrate the integrative programming model with paradigmatical code examples.
Implementing Fudgets with Standard Widget Sets
 In Glasgow Functional Programming Workshop
, 1998
"... Carlsson and Hallgren [1] describe the implementation of a set of "functional widgets" (Fudgets): components for programming graphical user interfaces under the X window system using the nonstrict functional programming language Haskell. We describe an alternative implementation based on existing wi ..."
Abstract

Cited by 10 (1 self)
 Add to MetaCart
Carlsson and Hallgren [1] describe the implementation of a set of "functional widgets" (Fudgets): components for programming graphical user interfaces under the X window system using the nonstrict functional programming language Haskell. We describe an alternative implementation based on existing widget sets (currently Openlook and Motif). Our purpose is twofold: to show that the Fudgets approach can be applied to existing widget sets; and to discuss problems experienced with Fudgets during an industrial case study. 1 Introduction Imperative language programmers enjoy relatively easy access to the graphics resources of workstations. The graphics hardware is manipulated by sideeffecting procedure calls. Even if the library of graphics procedures is written in one imperative language (e.g `C'), programs written in another imperative language can usually make calls to foreign procedures. For example, Ada allows foreign procedures to be called by giving a standard pragma. Ada compilers a...
Towards Merging Recursion and Comonads
, 2000
"... Comonads are mathematical structures that account naturally for effects that derive from the context in which a program is executed. This paper reports ongoing work on the interaction between recursion and comonads. Two applications are shown that naturally lead to versions of a comonadic fold op ..."
Abstract

Cited by 9 (2 self)
 Add to MetaCart
Comonads are mathematical structures that account naturally for effects that derive from the context in which a program is executed. This paper reports ongoing work on the interaction between recursion and comonads. Two applications are shown that naturally lead to versions of a comonadic fold operator on the product comonad. Both versions capture functions that require extra arguments for their computation and are related with the notion of strong datatype. 1 Introduction One of the main features of recursive operators derivable from datatype definitions is that they impose a structure upon programs which can be exploited for program transformation. Recursive operators structure functional programs according to the data structures they traverse or generate and come equipped with a battery of algebraic laws, also derivable from type definitions, which are used in program calculations [24, 11, 5, 15]. Some of these laws, the socalled fusion laws, are particularly interesting in p...
Implementing level 4 liveness in declarative visual programming languages
 In 1998 IEEE Symposium on Visual Languages
, 1998
"... An increasingly common characteristic in visual programming languages (VPLs) is level 4 liveness—the constant monitoring of the system state with continuous redisplay as computations progress, system events arrive, and user inputs occur. However, level 4 liveness can be expensive. In this paper, we ..."
Abstract

Cited by 9 (5 self)
 Add to MetaCart
An increasingly common characteristic in visual programming languages (VPLs) is level 4 liveness—the constant monitoring of the system state with continuous redisplay as computations progress, system events arrive, and user inputs occur. However, level 4 liveness can be expensive. In this paper, we present an implementation method that supports level 4 liveness in declarative VPLs, ensuring without “unreasonable ” cost that all values on the screen are correctly updated as computations progress. The method is especially wellsuited for the growing class of declarative VPLs that display continuously timevarying calculations and graphics, such as GUI specification VPLs, eventbased or reactive VPLs, scientific visualization VPLs, or graphical simulation VPLs. 1.
Metacomputationbased compiler architecture
 IN 5TH INTERNATIONAL CONFERENCE ON THE MATHEMATICS OF PROGRAM CONSTRUCTION
, 2000
"... This paper presents a modular and extensible style of language specification based on metacomputations. This style uses two monads to factor the static and dynamic parts of the specification, thereby staging the specification and achieving strong bindingtime separation. Because metacomputations are ..."
Abstract

Cited by 7 (4 self)
 Add to MetaCart
This paper presents a modular and extensible style of language specification based on metacomputations. This style uses two monads to factor the static and dynamic parts of the specification, thereby staging the specification and achieving strong bindingtime separation. Because metacomputations are defined interms of monads, they can be constructed modularly and extensibly using monad transformers. A number of language constructs are specified: expressions, control flow, imperative features, and block structure. Metacomputationstyle specification lends itself to semanticsdirected compilation, which we demonstrate by creating a modular compiler for a blockstructured, imperative while language.
Logic Programming for the Real World
 Proceedings of the ILPS'95 Postconference Workshop on Visions for the Future of Logic Programming
, 1995
"... this paper as an example. However, Mercury is by no means the only possible language design that fits within our proposal's framework. 2.1 A strong type system ..."
Abstract

Cited by 7 (0 self)
 Add to MetaCart
this paper as an example. However, Mercury is by no means the only possible language design that fits within our proposal's framework. 2.1 A strong type system
Monadic Corecursion  Definition, Fusion Laws, and Applications
 Electronic Notes in Theoretical Computer Science
, 1998
"... This paper investigates corecursive definitions which are at the same time monadic. This corresponds to functions that generate a data structure following a corecursive process, while producing a computational effect modeled by a monad. We introduce a functional, called monadic anamorphism, that cap ..."
Abstract

Cited by 5 (1 self)
 Add to MetaCart
This paper investigates corecursive definitions which are at the same time monadic. This corresponds to functions that generate a data structure following a corecursive process, while producing a computational effect modeled by a monad. We introduce a functional, called monadic anamorphism, that captures definitions of this kind. We also explore another class of monadic recursive functions, corresponding to the composition of a monadic anamorphism followed by (the lifting of) a function defined by structural recursion on the data structure that the monadic anamorphism generates. Such kind of functions are captured by socalled monadic hylomorphism. We present transformation laws for these monadic functionals. Two nontrivial applications are also described.