import java.util.*; import java.util.zip.*; import java.util.List; import java.util.regex.*; import java.util.concurrent.*; import java.util.concurrent.atomic.*; import javax.swing.*; import javax.swing.event.*; import javax.swing.text.*; import javax.swing.table.*; import java.io.*; import java.net.*; import java.lang.reflect.*; import java.lang.ref.*; import java.lang.management.*; import java.security.*; import java.security.spec.*; import java.awt.*; import java.awt.event.*; import java.awt.image.*; import javax.imageio.*; import java.math.*; import gnu.prolog.vm.*; import gnu.prolog.term.*; public class main { public static void main(String[] args) throws Exception { Environment env = new Environment(); // load stuff... Interpreter interpreter = env.createInterpreter(); env.runInitialization(interpreter); Term term = AtomTerm.get("true"); print(interpreter.runOnce(term)); } static StringBuffer local_log = new StringBuffer(); // not redirected static volatile StringBuffer print_log = local_log; // might be redirected, e.g. to main bot static void print() { print(""); } static void print(Object o) { String s = String.valueOf(o) + "\n"; local_log.append(s); if (print_log != local_log && print_log != null) print_log.append(s); System.out.print(s); } static void print(long l) { print(String.valueOf(l)); } }