Many applications of graph transformation require rules that change a graph without introducing new consistency violations. When designing such rules, it is natural to think about the desired outcome state, i.e., the desired effect, rather than the specific steps required to achieve it; these steps may vary depending on the specific rule-application context. Existing graph-transformation approaches either require a separate rule to be written for every possible application context or lack the ability to constrain the maximal change that a rule will create. We introduce effect-oriented graph transformation, shifting the semantics of a rule from specifying actions to representing the desired effect. A single effect-oriented rule can encode a large number of induced classic rules. Which of the potential actions is executed depends on the application context; ultimately, all ways lead to Rome. If a graph element to be deleted (created) by a potential action is already absent (present), this action need not be performed because the desired outcome is already present. We formally define effect-oriented graph transformation, show how matches can be computed without explicitly enumerating all induced classic rules, and report on a prototypical implementation of effect-oriented graph transformation in Henshin.
翻译:图变换的许多应用需要既能改变图结构又不引入新一致性违例的规则。在设计此类规则时,自然应着眼于期望的目标状态(即期望的效果),而非实现目标的具体步骤;这些步骤可能因具体的规则应用上下文而异。现有的图变换方法要么需要为每种可能的应用上下文分别编写规则,要么缺乏约束规则所能产生最大变化的能力。我们引入面向效果的图变换,将规则的语义从指定动作转变为表示期望效果。单个面向效果的规则可以编码大量派生出的经典规则。究竟执行哪些潜在动作取决于应用上下文;归根结底,条条大路通罗马。若待删除(创建)的图元素在潜在动作执行前已不存在(已存在),则该动作无需执行,因为期望结果已然达成。我们形式化定义了面向效果的图变换,展示了无需显式枚举所有派生经典规则即可计算匹配的方法,并报告了在Henshin中实现的面向效果图变换原型系统。