Joachim Klein
ba6c74270f
Property: handle missing constant in search for right // RESULT line
constValues.getValueOf() throws an Exception if the constant value
does not exist. This may happen, e.g., for parametric model checking,
where the parametric constants will have no values.
So, we first check if the constant value exists. If this is not the
case then the RESULT line is clearly no match.
In the future, it might make sense to handle parametric constants
differently than non-existent constants, e.g., to provide a warning
for a nonsensical RESULT line in the latter case.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11601 bbc10eb1-c90d-0410-af57-cb519fbb1720
10 years ago
Joachim Klein
52dc54df5b
ConstantList: methods for removing a constant definition
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11595 bbc10eb1-c90d-0410-af57-cb519fbb1720
10 years ago
Joachim Klein
7cd20911e9
ast.Property: tidy comment
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11594 bbc10eb1-c90d-0410-af57-cb519fbb1720
10 years ago
Joachim Klein
53036fa388
Property.checkAgainstExpectedResultString: Integer results in exact mode
Integer results are now also handled when using exact mode.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11558 bbc10eb1-c90d-0410-af57-cb519fbb1720
10 years ago
Joachim Klein
e1105ab74a
Property.checkAgainstExpectedResultString: handle complex expressions
Instead of before, where only
// RESULT: integer
or
// RESULT: numerator/denominator
were allowed for result expressions, we now support arbitrary expressions
over the model/property parameters, e.g.,
// RESULT: 4.3*floor(q*3)
Caveat: Currently, there can be no whitespace in the expression...
Additionally, when model checking in exact mode, the expected value is
also computed using Expression.evaluateExact.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11557 bbc10eb1-c90d-0410-af57-cb519fbb1720
10 years ago
Joachim Klein
2c8f5427b5
Expression: add evaluateExact methods
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11556 bbc10eb1-c90d-0410-af57-cb519fbb1720
10 years ago
Joachim Klein
d6e222a4e1
RESULT handling for Property: Invert order for picking RESULT
Now, the *first* RESULT that matches the model/property constants
is returned, previously it was the *last*. Inverting the order seems
to better match user expectations.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11548 bbc10eb1-c90d-0410-af57-cb519fbb1720
10 years ago
Joachim Klein
aa3ec454a8
ConstantList: add constructor from Values object
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11547 bbc10eb1-c90d-0410-af57-cb519fbb1720
10 years ago
Joachim Klein
69211a1c35
ConstantList: move initialisation to the variable definitions
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11546 bbc10eb1-c90d-0410-af57-cb519fbb1720
10 years ago
Dave Parker
ec0428f084
Update parser files to version 6.0 of JavaCC.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11367 bbc10eb1-c90d-0410-af57-cb519fbb1720
10 years ago
Joachim Klein
a81aec5199
Simplify: add handling for ExpressionITE (fixes a PTA bug) [by Linda Leuschner]
Add handling for ExpressionITE to Simplify.
Incidentally, this fixes a bug in PTA handling, where guards with an
ITE operation where not properly simplified and thus unsupported, e.g.,
s=0 ? true : false
as guard.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11214 bbc10eb1-c90d-0410-af57-cb519fbb1720
10 years ago
Joachim Klein
e165b9f9a6
refactor testing against PrismNotSupportedException
If the expected result specified via // RESULT
is an error, we treat a PrismNotSupportedException just
as any other ordinary exception. This allows verifying
the content of a PrismNotSupportedException error message.
Otherwise, we do the usual special handling as before.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11173 bbc10eb1-c90d-0410-af57-cb519fbb1720
10 years ago
Joachim Klein
5cfe76d82a
visitor.ReplaceLabels: for replacing labels in an expression
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11165 bbc10eb1-c90d-0410-af57-cb519fbb1720
10 years ago
Dave Parker
e2074832df
Switch from ModuleFile to ModelInfo in Values object.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11089 bbc10eb1-c90d-0410-af57-cb519fbb1720
10 years ago
Dave Parker
efbeda6faf
Switch from ModuleFile to ModelInfo in State object.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11088 bbc10eb1-c90d-0410-af57-cb519fbb1720
10 years ago
Vojtech Forejt
2d8194398b
Fixed a bug where the type of multi was not correctly determined if boolean arguments came before double arguments. Now we enforce doubles to be given first.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11076 bbc10eb1-c90d-0410-af57-cb519fbb1720
10 years ago
Vojtech Forejt
efff3c629b
Removing superfluous debugging output
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11057 bbc10eb1-c90d-0410-af57-cb519fbb1720
10 years ago
Vojtech Forejt
563d0bd772
Added capability for testing Pareto curves (no tests added yet, and the Pareto curve generation itself is still buggy)
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11056 bbc10eb1-c90d-0410-af57-cb519fbb1720
10 years ago
Joachim Klein
ea537cc895
Expression.containsTemporalTimeBounds(): do not recurse into P/R/SS subformulas
Expressions such as
P=?[ X F P>0[F<=4 s=7] ]
were problematic before, as the LTL check for time bounds would recurse into the P-subformula
and complain without need.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11036 bbc10eb1-c90d-0410-af57-cb519fbb1720
10 years ago
Joachim Klein
366660dac4
parser.visitor.ExpressionTraverseNonNested: Helper for traversing Expressions without recursing into nested P/R/SS formulas
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11035 bbc10eb1-c90d-0410-af57-cb519fbb1720
10 years ago
Dave Parker
4c13267ded
Add test methods for special cases in ExpressionLabels.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11028 bbc10eb1-c90d-0410-af57-cb519fbb1720
10 years ago
Dave Parker
d1468e2bd8
Fix recent changes to ExpressionFilter: lower case keywords got lost.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11019 bbc10eb1-c90d-0410-af57-cb519fbb1720
10 years ago
Dave Parker
bf59b2c9f7
Fix bug from new ModelInfo stuff: shows up when PropertiesFile model info is null (e.g. from GUI).
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11017 bbc10eb1-c90d-0410-af57-cb519fbb1720
10 years ago
Dave Parker
dbac067052
Bugfix for last commit: filter op name got lost.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11016 bbc10eb1-c90d-0410-af57-cb519fbb1720
10 years ago
Dave Parker
0d4ea5b904
Simplify parsing of filter operators in ExpressionFilter. [from Steffen Marcker]
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11015 bbc10eb1-c90d-0410-af57-cb519fbb1720
10 years ago
Dave Parker
4449ad4cd1
Further commenting in FilterOperator.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11014 bbc10eb1-c90d-0410-af57-cb519fbb1720
10 years ago
Dave Parker
04d348fabd
Commenting in ExpressionFilter operators. [from Steffen Marcker]
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11013 bbc10eb1-c90d-0410-af57-cb519fbb1720
10 years ago
Dave Parker
0f2bbbc7b6
Add some (syntactic) reward info to the ModelInfo interface and use this where possible in explicit model checking. Can now use ModulesFileModelGenerator for reward property model checking. Also push constant info from ModelGenerator up to ModelInfo.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11006 bbc10eb1-c90d-0410-af57-cb519fbb1720
10 years ago
Dave Parker
2fe6c5d762
Add basic variable info to ModelInfo interface.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11003 bbc10eb1-c90d-0410-af57-cb519fbb1720
11 years ago
Dave Parker
6e20db3f60
Comment typo
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@10998 bbc10eb1-c90d-0410-af57-cb519fbb1720
11 years ago
Dave Parker
388e8b5908
Add initial support to Prism API to load ModelGenerator objects + some associated changes in infrastructure + a test case.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@10996 bbc10eb1-c90d-0410-af57-cb519fbb1720
11 years ago
Dave Parker
7ff1ffe2db
Make ModulesFile implement new ModelInfo interface.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@10972 bbc10eb1-c90d-0410-af57-cb519fbb1720
11 years ago
Dave Parker
9ce7e6441b
Push containsUnboundedVariables methof from VarList up into ModulesFile.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@10970 bbc10eb1-c90d-0410-af57-cb519fbb1720
11 years ago
Dave Parker
f16da3762d
Add missing file from last commit.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@10964 bbc10eb1-c90d-0410-af57-cb519fbb1720
11 years ago
Dave Parker
17087eee26
Decompose semantics checks (into expressions, models, properties). This will facilitate later attempts to make model checking less tied to ModulesFile specifically, rather than other model sources.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@10963 bbc10eb1-c90d-0410-af57-cb519fbb1720
11 years ago
Dave Parker
8775d3a993
Small fix in Expression static constructors to make return types more clearly specified. [from Steffen Marcker]
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@10959 bbc10eb1-c90d-0410-af57-cb519fbb1720
11 years ago
Dave Parker
87b50d7da2
Small change in ExpandPropRefsAndLabels: either properties list or lable list can be omitted (and is then ignored).
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@10901 bbc10eb1-c90d-0410-af57-cb519fbb1720
11 years ago
Dave Parker
b1f83bfbf5
Small fix: slightly more efficient recursion in ExpandLabels and ExpandPropRefsAndLabels.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@10899 bbc10eb1-c90d-0410-af57-cb519fbb1720
11 years ago
Joachim Klein
043c776914
Refactor ConvertForJltl2ba (fix regression due to custom equals/hashCode for ASTElements)
In SVN 10565, custom equals/hashCode methods were introduced for the
various ASTElements/Expressions, providing semantic equality. In the
implementation of ConvertForJltl2ba, a Hashtable was used to store
SimpleLTL formulas for the already handled Expression objects. With
the new equals/hashCode, this can lead to SimpleLTL formulas that
share subtrees, resulting in a DAG instead of a tree.
The SimpleLTL.simplify() function behaves incorrectly for DAGs, e.g.,
for "! (X (s1=7)) | (X (X s1=7))", producing wrong output formulas.
We refactor ConvertForJltl2ba to do a simple recursive transformation
from Expression-based LTL to SimpleLTL. Optionally, sharing of
identical subtrees can be enabled.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@10894 bbc10eb1-c90d-0410-af57-cb519fbb1720
11 years ago
Dave Parker
f95f76ab81
Bugfix in PRISM-to-Latex translation.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@10853 bbc10eb1-c90d-0410-af57-cb519fbb1720
11 years ago
Dave Parker
c373555f9c
Refactoring multi-objective code: readying for allowing lists of objectives in strategy operator.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@10849 bbc10eb1-c90d-0410-af57-cb519fbb1720
11 years ago
Dave Parker
cec60108c2
Comment clarification.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@10845 bbc10eb1-c90d-0410-af57-cb519fbb1720
11 years ago
Dave Parker
d4c5fd4fd5
Remove accidental commits
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@10816 bbc10eb1-c90d-0410-af57-cb519fbb1720
11 years ago
Dave Parker
ff05caf158
Code tidy.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@10815 bbc10eb1-c90d-0410-af57-cb519fbb1720
11 years ago
Dave Parker
ce6131636e
Some refactoring of the RelOp and ModelType enums. [from Steffen Marcker]]
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@10616 bbc10eb1-c90d-0410-af57-cb519fbb1720
11 years ago
Dave Parker
7511a39939
Additional functionality in LTL parser test code.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@10612 bbc10eb1-c90d-0410-af57-cb519fbb1720
11 years ago
Dave Parker
1097ecaaeb
Add a second syntactic co-safe-ness check, which first converts to positive normal form.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@10611 bbc10eb1-c90d-0410-af57-cb519fbb1720
11 years ago
Dave Parker
2c6fece3d9
Auto-format
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@10610 bbc10eb1-c90d-0410-af57-cb519fbb1720
11 years ago
Dave Parker
f85e2cfa85
Remove some unnecessary exception throwing from functions in BooleanUtils.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@10609 bbc10eb1-c90d-0410-af57-cb519fbb1720
11 years ago
Dave Parker
f7e4b6f747
Comment typo
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@10608 bbc10eb1-c90d-0410-af57-cb519fbb1720
11 years ago