e intervals, for example, to index an array. A syntype may or may not contain a range condition (e.g. 0:4). Example: / Integers 0, 1, 2, 3 and 4 : * / SYNTYPE itIndex = Integer CONSTANTS 0 : 4 ENDSYNTYPE; SYNTYPE logical = Boolean ENDSYNTYPE; 2.4.4 Newtype Using NEWTYPE allows building your own types based on the predefined SDL types. A NEWTYPE may also contain operator signatures or definitions. 2.4.4.1 Literals Literals are used to define enumerated values, as shown in Figure 2.26. process TLE1 NEWTYPE discReason LITERALS normal, congestion, failure; ENDNEWTYPE; dR:= failure dR discReason; Figure 2.26 Newtype with literals 2 As opposed to C, SDL arrays indexes may not start at 0. 22 Validation of Communications Systems with SDL 2.4.4.2 Struct Struct is used inside a NEWTYPE to define a data structure, as illustrated in Figure 2.27. process TLE1 NEWTYPE LCD16 /* 16 characters LCD */ ready STRUCT lineBuf Charstring; /* Line buffer */ length Natural; status Boolean; /* False means error */ OPERATORS LCD:= LCDinit(LCD) LCDinit: LCD16 -> LCD16; LCDwrite: LCD16, Charstring -> LCD16; ENDNEWTYPE; LCD:= LCDwrite(LCD, 'Enter PIN:') LCD LCD16; Figure 2.27 Newtype containing a struct and operators 2.4.4.3 Operator signature You have three possibilities to describe an operator: using algorithmic notation (textual or graphical), using the C language3 or using axioms. 2.5 CONSTRUCTS FOR BETTER MODULARITY AND GENERICITY 2.5.1 Package To reuse type definitions easily in several systems, they can be moved into a package, as shown in Figure 2.28. The package can then be imported in a system as shown in Figure 2.29. package SS7pack NEWTYPE PDU SIGNAL STRUCT IAM, ACM(PDU); CRC Integer; isLast Boolean; SIGNALLIST ss7 = IAM, ACM; reason Natural; DEFAULT voidPDU; ENDNEWTYPE; SYNONYM voidPDU PDU = (. 0, False, 0.); SYNONYM D201 Duration = 15.0; Figure 2.28 The package SS7pack 2.5.2 Types, instances and gates To allow reuse of structural entities, SDL provides object-oriented features: any structural entity may be a type; thus we can us