Esempio n. 1
0
 // compileSimpleClause can be used in order to implement assert(...) operations
 public Program compileSimpleClause(String programCode) {
   Vector programList = stringToList(programCode);
   CompilerStructure struc = new CompilerStructure();
   if ((clause(programList, struc)) && (programList.size() == 0)) {
     CompilerStructure program = new CompilerStructure();
     program.type = program.PROGRAM;
     program.head = struc;
     updateNames(program);
     return structureToCode(program);
   } else return null;
 } // end of PrologCompiler.compileSimpleClause(String)