
/**
 * testFChain.java
 *
 */

import sheffield.*;
import java.util.*;
import pmatch.*;


public class TestFChain{
 public static void main(String[] arg) {
   // create objects for input and output
   EasyWriter scr = new EasyWriter();
   
   String[] ss = {"qqq","www"};
   scr.println(ss[0]);
   scr.println(ss.length);
   
   //make some rules
   Vector gfantes= new Vector();
   gfantes.add("?gf father of ?p");
   gfantes.add("?p parent of ?c");
   Rule gfrule = new Rule (gfantes, "?gf grandfather of ?c");
   
   Vector fpantes = new Vector();
   fpantes.add("?f father of ?c");
   Rule fprule = new Rule (fpantes, "?f parent of ?c");
   
   ArrayList rset = new ArrayList();
   rset.add(fprule);
   rset.add(gfrule);
   
   RuleSet rs = new RuleSet(rset); //maybe not needed
   
   //make a fchain engine
   FChain fc=new FChain(rset);
   
   //initial facts
   
   Vector facts = new Vector();
   facts.add("H7 father of H8");
   facts.add("H8 father of E");
   
   Vector res=fc.run_FC(facts);
   scr.println(res);
   
  }
}