public static void main(String[] args) {
    	Parser p = null; // the parser and builder of the circuit
    	Formatter f = null; // the parser and builder of the IO
    	BufferedReader br = null; // Reads from stdio
    	int[] dumm = new int[2];

    	// Load logging configuration file
    	PropertyConfigurator.configure(MyUtil.pathFile("SFE_logcfg.lcf"));

    	if (args.length != 2) 
    		parserUsage();

    	String circuit_filename = args[0] + ".Opt.circuit";
    	String fmt_filename = args[0] + ".Opt.fmt";
    	String sseed = args[1];

    	// Parse the circuit file and prepare the circuit
 
        FileReader fr = null;
        StreamTokenizer st = null;

        try {
            // Preparations
            fr = new FileReader(circuit_filename);
            st = new StreamTokenizer(fr);
            MyUtil.init(sseed);

            // Parsing
            p = new Parser(st);
            p.parse();

            // Clean-up
            fr.close();
        } catch (IOException e) {
            logger.error("main: cannot open/close " + circuit_filename + " - " +
                e.getMessage());
        } catch (ParseError e) {
            logger.error("main: parsing " + circuit_filename + " failed.");
        } catch (Exception e) {
            logger.error("main: exception - " + e.getMessage());
        }
        
        // Parse the IOformat file and prepare the inputs
        //
        FileReader fmt = null;
        StreamTokenizer fmtst = null;

        try {
            // Preparations
            fmt = new FileReader(fmt_filename);
            fmtst = new StreamTokenizer(fmt);

            // IO Formatting
            f = new Formatter(fmtst);
            f.parse();

            // Clean-up
            fmt.close();
        } catch (IOException e) {
            logger.error("main: cannot open/close " + fmt_filename + " - " +
                e.getMessage());
        } catch (FormatterError e) {
            logger.error("main: parsing " + fmt_filename + " failed.");
        } catch (Exception e) {
            logger.error("main: exception - " + e.getMessage());
        }

        // now do something with the circuit!
        Circuit c = p.getCircuit();
        f.markIO (c, dumm);        
        c.generateEncCircuit();

        br = new BufferedReader(new InputStreamReader(System.in));

        System.out.println("start input for Alice");
        f.getAliceInput(c, br); // get Alice's input
        System.out.println("start input for Bob");
        f.getBobInput(c, br); // get Bob's input

        //c.evalCircuit();
        c.evalGarbledCircuit(true, true);

        f.getAliceOutput(c, null); // print Alice's output
        f.getBobOutput(c, null); // print Bob's output
    }