use of suite.lp.doer.Specializer in project suite by stupidsing.
the class LogicCompilerLevel1Test method testCompileFunProgram.
/**
* Compiles the functional compiler and use it to compile a simple functional
* program.
*/
@Test
public void testCompileFunProgram() {
RuleSet rs = Suite.newRuleSet(List.of("auto.sl", "fc/fc.sl"));
String gs = //
"" + //
"source .in" + //
", compile-function .0 .in .out" + ", sink .out";
Node goal = new Specializer().specialize(Suite.substitute(gs, Atom.of("LAZY")));
Node input = Suite.parse("1 + 2");
Node result = FindUtil.collectSingle(finder(rs, goal), input);
System.out.println(result);
assertNotNull(result);
}
Aggregations