95,418 research outputs found

    A Logic of Reachable Patterns in Linked Data-Structures

    Get PDF
    We define a new decidable logic for expressing and checking invariants of programs that manipulate dynamically-allocated objects via pointers and destructive pointer updates. The main feature of this logic is the ability to limit the neighborhood of a node that is reachable via a regular expression from a designated node. The logic is closed under boolean operations (entailment, negation) and has a finite model property. The key technical result is the proof of decidability. We show how to express precondition, postconditions, and loop invariants for some interesting programs. It is also possible to express properties such as disjointness of data-structures, and low-level heap mutations. Moreover, our logic can express properties of arbitrary data-structures and of an arbitrary number of pointer fields. The latter provides a way to naturally specify postconditions that relate the fields on entry to a procedure to the fields on exit. Therefore, it is possible to use the logic to automatically prove partial correctness of programs performing low-level heap mutations

    A Brief History of Updates of Answer-Set Programs

    Get PDF
    Funding Information: The authors would like to thank José Alferes, Martin Baláz, Federico Banti, Antonio Brogi, Martin Homola, Luís Moniz Pereira, Halina Przymusinska, Teodor C. Przymusinski, and Theresa Swift, with whom they worked on the topic of this paper over the years, as well as Ricardo Gonçalves and Matthias Knorr for valuable comments on an earlier draft of this paper. The authors would also like to thank the anonymous reviewers for their insightful comments and suggestions, which greatly helped us improve this paper. The authors were partially supported by Fundação para a Ciência e Tecnologia through projects FORGET (PTDC/CCI-INF/32219/2017) and RIVER (PTDC/CCI-COM/30952/2017), and strategic project NOVA LINCS (UIDB/04516/2020). Publisher Copyright: © The Author(s), 2022. Published by Cambridge University Press.Over the last couple of decades, there has been a considerable effort devoted to the problem of updating logic programs under the stable model semantics (a.k.a. answer-set programs) or, in other words, the problem of characterising the result of bringing up-to-date a logic program when the world it describes changes. Whereas the state-of-the-art approaches are guided by the same basic intuitions and aspirations as belief updates in the context of classical logic, they build upon fundamentally different principles and methods, which have prevented a unifying framework that could embrace both belief and rule updates. In this paper, we will overview some of the main approaches and results related to answer-set programming updates, while pointing out some of the main challenges that research in this topic has faced.publishersversionpublishe

    TP-Compilation for inference in probabilistic logic programs

    Get PDF
    We propose TP -compilation, a new inference technique for probabilistic logic programs that is based on forward reasoning. TP -compilation proceeds incrementally in that it interleaves the knowledge compilation step for weighted model counting with forward reasoning on the logic program. This leads to a novel anytime algorithm that provides hard bounds on the inferred probabilities. The main difference with existing inference techniques for probabilistic logic programs is that these are a sequence of isolated transformations. Typically, these transformations include conversion of the ground program into an equivalent propositional formula and compilation of this formula into a more tractable target representation for weighted model counting. An empirical evaluation shows that TP -compilation effectively handles larger instances of complex or cyclic real-world problems than current sequential approaches, both for exact and anytime approximate inference. Furthermore, we show that TP -compilation is conducive to inference in dynamic domains as it supports efficient updates to the compiled model
    corecore