Skip to content

Commit 9ea8e10

Browse files
committed
Merge assumptions about external functions
2 parents 16bad02 + 2f15404 commit 9ea8e10

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

content/language-reference/system-description/declarations/external-functions.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,15 @@ The external functions are supported since Uppaal Stratego version 4.1.20-7, or
1212
The feature is supported on Linux and experimental on Windows and macOS.
1313
{{% /notice %}}
1414

15-
External Functions can be declared alongside other declarations. External functions are local to the current scope, defined by the grammar:
15+
{{% notice warning %}}
16+
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>
17+
For example:
18+
- *Side-effect-free* (or *free*) functions, which do not depend on [`static`](https://en.wikipedia.org/wiki/Static_variable) variables, are *deterministic*.
19+
- [Memoization](https://en.wikipedia.org/wiki/Memoization) pattern is not *side-effect-free* but results in a *deterministic* behavior, hence is also allowed.
20+
{{% /notice %}}
21+
22+
External functions can be declared alongside other declarations.
23+
External functions are local to the current scope, defined by the grammar:
1624

1725
``` EBNF
1826
ExternDecl = 'import' Path '{' [FwdDeclList] '}'

0 commit comments

Comments
 (0)