In this paper we propose a logic-based, framework inspired by artificial intelligence, but scaled down for practical database and programming applications. Computation in the framework is viewed as the task of generating a sequence of state transitions, with the purpose of making an agent's goals all true. States are represented by sets of atomic sentences (or facts), representing the values of program variables, tuples in a coordination language, facts in relational databases, or Herbrand models.In the model-theoretic semantics, the entire sequence of states and events are combined into a single model-theoretic structure, by associating timestamps with facts and events. But in the operational semantics, facts are updated destructively, without timestamps. We show that the model generated by destructive updates is identical to the model generated by reasoning with facts containing timestamps. We also extend the model with intentional predicates and composite event predicates defined by logic programs containing conditions in first-order logic, which query the current state.
§1 IntroductionIn this paper, we present a computational framework that uses logic for state transition systems. Although the approach has its origins in research about representing and reasoning about states, actions and events in artificial intelligence, it has been scaled-down to make it suitable for more conventional computer applications. It builds on logic programming, but includes imperative language features, including reactive rules and destructive change of state.In earlier versions 29,30,31,32) of this work, we referred to the framework as LPS, to highlight its focus on providing a Logic-based approach to Production Systems. In this paper, for the sake of continuity, we retain the name LPS, although the intended applications of the approach have been extended considerably. These applications include its use for agent programming, active databases, concurrent systems, and composite (or complex) event processing.The paper is organised as follows: Section 2 presents an overview of the framework, and Section 3 illustrates the framework by means of examples. Section 4 defines the language more formally, and Section 5 presents the operational semantics and discusses our implementations. Section 6 discusses soundness and completeness. In particular, it shows that destructive updates in LPS generate the same models as the frame axiom. Sections 7 and 8 discuss related and future work.Compared with earlier papers, the main contributions of this paper are its more rigorous treatment of the semantics of reactive rules and logic programs