52 research outputs found

    Generalising KAT to verify weighted computations

    Get PDF
    Kleene algebra with tests (KAT) was introduced as an algebraic structure to model and reason about classic imperative programs, i.e. sequences of discrete transitions guarded by Boolean tests. This paper introduces two generalisations of this structure able to express programs as weighted transitions and tests with outcomes in non necessarily bivalent truth spaces: graded Kleene algebra with tests (GKAT) and a variant where tests are also idempotent (I-GKAT). In this context, and in analogy to Kozen's encoding of Propositional Hoare Logic (PHL) in KAT we discuss the encoding of a graded PHL in I-GKAT and of its while-free fragment in GKAT. Moreover, to establish semantics for these structures four new algebras are de ned: FSET (T ), FREL(K; T ) and FLANG(K; T ) over complete residuated lattices K and T , and M(n;A) over a GKAT or I-GKAT A. As a nal exercise, the paper discusses some program equivalence proofs in a graded context.POCI-01-0145-FEDER-03094, NORTE-01-0145-FEDER-000037. ERDF – European Regional Development Fund through the Operational Programme for Competitiveness and Internationalisation - COMPETE 2020 Programme and by National Funds through the Portuguese funding agency, FCT - Fundação para a Ciência e a Tecnologia, within project POCI-01-0145-FEDER-030947. This paper is also a result of the project SmartEGOV, NORTE-01-0145-FEDER-000037. The second author is supported in the scope of the framework contract foreseen in the numbers 4, 5 and 6 of the article 23, of the Decree-Law 57/2016, of August 29, changed by Portuguese Law 57/2017, of July 19, at CIDMA (Centro de Investigação e Desenvolvimento em Matemática e Aplicações) UID/MAT/04106/2019

    On kleene algebras for weighted computation

    Get PDF
    Kleene algebra with tests (KAT) was introduced as an alge- braic structure to model and reason about classic imperative programs, i.e. sequences of discrete actions guarded by Boolean tests. This paper introduces two generalisations of this structure able to ex- press programs as weighted transitions and tests with outcomes in a not necessary bivalent truth space, namely graded Kleene algebra with tests (GKAT) and Heyting Kleene algebra with tests (HKAT). On these contexts, in analogy to Kozen's encoding of Propositional Hoare Logic (PHL) in KAT [10], we discuss the encoding of a graded PHL in HKAT and of its while-free fragment in GKAT.This work is financed by the ERDF - European Regional Development Fund through the Operational Programme for Competitiveness and Internationalisation - COMPETE 2020 Programme and by National Funds through the Portuguese funding agency, FCT - Fundacao para a Ciencia e a Tecnologia, within projects POCI-01-0145-FEDER-016692 and UID/MAT/04106/2013. The second author is also supported by the individual grant SFRH/BPD/103004/2014

    Weighted programming: A programming paradigm for specifying mathematical models

    Get PDF
    We study weighted programming, a programming paradigm for specifying mathematical models. More specifically, the weighted programs we investigate are like usual imperative programs with two additional features: (1) nondeterministic branching and (2) weighting execution traces. Weights can be numbers but also other objects like words from an alphabet, polynomials, formal power series, or cardinal numbers. We argue that weighted programming as a paradigm can be used to specify mathematical models beyond probability distributions (as is done in probabilistic programming). We develop weakest-precondition- and weakest-liberal-precondition-style calculi à la Dijkstra for reasoning about mathematical models specified by weighted programs. We present several case studies. For instance, we use weighted programming to model the ski rental problem - an optimization problem. We model not only the optimization problem itself, but also the best deterministic online algorithm for solving this problem as weighted programs. By means of weakest-precondition-style reasoning, we can determine the competitive ratio of the online algorithm on source code level

    Probabilistic Guarded KAT Modulo Bisimilarity: Completeness and Complexity

    Get PDF
    We introduce Probabilistic Guarded Kleene Algebra with Tests (ProbGKAT), an extension of GKAT that allows reasoning about uninterpreted imperative programs with probabilistic branching. We give its operational semantics in terms of special class of probabilistic automata. We give a sound and complete Salomaa-style axiomatisation of bisimilarity of ProbGKAT expressions. Finally, we show that bisimilarity of ProbGKAT expressions can be decided in O(n3 log n) time via a generic partition refinement algorithm

    Probabilistic Guarded KAT Modulo Bisimilarity: Completeness and Complexity

    Get PDF

    A semantics and a logic for Fuzzy Arden Syntax

    Get PDF
    Fuzzy programming languages, such as the Fuzzy Arden Syntax (FAS), are used to describe behaviours which evolve in a fuzzy way and thus cannot be characterized neither by a Boolean outcome nor by a probability distribution. This paper introduces a semantics for FAS, focusing on the weighted parallel interpretation of its conditional statement. The proposed construction is based on the notion of a fuzzy multirelation which associates with each state in a program a fuzzy set of weighted possible evolutions. The latter is parametric on a residuated lattice which models the underlying semantic ‘truth space’. Finally, a family of dynamic logics, equally parametric on the residuated lattice, is introduced to reason about FAS programsThis work was founded by the ERDF — European Regional Development Fund through the Operational Programme for Competitiveness and Internationalisation — COMPETE 2020 Pro gramme and by National Funds through the Portuguese funding agency, FCT — Fundação para a Ciência e a Tecnologia, within projects POCI-01-0145-FEDER-030947and POCI-01-0145-FEDER-02994

    Categorical Modelling of Logic Programming: Coalgebra, Functorial Semantics, String Diagrams

    Get PDF
    Logic programming (LP) is driven by the idea that logic subsumes computation. Over the past 50 years, along with the emergence of numerous logic systems, LP has also grown into a large family, the members of which are designed to deal with various computation scenarios. Among them, we focus on two of the most influential quantitative variants are probabilistic logic programming (PLP) and weighted logic programming (WLP). In this thesis, we investigate a uniform understanding of logic programming and its quan- titative variants from the perspective of category theory. In particular, we explore both a coalgebraic and an algebraic understanding of LP, PLP and WLP. On the coalgebraic side, we propose a goal-directed strategy for calculating the probabilities and weights of atoms in PLP and WLP programs, respectively. We then develop a coalgebraic semantics for PLP and WLP, built on existing coalgebraic semantics for LP. By choosing the appropriate functors representing probabilistic and weighted computation, such coalgeraic semantics characterise exactly the goal-directed behaviour of PLP and WLP programs. On the algebraic side, we define a functorial semantics of LP, PLP, and WLP, such that they three share the same syntactic categories of string diagrams, and differ regarding to the semantic categories according to their data/computation type. This allows for a uniform diagrammatic expression for certain semantic constructs. Moreover, based on similar approaches to Bayesian networks, this provides a framework to formalise the connection between PLP and Bayesian networks. Furthermore, we prove a sound and complete aximatization of the semantic category for LP, in terms of string diagrams. Together with the diagrammatic presentation of the fixed point semantics, one obtain a decidable calculus for proving the equivalence between propositional definite logic programs

    Foundations of Software Science and Computation Structures

    Get PDF
    This open access book constitutes the proceedings of the 23rd International Conference on Foundations of Software Science and Computational Structures, FOSSACS 2020, which took place in Dublin, Ireland, in April 2020, and was held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2020. The 31 regular papers presented in this volume were carefully reviewed and selected from 98 submissions. The papers cover topics such as categorical models and logics; language theory, automata, and games; modal, spatial, and temporal logics; type theory and proof theory; concurrency theory and process calculi; rewriting theory; semantics of programming languages; program analysis, correctness, transformation, and verification; logics of programming; software specification and refinement; models of concurrent, reactive, stochastic, distributed, hybrid, and mobile systems; emerging models of computation; logical aspects of computational complexity; models of software security; and logical foundations of data bases.
    • …
    corecore