-
Notifications
You must be signed in to change notification settings - Fork 7
added option to pass candidate functions #34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
kuldeepmeel
wants to merge
29
commits into
aig-shared-ptr-better-fix
Choose a base branch
from
input_guesses
base: aig-shared-ptr-better-fix
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 24 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
6f2d663
added option to pass candidate functions
kuldeepmeel 547c4a4
Adding an assert
msoos 3f180b4
Cleanup
msoos b2fa586
Initial BVA
msoos 3405c7d
Silent var update
msoos 2779b72
Update fuzzer to match new options
msoos e5de3db
Fixing bug about bw equal forcing
msoos c5d9955
Let's set to 4, seems best
msoos 189e4de
Update strategy matrix
msoos 80a9fd4
More fuzz
msoos 21976ff
edits
kuldeepmeel aa83290
Initial BVA
msoos 5a6b7af
Going back to old strategy numbering
msoos 812ac5e
Fix strategy label after cherry-pick conflict resolution
kuldeepmeel 55941de
Merge branch 'aig-shared-ptr-better-fix' into input_guesses
kuldeepmeel 5156579
fixed numbering due to merge
kuldeepmeel 31dd021
Use classified input set in unate synthesis
kuldeepmeel a616cfb
balanced AIG construction to avoid segfault due to deep recursion
kuldeepmeel 860aefc
rerun backward synthesis after unate_def with dependency-aware predef…
kuldeepmeel 6c38c9c
moving from assumptions to clauses
kuldeepmeel 091121c
edits
kuldeepmeel ad8f088
Merge branch 'input_guesses' into tmp
msoos 53602a1
Cleanup unate_def
msoos b4279c8
Merge branch 'aig-shared-ptr-better-fix' into input_guesses-fixes
msoos b8daad2
Merge
msoos d858259
Taking out the part that is balancing AIGs
msoos 68ca086
Fixing mapping
msoos 76af7e0
Update
msoos 0c1d685
Merge branch 'aig-shared-ptr-better-fix' into input_guesses
msoos File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -48,7 +48,19 @@ void MyTracer::add_derived_clause(uint64_t id, bool /*red*/, const std::vector<i | |
|
|
||
| const uint64_t id1 = rantec[0]; | ||
| auto aig = fs_clid[id1]; | ||
| release_assert(aig != nullptr); | ||
| set<Lit> resolvent(cls[id1].begin(),cls[id1].end()); | ||
| std::vector<aig_ptr> same_op_terms; | ||
| bool same_op_is_and = false; | ||
| bool same_op_started = false; | ||
|
|
||
| auto flush_terms = [&]() { | ||
| if (!same_op_started) return; | ||
| aig = combine_balanced(std::move(same_op_terms), same_op_is_and); | ||
| same_op_terms.clear(); | ||
| same_op_started = false; | ||
| }; | ||
|
||
|
|
||
| for(uint32_t i = 1; i < rantec.size(); i++) { | ||
| if (conf.verb >= 4) { | ||
| cout << "resolvent: "; for(const auto& l: resolvent) cout << l << " "; cout << endl; | ||
|
|
@@ -70,9 +82,24 @@ void MyTracer::add_derived_clause(uint64_t id, bool /*red*/, const std::vector<i | |
| } | ||
| assert(res_lit != lit_Undef); | ||
| bool input_or_copy = input.count(res_lit.var()) || res_lit.var() >= (uint32_t)orig_num_vars; | ||
| if (input_or_copy) aig = AIG::new_and(aig, fs_clid[id2]); | ||
| else aig = AIG::new_or(aig, fs_clid[id2]); | ||
| auto rhs = fs_clid[id2]; | ||
| release_assert(rhs != nullptr); | ||
| if (!same_op_started) { | ||
| same_op_started = true; | ||
| same_op_is_and = input_or_copy; | ||
| same_op_terms.push_back(aig); | ||
| same_op_terms.push_back(rhs); | ||
| } else if (same_op_is_and == input_or_copy) { | ||
| same_op_terms.push_back(rhs); | ||
| } else { | ||
| flush_terms(); | ||
| same_op_started = true; | ||
| same_op_is_and = input_or_copy; | ||
| same_op_terms.push_back(aig); | ||
| same_op_terms.push_back(rhs); | ||
| } | ||
| } | ||
| flush_terms(); | ||
| fs_clid[id] = aig; | ||
| verb_print(5, "intermediate formula: " << fs_clid[id]); | ||
| if (clause.empty()) { | ||
|
|
@@ -179,8 +206,8 @@ void Interpolant::generate_interpolant( | |
| } | ||
|
|
||
| // CaDiCaL on the core only | ||
| auto cdcl = std::make_unique<Solver>(); | ||
| MyTracer t(orig_num_vars, input_vars, conf, lit_to_aig, cnf.get_aig_mng()); | ||
| auto cdcl = std::make_unique<Solver>(); | ||
|
|
||
| cdcl->connect_proof_tracer(&t, true); | ||
| /* std::stringstream name; */ | ||
|
|
@@ -204,6 +231,7 @@ void Interpolant::generate_interpolant( | |
| } | ||
| release_assert(pret == Status::UNSATISFIABLE); | ||
| cdcl->disconnect_proof_tracer(&t); | ||
| cdcl.reset(); | ||
|
|
||
| defs[test_var] = t.out; | ||
| verb_print(5, "definition of var: " << test_var+1 << " is: " << t.out); | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be true by default. I don't see why it needs to be false by default?