Skip to content
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

General/instance vars in precision #247

Open
s0mark opened this issue Nov 23, 2023 · 0 comments
Open

General/instance vars in precision #247

s0mark opened this issue Nov 23, 2023 · 0 comments
Labels
xcfa Issue is XCFA specific (not core or XSTS or other formalisms)

Comments

@s0mark
Copy link
Contributor

s0mark commented Nov 23, 2023

Putting the general versions of variables into the precision instead of the instance versions makes Theta not be able to verify some tasks, while allowing some previously unverified tasks to be verified.

val reverseLookup = trace.states[i].processes.values.map {
it.varLookup.map {
it.map {
Pair(it.value, it.key)
}
}.flatten()
}.flatten().toMap()
val additionalLookup = if (i > 0) getTempLookup(
trace.actions[i - 1].edge.label).entries.associateBy(
{ it.value }) { it.key } else emptyMap()
val varLookup = if (checkForPop) additionalLookup else (reverseLookup + additionalLookup)
val precFromRef = refToPrec.toPrec(refutation, i).changeVars(varLookup)
runningPrec = refToPrec.join(runningPrec, precFromRef)

General versions of variables are put into the precision if both reverseLookup and additionalLookup are used in changeVars, while instances are used if reverseLookup is omitted.

For recursive tasks:

  • Fibonacci02.c, fibo_10-2.c, fibo_2calls_10-1.c, fibo_2calls_6-1.c, fibo_2calls_8-1.c, fibo_7-1.c can only be verified with general vars, not with instances,
  • Ackermann02.c, Addition02.c, BallRajamani-SPIN2000-Fig1.c can only be verified with instances, not with general vars.
  • Explicit abstraction performs better with general vars (49 vs. 39), while predicate abstraction solves significantly more tasks with instances (15 vs. 44).

For multithreaded tasks, general vars are preferred, as there were over 200 tasks that Theta can only solve with general vars and not with instances (see #244 (comment)).

This behavior does not seem to be by-design and should be investigated.

@AdamZsofi AdamZsofi added core Issue is core/algorithm and not formalism specific xcfa Issue is XCFA specific (not core or XSTS or other formalisms) and removed core Issue is core/algorithm and not formalism specific labels Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
xcfa Issue is XCFA specific (not core or XSTS or other formalisms)
Projects
None yet
Development

No branches or pull requests

2 participants