Recent logic programming languages employ dynamic scheduling of calls to improve efficiency of programs. Dynamic scheduling is realized by allowing some calls to be dynamically "delayed" until their arguments are sufficiently instantiated. To this end, logic languages are extended with constructs such as delay declarations. However, many declarative properties that hold for logic and pure Prolog programs do not apply any longer in this extended setting. In particular, the equivalence between the model theoretic and operational semantics does not hold. We study the class of input-consuming programs. Firstly, we argue that input-consuming logic programs are suitable for modeling programs employing delay declarations. Secondly, we show that under some syntactic restrictions the-semantics of a program is correct and fully abstract also for input-consuming programs. This allows us to conclude that for a large class of programs employing delay declarations there exists a model theoretic semantics which is equivalent to the operational one. Thus, input-consuming programs are shown to be the right answer for conjugate efficiency and declarativeness.
- Logic Programming
- Dynamic scheduling