def __init__(self, formula, type="plain", name=None):
     """
     Constructor, takes formula, type, and optional name.
     """
     self.formula = formula
     self.type = type
     Derivable.__init__(self, name)
Exemple #2
0
 def __init__(self, literals, type="plain", name=None):
     """
     Initialize the clause.
     """
     self.literals = literals
     self.type = type
     self.evaluation = None
     Derivable.__init__(self, name)
Exemple #3
0
 def __init__(self, literals, type="plain", name=None):
     """
     Initialize the clause.
     """
     self.literals = [l for l in literals if not l.isPropFalse()]
     self.type = type
     self.evaluation = None
     Derivable.__init__(self, name)
Exemple #4
0
        if proofObject:
            proof = res.orderedDerivation()
            enableDerivationOutput()
            print("# SZS output start CNFRefutation")
            for s in proof:
                print(s)
            print("# SZS output end CNFRefutation")
            disableDerivationOutput()
    else:
        if problem.isFof and problem.hasConj:
            print("# SZS status CounterSatisfiable")
        else:
            print("# SZS status Satisfiable")
        if proofObject:
            dummy = Derivable(
                "dummy",
                flatDerivation("pseudoreference", state.processed.clauses))
            sat = dummy.orderedDerivation()
            enableDerivationOutput()
            print("# SZS output start Saturation")
            for s in sat[:-1]:
                print(s)
            print("# SZS output end Saturation")
            disableDerivationOutput()
    print(state.statisticsStr())

    # We use the resources interface to get and print the CPU time
    resources = getrusage(RUSAGE_SELF)
    print("# -------- CPU Time ---------")
    print("# User time          : %.3f s" % (resources.ru_utime, ))
    print("# System time        : %.3f s" % (resources.ru_stime, ))