Skip to content

Commit

Permalink
expanded on side-effect-free external functions
Browse files Browse the repository at this point in the history
  • Loading branch information
mikucionisaau committed Apr 16, 2024
1 parent d9016a4 commit 30269bb
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ The external functions are supported since Uppaal Stratego version 4.1.20-7, or

{{% notice warning %}}
The external function calls must be ***deterministic***: for any argument values, the function should produce the same result at any time when called with the same values.<br>
For example, *side-effect-free* (or *free*) functions, which do not depend on [`static`](https://en.wikipedia.org/wiki/Static_variable) variables, are ***deterministic***.<br>
[Memoization](https://en.wikipedia.org/wiki/Memoization) is allowed.
Uppaal does ***not** check and *will not warn* if an external function is behaving *deterministically*.<br>
For example:
- *Side-effect-free* (or *free*) functions, which do not depend on [`static`](https://en.wikipedia.org/wiki/Static_variable) variables, are *deterministic*.
- [Memoization pattern](https://en.wikipedia.org/wiki/Memoization) is not *side-effect-free*, but results in *deterministic* behavior.
{{% /notice %}}

External Functions can be declared alongside other declaratios. External functions are local to the current scope, defined by the grammar:
Expand Down

0 comments on commit 30269bb

Please sign in to comment.