summaryrefslogtreecommitdiff
path: root/src/proof/sat_proof.h
diff options
context:
space:
mode:
authorlianah <lianahady@gmail.com>2013-05-10 18:23:20 -0400
committerlianah <lianahady@gmail.com>2013-05-10 18:23:27 -0400
commitd4c5c5d06f71958fcca6e561b7eade8fd72f7304 (patch)
treeb6fce44c439a5ee46a69a6802d0d1cff46937871 /src/proof/sat_proof.h
parent38216791c43f9be4afecbc700548d1dbba63acb0 (diff)
now proofs print mapping between atom and propositional variable as a comment in LFSC
Diffstat (limited to 'src/proof/sat_proof.h')
-rw-r--r--src/proof/sat_proof.h24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/proof/sat_proof.h b/src/proof/sat_proof.h
index a552b66fd..fb8966400 100644
--- a/src/proof/sat_proof.h
+++ b/src/proof/sat_proof.h
@@ -26,6 +26,8 @@
#include <ext/hash_map>
#include <ext/hash_set>
#include <sstream>
+#include "expr/expr.h"
+
namespace Minisat {
class Solver;
@@ -90,6 +92,8 @@ typedef std::vector < ResChain* > ResStack;
typedef std::hash_set < int > VarSet;
typedef std::set < ClauseId > IdSet;
typedef std::vector < ::Minisat::Lit > LitVector;
+typedef __gnu_cxx::hash_map<Expr, ::Minisat::Lit, ExprHashFunction > AtomToVar;
+
class SatProof;
class ProofProxy : public ProofProxyAbstract {
@@ -128,7 +132,10 @@ protected:
// unit conflict
ClauseId d_unitConflictId;
- bool d_storedUnitConflict;
+ bool d_storedUnitConflict;
+
+ // atom mapping
+ AtomToVar d_atomToVar;
public:
SatProof(::Minisat::Solver* solver, bool checkRes = false);
protected:
@@ -223,12 +230,20 @@ public:
*/
void storeUnitResolution(::Minisat::Lit lit);
- ProofProxy* getProxy() {return d_proxy; }
+ ProofProxy* getProxy() {return d_proxy; }
+ /**
+ * At mapping between literal and theory-atom it represents
+ *
+ * @param literal
+ * @param atom
+ */
+ void storeAtom(::Minisat::Lit literal, Expr atom);
};/* class SatProof */
class LFSCSatProof: public SatProof {
private:
- VarSet d_seenVars;
+ VarSet d_seenVars;
+ std::ostringstream d_atomsSS;
std::ostringstream d_varSS;
std::ostringstream d_lemmaSS;
std::ostringstream d_clauseSS;
@@ -246,11 +261,12 @@ private:
void printVariables();
void printClauses();
void flush(std::ostream& out);
-
+ void printAtoms();
public:
LFSCSatProof(::Minisat::Solver* solver, bool checkRes = false):
SatProof(solver, checkRes),
d_seenVars(),
+ d_atomsSS(),
d_varSS(),
d_lemmaSS(),
d_paren(),
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback