public static void main(String[] args) {		
		//make sure we're passed the correct arguments
		if(args.length != 1) { 
			System.out.println("Incorrect number of arguments - given " + args.length);
			System.out.println("Correct usage: java SsatSolver <ssat file>");
			System.out.print("Given : '");
			for(String s : args) System.out.print(s + " ");
			System.out.println("'");
			System.exit(0);
		}

		//start timing
		long startTime = System.currentTimeMillis();

		//read the SSAT formula
		readFormula(args[0]);

		//check if we start out with any unit clauses
		for(Clause c : clauses) {
			c.checkUnitness();
		}

		if(DEBUG) {
			//print out the clauses for debug purposes
			System.out.println("Read in the formula with " + clauses.size() + " clauses:");
			for(Clause c : clauses) {
				System.out.println(c);
			}
			System.out.println("");

			//print out the variables in order
			for(int i = 1; i < variables.size(); i++) {
				System.out.println(variables.get(i).getName() + "\t" + variables.get(i).getChanceTrue());
			}
		}

		//solve the formula
		Vector<Assignment> satAssignments = DPLL();

		//stop timing
		long stopTime = System.currentTimeMillis();

		//calculate and print out time taken
		double totalTime = (stopTime - startTime) / 1000.0;
		System.out.println("Time Taken = " + totalTime + " seconds.");

		//print out the assignment.
		printAssignments(satAssignments);
		//print out the total probablily of this plan, or if we don't have satisfaction
		double overallProb = Assignment.getTotalProbability(satAssignments);
		if(overallProb == 0.0) {
			System.out.println("No Satisfaction :-(");
		} else {
			System.out.println("Success Probability = " + overallProb);
		}

	}