English

Implementing Binary Search Trees in GP 2 (Extended Abstract)

Programming Languages 2026-01-08 v1 Data Structures and Algorithms

Abstract

We present an approach to implement binary search trees in the rule-based graph programming language GP 2. Our implementation uses GP 2's rooted graph transformation rules to be fast and supports insertion, deletion and query operations. We argue that the worst-case runtime for each of the operations is O(n) for a tree with n nodes. In addition, we expect that, on average, the operations run in time O(log(n)). Hence the implementation would match the time complexity of binary search trees implementations in imperative languages.

Keywords

Cite

@article{arxiv.2601.03897,
  title  = {Implementing Binary Search Trees in GP 2 (Extended Abstract)},
  author = {Ziad Ismaili Alaoui and Detlef Plump},
  journal= {arXiv preprint arXiv:2601.03897},
  year   = {2026}
}

Comments

In Proceedings GCM 2025, arXiv:2601.03249

R2 v1 2026-07-01T08:54:18.218Z