| 70 | | * A system function has no definition in CIVL-IR, but is instead defined elsewhere (for example, in C or Java code). Such a function will always be executed atomically. The first string specifies a path (e.g., Java package) to the library containing the function, the second is the name of the library. These two Strings should be enough to tell CIVL where to find the system definition of the function. |
| 71 | | * `$atomic_f` can only be used in a function definition. It indicates that a defined function is to behave atomically, i.e., every call to such a function will behave as if the call occurred in an `$atomic` block. (An abstract or system function must necessarily be atomic.) |
| 72 | | * `$pure` can be applied to a system function or defined function only. (An abstract function is necessarily pure.) The use of `$pure` indicates that the function has no side-effects, and the value returned in a mathematical function of the arguments. If the function is not actually pure, the behavior is undefined. |
| 73 | | * `$state_f` can be applied to a system function or defined function only. It declares that the function has no side-effects, and the value returned is a mathematical function of the state in which the call occurred; i.e., the value returned may depend on the arguments in the call, the values of global variables, or any other component of the state. But, if called twice from the same state, it will always return the same value. If the function does not actually have this property, the behavior is undefined. Any `$pure` function is necessarily a `$state_f`, so at most one of these two qualifiers can occur in a declaration or definition. |
| 74 | | * Contract clauses can occur only with system function and defined functions (not with abstract functions, not with variables). |
| | 70 | * A system function has no definition in the program, but is instead defined elsewhere (for example, in C or Java code). Such a function will always be executed atomically. The first string specifies a path (e.g., Java package) to the library containing the function, the second is the name of the library. These two Strings should be enough to tell CIVL where to find the system definition of the function. |
| | 71 | * `$atomic_f` can only be used in a function definition. It indicates that a defined function is to behave atomically, i.e., every call to such a function will be executed as if in atomic region. (An abstract or system function must necessarily be atomic.) |
| | 72 | * `$pure_f` can be applied to a system function or defined function only. (An abstract function is necessarily pure.) The use of `$pure_f` indicates that the function has no side-effects, and the value returned in a mathematical function of the arguments. If the function is not actually pure, the behavior is undefined. |
| | 73 | * `$state_f` can be applied to a system function or defined function only. It declares that the function has no side-effects, and the value returned is a mathematical function of the state in which the call occurred; i.e., the value returned may depend on the arguments in the call, the values of global variables, or any other component of the state. But, if called twice from the same state, it will always return the same value. If the function does not actually have this property, the behavior is undefined. Any `$pure_f` function is necessarily a `$state_f`, so at most one of these two qualifiers can occur in a declaration or definition. |
| | 74 | * Contract clauses can occur only with system functions and defined functions (not with abstract functions, not with variables). |