Skip to content

reubencornel/treediff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

treediff

This library implements the algorithm described by Chawathe et al in the following paper

Usage

  1. Implement the Node interface for nodes in your tree
  2. Implement a MatchingCriteria based on the tree you want to diff.
  3. Instantiate an instance of DefaultMatch or FastMatch. At this point the FastMatch implementation is slower than DefaultMatch. I have to spend time profiling it.
  4. Calculate a matching by calling calculateMatching on the DefaultMatch instance.
  5. Instantiate an instance of EditScriptAlgorithm passing in the matching obtained in the previous step and an instance of SimpleLCSAlgorithm
  6. Call calculateEditScript to get a the edit script for your tree

Look at EditScriptAlgorithmTest.case1() for an example of what your code should look like.

About

A Java library that generates an edit script of differences between two trees

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages