Joachim Klein
16c5442ab1
(HOA path) PrismParser: refactor double quoted identifiers
7 years ago
Dave Parker
35f392ec5e
POMDPs: Allow arbitrary expressions as observables, not just variables.
In addition to declaring some variables to be observable using an
observables ... endobservables block, other observables can be
defined as follows:
observable "top" = y=ymax;
which comprises a name and an expression to define it.
These named observables can appear in properties (e.g., to express
a target for reachability) in the same way as labels.
The ModelGenerator/ModelInfo interfaces are updated accordingly.
The key methods that need to be implemented are getObservableNames()
and getObservableTypes(), in ModelInfo and getObservation(State),
in ModelGenerator. As an optimisation (but essential for efficiency
in practice) isVarObservable() should also be implemented, since this
is needed to construct Belief objects that are as compact as possible.
Implementation/code details:
* New parser AST classes: ObservableVars/Observable (for observable
definitions in ModulesFile) and ExpressionObs (for references to
observables in expressions).
* A few imports are fixed to avoid names clases with Observable
* Observations/unobservations are now just stored as State objects,
so the Observation/Unobservation classes (in parser) are now redundant
and have been removed.
5 years ago
Dave Parker
c7cf09659c
Model type auto-detection for partially observable models.
MDPs/PTAs are considered to be POMDPs/POPTAs if they have observables.
5 years ago
Dave Parker
22b4bf1bcb
Add support for partially observable PTAs (POPTAs).
Uses a combination of digital clocks and POMDP model checking.
6 years ago
Dave Parker
12d07c9a8d
Add support for model checking partially observable MDPs (POMDPs).
This is a rebased version of the code previously published in the prism-ext repo,
with various bits of code refactored, tidied and improved.
Model construction and model checking support is added to the explicit engine.
The PRISM modelling language is extended with the 'pomdp' model keyword
and observables...endobservables blocks to indicate observable variables.
6 years ago
Dave Parker
953e2f5be3
Parser: Add position info to update elements for better error reporting.
8 years ago
Dave Parker
2700f52271
Allow the actual type of a PRISM model to differ from the one specified in the file.
For now, this provides a cleaner implementation of the default (unspecified)
model type being set to an MDP. Later, this will allow the actual model type
to be omitted or partially specified and derived from langage features.
6 years ago
Joachim Klein
abf37417fd
Fix JDK9 compilation issue, use parser.ast.Module instead of Module
In Java 9, there is a new system class java.lang.Module that is implicitly imported
everywhere and which clashes with the parser.ast.Module class, resulting in
compilation errors, as javac is not able to disambiguate between the two
automatically.
We are therefore more specific when referencing the PRISM parser's 'Module' class,
by using the full 'parser.ast.Module' name.
9 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
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
10 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
10 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
2119ef3f85
Slight tweak to LTL test in parser.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@10583 bbc10eb1-c90d-0410-af57-cb519fbb1720
11 years ago
Dave Parker
9493710a0f
Add some additional functionality to the LTL test mode of PrismParser.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@10563 bbc10eb1-c90d-0410-af57-cb519fbb1720
11 years ago
Dave Parker
8dbdce2e91
Test code for LTL formulas in PrismParser.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@10554 bbc10eb1-c90d-0410-af57-cb519fbb1720
11 years ago
Dave Parker
fa9b601faf
Update parser to allow proper <<>> or [[]] syntax.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@10418 bbc10eb1-c90d-0410-af57-cb519fbb1720
11 years ago
Dave Parker
234fe87e31
Fix parser tweak from previous commit.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@10364 bbc10eb1-c90d-0410-af57-cb519fbb1720
11 years ago
Dave Parker
cfa767ec0d
Parser tweak to avoid ambiguities with S operator inside an R (now that LTL formulae are allowed).
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@10361 bbc10eb1-c90d-0410-af57-cb519fbb1720
11 years ago
Dave Parker
957148215e
Support (symbolic/explicit) for expected reward to satisfy a co-safe LTL formula.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@10334 bbc10eb1-c90d-0410-af57-cb519fbb1720
11 years ago
Dave Parker
f19cb029d7
Parse modifiers on R and S operators as well as P.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@10037 bbc10eb1-c90d-0410-af57-cb519fbb1720
11 years ago
Dave Parker
8475ae29be
ExpressionQuant: mode -> modifier.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@10034 bbc10eb1-c90d-0410-af57-cb519fbb1720
11 years ago
Dave Parker
1945ef1d40
More refactoring of ExpressionQuant and add "mode" field, currently ignored.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@10032 bbc10eb1-c90d-0410-af57-cb519fbb1720
11 years ago
Dave Parker
bb6693f43d
Allow comments to have no trailing new-line (e.g. when occurring at very end of file) - cannot see a good reason not to allow this.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@9851 bbc10eb1-c90d-0410-af57-cb519fbb1720
11 years ago
Dave Parker
38f0e001c2
Bugfix in PrismParser.isKeyword (leading to incorrect identification of bad identifiers in SBML/reactions to PRISM translation).
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@9733 bbc10eb1-c90d-0410-af57-cb519fbb1720
11 years ago
Dave Parker
8cb6a437cd
Add strategy operators (<<>> and [[]]) to parser, but no support model checking.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@9219 bbc10eb1-c90d-0410-af57-cb519fbb1720
11 years ago
Dave Parker
bbbe3311d1
Add ratio reward objectives to the property parser (copied from prism-frac) but no model checking support yet.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@8810 bbc10eb1-c90d-0410-af57-cb519fbb1720
12 years ago
Dave Parker
8907515653
Parser fix: stop some unnecessary SystemDefn nodes being created in the parse tree.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@8789 bbc10eb1-c90d-0410-af57-cb519fbb1720
12 years ago
Dave Parker
7fb4426803
Models can have multiple system...endsystem constructs, they can be named, and they can be referenced from each other.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@8597 bbc10eb1-c90d-0410-af57-cb519fbb1720
12 years ago
Dave Parker
7abfb618f0
Suppress compiler warning
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@6984 bbc10eb1-c90d-0410-af57-cb519fbb1720
13 years ago
Dave Parker
fe4cd9560c
Allow unbounded integer variables in model (but forbid for symbolic model construction).
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@6929 bbc10eb1-c90d-0410-af57-cb519fbb1720
13 years ago
Dave Parker
9b5aae301f
Patch in current version of multi-objective model checking (from prism-multi branch). Still need to copy across etc/ directory containing lpsolve libraries. Also contains a few JDD fixes via Christian von Essen.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@6211 bbc10eb1-c90d-0410-af57-cb519fbb1720
13 years ago
Dave Parker
0022e81b1b
Parser handles invalid literals (too big etc.) + tidy up of parser error reporting code.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@5520 bbc10eb1-c90d-0410-af57-cb519fbb1720
14 years ago
Dave Parker
cdac320532
Fix in parser: make keyword list be created statically.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@5404 bbc10eb1-c90d-0410-af57-cb519fbb1720
14 years ago
Dave Parker
63162e41a3
Time-bounded properties with equal lower/upper bounds, e.g. P=?[ F[T,T] target ], can be specified as P=?[ F=T target ], for convenience.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@4710 bbc10eb1-c90d-0410-af57-cb519fbb1720
14 years ago
Dave Parker
3c8ca8495d
Added iff (<=>) to PRISM model/properties language.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@3175 bbc10eb1-c90d-0410-af57-cb519fbb1720
15 years ago
Dave Parker
8465fdeb07
Property names parsed (but not used) and -test switch added (but no property/verify blocks yet).
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@3096 bbc10eb1-c90d-0410-af57-cb519fbb1720
15 years ago
Dave Parker
ce4b0beb1e
Undoing last commit.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@3079 bbc10eb1-c90d-0410-af57-cb519fbb1720
15 years ago
Dave Parker
bcab165234
Use gcc-3 etc by default when building on Cygwin.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@3078 bbc10eb1-c90d-0410-af57-cb519fbb1720
15 years ago
Dave Parker
be47ad30e8
Cleaner handling of model types in parser code.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@3042 bbc10eb1-c90d-0410-af57-cb519fbb1720
15 years ago
Dave Parker
37a11d25bd
Parser accepts unicode (e.g. in comments).
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@2830 bbc10eb1-c90d-0410-af57-cb519fbb1720
15 years ago
Dave Parker
2eb3538cd4
Allowed strict lower bounds in temporal operators (CTMCs only). Note: New parser classes generated due to new version of JavaCC.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@2328 bbc10eb1-c90d-0410-af57-cb519fbb1720
15 years ago
Dave Parker
a04e766e04
Added -keywords switch.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@2321 bbc10eb1-c90d-0410-af57-cb519fbb1720
15 years ago
Dave Parker
726ff06c1b
Updates to filters.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@1801 bbc10eb1-c90d-0410-af57-cb519fbb1720
16 years ago
Dave Parker
a6627b8c5a
Filters, new property semantics and corresponding code tidying.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@1712 bbc10eb1-c90d-0410-af57-cb519fbb1720
16 years ago
Dave Parker
0ea0b0918e
First full version of new filter code.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@1661 bbc10eb1-c90d-0410-af57-cb519fbb1720
16 years ago
Dave Parker
3fe7e6f421
Removed accidental part of last commit.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@1657 bbc10eb1-c90d-0410-af57-cb519fbb1720
16 years ago
Dave Parker
324e51f746
Code tidy (parser).
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@1656 bbc10eb1-c90d-0410-af57-cb519fbb1720
16 years ago
Dave Parker
b71b56460b
Bugfix: Some state reward struct items misidentified as transition rewards.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@1565 bbc10eb1-c90d-0410-af57-cb519fbb1720
16 years ago
Dave Parker
d199d035ed
Integration of prism-explicit branch into trunk, i.e. merge of trunk@1015-prism-explicit@1405 into trunk.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@1406 bbc10eb1-c90d-0410-af57-cb519fbb1720
17 years ago
Dave Parker
2ccc376f11
More improvements to module renaming error reporting.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@908 bbc10eb1-c90d-0410-af57-cb519fbb1720
17 years ago