RISC JKU

Library download page

<< Return to the main page

Usage example (formatted by java2html):
Reader in1 = new StringReader("a.f(a,a,b)"); // Use FileReader instead
Reader in2 = new StringReader("a.f(a,b,b)"); // Use FileReader instead
Reader inN = new StringReader("a#X"); // Use FileReader instead
Reader inA = new StringReader("c,d"); // Use FileReader instead

final NodeFactory factory = new NodeFactory();
EquationSystem<AntiUnifyProblem> eqSys = new EquationSystem<AntiUnifyProblem>() {
	public AntiUnifyProblem newEquation(NominalTerm t, NominalTerm s) {
		return new AntiUnifyProblem(t, s, factory);
	}
};
FreshnessCtx nablaIn = new InputParser(factory).parseEquationAndCtx(in1, in2, inA, inN, eqSys);

new AntiUnify(eqSys, nablaIn, DebugLevel.SILENT, factory) {
	public void callback(AntiUnifySystem res, Variable var) {
		System.out.println(res.getNablaGen());
		System.out.println(res.getSigma().get(var));
	};
}.antiUnify(false, null);


Author: Alexander Baumgartner FWF Der Wissenschaftsfond
Project: SToUT - Symbolic Computation Techniques for Unranked Terms