Coalgebraic Aspects of Bidirectional Computation

By: Faris Abou-Saleh, James McKinna, Jeremy Gibbons


We have previously shown that several state-based 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.


bidirectional transformation, lens, monads, effects, bisimulation

Cite as:

Faris Abou-Saleh, James McKinna, Jeremy Gibbons, “Coalgebraic Aspects of Bidirectional Computation”, Journal of Object Technology, Volume 16, no. 1 (February 2017), pp. 1:1-29, doi:10.5381/jot.2017.16.1.a1.

PDF | DOI | BiBTeX | Tweet this | Post to CiteULike | Share on LinkedIn