-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integrate complete array support (#17)
Signed-off-by: Marco Lampacrescia <[email protected]>
- Loading branch information
1 parent
7e773fb
commit 81b2dcd
Showing
4 changed files
with
168 additions
and
10 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
{ | ||
"jani-version": 1, | ||
"name": "", | ||
"type": "mdp", | ||
"features": [ | ||
"arrays" | ||
], | ||
"variables": [ | ||
{ | ||
"name": "normal_array", | ||
"type": { | ||
"kind": "array", | ||
"base": "int" | ||
}, | ||
"transient": false, | ||
"initial-value": { | ||
"op": "ac", | ||
"var": "__array_iterator", | ||
"length": 15, | ||
"exp": 0 | ||
} | ||
}, | ||
{ | ||
"name": "next_id", | ||
"type": "int", | ||
"transient": false, | ||
"initial-value": 0 | ||
} | ||
], | ||
"constants": [], | ||
"actions": [ | ||
{ | ||
"name": "step" | ||
} | ||
], | ||
"automata": [ | ||
{ | ||
"name": "array_writer", | ||
"locations": [ | ||
{ | ||
"name": "step" | ||
} | ||
], | ||
"initial-locations": [ | ||
"step" | ||
], | ||
"edges": [ | ||
{ | ||
"location": "step", | ||
"destinations": [ | ||
{ | ||
"location": "step", | ||
"assignments": [ | ||
{ | ||
"ref": { | ||
"op": "aa", | ||
"exp": "normal_array", | ||
"index": "next_id" | ||
}, | ||
"value": "next_id", | ||
"index": 0 | ||
}, | ||
{ | ||
"ref": "next_id", | ||
"value": { | ||
"op": "+", | ||
"left": "next_id", | ||
"right": 1 | ||
}, | ||
"index": 1 | ||
} | ||
] | ||
} | ||
], | ||
"action": "step" | ||
} | ||
], | ||
"variables": [] | ||
} | ||
], | ||
"system": { | ||
"elements": [ | ||
{ | ||
"automaton": "array_writer" | ||
} | ||
], | ||
"syncs": [ | ||
{ | ||
"result": "step", | ||
"synchronise": [ | ||
"step" | ||
] | ||
} | ||
] | ||
}, | ||
"properties": [ | ||
{ | ||
"name": "property_no_array_access", | ||
"expression": { | ||
"op": "filter", | ||
"fun": "values", | ||
"values": { | ||
"op": "Pmin", | ||
"exp": { | ||
"op": "F", | ||
"exp": { | ||
"op": "=", | ||
"left": "next_id", | ||
"right": 10 | ||
} | ||
} | ||
}, | ||
"states": { | ||
"op": "initial" | ||
} | ||
} | ||
}, | ||
{ | ||
"name": "property_with_array_access", | ||
"comment": "Not working due to array access not supported in properties", | ||
"expression": { | ||
"op": "filter", | ||
"fun": "values", | ||
"values": { | ||
"op": "Pmin", | ||
"exp": { | ||
"op": "F", | ||
"exp": { | ||
"op": "=", | ||
"left": { | ||
"op": "aa", | ||
"exp": "normal_array", | ||
"index": 10 | ||
}, | ||
"right": 10 | ||
} | ||
} | ||
}, | ||
"states": { | ||
"op": "initial" | ||
} | ||
} | ||
} | ||
] | ||
} |
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