// Path: 3-sat-core/src/main/java/com/anjlab/sat3/Helper.java
// public static void printFormulas(ObjectArrayList formulas)
// {
//     for (int i = 0; i < formulas.size(); i++)
//     {
//         Helper.prettyPrint((ITabularFormula) formulas.get(i));
//     }
// }


import java.io.OutputStream;
import java.util.Properties;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.OptionBuilder;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.PosixParser;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import cern.colt.list.ObjectArrayList;
import static com.anjlab.sat3.Helper.printFormulas;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

            {
                String resultsFilename = commandLine.getOptionValue(EVALUATE_OPTION);
                boolean satisfiable = evaluateFormula(stopWatch, formula, resultsFilename);
                if (satisfiable)
                {
                    System.out.println("Formula evaluated as SAT");
                }
                else
                {
                    System.out.println("Formula evaluated as UNSAT");
                }
                //  Only evaluate formula value
                return;
            }
            
            //  Find if formula is SAT
            
            //  Clone initial formula to verify formula satisfiability later
            ITabularFormula formulaClone = null;
            if (Helper.EnableAssertions)
            {
                stopWatch.start("Clone initial formula");
                formulaClone = formula.clone();
                stopWatch.stop();
                stopWatch.printElapsed();
            }
            
            stopWatch.start("Create CTF");
            ObjectArrayList ct = Helper.createCTF(formula);
            timeElapsed = stopWatch.stop();

// Path: 3-sat-core/src/main/java/com/anjlab/sat3/Helper.java
// public static void printFormulas(ObjectArrayList formulas)
// {
//     for (int i = 0; i < formulas.size(); i++)
//     {
//         Helper.prettyPrint((ITabularFormula) formulas.get(i));
//     }
// }


// Path: 3-sat-core/src/main/java/com/anjlab/sat3/Program.java
import java.io.OutputStream;
import java.util.Properties;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.OptionBuilder;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.PosixParser;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import cern.colt.list.ObjectArrayList;
import static com.anjlab.sat3.Helper.printFormulas;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

            {
                String resultsFilename = commandLine.getOptionValue(EVALUATE_OPTION);
                boolean satisfiable = evaluateFormula(stopWatch, formula, resultsFilename);
                if (satisfiable)
                {
                    System.out.println("Formula evaluated as SAT");
                }
                else
                {
                    System.out.println("Formula evaluated as UNSAT");
                }
                //  Only evaluate formula value
                return;
            }
            
            //  Find if formula is SAT
            
            //  Clone initial formula to verify formula satisfiability later
            ITabularFormula formulaClone = null;
            if (Helper.EnableAssertions)
            {
                stopWatch.start("Clone initial formula");
                formulaClone = formula.clone();
                stopWatch.stop();
                stopWatch.printElapsed();
            }
            
            stopWatch.start("Create CTF");
            ObjectArrayList ct = Helper.createCTF(formula);
            timeElapsed = stopWatch.stop();

            printFormulas(ct);
