Results 1  10
of
418
Comprehending Monads
 Mathematical Structures in Computer Science
, 1992
"... Category theorists invented monads in the 1960's to concisely express certain aspects of universal algebra. Functional programmers invented list comprehensions in the 1970's to concisely express certain programs involving lists. This paper shows how list comprehensions may be generalised to an arbit ..."
Abstract

Cited by 456 (13 self)
 Add to MetaCart
Category theorists invented monads in the 1960's to concisely express certain aspects of universal algebra. Functional programmers invented list comprehensions in the 1970's to concisely express certain programs involving lists. This paper shows how list comprehensions may be generalised to an arbitrary monad, and how the resulting programming feature can concisely express in a pure functional language some programs that manipulate state, handle exceptions, parse text, or invoke continuations. A new solution to the old problem of destructive array update is also presented. No knowledge of category theory is assumed.
Deforestation: Transforming programs to eliminate trees
 Theoretical Computer Science
, 1990
"... An algorithm that transforms programs to eliminate intermediate trees is presented. The algorithm applies to any term containing only functions with definitions in a given syntactic form, and is suitable for incorporation in an optimising compiler. Intermediate listsand, more generally, interm ..."
Abstract

Cited by 403 (5 self)
 Add to MetaCart
An algorithm that transforms programs to eliminate intermediate trees is presented. The algorithm applies to any term containing only functions with definitions in a given syntactic form, and is suitable for incorporation in an optimising compiler. Intermediate listsand, more generally, intermediate treesare both the basis and the bane of a certain style of programming in functional languages. For example, to compute the sum of the squares of the numbers from 1 to n, one could write the following program: sum (map square (upto 1 n)) (1) A key feature of this style is the use of functions (upto, map, sum) to encapsulate common patterns of computation ("consider the numbers from 1 to n ", "apply a function to each element", "sum a collection of elements"). Intermediate lists are the basis of this stylethey are the glue that holds the functions together. In this case, the list [1; 2; : : : ; n] connects upto to map, and the list [1; 4; : : : ; n 2 ] connects map to sum. B...
Computational Interpretations of Linear Logic
 Theoretical Computer Science
, 1993
"... We study Girard's Linear Logic from the point of view of giving a concrete computational interpretation of the logic, based on the CurryHoward isomorphism. In the case of Intuitionistic Linear Logic, this leads to a refinement of the lambda calculus, giving finer control over order of evaluation an ..."
Abstract

Cited by 280 (3 self)
 Add to MetaCart
We study Girard's Linear Logic from the point of view of giving a concrete computational interpretation of the logic, based on the CurryHoward isomorphism. In the case of Intuitionistic Linear Logic, this leads to a refinement of the lambda calculus, giving finer control over order of evaluation and storage allocation, while maintaining the logical content of programs as proofs, and computation as cutelimination.
Report on the programming language Haskell: A nonstrict, purely functional language
 ACM SIGPLAN Notices
, 1992
"... ..."
OrderSorted Algebra I: Equational Deduction for Multiple Inheritance, Overloading, Exceptions and Partial Operations
 Theoretical Computer Science
, 1992
"... This paper generalizes manysorted algebra (hereafter, MSA) to ordersorted algebra (hereafter, OSA) by allowing a partial ordering relation on the set of sorts. This supports abstract data types with multiple inheritance (in roughly the sense of objectoriented programming), several forms of pol ..."
Abstract

Cited by 208 (33 self)
 Add to MetaCart
This paper generalizes manysorted algebra (hereafter, MSA) to ordersorted algebra (hereafter, OSA) by allowing a partial ordering relation on the set of sorts. This supports abstract data types with multiple inheritance (in roughly the sense of objectoriented programming), several forms of polymorphism and overloading, partial operations (as total on equationally defined subsorts), exception handling, and an operational semantics based on term rewriting. We give the basic algebraic constructions for OSA, including quotient, image, product and term algebra, and we prove their basic properties, including Quotient, Homomorphism, and Initiality Theorems. The paper's major mathematical results include a notion of OSA deduction, a Completeness Theorem for it, and an OSA Birkhoff Variety Theorem. We also develop conditional OSA, including Initiality, Completeness, and McKinseyMalcev Quasivariety Theorems, and we reduce OSA to (conditional) MSA, which allows lifting many known MSA results to OSA. Retracts, which intuitively are left inverses to subsort inclusions, provide relatively inexpensive runtime error handling. We show that it is safe to add retracts to any OSA signature, in the sense that it gives rise to a conservative extension. A final section compares and contrasts many different approaches to OSA. This paper also includes several examples demonstrating the flexibility and applicability of OSA, including some standard benchmarks like STACK and LIST, as well as a much more substantial example, the number hierarchy from the naturals up to the quaternions.
Java Security: From HotJava to Netscape and Beyond
 IEEE Symposium on Security and Privacy
, 1996
"... The introduction of Java applets has taken the World Wide Web by storm. Information servers can customize the presentation of their content with serversupplied code which executes inside the Web browser. We examine the Java language and both the HotJava and Netscape browsers which support it, and f ..."
Abstract

Cited by 197 (5 self)
 Add to MetaCart
The introduction of Java applets has taken the World Wide Web by storm. Information servers can customize the presentation of their content with serversupplied code which executes inside the Web browser. We examine the Java language and both the HotJava and Netscape browsers which support it, and find a significant number of flaws which compromise their security. These flaws arise for several reasons, including implementation errors, unintended interactions between browser features, differences between the Java language and bytecode semantics, and weaknesses in the design of the language and the bytecode format. On a deeper level, these flaws arise because of weaknesses in the design methodology used in creating Java and the browsers. In addition to the flaws, we discuss the underlying tension between the openness desired by Web application writers and the security needs of their users, and we suggest how both might be accommodated. 1.
Implementing lazy functional languages on stock hardware: the Spineless Tagless Gmachine  Version 2.5
 JOURNAL OF FUNCTIONAL PROGRAMMING
, 1992
"... The Spineless Tagless Gmachine is an abstract machine designed to support nonstrict higherorder functional languages. This presentation of the machine falls into three parts. Firstly, we give a general discussion of the design issues involved in implementing nonstrict functional languages. Next, ..."
Abstract

Cited by 187 (21 self)
 Add to MetaCart
The Spineless Tagless Gmachine is an abstract machine designed to support nonstrict higherorder functional languages. This presentation of the machine falls into three parts. Firstly, we give a general discussion of the design issues involved in implementing nonstrict functional languages. Next, we present the STG language, an austere but recognisablyfunctional language, which as well as a denotational meaning has a welldefined operational semantics. The STG language is the "abstract machine code" for the Spineless Tagless Gmachine. Lastly, we discuss the mapping of the STG language onto stock hardware. The success of an abstract machine model depends largely on how efficient this mapping can be made, though this topic is often relegated to a short section. Instead, we give a detailed discussion of the design issues and the choices we have made. Our principal target is the C language, treating the C compiler as a portable assembler. Version 2.5 of this paper (minus appendix) appe...
Simple unificationbased type inference for GADTs
, 2006
"... Generalized algebraic data types (GADTs), sometimes known as “guarded recursive data types ” or “firstclass phantom types”, are a simple but powerful generalization of the data types of Haskell and ML. Recent works have given compelling examples of the utility of GADTs, although type inference is k ..."
Abstract

Cited by 159 (35 self)
 Add to MetaCart
Generalized algebraic data types (GADTs), sometimes known as “guarded recursive data types ” or “firstclass phantom types”, are a simple but powerful generalization of the data types of Haskell and ML. Recent works have given compelling examples of the utility of GADTs, although type inference is known to be difficult. Our contribution is to show how to exploit programmersupplied type annotations to make the type inference task almost embarrassingly easy. Our main technical innovation is wobbly types, which express in a declarative way the uncertainty caused by the incremental nature of typical typeinference algorithms.
The Design and Implementation of the SELF Compiler, an Optimizing Compiler for ObjectOriented Programming Languages
, 1992
"... Objectoriented programming languages promise to improve programmer productivity by supporting abstract data types, inheritance, and message passing directly within the language. Unfortunately, traditional implementations of objectoriented language features, particularly message passing, have been ..."
Abstract

Cited by 127 (15 self)
 Add to MetaCart
Objectoriented programming languages promise to improve programmer productivity by supporting abstract data types, inheritance, and message passing directly within the language. Unfortunately, traditional implementations of objectoriented language features, particularly message passing, have been much slower than traditional implementations of their nonobjectoriented counterparts: the fastest existing implementation of Smalltalk80 runs at only a tenth the speed of an optimizing C implementation. The dearth of suitable implementation technology has forced most objectoriented languages to be designed as hybrids with traditional nonobjectoriented languages, complicating the languages and making programs harder to extend and reuse. This dissertation describes a collection of implementation techniques that can improve the runtime performance of objectoriented languages, in hopes of reducing the need for hybrid languages and encouraging wider spread of purely objectoriented langu...
On The Power Of Languages For The Manipulation Of Complex Objects
 In Proceedings of International Workshop on Theory and Applications of Nested Relations and Complex Objects
, 1993
"... Various models and languages for describing and manipulating hierarchically structured data have been proposed. Algebraic, calculusbased and logicprogramming oriented languages have all been considered. This paper presents a general model for complex objects, and languages for it based on the thre ..."
Abstract

Cited by 121 (6 self)
 Add to MetaCart
Various models and languages for describing and manipulating hierarchically structured data have been proposed. Algebraic, calculusbased and logicprogramming oriented languages have all been considered. This paper presents a general model for complex objects, and languages for it based on the three paradigms. The algebraic language generalizes those presented in the literature; it is shown to be related to the functional style of programming advocated by Backus. The notion of domain independence familiar from relational databases is defined, and syntactic restrictions (referred to as safety conditions) on calculus queries are formulated, that guarantee domain independence. The main results are: The domainindependent calculus, the safe calculus, the algebra, and the logicprogramming oriented language have equivalent expressive power. In particular, recursive queries, such as the transitive closure, can be expressed in each of the languages. For this result, the algebra needs the pow...