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

SMC features for discrete verification #150

Merged
merged 187 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
187 commits
Select commit Hold shift + click to select a range
ea99678
Stochastic Lens, and rate edit menu for transitions
tand00 Apr 29, 2024
709d73b
Added SMC features, only supported by VerifyDTAPN for now
tand00 May 7, 2024
826e7d1
Tool tips to make it clearer
tand00 May 7, 2024
8f88ff4
UI improvements for SMC
tand00 May 8, 2024
37b9e05
SMC Semantics selector to support Strong semantics
tand00 May 8, 2024
a3b91cb
Better smc results explanation
tand00 May 8, 2024
f68c8c8
Disabled GCD lowering when SMC
tand00 May 21, 2024
1254ef9
Merge remote-tracking branch 'tapaal-home/main'
tand00 May 27, 2024
af7b454
Fix merge bug
tand00 May 27, 2024
baa8185
Merge remote-tracking branch 'tapaal-home/main'
tand00 Jun 10, 2024
50b39c2
SMC text query parser
tand00 Jun 10, 2024
907beba
Support for distributions, cleanup needed
tand00 Jul 1, 2024
dc61823
Better transition editor
tand00 Jul 5, 2024
4bb8861
Colors SMC (not working yet)
tand00 Jul 9, 2024
f7fc17e
Merge remote-tracking branch 'tapaal-home/main'
tand00 Jul 9, 2024
f9ceed5
Wrong package fix in parser
tand00 Jul 9, 2024
4d77a9e
Query saving SMC options
tand00 Jul 11, 2024
5d01984
UI fixs
tand00 Jul 11, 2024
f331be6
Live explanation for distributions
tand00 Jul 16, 2024
589dea6
SMC checking for deadlocks
tand00 Jul 18, 2024
8ee116b
Switched from interval to +/- for SMC estimation
tand00 Jul 19, 2024
2da310e
Fixed StackOverflow when loading model with SMC deadlock query
tand00 Jul 22, 2024
1ade8ba
Parallel, Colors, and benchmark
tand00 Jul 26, 2024
38fed66
Better SMC explanations, and time estimation
tand00 Aug 2, 2024
bd84c1f
More benchmark runs
tand00 Aug 2, 2024
5273199
Time / Precision settings for SMC quantitative estimation
tand00 Aug 5, 2024
015e29b
Better code organization
tand00 Aug 5, 2024
948014a
Supporting simultaneous time and steps bound for SMC
tand00 Aug 6, 2024
3183bb0
Disabled overapprox for smc queries
tand00 Aug 6, 2024
eb8461b
Checkboxes for infinite bounds
tand00 Aug 6, 2024
1bec46c
Experimental time estimation using 2 benchmarks
tand00 Aug 6, 2024
5791d7f
Clearer UI
tand00 Aug 6, 2024
0eef0d2
Typing error : < to <= for smc query result
tand00 Aug 7, 2024
dd47569
Colored distributions fix
tand00 Aug 7, 2024
2996c6e
Distribution fixs
tand00 Aug 7, 2024
98ff811
Transition Weight
tand00 Aug 8, 2024
4bd8276
Display Weight under transition component
tand00 Aug 8, 2024
21921c6
New stats : average per valid
tand00 Aug 8, 2024
e1b45e9
Constant transition weight
tand00 Aug 9, 2024
c906622
New distribution panel
tand00 Aug 9, 2024
3bf3b6c
Unfolded loader fix
tand00 Aug 9, 2024
951a213
better layout for transition weight
tand00 Aug 9, 2024
defe784
Constant update for transition probability
tand00 Aug 9, 2024
b06afee
Better estimation UI
tand00 Aug 9, 2024
ecc53fb
Fix estimation
tand00 Aug 9, 2024
071b5f9
Better estimation mechanics
tand00 Aug 9, 2024
996c632
New net, better radio buttons behaviour
tand00 Aug 13, 2024
4b2bea0
Added probability to batch processing
mtygesen Aug 13, 2024
af62000
Added quantitative result class
mtygesen Aug 13, 2024
af728da
Merge pull request #1 from mtygesen/batch-processing-probability
tand00 Aug 13, 2024
82ba980
Standard deviation
tand00 Aug 13, 2024
22c2918
Merge branch 'main' of github.com:tand00/tapaal-gui
tand00 Aug 13, 2024
a12ede4
added graph for smc stats
mtygesen Aug 13, 2024
64f3b46
Merge pull request #3 from mtygesen/constants-remain-after-removal-20…
tand00 Aug 14, 2024
c2def4c
Merge branch 'main' of github.com:tand00/tapaal-gui
tand00 Aug 14, 2024
7eab24d
SMC various fixes
tand00 Aug 14, 2024
9ac91bd
updates to graphs
mtygesen Aug 14, 2024
ddad464
Better smc stats
tand00 Aug 15, 2024
4a07cef
added discrete uniform and updated resolution on exponential and gamma
mtygesen Aug 15, 2024
212b481
updated text
mtygesen Aug 15, 2024
7034e91
updated axis labels
mtygesen Aug 15, 2024
c66827c
Merge branch 'main' into smc-graphs
tand00 Aug 15, 2024
8b3db4b
Merge pull request #2 from mtygesen/smc-graphs
tand00 Aug 15, 2024
ea8bd39
Merge branch 'TAPAAL:main' into main
tand00 Aug 15, 2024
f2c2981
fixed query selected not updating
mtygesen Aug 15, 2024
8f366af
Fixed issue with gamma function and other updates
mtygesen Aug 15, 2024
e2e844f
comment
mtygesen Aug 15, 2024
a5f7435
Merge pull request #4 from mtygesen/smc-query-bug
tand00 Aug 15, 2024
fb81f17
Merge pull request #5 from mtygesen/smc-graph-updates
tand00 Aug 15, 2024
b25ebf9
Merge branch 'TAPAAL:main' into main
tand00 Aug 15, 2024
33b60b6
added mean to graphs
mtygesen Aug 15, 2024
fa46eaf
Now also shows mean legend + graph dialog interface update
mtygesen Aug 16, 2024
44f2dd6
small format
mtygesen Aug 16, 2024
bf0bc02
Merge pull request #6 from mtygesen/smc-graph-mean
tand00 Aug 16, 2024
a9f06ec
remove continuous engine from engine selection when using stochastic …
mtygesen Aug 16, 2024
ea2fb9f
Merge branch 'TAPAAL:main' into main
tand00 Aug 16, 2024
91de81f
Benchmark fix
tand00 Aug 16, 2024
e48c092
Merge branch 'main' of github.com:tand00/tapaal-gui
tand00 Aug 16, 2024
837df23
Fixed query dialog for smc
mtygesen Aug 16, 2024
9521472
Merge pull request #7 from mtygesen/smc-engine-selection
tand00 Aug 16, 2024
a05a6cf
started working on firing mode
mtygesen Aug 16, 2024
fc288d0
added firing mode to transitions
mtygesen Aug 16, 2024
23e535e
Merge pull request #8 from mtygesen/smc-firing-mode
tand00 Aug 19, 2024
7115bf7
FiringMode engine export fix
tand00 Aug 19, 2024
92ab5a5
started working on trace options
mtygesen Aug 19, 2024
a87b7df
Merge branch 'multi-trace-export-fix' into smc-trace-options
mtygesen Aug 19, 2024
28ad807
traces work for some nets
mtygesen Aug 19, 2024
b2bb9f1
updates
mtygesen Aug 19, 2024
d4a4d0b
enable unfolding of colored smc when simulating
mtygesen Aug 20, 2024
d56a68e
multi traces works for uncolored smc
mtygesen Aug 20, 2024
3e7d5b2
traces work for colored smc
mtygesen Aug 20, 2024
d1b3daa
ui fixes
mtygesen Aug 20, 2024
4677949
Merge branch 'multi-trace-export-fix' into smc-trace-options
mtygesen Aug 20, 2024
3440471
no longer shows valid runs when asking for trace
mtygesen Aug 20, 2024
506e231
Merge pull request #9 from mtygesen/smc-trace-options
tand00 Aug 20, 2024
e0163c0
Merge branch 'TAPAAL:main' into main
tand00 Aug 21, 2024
0a9c451
New SMC result panel
tand00 Aug 21, 2024
dc54091
new example : smc-fair-coin-from-unfair.tapn
tand00 Aug 21, 2024
7dc7453
Merge branch 'main' of [email protected]:tand00/tapaal-gui.git
tand00 Aug 21, 2024
4480fb1
Std Dev display with tooltip
tand00 Aug 21, 2024
d07c07b
Better SMCResultPanel layout
tand00 Aug 22, 2024
76bc8f5
Fixed queries quantifiers in fireflies example
tand00 Aug 22, 2024
222c7cb
Default firing mode to avoid nullpointerexception
tand00 Aug 22, 2024
8a4746a
added precision and confidence slider
mtygesen Aug 22, 2024
6e07b1f
Merge pull request #10 from mtygesen/smc-sliders
tand00 Aug 22, 2024
fa27668
Better title
tand00 Aug 22, 2024
eaab8bc
Merge branch 'main' of [email protected]:tand00/tapaal-gui.git
tand00 Aug 22, 2024
1af70dc
changed explanation breaks to stop fields from changing size
mtygesen Aug 22, 2024
5042ee3
Merge pull request #11 from mtygesen/smc-transition-ui-rework
tand00 Aug 22, 2024
1957dc5
Better UI
tand00 Aug 22, 2024
a5300e3
updated sliders and graphs
mtygesen Aug 22, 2024
4b79b5c
Merge pull request #12 from mtygesen/smc-graph-margin
tand00 Aug 22, 2024
f8c424f
updated command to interface and added command for weight and firingmode
mtygesen Aug 22, 2024
482a193
added new commands
mtygesen Aug 22, 2024
5027f99
revert
mtygesen Aug 22, 2024
a3d76dc
Erlang and geometric
tand00 Aug 22, 2024
df73c16
Changed geometric distribution explanation
tand00 Aug 22, 2024
ea48a12
small updates
mtygesen Aug 22, 2024
aeb3f5d
moved explanations under tooltip
mtygesen Aug 22, 2024
d9f9257
rotate label fix
mtygesen Aug 22, 2024
1b9bdf0
moved weight label
mtygesen Aug 22, 2024
7631b5b
update transition gui
mtygesen Aug 23, 2024
e4c2190
Fixed bug with weight and distribution update command
mtygesen Aug 23, 2024
030ee85
size revert
mtygesen Aug 23, 2024
fca8f59
Merge pull request #13 from mtygesen/smc-command-fix
tand00 Aug 23, 2024
6667c73
removed magic numbers and fixed switch for windows
mtygesen Aug 23, 2024
179280f
Merge pull request #14 from mtygesen/smc-bug-fixes
tand00 Aug 26, 2024
b136347
updates to transition ui and graphs
mtygesen Aug 27, 2024
1148cc0
simplifications and floating point fixes
mtygesen Aug 27, 2024
3f7c6f2
tweaks to auto margin on graphs
mtygesen Aug 27, 2024
5b32624
Merge branch 'main' into main
tand00 Aug 27, 2024
6782b9c
reordering transition gui
mtygesen Aug 28, 2024
2683617
Merge branch 'smc' into smc-transition-rework
mtygesen Aug 28, 2024
6d42a47
minor refactors
mtygesen Aug 28, 2024
7756616
Help dialog for SMC
tand00 Aug 28, 2024
6c346b1
added slider for estimated time
mtygesen Aug 28, 2024
ab16a88
Merge pull request #15 from mtygesen/smc-transition-rework
tand00 Aug 28, 2024
b023a3b
Merge branch 'TAPAAL:main' into main
tand00 Aug 29, 2024
9bed81a
"Verification time" -> "Average Simulation time" for smc result panel
tand00 Aug 29, 2024
1c272f2
changed estimated time slider to range from 1..100 in integers only
mtygesen Aug 29, 2024
f48ff18
Merge pull request #16 from mtygesen/smc-estimated-verification-slider
tand00 Aug 29, 2024
6c0bb2a
fixed container for param labels and fields
mtygesen Aug 29, 2024
bd2f4d9
fixed bug and better error messages
mtygesen Aug 29, 2024
1f08f24
Revert "fixed bug and better error messages"
mtygesen Aug 29, 2024
3853ab9
replaced euler example with new one
mtygesen Aug 30, 2024
09bdc9f
added more rows to net statistics and conversion of smc queries
mtygesen Aug 30, 2024
44a3a8d
Merge pull request #17 from mtygesen/smc-updates
tand00 Aug 30, 2024
6496ea0
Merge branch 'TAPAAL:main' into main
tand00 Aug 30, 2024
d7380cd
Fixed query conversions between smc and updated euler example net
mtygesen Aug 30, 2024
5510800
Fixed issue where smc queries did not update correctly
mtygesen Sep 2, 2024
f644c12
Query result stats fix for simulate mode
tand00 Sep 3, 2024
d3e1568
Merge branch 'TAPAAL:main' into main
tand00 Sep 3, 2024
8c4fad0
Merge branch 'TAPAAL:main' into main
tand00 Sep 6, 2024
8d2f981
Updated SMC examples
tand00 Sep 6, 2024
d4f97e1
Update stochastic-consumer-producer.tapn
tand00 Sep 6, 2024
59fefa5
Update stochastic-consumer-producer.tapn
tand00 Sep 6, 2024
6ce42d0
Update stochastic-consumer-producer.tapn
tand00 Sep 6, 2024
ea1d207
Updated consumer-producer example
tand00 Sep 9, 2024
510c22d
Merge branch 'TAPAAL:main' into main
tand00 Sep 9, 2024
7dde31d
started working on smc updates
mtygesen Sep 9, 2024
0ed83a7
updates to make position consisten for type combobox
mtygesen Sep 9, 2024
986f121
small alignment fix
mtygesen Sep 9, 2024
af5df0f
initial tool tips
mtygesen Sep 9, 2024
34ba863
updated slider ranges
mtygesen Sep 10, 2024
eb629c2
fixed width
mtygesen Sep 10, 2024
d205d46
Merge branch 'smc-query-conversion-fix' of github.com:mtygesen/tapaal…
tand00 Sep 10, 2024
7cfac1f
Merge branch 'TAPAAL:main' into main
tand00 Sep 11, 2024
d6e631f
potential fix for macc dialog width
mtygesen Sep 12, 2024
ab09b56
mac test
mtygesen Sep 12, 2024
a7ba611
test
mtygesen Sep 12, 2024
f4c3207
test
mtygesen Sep 12, 2024
04fe209
test
mtygesen Sep 12, 2024
16af143
revert
mtygesen Sep 12, 2024
66c1f4b
fixed issues with normal distribution and updated gammmma graph
mtygesen Sep 15, 2024
60d2dff
windows test
mtygesen Sep 15, 2024
bac7dc9
Merge pull request #20 from mtygesen/smc-query-option-rework
tand00 Sep 15, 2024
cdf74cd
Merge pull request #21 from mtygesen/smc-problem-with-graph-2080627
tand00 Sep 15, 2024
47a6e48
Merge branch 'colors-all-fix'
tand00 Sep 16, 2024
119d5f9
fixed issue where width of fields in quantitative panel would go to z…
mtygesen Sep 16, 2024
482d273
Merge pull request #22 from mtygesen/time-estimation-width-fix
tand00 Sep 16, 2024
9119167
Merge branch 'TAPAAL:main' into main
tand00 Sep 16, 2024
487619b
Merge branch 'colors-all-fix'
tand00 Sep 17, 2024
b0a2fc8
Merge branch 'colors-all-fix'
tand00 Sep 17, 2024
f5f62bc
Updated consumers-producer example
tand00 Sep 17, 2024
fa8dc34
Fixed wrong search strategy option with SMC
tand00 Sep 17, 2024
ec841c5
Applied coding rules
tand00 Sep 17, 2024
e733bba
Merge branch 'TAPAAL:main' into main
tand00 Sep 17, 2024
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 build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ dependencies {
implementation 'net.java.dev.jna:jna:5.11.0'
implementation 'org.jetbrains:annotations:23.0.0'
implementation 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.3'
implementation 'org.jfree:jfreechart:1.5.5'

testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,9 +399,7 @@ else if(nodeName.equals("deadlock")){
}
} else if (nodeName.equals("control")) {
return parseFormula(child);
}else{
parseFormula(property);
}
}

throw new XMLQueryParseException(ERROR_MESSAGE + nodeName);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,9 @@ private TCTLAbstractProperty parseFormula(Node property)
}
return new TCTLOrListNode(transitions);
}
} else{
} else if(nodeName.equals("deadlock")) {
return new TCTLDeadlockNode();
} else {
parseFormula(property);
}

Expand Down
84 changes: 42 additions & 42 deletions src/main/java/dk/aau/cs/TCTL/visitors/LTLQueryVisitor.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,43 +7,43 @@

public class LTLQueryVisitor extends VisitorBase {

private static final String XML_NS = "xmlns=\"http://tapaal.net/\"";
private static final String XML_PROPSET = "property-set";
private static final String XML_PROP = "property";
private static final String XML_PROPID = "id";
private static final String XML_PROPDESC = "description";
private static final String XML_FORMULA = "formula";
private static final String XML_ALLPATHS = "all-paths";
private static final String XML_EXISTSPATH = "exists-path";
private static final String XML_NEGATION = "negation";
private static final String XML_CONJUNCTION = "conjunction";
private static final String XML_DISJUNCTION = "disjunction";
private static final String XML_GLOBALLY = "globally";
private static final String XML_FINALLY = "finally";
private static final String XML_NEXT = "next";
private static final String XML_UNTIL = "until";
private static final String XML_BEFORE = "before";
private static final String XML_REACH = "reach";
private static final String XML_DEADLOCK = "deadlock";
private static final String XML_TRUE = "true";
private static final String XML_FALSE = "false";
private static final String XML_INTEGERLT = "integer-lt";
private static final String XML_INTEGERLE = "integer-le";
private static final String XML_INTEGEREQ = "integer-eq";
private static final String XML_INTEGERNE = "integer-ne";
private static final String XML_INTEGERGT = "integer-gt";
private static final String XML_INTEGERGE = "integer-ge";
private static final String XML_ISFIREABLE = "is-fireable";
private static final String XML_INTEGERCONSTANT = "integer-constant";
private static final String XML_TOKENSCOUNT = "tokens-count";
private static final String XML_PLACE = "place";
private static final String XML_TRANSITION = "transition";
private static final String XML_INTEGERSUM = "integer-sum";
private static final String XML_INTEGERPRODUCT = "integer-product";
private static final String XML_INTEGERDIFFERENCE = "integer-difference";


private final StringBuffer xmlQuery = new StringBuffer();
protected static final String XML_NS = "xmlns=\"http://tapaal.net/\"";
protected static final String XML_PROPSET = "property-set";
protected static final String XML_PROP = "property";
protected static final String XML_PROPID = "id";
protected static final String XML_PROPDESC = "description";
protected static final String XML_FORMULA = "formula";
protected static final String XML_ALLPATHS = "all-paths";
protected static final String XML_EXISTSPATH = "exists-path";
protected static final String XML_NEGATION = "negation";
protected static final String XML_CONJUNCTION = "conjunction";
protected static final String XML_DISJUNCTION = "disjunction";
protected static final String XML_GLOBALLY = "globally";
protected static final String XML_FINALLY = "finally";
protected static final String XML_NEXT = "next";
protected static final String XML_UNTIL = "until";
protected static final String XML_BEFORE = "before";
protected static final String XML_REACH = "reach";
protected static final String XML_DEADLOCK = "deadlock";
protected static final String XML_TRUE = "true";
protected static final String XML_FALSE = "false";
protected static final String XML_INTEGERLT = "integer-lt";
protected static final String XML_INTEGERLE = "integer-le";
protected static final String XML_INTEGEREQ = "integer-eq";
protected static final String XML_INTEGERNE = "integer-ne";
protected static final String XML_INTEGERGT = "integer-gt";
protected static final String XML_INTEGERGE = "integer-ge";
protected static final String XML_ISFIREABLE = "is-fireable";
protected static final String XML_INTEGERCONSTANT = "integer-constant";
protected static final String XML_TOKENSCOUNT = "tokens-count";
protected static final String XML_PLACE = "place";
protected static final String XML_TRANSITION = "transition";
protected static final String XML_INTEGERSUM = "integer-sum";
protected static final String XML_INTEGERPRODUCT = "integer-product";
protected static final String XML_INTEGERDIFFERENCE = "integer-difference";


protected final StringBuffer xmlQuery = new StringBuffer();

public LTLQueryVisitor() {
super();
Expand Down Expand Up @@ -83,7 +83,7 @@ public String getEndTag(){
return endTag(XML_PROPSET) + "\n";
}

private String queryInfo(String queryName){
protected String queryInfo(String queryName){
String nameToPrint = (queryName == null) ? "Query Comment/Name Here" : queryName;
return wrapInTag(nameToPrint, XML_PROPID) + wrapInTag(nameToPrint, XML_PROPDESC);
}
Expand Down Expand Up @@ -234,16 +234,16 @@ public void visit(TCTLAtomicPropositionNode atomicPropositionNode, Object contex
xmlQuery.append(endTag(op));
}

private String wrapInTag(String str, String tag){
protected String wrapInTag(String str, String tag){
return startTag(tag) + str + endTag(tag);
}
private String startTag(String tag){
protected String startTag(String tag){
return "<" + tag + ">";
}
private String endTag(String tag){
protected String endTag(String tag){
return "</" + tag + ">";
}
private String emptyElement(String tag){
protected String emptyElement(String tag){
return startTag(tag + "/");
}
}
58 changes: 58 additions & 0 deletions src/main/java/dk/aau/cs/TCTL/visitors/SMCQueryVisitor.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
package dk.aau.cs.TCTL.visitors;

import dk.aau.cs.TCTL.*;
import dk.aau.cs.verification.SMCSettings;

public class SMCQueryVisitor extends LTLQueryVisitor {

private static final String XML_SMC = "smc";
private static final String XML_TIME_BOUND_TAG = "time-bound";
private static final String XML_STEP_BOUND_TAG = "step-bound";
private static final String XML_FALSE_POS_TAG = "false-positives";
private static final String XML_FALSE_NEG_TAG = "false-negatives";
private static final String XML_INDIFFERENCE_TAG = "indifference";
private static final String XML_CONFIDENCE_TAG = "confidence";
private static final String XML_INTERVAL_WIDTH_TAG = "interval-width";
private static final String XML_COMPARE_TO_FLOAT_TAG = "compare-to";

public String getXMLQueryFor(TCTLAbstractProperty property, String queryName, SMCSettings settings) {
buildXMLQuery(property, queryName, settings);
return getFormatted();
}

public void buildXMLQuery(TCTLAbstractProperty property, String queryName, SMCSettings settings) {
xmlQuery.append(startTag(XML_PROP) + queryInfo(queryName) + smcTag(settings) + startTag(XML_FORMULA));
property.accept(this, null);
xmlQuery.append(endTag(XML_FORMULA) + endTag(XML_PROP));
}

private String smcTag(SMCSettings settings) {
String tagContent = XML_SMC;
if(settings.timeBound < Integer.MAX_VALUE)
tagContent += tagAttribute(XML_TIME_BOUND_TAG, settings.timeBound);
if(settings.stepBound < Integer.MAX_VALUE)
tagContent += tagAttribute(XML_STEP_BOUND_TAG, settings.stepBound);
if(settings.compareToFloat) {
tagContent += tagAttribute(XML_FALSE_POS_TAG, settings.falsePositives);
tagContent += tagAttribute(XML_FALSE_NEG_TAG, settings.falseNegatives);
tagContent += tagAttribute(XML_INDIFFERENCE_TAG, settings.indifferenceWidth);
tagContent += tagAttribute(XML_COMPARE_TO_FLOAT_TAG, settings.geqThan);
} else {
tagContent += tagAttribute(XML_CONFIDENCE_TAG, settings.confidence);
tagContent += tagAttribute(XML_INTERVAL_WIDTH_TAG, settings.estimationIntervalWidth);
}
return emptyElement(tagContent);
}

private String tagAttribute(String name, String value) {
return " " + name + "=\"" + value + "\"";
}

private String tagAttribute(String name, float value) {
return " " + name + "=\"" + String.valueOf(value) + "\"";
}

private String tagAttribute(String name, int value) {
return " " + name + "=\"" + String.valueOf(value) + "\"";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ else if (k instanceof TimedTransitionStep) {
} else {
NameMapping nameMapping = isColored? result.getUnfoldedModel().value2(): transformedModel.value2();
TimedArcPetriNetNetwork netNetwork = isColored? result.getUnfoldedModel().value1().parentNetwork(): model;
if (dataLayerQuery != null && dataLayerQuery.getCategory() == net.tapaal.gui.petrinet.verification.TAPNQuery.QueryCategory.HyperLTL) {
if (dataLayerQuery != null && dataLayerQuery.getCategory() == net.tapaal.gui.petrinet.verification.TAPNQuery.QueryCategory.HyperLTL || dataLayerQuery.getCategory() == net.tapaal.gui.petrinet.verification.TAPNQuery.QueryCategory.SMC) {
toReturn = new VerificationResult<>(
result.getQueryResult(),
decomposeTrace(result.getTraceMap(), nameMapping, netNetwork),
Expand Down Expand Up @@ -486,7 +486,7 @@ else if (k instanceof TimedTransitionStep) {

options.setTraceOption(oldTraceOption);
// if the old traceoption was none, we need to set the results traces to null so GUI doesn't try to display the traces later
if (oldTraceOption == TraceOption.NONE && toReturn != null){
if (oldTraceOption == TraceOption.NONE && toReturn != null && dataLayerQuery.getCategory() != net.tapaal.gui.petrinet.verification.TAPNQuery.QueryCategory.SMC) {
toReturn.setTrace(null);
toReturn.setSecondaryTrace(null);
}
Expand Down Expand Up @@ -527,8 +527,9 @@ public VerificationResult<TimedArcPetriNetTrace> batchWorker(
boolean modelIsColored = composedModel.value1().isColored();
boolean modelIsTimed = !composedModel.value1().isUntimed();
boolean modelIsGame = composedModel.value1().hasUncontrollableTransitions();
boolean modelIsStochastic = composedModel.value1().isStochastic();

TAPNLens lens = new TAPNLens(modelIsTimed, modelIsGame, modelIsColored);
TAPNLens lens = new TAPNLens(modelIsTimed, modelIsGame, modelIsColored, modelIsStochastic);

VerificationResult<TimedArcPetriNetTrace> verificationResult = modelChecker.verify(options, composedModel, queryToVerify, null, query, lens);

Expand Down
5 changes: 3 additions & 2 deletions src/main/java/dk/aau/cs/io/LoadedModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ public TAPNLens getLens(){
} else {
boolean isNetTimed = !network().isUntimed();
boolean isNetGame = network().hasUncontrollableTransitions();
boolean isNetColored = network.isColored();
boolean isNetColored = network().isColored();
boolean isNetStochastic = network().isStochastic();

return new TAPNLens(isNetTimed, isNetGame, isNetColored);
return new TAPNLens(isNetTimed, isNetGame, isNetColored, isNetStochastic);
}
}
public boolean isColored(){
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/dk/aau/cs/io/PNMLWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ private Element createTransitionElement(TimedTransitionComponent inputTransition

Element transitionElement = document.createElement("transition");
transitionElement.setAttribute("id", (inputTransition.getId() != null ? inputTransition.getId() : "error"));
inputTransition.underlyingTransition().getDistribution().writeToXml(transitionElement);

Element name = document.createElement("name"); //Name
transitionElement.appendChild(name);
Expand Down Expand Up @@ -276,6 +277,7 @@ private Element createColoredTransitionElement (TimedTransitionComponent inputTr

Element transitionElement = document.createElement("transition");
transitionElement.setAttribute("id", (inputTransition.getId() != null ? inputTransition.getId() : "error"));
inputTransition.underlyingTransition().getDistribution().writeToXml(transitionElement);

Element name = document.createElement("name"); //Name
transitionElement.appendChild(name);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/dk/aau/cs/io/PNMLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ private LoadedModel parse(Document doc) throws FormatException {
Node pnmlElement = doc.getElementsByTagName("pnml").item(0);
Node netNode = getFirstDirectChild(pnmlElement, "net");

lens = new TAPNLens(false, false, getFirstDirectChild(netNode, "declaration") != null);
lens = new TAPNLens(false, false, getFirstDirectChild(netNode, "declaration") != null, false);

String name = getTAPNName(netNode);

Expand Down
Loading
Loading