SAT-Based Algorithms for Regular Graph Pattern Matching

Miguel Terra-Neves, José Amaral, Alexandre Lemos, Rui Quintino, Pedro Resende +1 more
12/15/2023
cs.AI

No confident code implementation found for this paper.

Abstract

Graph matching is a fundamental problem in pattern recognition, with many applications such as software analysis and computational biology. One well-known type of graph matching problem is graph isomorphism, which consists of deciding if two graphs are identical. Despite its usefulness, the properties that one may check using graph isomorphism are rather limited, since it only allows strict equality checks between two graphs. For example, it does not allow one to check complex structural properties such as if the target graph is an arbitrary length sequence followed by an arbitrary size loop. We propose a generalization of graph isomorphism that allows one to check such properties through a declarative specification. This specification is given in the form of a Regular Graph Pattern (ReGaP), a special type of graph, inspired by regular expressions, that may contain wildcard nodes that represent arbitrary structures such as variable-sized sequences or subgraphs. We propose a SAT-based algorithm for checking if a target graph matches a given ReGaP. We also propose a preprocessing technique for improving the performance of the algorithm and evaluate it through an extensive experimental evaluation on benchmarks from the CodeSearchNet dataset.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{terraneves2023satbased,
  title  = {SAT-Based Algorithms for Regular Graph Pattern Matching},
  author = {Miguel Terra-Neves and José Amaral and Alexandre Lemos and Rui Quintino and Pedro Resende and Antonio Alegria},
  year   = {2023},
  eprint = {2312.09995},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2312.09995v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2312.09995.svg)](https://codeofpaper.com/paper/2312.09995)

Discussion