A Three-Valued Semantics for Typed Logic Programming
Jo\~ao Barbosa (Faculty of Science of the University of Porto),, M\'ario Florido (Faculty of Science of the University of Porto), V\'itor, Santos Costa (Faculty of Science of the University of Porto)

TL;DR
This paper introduces a three-valued semantics for typed logic programming, incorporating true, false, and a new 'wrong' value to represent runtime type errors, along with a sound type system.
Contribution
It proposes a novel three-valued semantics for logic programming and a corresponding type system that is proven to be semantically sound.
Findings
Semantics includes a 'wrong' value for runtime type errors
Type system is proven sound with respect to the semantics
Program semantics are independent of type semantics
Abstract
Types in logic programming have focused on conservative approximations of program semantics by regular types, on one hand, and on type systems based on a prescriptive semantics defined for typed programs, on the other. In this paper, we define a new semantics for logic programming, where programs evaluate to true, false, and to a new semantic value called wrong, corresponding to a run-time type error. We then have a type language with a separated semantics of types. Finally, we define a type system for logic programming and prove that it is semantically sound with respect to a semantic relation between programs and types where, if a program has a type, then its semantics is not wrong. Our work follows Milner's approach for typed functional languages where the semantics of programs is independent from the semantic of types, and the type system is proved to be sound with respect to a…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsLogic, programming, and type systems · Logic, Reasoning, and Knowledge · Formal Methods in Verification
