package JavaAgent.resource.fopl.test;


import JavaAgent.resource.fopl.*;
import java.util.*;
import java.io.*;


class Triangle {
  public static void main(String[] args) {
    try {

      FormulaSet kb = FormulaSet.parse(
          new FileInputStream("triangle.kb"));
      kb.writeToStream(System.out);

      Formula query = Formula.parse(
          "(=> (AND (Triangle a b c) (SegmentEq a c b c))" +
          "    (AngleEq c a b c b a))");
      kb.setTraceStream(System.out);
      if (kb.evaluate(query))
	System.out.println("True!");
      else
	System.out.println("Fail!");

      } catch (Exception e) {
	System.out.println("Test failed: " + e.getMessage());
      }
  }
}
