# A Unification Algorithm for GP 2 (Long Version)

**Authors:** Ivaylo Hristakiev, Detlef Plump

arXiv: 1705.02171 · 2017-05-08

## TL;DR

This paper introduces a complete, sound, and terminating unification algorithm for GP 2 expressions, enabling static conflict analysis of graph programs by solving equations involving attributed graph labels.

## Contribution

It presents the first rule-based unification algorithm for GP 2 expressions that handles associativity and unit laws, ensuring finitary solutions for conflict detection.

## Key findings

- Algorithm is sound, complete, and terminating.
- Generates a finite set of solutions for each input equation.
- Handles unification modulo associativity and unit law.

## Abstract

The graph programming language GP 2 allows to apply sets of rule schemata (or "attributed" rules) non-deterministically. To analyse conflicts of programs statically, graphs labelled with expressions are overlayed to construct critical pairs of rule applications. Each overlay induces a system of equations whose solutions represent different conflicts. We present a rule-based unification algorithm for GP expressions that is terminating, sound and complete. For every input equation, the algorithm generates a finite set of substitutions. Soundness means that each of these substitutions solves the input equation. Since GP labels are lists constructed by concatenation, unification modulo associativity and unit law is required. This problem, which is also known as word unification, is infinitary in general but becomes finitary due to GP's rule schema syntax and the assumption that rule schemata are left-linear. Our unification algorithm is complete in that every solution of an input equation is an instance of some substitution in the generated set.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1705.02171/full.md

## Figures

21 figures with captions in the complete paper: https://tomesphere.com/paper/1705.02171/full.md

## References

14 references — full list in the complete paper: https://tomesphere.com/paper/1705.02171/full.md

---
Source: https://tomesphere.com/paper/1705.02171