Results 1  10
of
25
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...
The Integration of Functions into Logic Programming: A Survey
, 1994
"... Functional and logic programming are the most important declarative programming paradigms, and interest in combining them has grown over the last decade. Early research concentrated on the definition and improvement of execution principles for such integrated languages, while more recently efficient ..."
Abstract

Cited by 35 (0 self)
 Add to MetaCart
Functional and logic programming are the most important declarative programming paradigms, and interest in combining them has grown over the last decade. Early research concentrated on the definition and improvement of execution principles for such integrated languages, while more recently efficient implementations of these execution principles have been developed so that these languages became relevant for practical applications. In this paper we survey the development of the operational semantics as well as
Efficient Translation of Lazy Functional Logic Programs into Prolog
 In Proc. Fifth International Workshop on Logic Program Synthesis and Transformation
, 1995
"... Abstract. In this paper, we present a highlevel implementation of lazy functional logic programs by transforming them into Prolog programs. The transformation is controlled by generalized definitional trees which specify the narrowing strategy to be implemented. Since we consider a sophisticated na ..."
Abstract

Cited by 34 (17 self)
 Add to MetaCart
Abstract. In this paper, we present a highlevel implementation of lazy functional logic programs by transforming them into Prolog programs. The transformation is controlled by generalized definitional trees which specify the narrowing strategy to be implemented. Since we consider a sophisticated narrowing strategy, a direct mapping of functions into predicates is not possible. Therefore, we present new techniques to reduce the interpretational overhead of the generated Prolog code. This leads to a portable and efficient implementation of functional logic programs. 1 Introduction In recent years, a lot of proposals have been made to amalgamate functional and logic programming languages [15]. Functional logic languages with a sound and complete operational semantics are based on narrowing, a combination of the reduction principle of functional languages and the resolution principle of logic languages. Narrowing, originally introduced in automated theorem proving [26], is used to solve equations by finding appropriate values for variables occurring in arguments of functions. A narrowing step instantiates some variables in a goal and applies a reduction step to a redex of the instantiated goal. The instantiation of goal variables is usually computed by unifying a subterm of the goal with the lefthand side of some rule. Example 1. Consider the following rules defining the addition and comparison of natural numbers which are represented by terms built from 0 and s:
Preference Logic Programming
 In Proc. 12th Intl. Conf. on Logic Programming
, 1995
"... Preference logic programming (PLP) is an extension of constraint logic programming (CLP) for declaratively specifying problems requiring optimization or comparison and selection among alternative solutions to a query. In the PLP framework, the definite clauses of a constraint logic program are augme ..."
Abstract

Cited by 32 (7 self)
 Add to MetaCart
Preference logic programming (PLP) is an extension of constraint logic programming (CLP) for declaratively specifying problems requiring optimization or comparison and selection among alternative solutions to a query. In the PLP framework, the definite clauses of a constraint logic program are augmented by two new kinds of clauses, which we call optimization clauses and arbiter clauses. Optimization clauses specify which predicates are to be optimized and arbiter clauses specify the criteria to be used for optimization. We illustrate their use with representative examples: one from dynamic programming and another from ambiguity resolution in grammars. We formalize the semantics of PLP using concepts from modal logic: Essentially, each world in the possibleworlds semantics for a preference logic program is a model of the program, and an ordering over these worlds is enforced by the arbiter clauses in the program. We introduce a new notion called preferential consequence to refer to tru...
Parameter Passing and Control Stack Management in Prolog Implementation Revisited
 ACM Transactions on Programming Languages and Systems
, 1994
"... Machine (WAM), the most widely used abstract machine for Prolog implementation, arguments are passed through argument registers, and the information associated with procedure calls is stored in possibly two frames. Although accessing registers is faster than accessing memory, this scheme requires th ..."
Abstract

Cited by 19 (15 self)
 Add to MetaCart
Machine (WAM), the most widely used abstract machine for Prolog implementation, arguments are passed through argument registers, and the information associated with procedure calls is stored in possibly two frames. Although accessing registers is faster than accessing memory, this scheme requires the argument registers to be saved and restored for backtracking and makes it difficult to implement full tail recursion elimination. These disadvantages may far outweigh the advantage in emulatorbased implementations because registers are actually simulated by using memory. In this article, we reconsider the two crucial issues and describe a new abstract machine called ATOAM (yet Another TreeOriented Abstract Machine) . The ATOAM differs from the WAM mainly in that (1) arguments are passed directly into stack frames, (2) only one frame is used for each procedure call, and (3) procedures are translated into matching trees if possible, and clauses in each procedure are indexed on all input ar...
Extension of WAM for a linear logic programming language
, 1996
"... This paper describes an extension of the WAM (Warren Abstract Machine) for a logic programming language called LLP which is based on intuitionisic linear logic. LLP is a subset of Lolli and includes additive and multiplicative conjunction, linear implication in a goal, exponential (!), and the const ..."
Abstract

Cited by 11 (6 self)
 Add to MetaCart
This paper describes an extension of the WAM (Warren Abstract Machine) for a logic programming language called LLP which is based on intuitionisic linear logic. LLP is a subset of Lolli and includes additive and multiplicative conjunction, linear implication in a goal, exponential (!), and the constant 1. The extension of the WAM is mainly for efficient resource management: especially for resource lookup and deletion. In our design, only one table is maintained to keep resources during the execution. Lookingup of a resource is done through a hash table. Deletion of a resource is done by just "marking" the entry in the table. Our prototype compiler produces 25 times faster code compared with a compiled Prolog program which represents resources by a list structure.
Higher Order Babel: Language and Implementation
 In editors Proc. 5th International Workshop on Extensions of Logic Programming ELP'96
, 1996
"... . We present the functional logic language Higher Order Babel which provides higher order unification for parameter passing and solving equations. When searching for a function which solves an equation, not only "polynomial functions" but also defined functions are taken into account. In contrast to ..."
Abstract

Cited by 11 (2 self)
 Add to MetaCart
. We present the functional logic language Higher Order Babel which provides higher order unification for parameter passing and solving equations. When searching for a function which solves an equation, not only "polynomial functions" but also defined functions are taken into account. In contrast to all other programming languages which support higher order unification HOBabel replaces the expensive fireduction by the much more efficient combinator reduction. Moreover, HOBabel is more homogeneous since it does not distinguish functions which only represent data structures and defined functions which are equipped with the full execution mechanism of the language. 1 Introduction In comparison to purely logic programming languages, integrated functional logic programming languages allow a more efficient implementation since functions are deterministic and this determinism can be exploited to reduce the search space. On the other hand, functional logic languages have more expressive po...
Optimization and Relaxation in Logic Languages
 Department of Computer Science, SUNYBuffalo
, 1997
"... Acknowledgements I wish to thank: 1. my advisor, Bharat Jayaraman, to whom this dissertation owes its existence in an uncountable number of ways, 2. Surya Mantha of Xerox Corporation, for input at various crucial stages, 3. Xerox Corporation, for generously providing funds that supported most of thi ..."
Abstract

Cited by 6 (2 self)
 Add to MetaCart
Acknowledgements I wish to thank: 1. my advisor, Bharat Jayaraman, to whom this dissertation owes its existence in an uncountable number of ways, 2. Surya Mantha of Xerox Corporation, for input at various crucial stages, 3. Xerox Corporation, for generously providing funds that supported most of this work, 4. the rest of my committee, namely, Prof. Alan L. Selman and Prof. Kenneth W. Regan, for their interest in my welfare, 5. the secretaries in the department of computer science, for, among other things, shielding me from administrivial vagaries of the University, 6. my friends, for believing in, supporting, and encouraging me through thick andthin. I shall refrain from enumerating names here for fear of making the list longer than the rest of my dissertation.
Compiling Resources in a Linear Logic Programming Language
 IN PROCEEDINGS OF THE WORKSHOP ON PARALLELISM AND IMPLEMENTATION TECHNOLOGY FOR LOGIC PROGRAMMING LANGUAGES
, 1998
"... There have been several proposals for logic programming language based on linear logic: Lolli [6], Lygon [5], LO [3], LinLog [2], Forum [8]. In addition, BinProlog allows the use of linear implications of affine logic (a variant of linear logic) [12, 13]. In these languages, it is possible to cre ..."
Abstract

Cited by 5 (2 self)
 Add to MetaCart
There have been several proposals for logic programming language based on linear logic: Lolli [6], Lygon [5], LO [3], LinLog [2], Forum [8]. In addition, BinProlog allows the use of linear implications of affine logic (a variant of linear logic) [12, 13]. In these languages, it is possible to create and consume resources dynamically as logical formulas. The efficient handling of resource formulas is therefore an important issue in the implementation of these languages. In [10], N. Tamura and Y. Kaneda proposed an abstract machine called LLPAM which is an extension of the standard WAM [14, 1] for a linear logic programming language called LLP. LLP is a superset of Prolog and a subset of Lolli. However, in the original LLPAM design, a resource formula was stored as a term in a heap memory and was not compiled into LLPAM code. In this paper, we describe an extension of LLPAM for compiling resource formulas. In our extension, resources are compiled into closures which consist of...