Commutators for Stochastic Rewriting Systems: Theory and Implementation in Z3

by   Nicolas Behr, et al.

In the semantics of stochastic rewriting systems (SRSs) based on rule algebras, the evolution equations for average expected pattern counts are computed via so-called commutators counting the distinct sequential compositions of rules and observable patterns regarded as identity rules. In this paper, we consider the commutators for conditional SRS in the Sesqui-Pushout (SqPO) approach. However, graphs are often subject to constraints. To minimise the construction of spurious compositions prohibited by such constraints, we develop strategies for computing rule composition, both theoretically and using the SMT solver Z3 with its Python interface. Our two equivalent solutions for checking constraints include a straightforward generate-and-test approach based on forbidden graph patterns and a modular solution, where the patterns are decomposed as pushouts of monic spans into forbidden relation patterns. The implementation is based on a framework that allows a direct and modular representation of the categorical and logical theory in Python/Z3. For an example of SqPO rewriting of rigid multigraphs modelling polymer formation in organic chemistry, we assess and compare the performance of the two strategies.


page 1

page 2

page 3

page 4


POTATO: exPlainable infOrmation exTrAcTion framewOrk

We present POTATO, a task- and languageindependent framework for human-i...

Rewriting Theory for the Life Sciences: A Unifying Theory of CTMC Semantics (Long version)

The Kappa biochemistry and the MØD organic chemistry frameworks are amon...

Visualizing modular forms

We describe practical methods to visualize modular forms. We survey seve...

Rewriting Theory for the Life Sciences: A Unifying Theory of CTMC Semantics

The Kappa biochemistry and the MØD organo-chemistry frameworks are among...

On Nested Justification Systems (full version)

Justification theory is a general framework for the definition of semant...

Unification in Matching Logic - Extended Version

Matching Logic is a framework for specifying programming language semant...

Computing with Modular Robots

Propagating patterns are used to transfer and process information in che...