-
Notifications
You must be signed in to change notification settings - Fork 37
WIP: CEG-Prophecy implementation in Pono #69
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
Conversation
…s by always using relational system
… Abstractor a friend
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.
Gave a pass.
Please see the comments
engines/ceg_prophecy_arrays.h
Outdated
| ProphecyModifier pm_; | ||
|
|
||
| size_t num_added_axioms_ = | ||
| 0; ///< set by refine to the number of added axioms |
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.
do the assignment in the initialize method
modifiers/array_abstractor.cpp
Outdated
| abs_rts.set_init(abs_init); | ||
| abs_rts.set_trans(abs_trans); | ||
|
|
||
| // TODO: remove these debug prints |
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.
should we remove it now or do you want to do it later in a separate PR?
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.
Let's just do it now, thanks!
pono.cpp
Outdated
| logger.set_verbosity(pono_options.verbosity_); | ||
|
|
||
| try { | ||
| // TEMP comment this out for development |
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.
anything to be done here?
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.
Yep, thanks. It does make sense to catch any exceptions, right? Or do you think it's better to let them go uncaught?
engines/ceg_prophecy_arrays.cpp
Outdated
| return ProverResult::FALSE; | ||
| } | ||
| reached_k_++; | ||
| } while (num_added_axioms_); |
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.
when will it exit from the loop? (only in the case of !refine())
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.
Either for !refine() or when no axioms were added (e.g. num_added_axioms_ == 0). So it tries to refine bmc until no new axioms were found, or there's a concrete counterexample.
engines/ceg_prophecy_arrays.cpp
Outdated
| ProverResult CegProphecyArrays::prove() | ||
| { | ||
| ProverResult res = ProverResult::FALSE; | ||
| while (res == ProverResult::FALSE) { |
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.
why are we refining before checking the abstract property?
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.
Ahh it's just a heuristic -- we used that in the prototype as well. It adds a few axioms first before trying to prove it. If the property doesn't require any axioms, then it will refine quickly anyway and get to the underlying model checker.
engines/ceg_prophecy_arrays.cpp
Outdated
| } | ||
|
|
||
| ProverResult CegProphecyArrays::prove() | ||
| { |
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.
also, maybe use check_until with INT_MAX
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.
Makes sense! That means it will call check_until(INT_MAX) for the underlying model checker instead of prove. So far that means exactly the same thing, but I wasn't sure it would stay that way. I'll make the change, but just thought I'd point that out.
|
Thanks for the review @ahmed-irfan! I know it was a lot. I addressed some your comments in the latest commit and commented about the rest. Let me know your thoughts when you get a chance. |
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.
Thanks for the great work.
Overall LGTM.
One minor request to add an example of non-consecutive axiom instantiation. (see the comment)
|
@makaimann need to resolve conflicts |
No description provided.