Results 1 -
4 of
4
Specification and correctness proof of a WAM extension with type constraints
, 1996
"... . We provide a mathematical specification of an extension of Warren's Abstract Machine for executing Prolog to type-constraint logic programming and prove its correctness. Our aim is to provide a full specification and correctness proof of a concrete system, the PROTOS Abstract Machine (PAM), an ext ..."
Abstract
-
Cited by 9 (4 self)
- Add to MetaCart
. We provide a mathematical specification of an extension of Warren's Abstract Machine for executing Prolog to type-constraint logic programming and prove its correctness. Our aim is to provide a full specification and correctness proof of a concrete system, the PROTOS Abstract Machine (PAM), an extension of the WAM by polymorphic order-sorted unification as required by the logic programming language PROTOS-L. In this paper, while leaving the details of the PAM's type constraint representation and solving facilities to a sequel to this work, we keep the notion of types and dynamic type constraints abstract to allow applications to different constraint formalisms like Prolog III or CLP(R). This generality permits us to introduce modular extensions of Borger's and Rosenzweig's formal derivation of the WAM. Since the type constraint handling is orthogonal to the compilation of predicates and clauses, we start from type-constraint Prolog algebras with compiled AND/OR structure that are der...
On the Use of Types in Logic Programming
, 1996
"... In procedural and functional languages it is rather clear what a type error is and the main purpose of typing is to detect programming errors automatically. Furthermore, in these languages the semantics of a program is usually independent of types. Type systems for logic programming languages differ ..."
Abstract
-
Cited by 4 (2 self)
- Add to MetaCart
In procedural and functional languages it is rather clear what a type error is and the main purpose of typing is to detect programming errors automatically. Furthermore, in these languages the semantics of a program is usually independent of types. Type systems for logic programming languages differ considerably on these aspects. We will show that these differences lead to several theoretical and practical problems. The mixture of static type checking purposes on the one hand and computations with type constraints in the CLP(X) style on the other hand will be marked as the central source of problems. As a solution we propose a typing scheme which separates these issues. We distinguish three almost independent dimensions of types in logic programming: types as approximations, types as constraints and types for proving partial correctness. Based on the notion of useless expressions, we develop a method that allows static program analysis for finding type errors, which enables error detec...
A Type-Based Debugging Tool for Untyped Logic Languages
- In: M.Fromherz, A.Kusalik, ��.Nytr�� and St.Prestwich (eds.): Proc. ICLP'95 Workshop on Logic Programming Environments
, 1995
"... This paper presents a method for debugging type errors in untyped logic programs by generating type information based on abstract interpretation with OLDT resolution. The notion "type" is extended to enable the phenomena in logic programs to be described more precisely. The classes Single Types and ..."
Abstract
-
Cited by 1 (1 self)
- Add to MetaCart
This paper presents a method for debugging type errors in untyped logic programs by generating type information based on abstract interpretation with OLDT resolution. The notion "type" is extended to enable the phenomena in logic programs to be described more precisely. The classes Single Types and Collected Types are introduced. An extended OLDT resolution performs combination of derived single types to collected types. Application of the different types for debugging unmodular and modular logic programs is discussed, and an extension of the module interface format proposed. 1 Introduction Having the opportunity to use untyped logic languages is very convenient for the programmer. However, this freedom has some disadvantages, too: Prolog, for example, allows for subtle errors 1 which are hard to locate and often require an expensive debugging process. If, on the other hand, a type system were at hand, most of these errors could be detected at compile time. In this paper we describe...
Lazy Type Checking in Functional Logic Programming
"... In this paper we propose a lazy functional and logic language with a type system combining parametric and inclusion polymorphism. Programs in this language consist of an specication of parametric and ordered types together with a set of type declarations for data constructors and functions and a ..."
Abstract
- Add to MetaCart
In this paper we propose a lazy functional and logic language with a type system combining parametric and inclusion polymorphism. Programs in this language consist of an specication of parametric and ordered types together with a set of type declarations for data constructors and functions and a set of conditional constructor based rewriting rules describing the behaviour of functions, where the conditional part includes data and type conditions. In order to dene the semantics of the language we present a typed rewriting logic by means of two inference calculi, which allow to prove the validity of well-typed formulas w.r.t. a program. The operational semantics of the language is presented by means of a typed lazy narrowing calculus for goal solving which combines equational solving, lazy unication, sharing and type checking. In order to keep up the laziness of the language a lazy type checking is achieved during the goal solving process. We state soundness and complete...

