-
Notifications
You must be signed in to change notification settings - Fork 44
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
Refactor: Use appropriate control configurations in trace checks #692
Conversation
df46ce8
to
613d0d7
Compare
The conflict is with the addition of the new Fox refinement strategy. I'll rebase after I have run the SV-COMP evaluation, because the current base is our reference point for the comparison. |
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.
I did not find the place where we really see a benefit from the removal of IRun. Can you point me to it so that I can have a closer look?
In contrast, I see many places that become more convoluted and difficult to understand, in particular because word and sequence of control locations is now separated.
This leads to passing null or returning pairs, having even more parameters, and generally obfuscating the relation between things.
It was a major concern for me to not let that happen.
Please introduce some wrapper class that combines both and perhaps provides helpful abstractions. In contrast to IRun, it can make its control location sequence optional, but then we should ensure that we fail early, i.e., that strategy modules that require control sequences fail if they are not provided with them.
It would also be nice if we could reduce these pesky casts even further, but I am not sure that this is easy.
.../uni_freiburg/informatik/ultimate/lib/acceleratedinterpolation/AcceleratedInterpolation.java
Outdated
Show resolved
Hide resolved
...anker/src/de/uni_freiburg/informatik/ultimate/lassoranker/nontermination/FixpointCheck2.java
Outdated
Show resolved
Hide resolved
trunk/source/Library-PDR/src/de/uni_freiburg/informatik/ultimate/lib/pdr/Pdr.java
Outdated
Show resolved
Hide resolved
...c/de/uni_freiburg/informatik/ultimate/lib/acceleratedinterpolation/MetaTraceTransformer.java
Outdated
Show resolved
Hide resolved
@@ -51,6 +52,7 @@ public class AnnotateAndAsserter<L extends IAction> { | |||
|
|||
protected final ManagedScript mMgdScriptTc; | |||
protected final NestedWord<L> mTrace; | |||
protected final List<?> mControlConfigurationSequence; |
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 is it called mControlConfiugrationSequence instead of mControlLocationSequence?
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.
For concurrent programs we do not have sequences of locations but sequence of SomethingElse. We do not yet know what SomethingElse should be.
- One good choice for SomethingElse is a set of locations, one location per active thread.
- Another choice might be that we additionally states of a monitor automaton.
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.
To add to this: In GemCutter, the SomethingElse has yet another type: it is a pair of a set of locations (one location per active thread) and a sleeo set (a set of letters).
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.
configuration
just seems awfully close to the mixing of concepts we want to avoid.
For GemCutter, I would argue that the pair of sets of location and the set of letters is the location of the explicit product automaton, so here location
would be ok. I think that location
is in general closer to the "something" we want to describe than configuration
. But right now I don't know a better name.
...rator/traceabstraction/pathinvariants/InterpolatingTraceCheckPathInvariantsWithFallback.java
Outdated
Show resolved
Hide resolved
@@ -94,7 +92,7 @@ public IpAbStrategyModuleResult<LETTER> buildInterpolantAutomaton(final List<Qua | |||
final INestedWordAutomaton<LETTER, IPredicate> castedAbstraction = | |||
(INestedWordAutomaton<LETTER, IPredicate>) mAbstraction; | |||
@SuppressWarnings("unchecked") | |||
final NestedRun<LETTER, IPredicate> castedCex = (NestedRun<LETTER, IPredicate>) mCounterexample; | |||
final List<IPredicate> castedCex = (List<IPredicate>) mCounterexampleRun; |
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.
Would be nice if we could get rid of these casts
...e/uni_freiburg/informatik/ultimate/plugins/generator/traceabstraction/tracehandling/Mcr.java
Outdated
Show resolved
Hide resolved
...rg/informatik/ultimate/plugins/generator/traceabstraction/tracehandling/StrategyFactory.java
Outdated
Show resolved
Hide resolved
...rg/informatik/ultimate/plugins/generator/traceabstraction/tracehandling/StrategyFactory.java
Outdated
Show resolved
Hide resolved
TraceChecks were made for for sequences of IActions. Perfect Interpolants and Assert Orders and an additional bonus that are sometimes desired and that require and additional sequence of control configurations.
Our TraceChecks are work in progress. We have to try to keep them as simple and as modular as possible. Let us pass null for the sequence of control configurations if there is no sequence of control configurations. |
I am not arguing for keeping IRun. I am arguing for adding a new type that describes a trace and optional metadata. |
c657d13
to
4a4e67f
Compare
...r/traceabstraction/interpolantautomata/builders/AbsIntNonSmtInterpolantAutomatonBuilder.java
Outdated
Show resolved
Hide resolved
…nces of the counterexample's set of ControlConfigurations exceed a given threshold Implementation of getControlConfigurationsFromCounterexample needs to be replaced when merging #692 Threshold is currently hardcoded to 1 and might be adjusted later on
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 your work. I don't have much to add here, just some minor comment.
...e/uni_freiburg/informatik/ultimate/plugins/generator/traceabstraction/tracehandling/Mcr.java
Outdated
Show resolved
Hide resolved
...rg/informatik/ultimate/plugins/generator/traceabstraction/tracehandling/StrategyFactory.java
Outdated
Show resolved
Hide resolved
This was omitted in PR #692 due to a misunderstanding. That omission broke assert order modulation for termination analysis, which was thus disabled in commit 240d0f7. According to mattermost discussion [1], control configurations should indeed be used in termination analysis as well. https://chat.sopranium.de/swt/pl/muq4okgsutnnbrm43jnysz9uxw
As discussed internally, this is an attempt at fixing the detection of perfect interpolant sequences, and some other usages of the control locations (or in the case of concurrent programs, control configurations) visited along a counterexample trace.
Motivation
At various points of the code, we either used the
IcfgLocation
returned byIIcfgTransition::getSource
(usually viaTraceCheckUtils::getSequenceOfProgramPoints
) or the predicate in theIRun
for the counterexample.IcfgLocation
s do not make sense in the context of concurrent programs, we want the whole control configuration, i.e., the locations of all threads.isPerfect
.Changes
IRun
byWord
.1.1 This includes usages in LassoChecker, where, according to @Heizmann, any emphasis on the usage of "perfect" proofs was unintentional.
IRun
by a new classCounterexample<L>
, which bundles the trace (aWord<L>
) and an optionalList<Object> controlConfigurationSequences
.Object
, any type will do -- we only care about equality of instances (as defined byObject::equals
).IRun
on the original program (e.g. a CEGAR loop's initial abstraction).As a lot of these changes touch code I am unfamiliar with, I would appreciate it if someone with more knowledge could take a look, in particular for accelerated interpolation and assert order modulation. @danieldietsch?
Evaluation
The nightly tests look fine: https://jenkins.sopranium.de/job/Ultimate/job/Ultimate%20Nightly/job/wip%252Fdk%252Fperfect-tracechecks/4/testReport/
Once the current evaluations are finished, I will run a fast SV-COMP run on this branch to stress-test these changes, and also to see if the "correct" notion of perfect proofs for concurrent programs has any positive impact.
Update: SV-COMP evaluation is currently running.