initial algebra semantics
Recently Published Documents


TOTAL DOCUMENTS

15
(FIVE YEARS 3)

H-INDEX

6
(FIVE YEARS 0)

2022 ◽  
Vol 6 (POPL) ◽  
pp. 1-29
Author(s):  
Marcelo Fiore ◽  
Dmitrij Szamozvancev

Despite extensive research both on the theoretical and practical fronts, formalising, reasoning about, and implementing languages with variable binding is still a daunting endeavour – repetitive boilerplate and the overly complicated metatheory of capture-avoiding substitution often get in the way of progressing on to the actually interesting properties of a language. Existing developments offer some relief, however at the expense of inconvenient and error-prone term encodings and lack of formal foundations. We present a mathematically-inspired language-formalisation framework implemented in Agda. The system translates the description of a syntax signature with variable-binding operators into an intrinsically-encoded, inductive data type equipped with syntactic operations such as weakening and substitution, along with their correctness properties. The generated metatheory further incorporates metavariables and their associated operation of metasubstitution, which enables second-order equational/rewriting reasoning. The underlying mathematical foundation of the framework – initial algebra semantics – derives compositional interpretations of languages into their models satisfying the semantic substitution lemma by construction.


2021 ◽  
Vol vol. 23 no. 1 (Automata, Logic and Semantics) ◽  
Author(s):  
Zoltán Fülöp ◽  
Dávid Kószó ◽  
Heiko Vogler

We consider weighted tree automata (wta) over strong bimonoids and their initial algebra semantics and their run semantics. There are wta for which these semantics are different; however, for bottom-up deterministic wta and for wta over semirings, the difference vanishes. A wta is crisp-deterministic if it is bottom-up deterministic and each transition is weighted by one of the unit elements of the strong bimonoid. We prove that the class of weighted tree languages recognized by crisp-deterministic wta is the same as the class of recognizable step mappings. Moreover, we investigate the following two crisp-determinization problems: for a given wta ${\cal A}$, (a) does there exist a crisp-deterministic wta which computes the initial algebra semantics of ${\cal A}$ and (b) does there exist a crisp-deterministic wta which computes the run semantics of ${\cal A}$? We show that the finiteness of the Nerode algebra ${\cal N}({\cal A})$ of ${\cal A}$ implies a positive answer for (a), and that the finite order property of ${\cal A}$ implies a positive answer for (b). We show a sufficient condition which guarantees the finiteness of ${\cal N}({\cal A})$ and a sufficient condition which guarantees the finite order property of ${\cal A}$. Also, we provide an algorithm for the construction of the crisp-deterministic wta according to (a) if ${\cal N}({\cal A})$ is finite, and similarly for (b) if ${\cal A}$ has finite order property. We prove that it is undecidable whether an arbitrary wta ${\cal A}$ is crisp-determinizable. We also prove that both, the finiteness of ${\cal N}({\cal A})$ and the finite order property of ${\cal A}$ are undecidable.


2020 ◽  
Author(s):  
Jan Aldert Bergstra ◽  
John V. Tucker

In an arithmetical structure one can make division a total function by defining 1/0 to be an element of the structure, or by adding a new element, such as an error element also denoted with a new constant symbol, an unsigned infinity or one or both signed infinities, one positive and one negative. We define an enlargement of a field to a transfield, in which division is totalised by setting 1/0 equal to the positive infinite value and -1/0 equal to its opposite, and which also contains an error element to help control their effects. We construct the transrational numbers as a transfield of the field of rational numbers and consider it as an abstract data type. We give it an equational specification under initial algebra semantics.


Author(s):  
ROBERT ATKEY ◽  
PATRICIA JOHANN

AbstractThe study of programming with and reasoning about inductive datatypes such as lists and trees has benefited from the simple categorical principle of initial algebras. In initial algebra semantics, each inductive datatype is represented by an initial f-algebra for an appropriate functor f. The initial algebra principle then supports the straightforward derivation of definitional principles and proof principles for these datatypes. This technique has been expanded to a whole methodology of structured functional programming, often called origami programming.In this article we show how to extend initial algebra semantics from pure inductive datatypes to inductive datatypes interleaved with computational effects. Inductive datatypes interleaved with effects arise naturally in many computational settings. For example, incrementally reading characters from a file generates a list of characters interleaved with input/output actions, and lazily constructed infinite values can be represented by pure data interleaved with the possibility of non-terminating computation. Straightforward application of initial algebra techniques to effectful datatypes leads either to unsound conclusions if we ignore the possibility of effects, or to unnecessarily complicated reasoning because the pure and effectful concerns must be considered simultaneously. We show how pure and effectful concerns can be separated using the abstraction of initial f-and-m-algebras, where the functor f describes the pure part of a datatype and the monad m describes the interleaved effects. Because initial f-and-m-algebras are the analogue for the effectful setting of initial f-algebras, they support the extension of the standard definitional and proof principles to the effectful setting.Initial f-and-m-algebras are originally due to Filinski and Støvring, who studied them in the category Cpo. They were subsequently generalised to arbitrary categories by Atkey, Ghani, Jacobs, and Johann in a FoSSaCS 2012 paper. In this article we aim to introduce the general concept of initial f-and-m-algebras to a general functional programming audience.


2010 ◽  
Vol 20 (3-4) ◽  
pp. 353-373 ◽  
Author(s):  
GRAHAM HUTTON ◽  
MAURO JASKELIOFF ◽  
ANDY GILL

AbstractThe worker/wrapper transformation is a general technique for improving the performance of recursive programs by changing their types. The previous formalisation (A. Gill & G. Hutton, J. Funct. Program., vol. 19, 2009, pp. 227–251) was based upon a simple fixed-point semantics of recursion. In this paper, we develop a more structured approach, based upon initial-algebra semantics. In particular, we show how the worker/wrapper transformation can be applied to programs defined using the structured pattern of recursion captured by fold operators, and illustrate our new technique with a number of examples.


Sign in / Sign up

Export Citation Format

Share Document