Support of @deterministic
Submitted by Gyorgy Rethy
Assigned to Bence Janos Szabo
Link to original bug (#499489)
Description
The @deterministic modifier serves the purpose to flag functions, which fulfill the requirements for functions called from specific places, i.e. during evaluation of a snapshot (i.e. in alt branch guards). Using this flag doesn't require any specific checks from the test tool, it is more a "reminder" for the user.
Therefore as effect on @deterministic Titan should just issue a warning like:
"Please ensure that the <function name>
complies with the requirements in clause 16.1.4 of the TTCN-3 core language standard (ES 201 873-1)"
Full text of defining @deterministic in the standard: "Using the @deterministic modifier, a function can be declared to be deterministic. Deterministic functions are safe to be used when called from specific places where non-determinism could lead to unexpected side effects (see clause 16.1.4). NOTE 0: The determination of determinism of a function is a semi-decidable problem and as such can and will not be exhaustively checked. As such, the annotation deterministic is mainly used for informational purposes and for allowing certain functions to be used during snapshot evaluation. Principally, a function can be seen as deterministic if it does not violate any of the restrictions from clause 16.1.4 which does not mean that violation of these restriction automatically leads to non-determinism."
Version: 5.5.0