The CONVECS team is pleased to announce
that version 3.8 of the TRAIAN compiler for LOTOS NT is available.
TRAIAN 3.8 brings
thirteen language changes,
nine static-semantics changes,
two compiler changes,
six release changes,
and six bug fixes
(see below their description).
TRAIAN 3.8 introduces various changes to the LOTOS NT language in order to further align it with the LNT language supported by the CADP toolbox. The LOTOS NT Reference Manual and the demo examples have been updated to reflect these changes.
X := F [E1, ..., Em] (A1, ..., An)instead of:
eval X := F [E1, ..., Em] (A1, ..., An)where each Ai is either an "in" parameter (i.e., "Vi"), an "out" parameter (i.e., "?Xi"), or an "in out" parameter (i.e., "!?Xi").
F [E1, ..., Em] (A1, ..., An)instead of:
eval F [E1, ..., Em] (A1, ..., An)
"eval" before function call in instructions (or behaviours) is deprecated and should be removed
return G (?X) X := any NAT where F (?X, Y) if F (?X, Y) then ...but rejected with a new error message:
forbidden argument "?X" causing side effect in valueUsers are advised to upgrade their LOTOS NT programs by running the following command:
traian_upc 2022-LOTNT-EVAL [<file> or <directory>]which will remove "eval" keywords where appropriate. See item 421 in the HISTORY.txt file.
+ (a, b);or even:
a + b;The new restrictions avoid such a potentially misleading syntax. This change is incompatible, in the sense that certain LOTOS NT specifications may, after removing "eval" keywords, become incorrect. The solution is to manually rename the offending functions, e.g., renaming "+" into "PLUS". See item 426 in the HISTORY.txt file.
type T is A, B, C with < !implementedby "LOTOS:<" !implementedby "C:LT" end typeSuch pragmas were syntactically rejected by TRAIAN 3.7. The compiler also ensures that "!external" pragmas are not attached to such "with" clauses. See item 436 in the HISTORY.txt file.
function + (X : INT) : INT function + (X : REAL) : REALHaving these functions predefined will prevent users from defining them, therefore avoiding semantic ambiguities. For instance, if users could define:
function + (X : INT) : INT is return X + 1 end functionthen "+1" and "+(1)" would give two different values. See item 444 in the HISTORY.txt file.
array access applied to non-array value in value: X [3] the left-hand value has non-array type Nat non-natural array index in instruction: X [true] := 0 the bracketed array index has type BOOL instead of NAT array assigned with incorrect type in instruction: X [0] := true the type T of X is an array of nat but the right-hand value has type BOOLSee item 414 in the HISTORY.txt file.
useless assignment to Xwhen a variable assigned before a "break" clause is neither used before the "break" nor after the end of the loop. See item 417 in the HISTORY.txt file.
"in" parameter X overwritten before used (should be a local variable)From now on, the warning is:
"in" parameter X modified (should be an "in var" parameter)See item 419 in the HISTORY.txt file.
function G [E1, E2 : none] (out X, Y : nat) is X := F [E1, E2] (1, ?Y) -- without "eval" end functionFrom now on, if the right-hand side of an assignment is a function call with "out" or "in out" parameters, the data-flow analysis considers these parameters as modified. Moreover, new verifications have been added to detect unwanted uses of "out" or "in out" parameters, e.g.:
X := F [E1, E2] (?X)or
Y := F [E1, E2] (?X, ?X)which are rejected with new error messages:
- result variable X also used as "[in] out" parameter - multiple occurrences of variable X in "[in] out" parametersSee item 422 in the HISTORY.txt file.
function F : BOOL is loop null end loop end functionTRAIAN now emits an error message:
error: function with result but looping foreverrather than a mere warning:
warning: function with result but no normal terminationSee item 437 in the HISTORY.txt file.
process P1 [E : any] (X : nat) is P2 [...] (...) end process process P2 [E : any] (X : nat) is E (X); P1 [...] (...) end processSee item 432 in the HISTORY.txt file.
function F (out X : nat) : bool is X := 1; return true end function function G : bool is var X : nat in return F (...); use X end var end functionis now rejected with the following error message:
forbidden argument "?X" causing side effect in value (when expanding "...")See item 433 in the HISTORY.txt file.
function F (in var X : int) is while true [...] () loop X := X - 1 end loop end functionnow displays an "infinite loop" warning. See item 435 in the HISTORY.txt file.
G (?X) where X != 0From now on, the fact that X is used in the Boolean guard is properly taken into account. See item 440 in the HISTORY.txt file.
TRAIAN will continue to evolve, our goal being to merge LOTOS NT and LNT
in one single language.
TRAIAN 3.8 can be freely downloaded from the TRAIAN Web Page located at: