Results 1 -
9 of
9
Fast and Precise Regular Approximation of Logic Programs
, 1993
"... A practical procedure for computing a regular approximation of a logic program is given. Regular approximations are useful in a variety of tasks in debugging, program specialisation and compile-time optimisation. The algorithm shown here incorporates optimisations taken from deductive database fixpo ..."
Abstract
-
Cited by 96 (19 self)
- Add to MetaCart
A practical procedure for computing a regular approximation of a logic program is given. Regular approximations are useful in a variety of tasks in debugging, program specialisation and compile-time optimisation. The algorithm shown here incorporates optimisations taken from deductive database fixpoint algorithms and efficient bottom-up abstract interpretation techniques. Frameworks for defining regular approximations have been put forward in the past, but the emphasis has usually been on theoretical aspects. Our results contribute mainly to the development of effective analysis tools that can be applied to large programs. Precision of the approximation can be greatly improved by applying query-answer transformations to a program and a goal, thus capturing some argument dependency information. A novel technique is to use transformations based on computation rules other than left-to-right to improve precision further. We give performance results for our procedure on a range of programs. 1
A framework of directionality for proving termination of logic programs
- Proc. JICSLP
, 1992
"... internet: ..."
The Type System of a Higher-Order Logic Programming Language
- TYPES IN LOGIC PROGRAMMING
, 1992
"... ..."
Implementing Polymorphic Typing in a Logic Programming Language
- COMPUTER LANGUAGES
, 1993
"... Introducing types into a logic programming language leads to the need for typed unification within the computation model. In the presence of polymorphism and higher-order features, this aspect forces analysis of types at run-time. We propose extensions to the Warren Abstract Machine (WAM) that permi ..."
Abstract
-
Cited by 17 (10 self)
- Add to MetaCart
Introducing types into a logic programming language leads to the need for typed unification within the computation model. In the presence of polymorphism and higher-order features, this aspect forces analysis of types at run-time. We propose extensions to the Warren Abstract Machine (WAM) that permit such analysis to be done with reasonable efficiency. Much information about the structures of types is present at compile-time, and we show that this information can be used to considerably reduce the work during execution. We illustrate our ideas in the context of a typed version of Prolog. We describe a modified representation for terms, new instructions and additional data areas that in conjunction with existing WAM structures suffice to implement this language. The nature of compiled code is illustrated through examples, and the kind of run-time overheads that are incurred for processing types is analyzed, especially in those cases where others have shown that type checking can be eliminated during execution. The ideas
A First-Order Theory of Types and Polymorphism in Logic Programming
- Department of Computer Science, University at Stony Brook
, 1990
"... We describe a new logic called typed predicate calculus (T PC) that gives declarative meaning to logic programs with type declarations and type inference. T PC supports all popular types of polymorphism, such as parametric, inclusion, and ad hoc polymorphism. The proper interaction between parametri ..."
Abstract
-
Cited by 11 (5 self)
- Add to MetaCart
We describe a new logic called typed predicate calculus (T PC) that gives declarative meaning to logic programs with type declarations and type inference. T PC supports all popular types of polymorphism, such as parametric, inclusion, and ad hoc polymorphism. The proper interaction between parametric and inclusion varieties of polymorphism is achieved through a new construct, called type dependency, which is reminiscent of implication types of [PR89] but yields more natural and succinct specifications. Unlike other proposals where typing has extra-logical status, in T PC the notion of type-correctness has precise model-theoretic meaning that is independent of any specific type-checking or type-inference procedure. Moreover, many different approaches to typing that were proposed in the past can be studied and compared within the framework of our logic. As an illustration, we apply T PC to interpret and compare the results reported in [MO84, Smo88, HT90, Mis84, XW88]. Another novel featu...
Type Checking and Type Inferencing for Logic Programs with Subtypes and Parametric Polymorphism
- Subtypes and Parametric Polymorphism, Informatik Berichte 200, Fern Universitat
, 1996
"... We analyze basic shortcomings of existing proposals for type checking and type inferencing in logic programming languages. A new type system is presented using simple and declarative type annotations. It includes parametric polymorphism and subtyping. Static type checking and inferencing within the ..."
Abstract
-
Cited by 9 (2 self)
- Add to MetaCart
We analyze basic shortcomings of existing proposals for type checking and type inferencing in logic programming languages. A new type system is presented using simple and declarative type annotations. It includes parametric polymorphism and subtyping. Static type checking and inferencing within the new type system is able to detect more programming errors than in other comparable systems. Our approach is independent of a specific resolution calculus and therefore applicable to a wide range of logic languages. A type inferencing algorithm is presented for reconstructing variable typings. As a concrete instance, the results were applied to unrestricted standard Prolog with type annotations, for which a type checking and type inferencing tool is available. This report is part of the documentation for a type checking tool available at !URL:http://www.fernuni-hagen.de/pi8/typical/?. It is complemented by a report "On the Use of Types in Logic Programming" [Mey96]. Research supported by ...
Polymorphic Types in Higher-Order Logic Programming
, 1993
"... This paper analyses the requirements to the notion of type correctness in logic programming and proposes several "adequacy" criteria for such a system. We then present a type theory for a higher-order logic programming language, HiLog [5], which is adequate in that sense. The proposed type system no ..."
Abstract
-
Cited by 4 (2 self)
- Add to MetaCart
This paper analyses the requirements to the notion of type correctness in logic programming and proposes several "adequacy" criteria for such a system. We then present a type theory for a higher-order logic programming language, HiLog [5], which is adequate in that sense. The proposed type system not only captures type errors of syntactic origin, but also ensures that all atoms true in a canonical model (such as the perfect model or the well-founded partial model) of a well-typed program are well-typed. Furthermore, type dependencies among arguments of functions and/or predicates are incorporated into the definition of welltyped terms and atoms, so that the benefits of both parametric and inclusion polymorphism are preserved. Finally types are treated as first-class objects and type declarations can be queried directly by users, making it a suitable framework for schema integration of heterogeneous databases. Keywords: types, inclusion and parametric polymorphism, type dependency, arg...
Avoiding Dynamic Type Checking in a Polymorphic Logic Programming Language
"... For obvious efficiency reasons, it is good to avoid dynamic type-checking in a programming language. The Prolog type system proposed by Mycroft and O'keefe has some good properties which avoid such a runtime overhead. One of this property called type preserving or transparency is a restriction of th ..."
Abstract
-
Cited by 1 (0 self)
- Add to MetaCart
For obvious efficiency reasons, it is good to avoid dynamic type-checking in a programming language. The Prolog type system proposed by Mycroft and O'keefe has some good properties which avoid such a runtime overhead. One of this property called type preserving or transparency is a restriction of the polymorphism. This restriction is not compatible with some programming techniques, for example with higher-order predicates.
Our LIPS Are Sealed: Interfacing Logic and Functional Programming Systems
, 1992
"... We report on a technique for interfacing an untyped logic language to a statically polymorphically typed functional language. Our key insight is that polymorphic types can be interpreted as "need to know" specifications on function arguments. This leads to a criterion for liberally yet safely invoki ..."
Abstract
- Add to MetaCart
We report on a technique for interfacing an untyped logic language to a statically polymorphically typed functional language. Our key insight is that polymorphic types can be interpreted as "need to know" specifications on function arguments. This leads to a criterion for liberally yet safely invoking the functional language to reduce application terms as required during unification in the logic language. This method, called P-unification, enriches the capabilities of each language while retaining the integrity of their individual semantics and implementation technologies. An experimental test has been successfully performed, whereby a Horn clause logic programming (HCLP) interpreter written in Common Lisp was interfaced to the Standard ML of New Jersey system. The latter implementation was employed (i) on untyped or dynamically typed data, even though it is statically typed; (ii) lazily, even though it is strict, and (iii) on alien HCLP terms such as unbound variables --- without the ...

