Need to allow for one spare encoding for the non-executed case with no suitable stores.
[satcheck.git] / equalsrecord.cc
1 /*      Copyright (c) 2015 Regents of the University of California
2  *
3  *      Author: Brian Demsky <bdemsky@uci.edu>
4  *
5  *      This program is free software; you can redistribute it and/or
6  *      modify it under the terms of the GNU General Public License
7  *      version 2 as published by the Free Software Foundation.
8  */
9
10 #include "equalsrecord.h"
11 #include "constraint.h"
12 #include "constgen.h"
13 #include "eprecord.h"
14
15 EqualsRecord::EqualsRecord(ConstGen *cg, EPRecord *eq) : equals(eq) {
16         vars=cg->getNewVar();
17 }
18
19 EqualsRecord::~EqualsRecord() {
20 }
21
22 Constraint * EqualsRecord::getValueEncoding(uint64_t val) {
23         if (val)
24                 return vars;
25         else
26                 return vars->negate();
27 }
28