Well-Typed Logic Programs Are not Wrong

Computer Science – Logic in Computer Science

Scientific paper

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

21 pages, 7 figures

Scientific paper

We consider prescriptive type systems for logic programs (as in Goedel 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.

No associations

LandOfFree

Say what you really think

Search LandOfFree.com for scientists and scientific papers. Rate them and share your experience with other people.

Rating

Well-Typed Logic Programs Are not Wrong does not yet have a rating. At this time, there are no reviews or comments for this scientific paper.

If you have personal experience with Well-Typed Logic Programs Are not Wrong, we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Well-Typed Logic Programs Are not Wrong will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFWR-SCP-O-374495

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.