Graph transformation theory relies upon the composition of rules to express the effects of sequences of rules. In practice, graphs are often subject to constraints, ruling out many candidates for composed rules. Focusing on the case of sesqui-pushout (SqPO) semantics, we develop a number of alternative strategies for computing compositions, each theoretically and with an implementation via the Python API of the Z3 theorem prover. The strategies comprise a straightforward generate-and-test strategy based on forbidden graph patterns, a variant with a more implicit logical encoding of the negative constraints, and a modular strategy, where the patterns are decomposed as forbidden relation patterns. For a toy model of polymer formation in organic chemistry, we compare the performance of the three strategies in terms of execution times and memory consumption.
翻译:图表转换理论依靠规则的构成来表达规则序列的效果。 实际上,图表往往受到制约,排除了许多组成规则的候选者。 我们把重点放在sesquipushout(SqPO)语义学上,我们制定了一些计算构成的替代战略,每个战略都是理论上的,并且通过Z3 理论证明的Python API来实施。这些战略包括基于被禁止的图形模式的直截了当的生成和测试战略,一个含有更隐含的负面制约逻辑编码的变量和一个模块化战略,其模式被分解为被禁止的关系模式。对于有机化学中聚合物形成的一个微量模型,我们比较了这三种战略的执行时间和记忆消耗的绩效。