import java.sql.SQLException; import java.util.*; import java.io.*; import Zql.*; public class testing { public static void main(String args[]) { Atom a1 = new Atom(new String("x"),new String(">"),10); Atom a2 = new Atom(new String("y"),new String("<"),20); Atom a3 = new Atom(new String("z"),new String(">"),15); Atom a4 = new Atom(new String("x"),new String("<="),15); Atom a5 = new Atom(new String("t"),new String("="),0); Atom a6 = new Atom(new String("a"),new String("<"),15); Atom b1 = new Atom(new String("x"),new String("="),new String("y")); Atom b2 = new Atom(new String("x"),new String(">"),new String("z")); // try > Atom b3 = new Atom(new String("t"),new String("<"),new String("y")); Vector type1 = new Vector(); type1.add(a1); type1.add(a2); type1.add(a3); type1.add(a4); type1.add(a5); type1.add(a6); Vector type2 = new Vector(); type2.add(b1); type2.add(b2); type2.add(b3); Satisfy stf = new Satisfy(type1,type2); System.out.println(stf.isQuerySatisfiable()); type1.addAll(type2); stf = new Satisfy(type1); System.out.println(stf.isQuerySatisfiable()); /* try { ZqlParser p = null; if(args.length < 1) { System.out.println("Reading SQL from stdin (quit; or exit; to quit)"); p = new ZqlParser(System.in); } else { p = new ZqlParser(new DataInputStream(new FileInputStream(args[0]))); } // Read all SQL statements from input ZStatement st; while((st = p.readStatement()) != null) { System.out.println(st.toString()); // Display the statement if(st instanceof ZQuery) { // An SQL query QueryObject ob = new QueryObject((ZQuery)st,1); System.out.println(ob.getSqlquery() + "hello sir"); } } } catch(Exception e) {e.printStackTrace();} */ } }