11 research outputs found

    Logic Programming in Tabular Allegories

    Get PDF
    We develop a compilation scheme and categorical abstract machine for execution of logic programs based on allegories, the categorical version of the calculus of relations. Operational and denotational semantics are developed using the same formalism, and query execution is performed using algebraic reasoning. Our work serves two purposes: achieving a formal model of a logic programming compiler and efficient runtime; building the base for incorporating features typical of functional programming in a declarative way, while maintaining 100% compatibility with existing Prolog programs

    Exploiting parallelism in coalgebraic logic programming

    Get PDF
    We present a parallel implementation of Coalgebraic Logic Programming (CoALP) in the programming language Go. CoALP was initially introduced to reflect coalgebraic semantics of logic programming, with coalgebraic derivation algorithm featuring both corecursion and parallelism. Here, we discuss how the coalgebraic semantics influenced our parallel implementation of logic programming

    Category theoretic semantics for theorem proving in logic programming: embracing the laxness

    Get PDF
    A propositional logic program P may be identified with aP f P f -coalgebra on the set of atomic propositions in the program. Thecorresponding C(P f P f )-coalgebra, where C(P f P f ) is the cofree comonadon P f P f , describes derivations by resolution. Using lax semantics, thatcorrespondence may be extended to a class of first-order logic programswithout existential variables. The resulting extension captures the proofsby term-matching resolution in logic programming. Refining the lax ap-proach, we further extend it to arbitrary logic programs. We also exhibita refinement of Bonchi and Zanasi’s saturation semantics for logic pro-gramming that complements lax semantics.<br/

    Compositional Semantics for Probabilistic Programs with Exact Conditioning

    Full text link
    We define a probabilistic programming language for Gaussian random variables with a first-class exact conditioning construct. We give operational, denotational and equational semantics for this language, establishing convenient properties like exchangeability of conditions. Conditioning on equality of continuous random variables is nontrivial, as the exact observation may have probability zero; this is Borel's paradox. Using categorical formulations of conditional probability, we show that the good properties of our language are not particular to Gaussians, but can be derived from universal properties, thus generalizing to wider settings. We define the Cond construction, which internalizes conditioning as a morphism, providing general compositional semantics for probabilistic programming with exact conditioning.Comment: 16 pages, 5 figure

    Category theoretic semantics for theorem proving in logic programming: embracing the laxness

    Get PDF
    A propositional logic program PP may be identified with a PfPfP_fP_f-coalgebra on the set of atomic propositions in the program. The corresponding C(PfPf)C(P_fP_f)-coalgebra, where C(PfPf)C(P_fP_f) is the cofree comonad on PfPfP_fP_f, describes derivations by resolution. Using lax semantics, that correspondence may be extended to a class of first-order logic programs without existential variables. The resulting extension captures the proofs by term-matching resolution in logic programming. Refining the lax approach, we further extend it to arbitrary logic programs. We also exhibit a refinement of Bonchi and Zanasi's saturation semantics for logic programming that complements lax semantics.Comment: 20 pages, CMCS 201

    Logic programming: Laxness and Saturation

    Get PDF

    Bialgebraic Semantics for Logic Programming

    Get PDF
    Bialgebrae provide an abstract framework encompassing the semantics of different kinds of computational models. In this paper we propose a bialgebraic approach to the semantics of logic programming. Our methodology is to study logic programs as reactive systems and exploit abstract techniques developed in that setting. First we use saturation to model the operational semantics of logic programs as coalgebrae on presheaves. Then, we make explicit the underlying algebraic structure by using bialgebrae on presheaves. The resulting semantics turns out to be compositional with respect to conjunction and term substitution. Also, it encodes a parallel model of computation, whose soundness is guaranteed by a built-in notion of synchronisation between different threads

    Logic programming:Laxness and saturation

    Get PDF
    A propositional logic program P may be identified with a P f P f -coalgebra on the set of atomic propositions in the program. The corresponding C(P f P f )-coalgebra, where C(P f P f ) is the cofree comonad on P f P f , describes derivations by resolution. That correspondence has been developed to model first-order programs in two ways, with lax semantics and saturated semantics, based on locally ordered categories and right Kan extensions respectively. We unify the two approaches, exhibiting them as complementary rather than competing, reflecting the theorem-proving and proof-search aspects of logic programming. While maintaining that unity, we further refine lax semantics to give finitary models of logic programs with existential variables, and to develop a precise semantic relationship between variables in logic programming and worlds in local state
    corecore