-
Notifications
You must be signed in to change notification settings - Fork 73
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
HOA path formulas #129
Open
kleinj
wants to merge
8
commits into
prismmodelchecker:master
Choose a base branch
from
kleinj:pr/hoa-path-expressions
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
HOA path formulas #129
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The support for computing end components was already there, so we just have to allow STREETT acceptance in the product construction/LTL generation.
…ssible If we know the filename of a ModulesFile or PropertiesFile, we store it and make it accessible. Note that we don't necessarily have a filename, e.g., when dealing with model code from the GUI that has not yet been saved. Additionally, for symbolic/explicit StateModelChecker, we provide access to the ModulesFile / PropertiesFile stored in the model checker.
…model or properties file. This helper can be used to resolve paths given in PRISM properties, e.g., the location of an automaton file in a path expression. If the path is relative, we will resolve it relative to 1) the properties file location (if there is one) 2) the model file location (if there is one) 3) the working directory. Additionally, it's also possible to specify paths using the following three macros: $MODEL_DIR/filename $PROPERTY_DIR/filename $WORKING_DIR/filename which resolve relative to the directory where the model file or the property file is located or the working directory.
Before, double quotes were an individual lexical symbol and only syntactic, i.e., inside the quotes only identifier characters were allowed and thus no actual quoting was going on. As we want to support properly quoted string (e.g., for file system locations), we refactor here by providing a rule for QuotedIdentifiers.
Support arbitrary quoted strings. As REG_QUOTED_IDENT takes precedence over REG_QUOTED_STRING, QuotedString matches QuotedIdentifier as well.
* ExpressionHOA and visitor adaption * Add Expression.isHOA to check for (negated) HOA expression * PathSpecification supports LTL and HOA-style path specifications e.g. P=?[ HOA: { "automatonfile", "ap1" <- "label1", "ap2" <- "label2" } ] * LTL2DA: readHOA and fromExpressionHOA helpers * Add support in LTLModelCheckers (ex/sym) to support HOA path specifications * some testcases Additionally, protect multi-objective model checking and checkRewardCoSafeLTL against HOA path specifications. Later on, we can add handling for that.
davexparker
force-pushed
the
master
branch
2 times, most recently
from
January 12, 2024 14:23
ca12ca0
to
6bf73df
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With this PR, PRISM learns a new mechanism for specifying path formulas: Directly via a deterministic automaton in HOA format.
PRISM already supports HOA automata, when they are constructed by an external tool from an LTL path formula. Now, one can write properties like
P=?[ HOA: {"filename.hoa"} ]
which computes the probability of the paths that are accepted by the given HOA automaton. In this short form, the atomic propositions (APs) from the automaton are matched with the corresponding labels in the model. Alternatively, one can specify state expressions for labels, e.g.,
P=?[ HOA: {"filename.hoa", "a" <- s=3, "b" <- (s=1|s=2) }
Here, the automaton has two APs,
a
andb
, which are mapped to the set of states satisfyings=3
and(s=1|s=2)
, respectively.This has a few advantages:
This is the first time that properties can refer to external filenames, which raises the issue how to deal with relative filenames (similar to things like
#include
in C++, etc). Here, we propose to do resolution as follows:We also propose a mechanism to explicitly specify the directory for resolution by 3 macros, i.e., for following would be valid filenames for a HOA path expression:
$PROPERTY_DIR/filename.hoa
$MODEL_DIR/filename.hoa
$WORKING_DIR/filename.hoa
Note that these macros are only considered if they are at the beginning of the location string.
This extension was published in "Advances in Symbolic Probabilistic Model Checking with PRISM" (TACAS'16) and has been in use at TU Dresden for quite some time.
TODOs: