Abstract
We consider the decidability problem of logic program semantics, focusing in particular on the least Herbrand model, the least term model and the S-semantics. A declarative characterization is given for a large class of programs whose semantics are decidable sets. In addition, we show how decidability is strongly related to (black box) testing. In our terminology, the testing problem consists of checking whether or not the formal semantics of a program includes a given finite set of atoms. We show that the testing problem for a program is decidable iff its formal semantics is a decidable set.
Interestingly, the decision procedure used to check whether an atom belongs to the S-semantics of a program has a natural implementation in the logic programming paradigm itself, in the form of a Prolog metaprogram. Consequently, this provides us with a basic tool for testing. Theory and tools are refined to consider the use of non-standard predicates, such as arithmetic built-in's and the meta-predicate demo.
Preview
Unable to display preview. Download preview PDF.
References
K.R. Apt. Logic programming. In J. van Leeuwen, editor, Handbook of Theoretical Computer Science, volume B, pages 493–574. Elsevier, 1990.
K.R. Apt, M. Gabbrielli, and D. Pedreschi. A Closer Look at Declarative Interpretations. Technical Report CS-R9470, Centre for Mathematics and Computer Science, Amsterdam, 1994. To appear in Journal of Logic Programming.
K.R. Apt and E. Marchiori. Reasoning about Prolog programs: from modes through types to assertions. Formal Aspects of Computing, 6A:743–764, 1994.
K.R. Apt and D. Pedreschi. Studies in Pure Prolog: Termination. In J. W. Lloyd, editor, Symposium on Computational Logic. Springer-Verlag, Berlin, 1990.
A. Bossi, M. Gabbrielli, G. Levi, and M. Martelli. The S-semantics Approach: Theory and Applications. Journal of Logic Programming, 19, 20:149–197, 1994.
L. Bougè, N. Choquet, L. Fribourg, and M. Gaudel. Test sets generation from algebraic specifications using logic programming. Journal of System and Software, 6(4), 1986.
M. Bruynooghe. A Practical Framework for the Abstract Interpretation of Logic Programs. New Generation Computing, 10(2):91–124, 1991.
K.L. Clark. Predicate logic as a computational formalism. Technical Report DOC 79/59, Imperial College, Dept. of Computing, 1979.
M. Comini, G. Levi, and G. Vitiello. Efficient detection of incompleteness errors in the abstract debugging of logic programs. In AADEBUG'95, 1995.
M. Falaschi, G. Levi, M. Martelli, and C. Palamidessi. A Model-Theoretic Reconstruction of the Operational Semantics of Logic Programs. Information and Computation, 102(1):86–113, 1993.
M. Gorlick, C.F. Kesselman, D. Marotta, and D. Stott Parker. MOCKINGBIRD: A Logical Methodology for Testing. Journal of Logic Programming, 8(1,2), 1990.
G. Levi and D. Ramundo. A Formalization of Metaprogramming for Real. In D.S. Warren, editor, Proceedings Tenth International Conference on Logic Programming, pages 354–373. The MIT Press, 1993.
L. Naish. Declarative Diagnosis of Missing Answers. New Generation Computing, 10:255–285, 1991.
D. Pedreschi and S. Ruggieri. Termination is language-independent. In M. Alpuente et. al., editor, Proc. of the GULP-PRODE'94 Joint Conference on Declarative Programming. Univ. Politecnica de Valencia, 1994.
D. Pedreschi and S. Ruggieri. Verification of Metainterpreters. Technical Report TR-96-23, Dipartimento di Informatica, Università di Pisa, 1996. Accepted for publication in Journal of Logic and Computation.
J. Shoenfield. Mathematical logic. Addison Wesdley, Reading, 1967.
L. Sterling and E. Shapiro. The Art of Prolog. The MIT Press, 1986.
J.D. Ulmann and A. van Gelder. Efficient tests for top-down termination of logical rules. Journal of the ACM, 35(2):345–373, 1988.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1996 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Ruggieri, S. (1996). Decidability of logic program semantics and applications to testing. In: Kuchen, H., Doaitse Swierstra, S. (eds) Programming Languages: Implementations, Logics, and Programs. PLILP 1996. Lecture Notes in Computer Science, vol 1140. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-61756-6_96
Download citation
DOI: https://doi.org/10.1007/3-540-61756-6_96
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-61756-3
Online ISBN: 978-3-540-70654-0
eBook Packages: Springer Book Archive