From 2a0b9d23aa7fe803d4ce7502b57b24f66ad7acad Mon Sep 17 00:00:00 2001 From: mondokm Date: Mon, 1 Mar 2021 14:48:35 +0100 Subject: [PATCH] Updated readme --- subprojects/xsts/xsts/README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/subprojects/xsts/xsts/README.md b/subprojects/xsts/xsts/README.md index 5c68db18d3..a193970328 100644 --- a/subprojects/xsts/xsts/README.md +++ b/subprojects/xsts/xsts/README.md @@ -56,9 +56,9 @@ When using product abstraction (`PROD`), variables tagged as control variables a `ctrl var : ` -Local variables can be declared at the top of blocks with the `local` keyword. (These variables cannot be flagged as `ctrl` and can have no initial value assigned to them.) +Local variables can be declared with the `local` keyword. (These variables cannot be flagged as `ctrl`.) As these declarations are statements, they must end with semicolons. -`{ local var : }` +`local var : ` Examples: @@ -67,6 +67,7 @@ var a : integer var b : boolean = false var c : Color = RED ctrl var x : integer = 0 +local var y : integer = x + 2; ``` All variable names matching the pattern `temp([0-9])+` are reserved for use by the model checker. @@ -90,10 +91,11 @@ The behaviour of XSTSs can be described using transitions. A transition is an at * assignments of the form ` := `, where `` is the name of a variable and `` is an expression of the same type * assumptions of the form `assume `, where `` is a boolean expression * havocs of the form `havoc ` + * local variable declarations * composite statements: * nondeterministic choices of the form `choice { } or { }`, with 1 or more branches * sequences of the form ` ` - * blocks that can include local variable declarations + * blocks Only those branches of a choice statement are considered for execution, of which all contained assumptions evaluate to true. @@ -105,7 +107,7 @@ choice { assume y<2; x := x+y; } or { - local var z: integer + local var z: integer = x + 4; z := 2; choice { assume true;