410 research outputs found

    A denotational semantics and dataflow construction for logic programs

    Get PDF
    AbstractWe present a denotational semantics for a logic program to construct a dataflow for the logic program. The dataflow is defined as an algebraic manipulator of idempotent substitutions and it virtually reflects the resolution deductions

    Analyzing logic programs with dynamic scheduling

    Get PDF
    Traditional logic programming languages, such as Prolog, use a fixed left-to-right atom scheduling rule. Recent logic programming languages, however, usually provide more flexible scheduling in which computation generally proceeds leftto- right but in which some calis are dynamically "delayed" until their arguments are sufRciently instantiated to allow the cali to run efficiently. Such dynamic scheduling has a significant cost. We give a framework for the global analysis of logic programming languages with dynamic scheduling and show that program analysis based on this framework supports optimizations which remove much of the overhead of dynamic scheduling

    Mechanized semantics

    Get PDF
    The goal of this lecture is to show how modern theorem provers---in this case, the Coq proof assistant---can be used to mechanize the specification of programming languages and their semantics, and to reason over individual programs and over generic program transformations, as typically found in compilers. The topics covered include: operational semantics (small-step, big-step, definitional interpreters); a simple form of denotational semantics; axiomatic semantics and Hoare logic; generation of verification conditions, with application to program proof; compilation to virtual machine code and its proof of correctness; an example of an optimizing program transformation (dead code elimination) and its proof of correctness

    Abstract Machine for a Comonadic Dataflow Language

    Get PDF
    The formal semantics of higher-order functional dataflow language programs can be represented with the concepts of arrows and comonads from category theory. Both of these methods convey the meaning of programs, but not the operational behaviour of them. In order to understand the operational behaviour of dataflow programs we will derive an abstract machine from an interpreter that is equivalent to a comonadic denotational semantics of a higher-order call-by-name dataflow language. The resulting abstract machine is identical to the well known abstract machine by Krivine with the exception of an overloaded notion of the environment and two additional transition rules for evaluating constructs specific to the dataflow language. The main result of this thesis is that the operational behaviour of call-by-name dataflow language programs is identical to the operational behaviour of regular non-strict languages

    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

    Nové knihy

    Get PDF
    corecore