Abstract
Three semantics have been proposed as the most promising candidates for a declarative interpretation for logic programs and pure Prolog programs: the least Herbrand model, the least term model, i.e., the C -semantics, and the I -semantics. Previous results show that a strictly increasing information ordering between these semantics exists for the class of all programs. In particular, the I -semantics allows us to model the computed answer substitutions, which is not the case for the other two. We study here the relationship between these three semantics for specific classes of programs. We show that for a large class of programs (which is Turing complete), these three semantics are isomorphic. As a consequence, given a query, we can extract from the least Herbrand model of a program in this class all computed answer substitutions. However, for specific programs the least Herbrand model is tedious to construct and reason about because it contains “ill-typed” facts. Therefore, we propose a fourth semantics that associates with a “correctly typed” program the “well-typed” subset of its least Herbrand model. This semantics is used to reason about partial correctness and absence of failures of correctly typed programs. The results are extended to programs with arithmetic.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.