1,419 research outputs found

    Partial arithmetical data types of rational numbers and their equational specification

    Get PDF
    Upon adding division to the operations of a field we obtain a meadow. It is conventional toview division in a field as a partial function, which complicates considerably its algebra andlogic. But partiality is one out of a plurality of possible design decisions regarding division.Upon adding a partial division function ÷ to a field Q of rational numbers we obtain apartial meadow Q (÷) of rational numbers that qualifies as a data type. Partial data typesbring problems for specifying and programming that have led to complicated algebraicand logical theories – unlike total data types. We discuss four different ways of providingan algebraic specification of this important arithmetical partial data type Q (÷) via thealgebraic specification of a closely related total data type. We argue that the specificationmethod that uses a common meadow of rational numbers as the total algebra is themost attractive and useful among these four options. We then analyse the problem ofequality between expressions in partial data types by examining seven notions of equalitythat arise from our methods alone. Finally, based on the laws of common meadows, wepresent an equational calculus for working with fracterms that is of general interest outsideprogramming theory

    A Complete Finite Equational Axiomatisation of the Fracterm Calculus for Common Meadows

    Full text link
    We analyse abstract data types that model numerical structures with a concept of error. Specifically, we focus on arithmetic data types that contain an error flag ⊥\bot whose main purpose is to always return a value for division. To rings and fields we add a division operator x/yx/y and study a class of algebras called \textit{common meadows} wherein x/0=⊥x/0 = \bot. The set of equations true in all common meadows is named the \textit{fracterm calculus of common meadows}. We give a finite equational axiomatisation of the fracterm calculus of common meadows and prove that it is complete and that the fracterm calculus is decidable

    Global semantic typing for inductive and coinductive computing

    Get PDF
    Inductive and coinductive types are commonly construed as ontological (Church-style) types, denoting canonical data-sets such as natural numbers, lists, and streams. For various purposes, notably the study of programs in the context of global semantics, it is preferable to think of types as semantical properties (Curry-style). Intrinsic theories were introduced in the late 1990s to provide a purely logical framework for reasoning about programs and their semantic types. We extend them here to data given by any combination of inductive and coinductive definitions. This approach is of interest because it fits tightly with syntactic, semantic, and proof theoretic fundamentals of formal logic, with potential applications in implicit computational complexity as well as extraction of programs from proofs. We prove a Canonicity Theorem, showing that the global definition of program typing, via the usual (Tarskian) semantics of first-order logic, agrees with their operational semantics in the intended model. Finally, we show that every intrinsic theory is interpretable in a conservative extension of first-order arithmetic. This means that quantification over infinite data objects does not lead, on its own, to proof-theoretic strength beyond that of Peano Arithmetic. Intrinsic theories are perfectly amenable to formulas-as-types Curry-Howard morphisms, and were used to characterize major computational complexity classes Their extensions described here have similar potential which has already been applied

    A systematic study of models of abstract data types

    Get PDF
    AbstractThe term-generated models of an abstract data type can be represented by congruence relations on the term algebra. Total and partial heterogeneous algebras are considered as models of hierarchical abstract data types.Particular classes of models are studied and it is investigated under which conditions they form a complete lattice. This theory allows also to describe programming languages (and their semantic models) by abstract types. As example we present a simple deterministic stream processing language
    • …
    corecore