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.
Decidability of logic program semantics and applications to testing
RUGGIERI, SALVATORE
1996-01-01
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.I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.