• Open Access IconOpen Access
  • Cite Icon8
  • https://doi.org/10.1007/3-540-44716-4_18Copy DOI Icon

Well-Typed Logic Programs Are not Wrong

  • Jan 1, 2001
  • Pierre Deransart +1 more
Show More
  • Abstract
  • Literature Map
  • References
  • Citations
  • Similar Papers
Abstract

We consider prescriptive type systems for logic programs (as in Godel or Mercury). In such systems, the typing is static, but it guarantees an operational property: if a program is well-typed, then all derivations starting in a well-typed query are again well-typed. This property has been called subject reduction. We show that this property can also be phrased as a property of the proof-theoretic semantics of logic programs, thus abstracting from the usual operational (top-down) semantics. This proof-theoretic view leads us to questioning a condition which is usually considered necessary for subject reduction, namely the head condition. It states that the head of each clause must have a type which is a variant (and not a proper instance) of the declared type. We provide a more general condition, thus reestablishing a certain symmetry between heads and body atoms. The condition ensures that in a derivation, the types of two unified terms are themselves unifiable. We discuss possible implications of this result. We also discuss the relationship between the head condition and polymorphic recursion, a concept known in functional programming.

Similar Papers
  • Conference Article
  • Citations9

Moded type systems for logic programming

  • Jan 01, 1989
  • K A Yelick +1
  • Book Chapter

A bottom-up reconstruction of the well-founded semantics for disjunctive logic programs

  • Jan 01, 1994
  • Cristian Papp
  • Research Article
  • Citations101

Partial evaluation of functional logic programs

  • Jul 01, 1998
  • ACM Transactions on Programming Languages and Systems
  • María Alpuente +2
  • Book Chapter
  • Citations24

A fibrational semantics for logic programs

  • Jan 01, 1996
  • Y Kinoshita +1
  • Research Article
  • Citations1

A game semantics for disjunctive logic programming

  • Jul 01, 2013
  • Annals of Pure and Applied Logic
  • Thanos Tsouanas
  • Research Article
  • Citations42

Semantics of infinite tree logic programming

  • Jan 01, 1986
  • Theoretical Computer Science
  • Joxan Jaffar +1
  • Book Chapter

The Head Condition and Polymorphic Recursion

  • Jan 01, 2002
  • Jan-Georg Smaus
  • Book Chapter
  • Citations8

Introducing Constraint Functional Logic Programming

  • Jan 01, 1992
  • John Darlington +2
  • Book Chapter
  • Citations10

Semantics for Dynamic Logic Programming: A Principle-Based Approach

  • Jan 01, 2003
  • José J Alferes +3
  • Research Article

Let Generalization, Polymorphic Recursion, and Variable Minimization in Boolean-Kinded Type Systems

  • Jan 08, 2026
  • Proceedings of the ACM on Programming Languages
  • Joseph Zullo
  • Research Article
  • Citations4

The intricacies of three-valued extensional semantics for higher-order logic programs

  • Aug 23, 2017
  • Theory and Practice of Logic Programming
  • Panos Rondogiannis +1
  • Research Article
  • Citations8

Three-valued completion for abductive logic programs

  • Sep 01, 1996
  • Theoretical Computer Science
  • Frank Teusink
  • Book Chapter

A First Order Logic for Logic Programming

  • Jan 01, 1987
  • J. J. Moreno Navarro +1
  • Book Chapter
  • Citations1

Default Rules for Curry

  • Jan 01, 2016
  • Sergio Antoy +1
  • Research Article
  • Citations8

Default rules for Curry

  • Jul 01, 2016
  • Theory and Practice of Logic Programming
  • Sergio Antoy +1
Cactus Communications logo

Copyright 2026 Cactus Communications. All rights reserved.