Research Article
Formal Modeling, Proving, and Model Checking of a Flood Warning, Monitoring, and Rescue System-of-Systems
Table 2
Mapping of List data types.
| CPN specification | B Notation |
| ins new 1 x if x is not a number of list 1, then x is inserted at the end of 1, otherwise 1 is returned | ann <– ins new(ll,xx) = = if xx: ran(ll) then aa: = ll else aa: = ll < -xx end | nil or [] empty list | [] | hd lst head, the first element of the list | first(lst) | tl lst tail, the last element of the list | tail(lst) | Length lst length of list | size(lst) | elt:: List prepend element as head of list | elt - > lst | Rev lst reverse list | rev(lst) | Rev lst reverse list | lst(nth) | list.take(lst,n) returns first n elements of list | Lst/|\n | list.drop(lst,n) returns what is left after dropping first n elements of list | lst\|/n | list.null lst returns true if element is empty | (lst = []) | mem.null lst returns true if element is in the list | elt:ran(lst) | Contains lst1 lst2 returns true if all elements in list 2 are elements in list 1 (ignoring the multiplicity of elements in list 2) | ran(lst1)<:ran(lst2) | union lst1 lst2 (or lst1∧lst2 the concatenation of two list | lst1∧lst2 | Ins lst elt inserts element at the end of list | lst < -elt |
|
|