Results 1  10
of
19
Type Inferencing for Polymorphic OrderSorted Logic Programs
 PROCEEDINGS OF THE TWELFTH INTERNATIONAL CONFERENCE ON LOGIC PROGRAMMING
, 1995
"... The purpose of this paper is to study the problem of complete type inferencing for polymorphic ordersorted logic programs. We show that previous approaches are incomplete even if one does not employ the full power of the used type systems. We present a complete type inferencing algorithm that cover ..."
Abstract

Cited by 24 (1 self)
 Add to MetaCart
(Show Context)
The purpose of this paper is to study the problem of complete type inferencing for polymorphic ordersorted logic programs. We show that previous approaches are incomplete even if one does not employ the full power of the used type systems. We present a complete type inferencing algorithm that covers the polymorphic ordersorted types in PROTOSL, a logic programming language that allows for polymorphism as in ML and for hierarchically structured monomorphic types.
A Declarative View of Modes
 In Proceedings of the 1996 Joint International Conference and Symposium on Logic Programming
, 1996
"... Mode information in logic programming is concerned with such things as inputs and outputs of procedures, producers and consumers of variable bindings, instantiation states of calls during execution and the order of execution. Modes seem inextricably tied to the procedural rather than the declarative ..."
Abstract

Cited by 16 (7 self)
 Add to MetaCart
(Show Context)
Mode information in logic programming is concerned with such things as inputs and outputs of procedures, producers and consumers of variable bindings, instantiation states of calls during execution and the order of execution. Modes seem inextricably tied to the procedural rather than the declarative view of logic programs. Despite this, we argue that purely declarative information can actually express the essence of modes remarkable well. The declarative view allows a high level notion of correctness which is independent of how the information is used. We start from a framework which includes types and show how a set of ground atoms related to the success set can be used to express mode information. We introduce constrained regular trees to define such sets and show how they can be used as the basis for a polymorphic mode system. The mode system can express directional types, back communication and linearity and can be used to infer lower level mode information for languages such as Me...
A FirstOrder 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 12 (5 self)
 Add to MetaCart
(Show Context)
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 extralogical status, in T PC the notion of typecorrectness has precise modeltheoretic meaning that is independent of any specific typechecking or typeinference 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...
Approximating Constraint Logic Programs Using . . .
 DEPARTMENT OF COMPUTER SCIENCE, UNIVERSITY OF BRISTOL
, 1995
"... Approximate descriptions of the success set of a program have many uses in program development and optimisation. For untyped logic programming languages, regular approximation is a practical and useful tool. In this paper we consider the problem of approximating the meaning of programs in which s ..."
Abstract

Cited by 11 (2 self)
 Add to MetaCart
Approximate descriptions of the success set of a program have many uses in program development and optimisation. For untyped logic programming languages, regular approximation is a practical and useful tool. In this paper we consider the problem of approximating the meaning of programs in which some #polymorphic# type information is given. This situation can arise in constraint logic programming languages. In untyped languages the user could impose types on selected symbols. Even in strongly typed languages wemay be able to derive more precise descriptions of the meaning, or to consider restricted uses of polymorphic typed predicates. We propose a practical twostage method: #rst the original program is transformed by replacing typed arguments by corresponding polymorphic type terms. For welltyped programs the resulting program is an abstraction of the original. Second, an established algorithm for regular approximation is applied to the transformed program. The algorithm is guaranteed to terminate without using arti#cial techniques such as depthk bounds on #type# terms. The derived description combines polymorphic type terms, including union types, with regular descriptions of untyped terms. The method allows goaldependent analysis as well as goalindependent analysis of a complete program. We show some experimental results demonstrating the speed and precision of the method and show that it scales up well when applied to larger programs.
Using Modes to Ensure Subject Reduction for Typed Logic Programs with Subtyping
, 2000
"... We consider a general prescriptive type system with parametric polymorphism and subtyping for logic programs. The property of subject reduction expresses the consistency of the type system w.r.t. the execution model: if a program is welltyped, then all derivations starting in a welltyped goal are ..."
Abstract

Cited by 8 (7 self)
 Add to MetaCart
We consider a general prescriptive type system with parametric polymorphism and subtyping for logic programs. The property of subject reduction expresses the consistency of the type system w.r.t. the execution model: if a program is welltyped, then all derivations starting in a welltyped goal are again welltyped. It is wellestablished that without subtyping, this property is readily obtained for logic programs w.r.t. their standard (untyped) execution model. Here we give syntactic conditions that ensure subject reduction also in the presence of general subtyping relations between type constructors. The idea is to consider logic programs with a xed dataow, given by modes.
SchemaBased TopDown Design of Logic Programs Using Abstract Data Types
 Proc. LOPSTR /META'94 , pages 138153, LNCS 883
, 1994
"... Data Types E. Marakakis and J.P. Gallagher Department of Computer Science, University of Bristol Queen's Building, University Walk, Bristol BS8 1TR, U.K. email: manolis@compsci.bristol.ac.uk, john@compsci.bristol.ac.uk Abstract. This paper presents a set of schemata that support stepwise top ..."
Abstract

Cited by 7 (1 self)
 Add to MetaCart
(Show Context)
Data Types E. Marakakis and J.P. Gallagher Department of Computer Science, University of Bristol Queen's Building, University Walk, Bristol BS8 1TR, U.K. email: manolis@compsci.bristol.ac.uk, john@compsci.bristol.ac.uk Abstract. This paper presents a set of schemata that support stepwise topdown design of logic programs using abstract data types (ADTs). There are thus three main components to this approach: topdown design, program schemata and ADTs, all of which are already well established notions. Our aim is to combine these ideas in a framework, amenable to support by design tools and allowing the use of existing logic program transformation techniques to optimise the final programs. 1 Introduction and Motivation This paper presents a set of schemata that support stepwise topdown design of logic programs using abstract data types (ADTs). There are thus three main components to this approach: topdown design, program schemata and ADTs, all of which are already wellestablished ...
Report of the Logic Programming Language PROTOSL
 REVISED VERSION: WORKING PAPER 4, IBM GERMANY, SCIENTIFIC CENTER, INSTITUTE FOR LOGICS AND LINGUISTICS
, 1994
"... PROTOSL is a language based on logic programming that integrates a variety of concepts for programming large knowledge based systems like a powerful type concept, a module concept, highlevel access to external relational databases, and finite domain constraints. The type concept covers user defin ..."
Abstract

Cited by 5 (2 self)
 Add to MetaCart
PROTOSL is a language based on logic programming that integrates a variety of concepts for programming large knowledge based systems like a powerful type concept, a module concept, highlevel access to external relational databases, and finite domain constraints. The type concept covers user defined sorts, subsort relationships supporting multiple inheritance and parameterized sorts in the form of polymorphism. In addition to relations, also userdefined functions are available. The module concept is similar to that of Modula2 and allows to hide implementation details from the user of a module. Database access and modification is fully embedded in the programming language PROTOSL and can be programmed transparent to the user of a program or a program part. Besides simple links to external relations, nonrecursive as well as recursive function free deduction rules can be defined. PROTOSL also provides an easy way to work with windows via an objectoriented interface to the OSF/Mot...
The Completion of Typed Logic Programs and SLDNFResolution
, 1993
"... We consider logic programming languages with a parametric type system, first described by Mycroft and O'Keefe, that allows generic polymorphism. It is well known that provided certain conditions hold typed definite logic programs do not go wrong under SLDresolution. Previous work has looked ..."
Abstract

Cited by 5 (1 self)
 Add to MetaCart
We consider logic programming languages with a parametric type system, first described by Mycroft and O'Keefe, that allows generic polymorphism. It is well known that provided certain conditions hold typed definite logic programs do not go wrong under SLDresolution. Previous work has looked at how these conditions may be avoided by adding runtime type checking to the SLDresolution. However, only definite programs have been considered and the program's theory was assumed to be given by the statements of the program and not its completion. This paper establishes results showing that the conditions are also necessary for almost all typed logic programs if the declarative semantics is the completion semantics and the procedural semantics is based on SLDNFresolution. 1 Introduction The type system considered here is parametric. Parametric type systems have been described in a number of papers, including [2], [3], [6], [7], [8], [10], [11], and [13]. Such a type system is one...
A Toolkit for Static Analysis of Constraint Logic Programs
, 1997
"... Generic systems for the analysis of logic programs have been proposed over the last decade or so. Considerable progress has been made in terms of frameworks, algorithms, abstract domains and implementations. A number of generic topdown procedural frameworks are widely available. However, implementa ..."
Abstract

Cited by 5 (1 self)
 Add to MetaCart
Generic systems for the analysis of logic programs have been proposed over the last decade or so. Considerable progress has been made in terms of frameworks, algorithms, abstract domains and implementations. A number of generic topdown procedural frameworks are widely available. However, implementation e#orts for bottomup declarative frameworks are in a preliminary stage. In this thesis
Polymorphic Types in HigherOrder 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 higherorder logic programming language, HiLog [5], which is adequate in that sense. The proposed type ..."
Abstract

Cited by 4 (2 self)
 Add to MetaCart
(Show Context)
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 higherorder 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 wellfounded partial model) of a welltyped program are welltyped. 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 firstclass 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...