How to Kill Epsilons with a Dagger - A Coalgebraic Take on Systems with Algebraic Label Structure (original) (raw)
Related papers
Killing epsilons with a dagger: A coalgebraic study of systems with algebraic label structure
Theoretical Computer Science, 2015
We propose an abstract framework for modeling state-based systems with internal behaviour as e.g. given by silent or epsilon-transitions. Our approach employs monads with a parametrized fixpoint operator † to give a semantics to those systems and implement a sound procedure of abstraction of the internal transitions, whose labels are seen as the unit of a free monoid. More broadly, our approach extends the standard coalgebraic framework for state- based systems by taking into account the algebraic structure of the labels of their transitions. This allows to consider a wide range of other examples, including Mazurkiewicz traces for concurrent systems and non-deterministic transducers.
State Based Systems Are Coalgebras
Universal coalgebra is a mathematical theory of state based systems, which in many respects is dual to universal algebra. Equality must be replaced by indistinguishability. Coinduction replaces induction as a proof principle and maps are defined by co-recursion. In this (entirely self-contained) paper we give a first glimpse at the general theory and focus on some applications in Computer Science. 1. State based systems State based systems can be found everywhere in our environment -- from simple appliances like alarm clocks and answering machines to sophisticated computing devices. Typically, such systems receive some input and, as a result, produce some output. In contrast to purely algebraic systems, however, the output is not only determined by the input received, but also by some modifiable "internal state". Internal states are usually not directly observable, so there may as well be di#erent states that cannot be distinguished from the input-output behavior of the sy...
A Coalgebraic Foundation for Linear Time Semantics
Electronic Notes in Theoretical Computer Science, 1999
We present a coalgebraic approach to trace equivalence semantics based on lifting behaviour endofunctors for deterministic action to Kleisli categories of monads for non-deterministic choice. In Set, this gives a category with ordinary transition systems as objects and with morphisms characterised in terms of a linear notion of bisimulation. The final object in this category is the canonical abstract model for trace equivalence and can be obtained by extending the final coalgebra of the deterministic action behaviour to the Kleisli category of the non-empty powerset monad. The corresponding final coalgebra semantics is fully abstract with respect to trace equivalence.
Generalizing determinization from automata to coalgebras
Logical Methods in Computer Science, 2013
The powerset construction is a standard method for converting a nondeterministic automaton into a deterministic one recognizing the same language. In this paper, we lift the powerset construction from automata to the more general framework of coalgebras with structured state spaces. Coalgebra is an abstract framework for the uniform study of different kinds of dynamical systems. An endofunctor F determines both the type of systems (F -coalgebras) and a notion of behavioural equivalence (∼F ) amongst them. Many types of transition systems and their equivalences can be captured by a functor F . For example, for deterministic automata the derived equivalence is language equivalence, while for non-deterministic automata it is ordinary bisimilarity.
Coalgebraic Aspects of Bidirectional Computation
The Journal of Object Technology, 2017
We have previously (Bx, 2014; MPC, 2015) shown that several statebased bx formalisms can be captured using monadic functional programming, using the state monad together with possibly other monadic effects, giving rise to structures we have called monadic bx (mbx). In this paper, we develop a coalgebraic theory of state-based bx, and relate the resulting coalgebraic structures (cbx) to mbx. We show that cbx support a notion of composition coherent with, but conceptually simpler than, our previous mbx definition. Coalgebraic bisimulation yields a natural notion of behavioural equivalence on cbx, which respects composition, and essentially includes symmetric lens equivalence as a special case. Finally, we speculate on the applications of this coalgebraic perspective to other bx constructions and formalisms. 1 Introduction Many scenarios in computer science involve multiple, partially overlapping, representations of the same data, such that whenever one representation is modified, the others must be updated in order to maintain consistency. Such scenarios arise for example in the context of model-driven software development, databases and string parsing [6]. Various formalisms, collectively known as bidirectional transformations (bx), have been developed to study them, including (a)symmetric lenses [8, 16], relational bx [30], and triple-graph grammars [27]. In recent years, there has been a drive to understand the similarities and differences between these formalisms [18]; and a few attempts have been made to give a unified treatment. In previous work [5, an extended abstract] and [1, to appear], we outlined a unified theory, with examples, of various accounts of bx in the literature, in terms of computations defined monadically using Haskell's do-notation. The idea is to interpret a bx between two data sources A and B (subject to some consistency relation R ⊆ A × B) relative to some monad M representing computational effects, in terms of operations, get L : MA and set L : A → M (), and similarly get R , set R for B , which allow lookups and updates on both A and B while maintaining R. We defined an effectful bx over a monad M in terms of these four operations, written as t : A ⇐⇒ M B , subject to several equations in line with the Plotkin-Power equational theory of state [23]. The key difference is that in a bidirectional context, the sources A and B are interdependent, or entangled : updates to A (via set L) should in general affect B , and vice versa. Thus we must abandon some of the Plotkin-Power equations; for instance, one no longer expects set L to commute with set R. To distinguish our earlier effectful bx from the coalgebraic treatment to be developed in this paper, we will refer to them as monadic bx, or simply mbx, from now on. We showed that several well-known bx formalisms may be described by monadic bx for the particular case of the state monad, M S X = S → (X × S), called State S in Haskell. Moreover, we introduced a new class of bx: monadic bx with effects, expressed in terms of the monad transformer counterpart T M S to M S (called StateT S M in Haskell), where T M S X = S → M (X × S) builds on some monad M , such as I/O. We defined
Notions of Computation Determine Monads
2002
We model notions of computation using algebraic operations and equations. We show that these generate several of the monads of primary interest that have been used to model computational effects, with the striking omission of the continuations monad. We focus on semantics for global and local state, showing that taking operations and equations as primitive yields a mathematical relationship that reflects their computational relationship. This work is supported by EPSRC grant GR/M56333 and a British Council grant. may also prove useful when manipulating programs, e.g., for optimisation. We regard it as positive that there are no algebraic operations and equations in the sense of the theorem yielding the continuations monad, taking that as reflecting its differing computational nature.
Well-abstracted transition systems: application to FIFO automata
Information and Computation, 2003
Formal methods based on symbolic representations have been found to be very effective. In the case of infinite state systems, there has been a great deal of interest in accelerations -a technique for characterizing the result of iterating an execution sequence an arbitrary number of times, in a sound, but not necessarily complete, way. We propose the use of abstractions as a general framework to design accelerations. We investigate SemiLinear Regular Expressions (SLREs) as symbolic representations for FIFO automata. In particular, we show that: (a) SLREs are easy to manipulate, (b) SLREs form the core of known FIFO symbolic representations, and (c) SLREs are sufficient to represent the effect of arbitrary iterations of a loop for FIFO automata with one channel.
Initial algebra and final coalgebra semantics for concurrency
A Decade of Concurrency Reflections and Perspectives, 1994
The aim of this paper is to relate initial algebra semantics and final coalgebra semantics. It is shown how these two approaches to the semantics of programming languages are each others dual, and some conditions are given under which they coincide. More precisely, it is shown how to derive initial semantics from final semantics, using the initiality and finality to ensure their equality. Moreover, many facts about congruences (on algebras) and (generalized) bisimulations (on coalgebras) are shown to be dual as well.
An algebraic and algorithmic method for analysing transition systems
Theoretical Computer Science, 1986
To describe significant properties of concurrent processes a formal algebra is defined whose terms are interpreted, in transition systems, as effectively computable functions of power algebras of sets of states and transitions. We study the expressive power of this formal system and compare it with temporal logics.
An abstract monadic semantics for value recursion
RAIRO - Theoretical Informatics and Applications, 2004
This paper proposes an operational semantics for value recursion in the context of monadic metalanguages. Our technique for combining value recursion with computational effects works uniformly for all monads. The operational nature of our approach is related to the implementation of recursion in Scheme and its monadic version proposed by Friedman and Sabry, but it defines a different semantics and does not rely on assignments. When contrasted to the axiomatic approach proposed by Erkök and Launchbury, our semantics for the continuation monad invalidates one of the axioms, adding to the evidence that this axiom is problematic in the presence of continuations.