// Create arguments
Term prolog = SymbolTerm.makeSymbol(_prolog);
Term wam = SymbolTerm.makeSymbol(_wam);
Term op = Prolog.Nil;
if (eliminateDisjunctions) {
op = new ListTerm(SymbolTerm.makeSymbol("ed"), op);
}
if (arithmeticCompilation) {
op = new ListTerm(SymbolTerm.makeSymbol("ac"), op);
}
if (inlineExpansion) {
op = new ListTerm(SymbolTerm.makeSymbol("ie"), op);
}
if (optimiseRecursiveCall) {
op = new ListTerm(SymbolTerm.makeSymbol("rc"), op);
}
if (switchOnHash) {
op = new ListTerm(SymbolTerm.makeSymbol("idx"), op);
}
if (generateClosure) {
op = new ListTerm(SymbolTerm.makeSymbol("clo"), op);
}
Term[] args = { new ListTerm(prolog, new ListTerm(wam,
new ListTerm(op, Prolog.Nil))) };
// Create predicate
Class clazz = new PrologClassLoader().loadPredicateClass(
"jp.ac.kobe_u.cs.prolog.compiler.pl2am", "pl2am", 1, true);
Predicate code = (Predicate) clazz.newInstance();
// Translate Prolog into WAM