Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
277 commits
Select commit Hold shift + click to select a range
a0b6ed5
Variable Assignment Reuse via annotation
MaxBarth95 Nov 21, 2023
03b3eac
VaAnnotationFile
MaxBarth95 Nov 21, 2023
2871f1b
fixed reach error bug, fixed va reuse bug
MaxBarth95 Nov 22, 2023
6c8eeb8
Bugfix reuse
MaxBarth95 Nov 22, 2023
ea2a334
TestComp24 Final Version
MaxBarth95 Nov 23, 2023
9fedda7
Activate VaReuse and reset default testgeneration to NONE
MaxBarth95 Nov 28, 2023
4c8443a
new reuse version
MaxBarth95 Dec 11, 2023
006e3db
New import to annotate and assert
MaxBarth95 Dec 11, 2023
0725c8f
choose arbitrary value for input beween test goals
MaxBarth95 Dec 26, 2023
579a82d
Fixed "Other Branch" optimisation. Ensuring that it is only used if t…
MaxBarth95 Jan 10, 2024
6a95f37
fixed optimisation output and double smt terms in test generation reuse
MaxBarth95 Jan 15, 2024
7f6a1a9
Fixed Nondet Value Regex Matcher
MaxBarth95 Jan 15, 2024
63a0638
Fixed that other branch optimization creates testcases with the same …
MaxBarth95 Jan 29, 2024
ab093a0
Fixed UnsatWith
MaxBarth95 Jan 30, 2024
38acd29
deactivated reuse for evaluation
MaxBarth95 Feb 1, 2024
b5234f7
reactivate reuse
MaxBarth95 Feb 2, 2024
a64d573
minor fix
MaxBarth95 Feb 3, 2024
fa2aa90
minor fix
MaxBarth95 Feb 3, 2024
130ef25
Potential Fix for hardness benchmarks (needs to be evaluated)
MaxBarth95 Feb 10, 2024
4d16fe8
added setting for reuse
MaxBarth95 Feb 15, 2024
cca14d5
Bugfic back to c of bools. C bool has value 0 if value is 0 and 1 oth…
MaxBarth95 Feb 26, 2024
9617ea0
- New BvToInt constraint mode for intand
MaxBarth95 Mar 2, 2024
9094e2d
just do mod if signed c type
MaxBarth95 Mar 3, 2024
75bcaed
Test Generation: Added support for ONE_CEGAR_PER_ERROR_LOCATION and T…
MaxBarth95 Mar 14, 2024
79b3292
Reuse when Unsat solang kein function call im Trace ist
MaxBarth95 Mar 26, 2024
c7920a5
Nur reuse, wenn keine function calls in trace
MaxBarth95 Mar 26, 2024
d79ea01
Normal Reuse but Reuse when unsat only when no functions calls in trace
MaxBarth95 Mar 27, 2024
8cc4293
Only Reuse when Unsat if CurrentVA not in function call other than main
MaxBarth95 Mar 28, 2024
24e8ecc
Second try, reuse only when not in function and reuse unsat only when…
MaxBarth95 Mar 30, 2024
5d6c9a8
Reactivated VAOrder, use last checked for reuse
MaxBarth95 Mar 30, 2024
a0a24c2
Fix reuseunsat, readde no reuse if negated
MaxBarth95 Apr 1, 2024
3c24b77
Normal Reuse, only reuse vas annotated to test-goals that are not in …
MaxBarth95 Apr 1, 2024
57324c4
minor fix
MaxBarth95 Apr 1, 2024
6137ec5
Removed redundant SatCheck
MaxBarth95 Apr 2, 2024
7190344
Possible Fix for having error automaton but not an active test-goal
MaxBarth95 Apr 4, 2024
2629c5c
BvToInt: Fix Unsoundness in SMT-Comp23
MaxBarth95 Apr 19, 2024
679dd15
Instead of removing covered test goals from the A* goal set, we add t…
MaxBarth95 Apr 22, 2024
ef07720
Make ReuseUnsat dependend on procedures calling location
MaxBarth95 Apr 30, 2024
02844a7
Fixed Default Reuse
MaxBarth95 May 6, 2024
bc13675
Fix Match Prefix WIP
MaxBarth95 May 9, 2024
a840859
Match prefix for resuse Fix
MaxBarth95 May 9, 2024
e6fd0df
minor fix
MaxBarth95 May 9, 2024
0c76f65
Removed prints
MaxBarth95 May 9, 2024
0cd023b
Version where we reuse always and only use optimization if prefixes m…
MaxBarth95 May 12, 2024
cf97a5e
Added setting for calloc
MaxBarth95 May 13, 2024
4b0b90b
Added support for Reuse + Mutligoal needs evaluation
MaxBarth95 Jun 24, 2024
10d1d19
Removed Concrete execution method for now
MaxBarth95 Sep 12, 2024
2c250e6
Prepared STTT Evaluation:
MaxBarth95 Sep 14, 2024
71e41b3
Bug Fix, unlock script if error occurs
MaxBarth95 Sep 15, 2024
5704f59
Bugfix unknown var in reusescript
MaxBarth95 Sep 16, 2024
8db44d3
Fix if value is real but sort is int
MaxBarth95 Sep 16, 2024
581c3b5
assert to cfg script even if no reuse
MaxBarth95 Sep 17, 2024
6998d33
Reveted using cfg script for reuse, overhead too big
MaxBarth95 Sep 18, 2024
8a4f03c
fix forgott to pop() and provide no programExecution in case of reuse
MaxBarth95 Sep 18, 2024
4c3e5e0
Fixed that we reuse for the first goal again
MaxBarth95 Sep 21, 2024
f0e5242
Switch Floats and Double. Why was it the other way around?
MaxBarth95 Sep 30, 2024
222e02f
Test Export: Potential fix for Floats
MaxBarth95 Oct 1, 2024
71f30c0
Parallel Trace Abstraction v1
MaxBarth95 Oct 29, 2024
541d310
Missing files
MaxBarth95 Oct 29, 2024
a397d93
Fix Build
MaxBarth95 Oct 29, 2024
c427680
No more busy waiting.
MaxBarth95 Nov 4, 2024
5f18253
Added support for parallel test case generation.
MaxBarth95 Nov 12, 2024
99d8e97
changed logger back, leads to bugs in Ultiamte.py
MaxBarth95 Nov 12, 2024
e8fdc79
Terminate if thread throws exception
MaxBarth95 Dec 9, 2024
0cb8643
cleaned up prints
MaxBarth95 Dec 9, 2024
63f9dff
small rework of metadata file extraction
MaxBarth95 Dec 9, 2024
cc587c7
Added Setting to switch between parallel and seq
MaxBarth95 Dec 10, 2024
a2c1ef4
TODO removed erroratuomaton statistics for evaluation. Readd Later!
MaxBarth95 Dec 10, 2024
8809e76
Added setting for maxThreads
MaxBarth95 Dec 13, 2024
4448d84
minor fix
MaxBarth95 Dec 14, 2024
0b54b73
another minor fix
MaxBarth95 Dec 15, 2024
012bfe3
deactivate gc after cegar iteration
MaxBarth95 Dec 16, 2024
33d059d
if we log with thid we cannot determine ultimate verison
MaxBarth95 Dec 16, 2024
d504ab3
Some advances / bugfixes for parallel in the incrHoareTripleChecker
MaxBarth95 Dec 17, 2024
40ed008
maxThread is now available cores -1
MaxBarth95 Dec 17, 2024
235a267
Added Search Strategy for Paralle search
MaxBarth95 Dec 27, 2024
d12d70d
pin jdk and maven versions
danieldietsch Nov 5, 2024
4c91ca6
Some Bug fixes
MaxBarth95 Dec 30, 2024
0452d7d
reworked the search,
MaxBarth95 Dec 30, 2024
1f1aa83
remembering all counterexamples takes too much memory
MaxBarth95 Dec 30, 2024
2cb349f
Changed Search, and improved the loop in case no counterexample can b…
MaxBarth95 Jan 5, 2025
aca11d6
Dont save all counterexamples
MaxBarth95 Jan 5, 2025
27be31a
ReachSafety: works without minimization
MaxBarth95 Jan 7, 2025
c9e4f0e
If counterexample is in allcounterexamples then do not check.
MaxBarth95 Jan 7, 2025
ce32be2
All worker get the inital abstraction and not an intermediate result
MaxBarth95 Jan 7, 2025
7239a36
unsound in reach safety, say unsafe instead of safe
MaxBarth95 Jan 10, 2025
3c14b69
Reset IsEmpty
MaxBarth95 Jan 13, 2025
e2dbd9d
Added setting for minimization
MaxBarth95 Jan 13, 2025
09ac27f
fixed some isEmptyParallel bugs
MaxBarth95 Jan 14, 2025
a42d3fd
Cant fix the IsEmptyParallel Bug atm, dont know where it comes from
MaxBarth95 Jan 14, 2025
de1b6ba
Deactivated debug asserts to for trial run
MaxBarth95 Jan 14, 2025
7696219
Looks like the bug is fixed:
MaxBarth95 Jan 15, 2025
1216ab0
this wont work with use test goal set as goal set
MaxBarth95 Jan 15, 2025
9f39cbb
Some minor refactoring
MaxBarth95 Jan 15, 2025
94bdd98
Deactivated counterexample report
MaxBarth95 Jan 18, 2025
d852820
reorganised the loop, now we wait if we didnt find a new cex for an a…
MaxBarth95 Jan 19, 2025
51df89a
long description of unprovable and unsafe result doesnt work since th…
MaxBarth95 Jan 20, 2025
0da0552
terminte if isEmpty sais true even if threads are running
MaxBarth95 Jan 23, 2025
69cb2aa
missing file
MaxBarth95 Jan 23, 2025
30a1935
fixed recursions
MaxBarth95 Jan 24, 2025
2d25a05
deactivate recusive fix
MaxBarth95 Jan 25, 2025
2f1df66
small change to loop
MaxBarth95 Jan 25, 2025
a61654d
deactiavete worker cancel
MaxBarth95 Jan 26, 2025
3304ecb
was still writing test cases
MaxBarth95 Jan 26, 2025
e1c406a
removed the cancelation completely
MaxBarth95 Jan 26, 2025
e436462
reversed change
MaxBarth95 Jan 26, 2025
077e917
refactored the loop
MaxBarth95 Jan 27, 2025
21261dd
Merge branch 'dev' into TestGeneration
MaxBarth95 Jan 27, 2025
dc00308
fixing merge issues
MaxBarth95 Jan 28, 2025
5c6cd22
fixing merge, deactivated reuse und annotate and assert and trace check
MaxBarth95 Jan 28, 2025
d127b79
fixing merge
MaxBarth95 Jan 28, 2025
42dec80
fixing merge
MaxBarth95 Jan 28, 2025
555871a
fixing merge
MaxBarth95 Jan 28, 2025
7aac2ff
fixing merge, added dependencies for test case generation in trace check
MaxBarth95 Jan 28, 2025
e16dde3
fixing merge
MaxBarth95 Jan 28, 2025
3466229
Fixed some Parallel stuff lost in merge
MaxBarth95 Jan 28, 2025
d859f48
always try bfs first
MaxBarth95 Jan 29, 2025
ac8a0ad
use counterexample class correclty to fix bug where we dont check for…
MaxBarth95 Feb 1, 2025
d1b5a32
BugFix interpolation with unsat core produces invalid hoare triple
MaxBarth95 Feb 1, 2025
7106317
isEmptyParallel no longer throws an exception if it fails to construc…
MaxBarth95 Feb 1, 2025
f7e587f
added patchcache to parallel loop so that we do loop acceleration
MaxBarth95 Feb 2, 2025
b178105
deactivated test regex in ultaimte.py!
MaxBarth95 Feb 2, 2025
9e924d9
less memory consumption in isemptyparallel
MaxBarth95 Feb 2, 2025
06bdad8
isEmptyParallel deactivated the recursion fix again.
MaxBarth95 Feb 2, 2025
28254a7
fixed some warnings.
MaxBarth95 Feb 3, 2025
1c5614b
give worker a copy of patchprogramcache
MaxBarth95 Feb 4, 2025
a6d2d28
Made some more copies of globals maybe useless
MaxBarth95 Feb 4, 2025
4791747
IsEmptyParallel can become very expensive
MaxBarth95 Feb 4, 2025
59ac862
Added more statistics
MaxBarth95 Feb 5, 2025
9471e26
check if programcache is the problem
MaxBarth95 Feb 5, 2025
3d63d80
making a real copy of programcache
MaxBarth95 Feb 6, 2025
d3be142
some more statistics
MaxBarth95 Feb 8, 2025
b6bd5ba
start as many threads as possible
MaxBarth95 Feb 8, 2025
806d41d
IsEmptyParallel: Fixed that we get 2 returns for the same call
MaxBarth95 Feb 10, 2025
06b3c7f
No witness printing in Parallel CEGAR
MaxBarth95 Feb 11, 2025
5304b3d
deactivated concurrency CEGAR for evaluation
MaxBarth95 Feb 11, 2025
bf9d948
Tried sth. might introduce a datarace on mAbstraction
MaxBarth95 Feb 11, 2025
c7aba7e
isEmtpyParallel stackOVerflow prevention
MaxBarth95 Feb 14, 2025
47170a7
removed backtransfer in qelim
MaxBarth95 Feb 14, 2025
c9304f8
orginal program cache was the copy
MaxBarth95 Feb 14, 2025
c4c37b2
added script exit to tracecheckSPWP
MaxBarth95 Feb 17, 2025
82dbed9
removed tcScript.exit()
MaxBarth95 Feb 19, 2025
b813494
Fixed Bug in termiantion
MaxBarth95 Feb 19, 2025
6b530d4
reactivate concurrency
MaxBarth95 Feb 19, 2025
4229237
testing new naming for variables that depends on trace hash.
MaxBarth95 Feb 22, 2025
3db4a46
Reversed Naming.
MaxBarth95 Feb 22, 2025
2d6a39a
trying to fix recursion unsoundness in search
MaxBarth95 Feb 24, 2025
18896a3
Trying to fix Recursion
MaxBarth95 Feb 25, 2025
1923777
if search not correct return null instead of incorrect word
MaxBarth95 Feb 26, 2025
474959e
Started Major refactoring,
MaxBarth95 Mar 3, 2025
3ae9c7c
Refactored the Loop
MaxBarth95 Mar 11, 2025
1c04878
trying new search that focues on circumventing loops
MaxBarth95 Mar 28, 2025
11025c3
backup for parallel strategy, not yet working
MaxBarth95 Mar 31, 2025
12a4241
Framework for parallel strategy is done:
MaxBarth95 Mar 31, 2025
460b125
Added Support for parallel loop acceleration
MaxBarth95 Apr 4, 2025
26a0e7c
fixed more for parallel loop acceleration
MaxBarth95 Apr 4, 2025
42357be
BugFix in Parallel Strategy LoopAcceleration, only do LA once per PP.…
MaxBarth95 Apr 5, 2025
9b6fb2e
1 thread per executor, 2 threads per countereaxmple. Per cex we queu…
MaxBarth95 Apr 20, 2025
19d4cb9
Thread Limit is now limit of Groups (PathPRogram) times limit of stra…
MaxBarth95 Apr 22, 2025
ce680f4
New dynamic executor, executor has a limit of threadlimit / pathprogr…
MaxBarth95 Apr 22, 2025
3d4d6eb
changed how running threads is counted, now its basically running pat…
MaxBarth95 Apr 22, 2025
019376e
Added Union for NWAs, removed totalization nad changed the resultChec…
MaxBarth95 Apr 27, 2025
877d4c1
missing files
MaxBarth95 Apr 27, 2025
d7712af
Added a worker thread that can only generalize a given automaton
MaxBarth95 May 22, 2025
69bb61d
removed local benchmark
MaxBarth95 May 22, 2025
9bacbac
removed GeneralizationWorker, cannot be used at the moment. We fail w…
MaxBarth95 May 22, 2025
b5f67cd
added enum for different generalization modes in worker thread.
MaxBarth95 May 22, 2025
c348083
Added a new strategy that does not interpolate at all
MaxBarth95 May 23, 2025
62dfd3d
Preparing Merge, reset files without meaningfull change to dev version
MaxBarth95 May 24, 2025
4736c5f
resetting files used only for testgen to dev
MaxBarth95 May 24, 2025
ecefd0a
Merge branch 'TestGeneration' of https://github.com/ultimate-pa/ultim…
MaxBarth95 May 24, 2025
eb5daac
Adding new files from dev for libraries
MaxBarth95 May 24, 2025
15550ef
resetting files to dev only used in testgen
MaxBarth95 May 24, 2025
5e08cbe
Removed more code related to testgeneration
MaxBarth95 May 24, 2025
25128ed
Merge branch 'dev' into TestGeneration
MaxBarth95 May 24, 2025
5b71f21
Fixed Merge,
MaxBarth95 May 24, 2025
c72514c
Cleanup of some style differences between branch and dev
MaxBarth95 May 25, 2025
6e133e4
IsEmpty used no loop search! changed back to default
MaxBarth95 May 25, 2025
b8c1cd8
Cleanup some code, removed unused stuff
MaxBarth95 May 25, 2025
1529281
Removed unused class
MaxBarth95 May 25, 2025
7be6c73
Minor changes
MaxBarth95 May 25, 2025
abee4e9
Added comment to warnings from VariableManager
MaxBarth95 May 25, 2025
1f42f26
Fixed ThreadPoolCalculation
MaxBarth95 May 25, 2025
5bdb543
Fixed Executor size calculation
MaxBarth95 May 25, 2025
6e309fd
Trying to support witnesses, by making use of the HistoryRecordingScr…
MaxBarth95 May 25, 2025
c9b2fa1
Added Parallel Strategy for Bit-Precise mode
MaxBarth95 May 25, 2025
2ee13ed
Added new parallelization that applies multiple worker per cex and a …
MaxBarth95 May 27, 2025
6ec5875
missing file
MaxBarth95 May 27, 2025
3aeade2
Added a new strategy / mode
MaxBarth95 Jun 2, 2025
7e16136
Removed DFS, after failed serach
MaxBarth95 Jun 2, 2025
7fe0af3
Merge, removed some more testing stuff from abstractcegarloop
MaxBarth95 Jun 2, 2025
48e45e1
deactivate loop acceleration
MaxBarth95 Jun 2, 2025
b0c7f46
Removed Futures, when using a blocking queue,
MaxBarth95 Jun 6, 2025
b3f4c93
Renamed ParallelCEGARLoop to ParallelNWACegarLoop and the worker too
MaxBarth95 Jun 6, 2025
ea0673d
renaming
MaxBarth95 Jun 6, 2025
684504b
Renamed parallel cegar loop
MaxBarth95 Jun 6, 2025
ae433e0
Removed remains from testgen
MaxBarth95 Jun 6, 2025
be2a91d
Removed commented code
MaxBarth95 Jun 6, 2025
8104a49
Removed leftover from Testgen
MaxBarth95 Jun 6, 2025
0aa3c46
All of them are not needed
MaxBarth95 Jun 6, 2025
cabd55c
Reactivated long description for results with program execution.
MaxBarth95 Jun 7, 2025
7ce31a5
minor style change
MaxBarth95 Jun 7, 2025
428898f
Added serach strategy that does not allow loops at all,
MaxBarth95 Jun 10, 2025
6538a5f
Fixed some Bugs
MaxBarth95 Jun 10, 2025
fa908ae
Changing the amount of Running threads when updating executor sizes d…
MaxBarth95 Jun 10, 2025
247980e
reworked the search now uses a prefix that isEmptyHeuristic follows b…
MaxBarth95 Jun 15, 2025
9d65f0b
Added No Loop mode to IsEmptyHeuristic
MaxBarth95 Jun 23, 2025
ed1c90a
moving towards continues worker only and transfer of automata. taken …
MaxBarth95 Oct 17, 2025
019a245
removed parallel refinement strategy
MaxBarth95 Oct 17, 2025
6f97d06
removed parallel strategy
MaxBarth95 Oct 17, 2025
b487d7e
made StmtSequence, Call and Return public
MaxBarth95 Oct 17, 2025
9a4151e
give worker script through to TypeSortTranslator for backtranslation …
MaxBarth95 Oct 17, 2025
40d63e1
Rebased all files with the old HistoryRecordingScript termtransfer
MaxBarth95 Oct 17, 2025
d965596
removed old file
MaxBarth95 Oct 17, 2025
776164b
rebased MonitoredProcess
MaxBarth95 Oct 17, 2025
eef0e07
reverted change, not sure what it does
MaxBarth95 Oct 19, 2025
c481078
Merge branch 'dev' into merge/mb/parallel-trace-abstraction
MaxBarth95 Oct 19, 2025
cb3d1ed
fix build
MaxBarth95 Oct 19, 2025
c0436a3
2 Bug fixes
MaxBarth95 Oct 19, 2025
a9f599e
added setPayload such that we can copy the payload to the worker edges
MaxBarth95 Oct 19, 2025
013cdde
reafactoring searches
MaxBarth95 Oct 22, 2025
6df3827
addressed some merge comments
MaxBarth95 Oct 22, 2025
0384708
code cleanup for merge request
MaxBarth95 Oct 27, 2025
7c3fe11
code cleanup searches, removed noLoopMode flag from isempyheuristic s…
MaxBarth95 Oct 27, 2025
9774e77
readded lock
MaxBarth95 Oct 27, 2025
8fc325f
cleaned up IsEmptyParallel
MaxBarth95 Oct 27, 2025
8cf1f68
removed unncesa code, cleanup
MaxBarth95 Oct 27, 2025
09828a4
added comment
MaxBarth95 Oct 27, 2025
f4eaa06
cleanup
MaxBarth95 Oct 27, 2025
da3bdef
cleanup basicCegarLoop
MaxBarth95 Oct 27, 2025
a90aeab
cleanup CEGARloopfactory
MaxBarth95 Oct 27, 2025
13fd37d
fix build by adding exception
MaxBarth95 Oct 27, 2025
8d8207c
cleanup NWA
MaxBarth95 Oct 27, 2025
580785a
cleanup TAPreferences
MaxBarth95 Oct 27, 2025
3cf699f
cleanup perference initializer
MaxBarth95 Oct 27, 2025
a4414ed
cleanup perference initializer
MaxBarth95 Oct 27, 2025
a9fcb98
cleanup perference initializer
MaxBarth95 Oct 27, 2025
4830e8d
cleaned StrategyFactory
MaxBarth95 Oct 27, 2025
c1c58a5
and the rest of the strategy stuff
MaxBarth95 Oct 27, 2025
dc88d98
and the rest of the strategy stuff
MaxBarth95 Oct 27, 2025
181b175
and the rest of the strategy stuff
MaxBarth95 Oct 27, 2025
471d281
clean pathprogram cache
MaxBarth95 Oct 27, 2025
ca9ed97
use Excutionservice again, add licence hadders
MaxBarth95 Oct 27, 2025
906a1ae
Fixed NoInterpolationWorker, cleaned up the rest
MaxBarth95 Oct 28, 2025
6354e66
bugfix
MaxBarth95 Oct 30, 2025
dabdd95
bugfix
MaxBarth95 Oct 30, 2025
886453f
removing noInterpolation worker
MaxBarth95 Oct 30, 2025
d989604
cleanup nointerpolation worker
MaxBarth95 Oct 30, 2025
a37eae6
fix
MaxBarth95 Oct 30, 2025
826e9f3
clean
MaxBarth95 Oct 30, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions trunk/source/Library-Automata/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -311,5 +311,6 @@ Bundle-ClassPath: src/de/uni_freiburg/informatik/ultimate/automata/petrinet/petr
Import-Package: de.uni_freiburg.informatik.ultimate.lib.modelcheckerutils.cfg.structure,
de.uni_freiburg.informatik.ultimate.lib.modelcheckerutils.cfg.transitions,
de.uni_freiburg.informatik.ultimate.lib.modelcheckerutils.smt,
de.uni_freiburg.informatik.ultimate.lib.modelcheckerutils.smt.predicates,
de.uni_freiburg.informatik.ultimate.plugins.generator.rcfgbuilder.cfg
Automatic-Module-Name: de.uni.freiburg.informatik.ultimate.lib.automata

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
import de.uni_freiburg.informatik.ultimate.util.CoreUtil;
import de.uni_freiburg.informatik.ultimate.util.HashUtils;
import de.uni_freiburg.informatik.ultimate.util.datastructures.HashedPriorityQueue;
import de.uni_freiburg.informatik.ultimate.util.datastructures.relation.Pair;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the changes in this class related to parallel TAR? The waypoint stuff seems witness-related?


/**
* Check emptiness and obtain an accepting run of a nested word automaton using a modified version of A*.
Expand All @@ -83,7 +84,8 @@ public final class IsEmptyHeuristic<LETTER, STATE> extends UnaryNwaOperation<LET
private final Predicate<STATE> mIsForbiddenState;
private final NestedRun<LETTER, STATE> mAcceptingRun;
private final STATE mDummyEmptyStackState;

protected final List<Pair<STATE, LETTER>> mWayPoints;
private boolean stillFollowingWayPoint = true;
private final IHeuristic<STATE, LETTER> mHeuristic;

/**
Expand Down Expand Up @@ -116,7 +118,25 @@ public IsEmptyHeuristic(final AutomataLibraryServices services,
final INwaOutgoingLetterAndTransitionProvider<LETTER, STATE> operand,
final IHeuristic<STATE, LETTER> heuristic) throws AutomataOperationCanceledException {
this(services, operand, CoreUtil.constructHashSet(operand.getInitialStates()), a -> false, operand::isFinal,
heuristic);
heuristic, new ArrayList<>());
}

/**
* Default constructor. Here we search a run from the initial states of the automaton to the final states of the
* automaton and use the zero heuristic.
*
* @param services
* Ultimate services
* @param operand
* input NWA
* @see #IsEmpty(AutomataLibraryServices, INwaOutgoingLetterAndTransitionProvider)
*/
public IsEmptyHeuristic(final AutomataLibraryServices services,
final INwaOutgoingLetterAndTransitionProvider<LETTER, STATE> operand,
final IHeuristic<STATE, LETTER> heuristic, final ArrayList<Pair<STATE, LETTER>> wayPoints)
throws AutomataOperationCanceledException {
this(services, operand, CoreUtil.constructHashSet(operand.getInitialStates()), a -> false, operand::isFinal,
heuristic, wayPoints);
}

/**
Expand All @@ -128,15 +148,15 @@ public IsEmptyHeuristic(final AutomataLibraryServices services, final INestedWor
final Set<STATE> startStates, final Predicate<STATE> funIsForbiddenState,
final Predicate<STATE> funIsGoalState, final IHeuristic<STATE, LETTER> heuristic)
throws AutomataOperationCanceledException {
this(services, (INwaOutgoingLetterAndTransitionProvider<LETTER, STATE>) operand, startStates,
funIsForbiddenState, funIsGoalState, heuristic);
this(services, operand, startStates, funIsForbiddenState, funIsGoalState, heuristic, new ArrayList<>());
assert operand.getStates().containsAll(startStates) : "unknown states";
}

private IsEmptyHeuristic(final AutomataLibraryServices services,
public IsEmptyHeuristic(final AutomataLibraryServices services,
final INwaOutgoingLetterAndTransitionProvider<LETTER, STATE> operand, final Set<STATE> startStates,
final Predicate<STATE> funIsForbiddenState, final Predicate<STATE> funIsGoalState,
final IHeuristic<STATE, LETTER> heuristic) throws AutomataOperationCanceledException {
final IHeuristic<STATE, LETTER> heuristic, final ArrayList<Pair<STATE, LETTER>> wayPoints)
throws AutomataOperationCanceledException {
super(services);
mOperand = operand;
mIsGoalState = funIsGoalState;
Expand All @@ -148,7 +168,10 @@ private IsEmptyHeuristic(final AutomataLibraryServices services,
assert mOperand != null;

mDummyEmptyStackState = mOperand.getEmptyStackState();

mWayPoints = wayPoints;
if (!mWayPoints.isEmpty()) {
stillFollowingWayPoint = true;
}
if (mLogger.isInfoEnabled()) {
mLogger.info(startMessage());
}
Expand All @@ -172,12 +195,13 @@ private NestedRun<LETTER, STATE> getAcceptingRun(final Collection<STATE> startSt
final HashedPriorityQueue<Item> worklist =
new HashedPriorityQueue<>(Comparator.comparing(a -> a.mEstimatedCostToTarget));

final List<Pair<STATE, LETTER>> visited = new ArrayList<>();

for (final STATE state : startStates) {
final Item initialItem = new Item(state);
initialItem.setCostSoFar(0.0);
worklist.add(initialItem);
}

if (mLogger.isDebugEnabled()) {
mLogger.debug(String.format("Initial queue: %s", worklist));
}
Expand All @@ -190,6 +214,8 @@ private NestedRun<LETTER, STATE> getAcceptingRun(final Collection<STATE> startSt
final Map<CallTransition, Map<ReturnTransition, SummaryItem>> summaries = new HashMap<>();
final Map<CallTransition, Map<ReturnTransition, Set<Item>>> usedSummaries = new HashMap<>();

int lengthOfPrefixThatWeFollow = mWayPoints.size();

while (!worklist.isEmpty()) {
if (!mServices.getProgressAwareTimer().continueProcessing()) {
final String taskDescription = "searching accepting run (input had " + mOperand.size() + " states)";
Expand All @@ -202,7 +228,7 @@ private NestedRun<LETTER, STATE> getAcceptingRun(final Collection<STATE> startSt
if (mLogger.isDebugEnabled()) {
mLogger.debug(String.format("Current: %s", current));
}
if (mIsGoalState.test(current.mTargetState)) {
if (mIsGoalState.test(current.mTargetState) && !stillFollowingWayPoint) {
if (mLogger.isDebugEnabled()) {
mLogger.debug(" Is target");
printDebugStats(lowestCall, lowestOther, summaries);
Expand All @@ -218,7 +244,7 @@ private NestedRun<LETTER, STATE> getAcceptingRun(final Collection<STATE> startSt
}

final List<Item> unvaluatedSuccessors =
getUnvaluatedSuccessors(current, discoveredUniqueReturnStates, delayedCalls);
getUnvaluatedSuccessors(current, discoveredUniqueReturnStates, delayedCalls, visited);
if (mLogger.isDebugEnabled() && unvaluatedSuccessors.isEmpty()) {
mLogger.debug(" No successors");
continue;
Expand All @@ -234,6 +260,12 @@ private NestedRun<LETTER, STATE> getAcceptingRun(final Collection<STATE> startSt
}

for (final Item succ : successors) {
if (lengthOfPrefixThatWeFollow >= 0) {
// consider all successors, even the once seen before by prefix check
worklist.add(succ);
lengthOfPrefixThatWeFollow -= 1;
continue;
}
if (mLogger.isDebugEnabled()) {
mLogger.debug(String.format(" Succ: %s", succ));
}
Expand Down Expand Up @@ -334,6 +366,7 @@ private List<Item> addCostAndSummaries(final List<Item> succs,
for (final Entry<ReturnTransition, SummaryItem> entry : summary.entrySet()) {
final SummaryItem sumItem = entry.getValue();
final Item newSucc = new Item(succ, sumItem);

newSucc.setCostSoFar(succ.mCostSoFar + sumItem.mSummaryCost);
newSuccs.add(newSucc);

Expand Down Expand Up @@ -446,28 +479,38 @@ private boolean isCheapestAncestor(final Map<Item, Double> lowest,
}

private List<Item> getUnvaluatedSuccessors(final Item current,
final Map<STATE, Set<STATE>> discoveredUniqueReturnStates, final Map<STATE, Set<Item>> delayedCalls) {
final Map<STATE, Set<STATE>> discoveredUniqueReturnStates, final Map<STATE, Set<Item>> delayedCalls,
final List<Pair<STATE, LETTER>> visited) {
final List<Item> rtr = new ArrayList<>();

// process internal transitions
for (final OutgoingInternalTransition<LETTER, STATE> transition : mOperand
.internalSuccessors(current.mTargetState)) {
final LETTER symbol = transition.getLetter();
final STATE succ = transition.getSucc();
if (mIsForbiddenState.test(succ)) {

if (mIsForbiddenState.test(succ) || visited.contains(new Pair<>(current.mTargetState, symbol))
|| !followingWayPoint(succ, symbol)) {
continue;
}
rtr.add(new Item(succ, current.getHierPreState(), symbol, current, ItemType.INTERNAL));
if (stillFollowingWayPoint) {
break;
}
}

// process call transitions
for (final OutgoingCallTransition<LETTER, STATE> transition : mOperand.callSuccessors(current.mTargetState)) {
final LETTER symbol = transition.getLetter();
final STATE succ = transition.getSucc();
if (mIsForbiddenState.test(succ)) {
if (mIsForbiddenState.test(succ) || visited.contains(new Pair<>(current.mTargetState, symbol))
|| !followingWayPoint(succ, symbol)) {
continue;
}
rtr.add(new Item(succ, current.mTargetState, symbol, current, ItemType.CALL));
if (stillFollowingWayPoint) {
break;
}
}

final STATE hierPre = current.getHierPreState();
Expand All @@ -482,11 +525,15 @@ private List<Item> getUnvaluatedSuccessors(final Item current,
.returnSuccessorsGivenHier(current.mTargetState, hierPre)) {
final LETTER symbol = transition.getLetter();
final STATE succ = transition.getSucc();
if (mIsForbiddenState.test(succ)) {
if (mIsForbiddenState.test(succ) || visited.contains(new Pair<>(current.mTargetState, symbol))
|| !followingWayPoint(succ, symbol)) {
continue;
}
// hierarchical predecessor will be taken from current
rtr.add(new Item(succ, null, symbol, current, ItemType.RETURN));
if (stillFollowingWayPoint) {
break;
}
}
if (old != rtr.size()) {
// we found a new state from which a hierPre call can take at least one return
Expand Down Expand Up @@ -520,6 +567,21 @@ private boolean checkCost(final double expectedCost, final NestedRun<LETTER, STA
return true;
}

protected boolean followingWayPoint(final STATE state, final LETTER letter) {
final boolean empty = mWayPoints.isEmpty();
if (empty) {
stillFollowingWayPoint = false;
return true;
}
boolean contains = mWayPoints.getFirst().getFirst().equals(state);
contains = contains && mWayPoints.getFirst().getSecond().equals(letter);
if (contains) {
mWayPoints.removeFirst();

}
return contains || mWayPoints.isEmpty();
}

@Override
protected INwaOutgoingLetterAndTransitionProvider<LETTER, STATE> getOperand() {
return mOperand;
Expand Down
Loading