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

Shorthand notation for observation variables #1776

Open
markuzzz opened this issue Jun 6, 2024 · 0 comments
Open

Shorthand notation for observation variables #1776

markuzzz opened this issue Jun 6, 2024 · 0 comments
Labels
feature New functionality

Comments

@markuzzz
Copy link

markuzzz commented Jun 6, 2024

It is a common use case to use 'observation variables' in mu-calculus formulas to track the state of the system. Certain action then change these variables, usually only one at a time. For example:
nu X(
long_variable_name_1: Bool = false,
long_variable_name_2: Bool = false,
long_variable_name_3: Bool = false,
long_variable_name_4: Bool = false
).(
[a]X(true, long_variable_name_2, long_variable_name_3, long_variable_name_4)
&& [b]X(long_variable_name_1, true, long_variable_name_3, long_variable_name_4)
&& [c]X(long_variable_name_1, long_variable_name_2, true, long_variable_name_4)
&& ....
)

The more variables there are, the more annoying it becomes to repeat all the names of unchanged variables. I just wrote a formula with 9 observation variables for Rijkswaterstaat. Moreover, it becomes difficult to read because the variable that is changed is the interesting one but exactly the name of that variable is not given in the update. For recursion in processes there is a shorthand notation that could also be used here:
nu X(
long_variable_name_1: Bool = false,
long_variable_name_2: Bool = false,
long_variable_name_3: Bool = false,
long_variable_name_4: Bool = false
).(
[a]X(long_variable_name_1 = true)
&& [b]X(long_variable_name_2 = true)
&& [c]X(long_variable_name_3 = true)
&& ....
)

It could probably be implemented easily as syntactic sugar that is replaced in a preprocessing step.

@mlaveaux mlaveaux added the feature New functionality label Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality
Projects
None yet
Development

No branches or pull requests

2 participants