Skip to content

Commit 32bb577

Browse files
committed
Build
1 parent 01d1273 commit 32bb577

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

html/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ <h1>Arjun Functional Synthesis in Your Browser</h1>
174174
try {
175175
console.log('Running with args:', e.data.args);
176176
Module.FS.writeFile('/input.cnf', e.data.input);
177-
var args = ['--verb', '3', '--synth'].concat(e.data.extraArgs || []).concat(['/input.cnf']);
177+
var args = ['--verb', '1', '--synth'].concat(e.data.extraArgs || []).concat(['/input.cnf']);
178178
Module.callMain(args);
179179
postMessage({ type: 'done' });
180180
} catch (e) {

scripts/build_emscripten.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set -e
33

44
rm -rf lib* Test* tests* include tests CM* cmake* arjun Makefile rjun-src
5-
emcmake cmake -DCMAKE_INSTALL_PREFIX=$EMINSTALL -DEXTRA_SYNTH=OFF ..
5+
emcmake cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$EMINSTALL -DEXTRA_SYNTH=OFF ..
66
emmake make -j26
77
emmake make install
88
cp arjun.wasm ../html

src/manthan.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1772,7 +1772,7 @@ void Manthan::inject_formulas_into_solver() {
17721772
vector<Lit> cl2;
17731773
for(const auto& l: cl.lits) {
17741774
auto v = l.var();
1775-
if (to_define_full.count(v)) { cl2.push_back(Lit(y_to_y_hat[v], l.sign()));}
1775+
if (to_define_full.count(v)) { cl2.push_back(Lit(y_to_y_hat.at(v), l.sign()));}
17761776
else cl2.push_back(l);
17771777
}
17781778
cex_solver.add_clause(cl2);
@@ -1790,7 +1790,7 @@ void Manthan::inject_formulas_into_solver() {
17901790
assert(var_to_formula.count(y));
17911791
for(const auto& cl: var_to_formula[y].clauses) assert(cl.inserted && "All clauses must have been inserted");
17921792
const auto& form_out = var_to_formula[y].out;
1793-
const auto& y_hat = y_to_y_hat[y];
1793+
const auto& y_hat = y_to_y_hat.at(y);
17941794

17951795
y_hat_to_indic[y_hat] = ind;
17961796
indic_to_y_hat[ind] = y_hat;
@@ -1858,6 +1858,13 @@ bool Manthan::get_counterexample(sample& ctx) {
18581858
if (ret == l_True) {
18591859
verb_print(2, COLYEL "[manthan] *** Counterexample found ***");
18601860
ctx = cex_solver.get_model();
1861+
cout << "ctx: ";
1862+
for(auto v : ctx) {
1863+
if (v == l_Undef) cout << "U ";
1864+
else if (v == l_True) cout << "T ";
1865+
else cout << "F ";
1866+
}
1867+
cout << endl;
18611868
compute_needs_repair(ctx);
18621869
assert(!needs_repair.empty() && "If we found a counterexample, there must be something to repair!");
18631870
return false;

src/synth.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,9 +259,7 @@ void SynthRunner::run_manthan_strategies(
259259
<< (mconf.max_repairs ? std::string("unlimited") : std::to_string(mconf.max_repairs)));
260260
cnf = arjun->standalone_manthan(cnf, mconf);
261261
if (cnf.synth_done()) {
262-
verb_print(1,"Manthan finished with "
263-
<< (mconf.max_repairs == std::numeric_limits<uint32_t>::max() ? "unlimited" : std::to_string(mconf.max_repairs))
264-
<< " repairs for strategy " << i << "/" << strategies.size()-1
262+
verb_print(1,"Manthan finished with strategy " << i << "/" << strategies.size()-1
265263
<< " -- " << strat.raw);
266264
break;
267265
}

0 commit comments

Comments
 (0)