-
Notifications
You must be signed in to change notification settings - Fork 11
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
Independent solver rework #85
Conversation
e7ce3b1
to
fde881f
Compare
38fc182
to
5c1c074
Compare
cdb3b3b
to
0d0fcc1
Compare
Codecov Report
@@ Coverage Diff @@
## main #85 +/- ##
==========================================
+ Coverage 65.37% 65.60% +0.22%
==========================================
Files 211 213 +2
Lines 28676 29018 +342
Branches 6374 6437 +63
==========================================
+ Hits 18746 19036 +290
- Misses 7442 7519 +77
+ Partials 2488 2463 -25
|
eaf1337
to
a26c72d
Compare
0e8b5e3
to
1d4b9bd
Compare
include/klee/Expr/Assignment.h
Outdated
bool allowFreeValues) { | ||
AssignmentEvaluator v(*this, allowFreeValues); | ||
for (; begin != end; ++begin) { | ||
if ((*begin)->getWidth() == Expr::Bool && !v.visit(*begin)->isTrue()) |
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.
Please separate the logic for processing non-boolean expressions into a separate function
|
||
#undef ITEMSIZE | ||
#undef ALPHA | ||
#endif |
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.
Put a new line
include/klee/ADT/ImmutableMap.h
Outdated
if (*it1 != *it2) | ||
return false; | ||
} | ||
return size() == b.size(); |
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.
Swap the size equality condition with the element equality conditions for better performance
include/klee/ADT/ImmutableMap.h
Outdated
if (*it1 > *it2) | ||
return false; | ||
} | ||
return size() < b.size(); |
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.
Same as above
include/klee/ADT/DisjointSetUnion.h
Outdated
disjointSets_ty ds() const { return disjointSets; } | ||
}; | ||
} // namespace klee | ||
#endif |
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.
Put a new line
include/klee/Expr/Assignment.h
Outdated
@@ -27,45 +28,44 @@ using symcretes_ty = SymcreteOrderedSet; | |||
|
|||
class Assignment { | |||
public: | |||
typedef std::map<const Array *, SparseStorage<unsigned char>> bindings_ty; | |||
using bindings_ty = ImmutableMap<const Array *, SparseStorage<unsigned char>>; |
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.
You can use PersistentMap
instead of ImmutableMap
, since the persistent version is a wrapper for convenience
@@ -328,6 +328,13 @@ class Expr { | |||
// Given an array of new kids return a copy of the expression | |||
// but using those children. | |||
virtual ref<Expr> rebuild(ref<Expr> kids[/* getNumKids() */]) const = 0; | |||
virtual ref<Expr> rebuild() const { |
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.
Is this the code used?
}; | ||
} // namespace klee | ||
|
||
#endif |
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.
Put a new line
icsu.reEvaluateConcretization(newConcretization); | ||
return icsu.getConcretizedVersion(); | ||
} | ||
} // namespace klee |
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.
Put a new line
@@ -132,7 +132,8 @@ struct isValidOrSatisfyingResponse { | |||
isValidOrSatisfyingResponse(KeyType &_key) : key(_key) {} | |||
|
|||
bool operator()(ref<SolverResponse> a) const { |
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.
Split keys
in boolean keys and non-boolean keys and update the predicate accordingly
1d4b9bd
to
5937f8b
Compare
5937f8b
to
e319a6f
Compare
Summary:
Checklist: