Skip to content

contificate/algorithm-d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Algorithm D

An implementation of Algorithm D as described in Pattern Matching in Trees by Hoffmann and O'Donnell.

screenshot

The algorithm works by constructing an Aho-Corasick automaton for a set of root-to-leaf "path strings" from the pattern tree(s). Then, the subject tree is traversed in pre-order using a traversal stack. At each output, the match length can be used to index the traversal stack to find the relevant subtree. If, by the end, the number of path string matches equals the number of path strings, then there's a match.

Usage

javac *.java && java Main

About

Implementation of tree matching using Algorithm D

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages