4 research outputs found

    Recursive Rules with Aggregation: A Simple Unified Semantics

    Full text link
    Complex reasoning problems are most clearly and easily specified using logical rules, especially recursive rules with aggregation such as counts and sums for practical applications. Unfortunately, the meaning of such rules has been a significant challenge, leading to many different conflicting semantics. This paper describes a unified semantics for recursive rules with aggregation, extending the unified founded semantics and constraint semantics for recursive rules with negation. The key idea is to support simple expression of the different assumptions underlying different semantics, and orthogonally interpret aggregation operations straightforwardly using their simple usual meaning

    Theory of partial-order programming

    Get PDF
    This paper shows the use of partial-order program clauses and lattice domains for declarative programming. This paradigm is particularly useful for expressing concise solutions to problems from graph theory, program analysis, and database querying. These applications are characterized by a need to solve circular constraints and perform aggregate operations, a capability that is very clearly and efficiently provided by partial-order clauses. We present a novel approach to their declarative and operational semantics, as well as the correctness of the operational semantics. The declarative semantics is model-theoretic in nature, but the least model for any function is not the classical intersection of all models, but the greatest lower bound/least upper bound of the respective terms defined for this function in the different models. The operational semantics combines top-down goal reduction with memo-tables. In the partial-order programming framework, however, memoization is primarily needed in order to detect circular circular function calls. In general we need more than simple memoization when functions are defined circularly in terms of one another through monotonic functions. In such cases, we accumulate a set of functional-constraint and solve them by general fixed-point-finding procedure. In order to prove the correctness of memoization, a straightforward induction on the length of the derivation will not suffice because of the presence of the memo-table. However, since the entries in the table grow monotonically, we identify a suitable table invariant that captures the correctness of the derivation. The partial-order programming paradigm has been implemented and all examples shown in this paper have been tested using this implementation

    Extending the Well-Founded and Valid Semantics for Aggregation

    No full text
    We present a very general technique for defining semantics for programs that use aggregation. We use the technique to extend the well-founded semantics and the valid semantics, both of which were designed to provide semantics for programs with negation, to handle programs that contain possibly recursive use of aggregation. The generalization is based on a simple but powerful idea of aggregation on three-valued multisets. The use of three-valued multisets makes our extended well-founded semantics, which we call aggregate-wellfounded semantics, easier to understand and more intuitive, in our opinion, than the extension of well-founded models by Van Gelder [14]. 1 Introduction In recent years there has been much interest in defining semantics for deductive databases/logic programs that use negation and aggregation. We call such programs extended logic programs. Early approaches restricted the class of programs to those that are stratified in some fashion [1, 8, 12]. More recent approache..
    corecore