/* Copyright (C) 1994 - 2001 by Telelogic AB. Copyright (C) 1991, 1992, 1993, 1994 by Telelogic Malmoe AB. Copyright (C) 1990, 1991 by Telesoft Europe AB. This Program is owned by Telelogic and is protected by national copyright laws and international copyright treaties. Telelogic grants you the right to use this Program on one computer or in one local computer network at any one time. Under this License you may only modify the source code for the purpose of adapting it to your environment. You must reproduce and include any copyright and trademark notices on all copies of the source code. You may not use, copy, merge, modify or transfer the Program except as provided in this License. Telelogic does not warrant that the Program will meet your requirements or that the operation of the Program will be uninterrupted and error free. You are solely responsible that the selection of the Program and the modification of the source code will achieve your intended results and that the results are actually obtained. */ package Predefined; NEWTYPE Boolean LITERALS true,false; OPERATORS "not" : Boolean -> Boolean; "and" : Boolean, Boolean -> Boolean; "or" : Boolean, Boolean -> Boolean; "xor" : Boolean, Boolean -> Boolean; "=>" : Boolean, Boolean -> Boolean; ENDNEWTYPE Boolean; NEWTYPE Character LITERALS NUL, SOH, STX, ETX, EOT, ENQ, ACK, BEL, BS, HT, LF, VT, FF, CR, SO, SI, DLE, DC1, DC2, DC3, DC4, NAK, SYN, ETB, CAN, EM, SUB, ESC, IS4, IS3, IS2, IS1, ' ', '!', '"', '#', '$', '%', '&', '''', '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?', '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', '\', ']', '^', '_', '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '{', '|', '}', '~', DEL, E_NUL, E_SOH, E_STX, E_ETX, E_EOT, E_ENQ, E_ACK, E_BEL, E_BS, E_HT, E_LF, E_VT, E_FF, E_CR, E_SO, E_SI, E_DLE, E_DC1, E_DC2, E_DC3, E_DC4, E_NAK, E_SYN, E_ETB, E_CAN, E_EM, E_SUB, E_ESC, E_IS4, E_IS3, E_IS2, E_IS1, ' ', '¡', '¢', '£', '¤', '¥', '¦', '§', '¨', '©', 'ª', '«', '¬', '­', '®', '¯', '°', '±', '²', '³', '´', 'µ', '¶', '·', '¸', '¹', 'º', '»', '¼', '½', '¾', '¿', 'À', 'Á', 'Â', 'Ã', 'Ä', 'Å', 'Æ', 'Ç', 'È', 'É', 'Ê', 'Ë', 'Ì', 'Í', 'Î', 'Ï', 'Ð', 'Ñ', 'Ò', 'Ó', 'Ô', 'Õ', 'Ö', '×', 'Ø', 'Ù', 'Ú', 'Û', 'Ü', 'Ý', 'Þ', 'ß', 'à', 'á', 'â', 'ã', 'ä', 'å', 'æ', 'ç', 'è', 'é', 'ê', 'ë', 'ì', 'í', 'î', 'ï', 'ð', 'ñ', 'ò', 'ó', 'ô', 'õ', 'ö', '÷', 'ø', 'ù', 'ú', 'û', 'ü', 'ý', 'þ', 'ÿ'; OPERATORS "<" : Character, Character -> Boolean; "<=" : Character, Character -> Boolean; ">" : Character, Character -> Boolean; ">=" : Character, Character -> Boolean; num : Character -> Integer; chr : Integer -> Character; ENDNEWTYPE Character; GENERATOR String(TYPE Itemsort, LITERAL emptystring) LITERALS emptystring; OPERATORS mkstring : Itemsort -> String; length : String -> Integer; first : String -> Itemsort; last : String -> Itemsort; "//" : String, String -> String; extract! : String, Integer -> Itemsort; modify! : String, Integer, Itemsort -> String; substring : String, Integer, Integer -> String; make! : * Itemsort -> String; append : in/out String, Itemsort; ENDGENERATOR String; NEWTYPE Charstring LITERALS NAMECLASS '''' ((' ' : '&') or '''''' or ('(' : '~') or (' ' : 'ÿ'))* ''''; OPERATORS mkstring : Character -> Charstring; length : Charstring -> Integer; first : Charstring -> Character; last : Charstring -> Character; "//" : Charstring, Charstring -> Charstring; extract! : Charstring, Integer -> Character; modify! : Charstring, Integer, Character -> Charstring; substring : Charstring, Integer,Integer -> Charstring; ENDNEWTYPE Charstring; SYNTYPE IA5String = Charstring CONSTANTS FROM( NUL:DEL) ENDSYNTYPE; SYNTYPE NumericString = Charstring CONSTANTS FROM( '0':'9', ' ') ENDSYNTYPE; SYNTYPE PrintableString = Charstring CONSTANTS FROM( 'A':'Z', 'a':'z', '0':'9', ' ', '''':')', '+':'/', ':', '=', '?') ENDSYNTYPE; SYNTYPE VisibleString = Charstring CONSTANTS FROM( ' ':'~') ENDSYNTYPE; NEWTYPE Integer LITERALS NAMECLASS ('0' : '9')+ or (''''((('0' or '1')*'''B') or (('0':'9') or ('A':'F'))*'''H')); OPERATORS "-" : Integer -> Integer; "+" : Integer, Integer -> Integer; "-" : Integer, Integer -> Integer; "*" : Integer, Integer -> Integer; "/" : Integer, Integer -> Integer; "mod" : Integer, Integer -> Integer; "rem" : Integer, Integer -> Integer; "<" : Integer, Integer -> Boolean; ">" : Integer, Integer -> Boolean; "<=" : Integer, Integer -> Boolean; ">=" : Integer, Integer -> Boolean; float : Integer -> Real; fix : Real -> Integer; ENDNEWTYPE Integer; SYNTYPE Natural = Integer CONSTANTS >= 0 ENDSYNTYPE Natural; NEWTYPE Real LITERALS NAMECLASS ('0' : '9')+ or (('0' : '9')* '.' ('0' : '9')+); OPERATORS "-" : Real -> Real; "+" : Real, Real -> Real; "-" : Real, Real -> Real; "*" : Real, Real -> Real; "/" : Real, Real -> Real; "<" : Real, Real -> Boolean; ">" : Real, Real -> Boolean; "<=" : Real, Real -> Boolean; ">=" : Real, Real -> Boolean; ENDNEWTYPE Real; SYNONYM PLUS_INFINITY Real = EXTERNAL, MINUS_INFINITY Real = EXTERNAL; GENERATOR Array (TYPE Index, TYPE Itemsort) OPERATORS make! : Itemsort -> Array; modify! : Array,Index,Itemsort -> Array; extract! : Array,Index -> Itemsort; ENDGENERATOR Array; GENERATOR Powerset ( TYPE Itemsort ) LITERALS empty; OPERATORS "in" : Itemsort, Powerset -> Boolean; incl : Itemsort, Powerset -> Powerset; del : Itemsort, Powerset -> Powerset; incl : Itemsort, in/out Powerset; del : Itemsort, in/out Powerset; length : Powerset -> Integer; take : Powerset -> Itemsort; take : Powerset, Integer -> Itemsort; "<" : Powerset, Powerset -> Boolean; ">" : Powerset, Powerset -> Boolean; "<=" : Powerset, Powerset -> Boolean; ">=" : Powerset, Powerset -> Boolean; "and" : Powerset, Powerset -> Powerset; "or" : Powerset, Powerset -> Powerset; make! : * Itemsort -> Powerset; ENDGENERATOR Powerset; GENERATOR Bag ( TYPE Itemsort ) LITERALS empty; OPERATORS incl : Itemsort, Bag -> Bag; del : Itemsort, Bag -> Bag; incl : Itemsort, in/out Bag; del : Itemsort, in/out Bag; length : Bag -> Integer; take : Bag -> Itemsort; take : Bag, Integer -> Itemsort; makebag : Itemsort -> Bag; "in" : Itemsort, Bag -> Boolean; "<" : Bag, Bag -> Boolean; ">" : Bag, Bag -> Boolean; "<=" : Bag, Bag -> Boolean; ">=" : Bag, Bag -> Boolean; "and" : Bag, Bag -> Bag; "or" : Bag, Bag -> Bag; make! : * Itemsort -> Bag; ENDGENERATOR Bag; NEWTYPE Pid LITERALS Null; DEFAULT Null; ENDNEWTYPE Pid; NEWTYPE Duration LITERALS NAMECLASS ('0' : '9')+ or (('0' : '9')* '.' ('0' : '9')+); OPERATORS "+" : Duration, Duration -> Duration; "-" : Duration -> Duration; "-" : Duration, Duration -> Duration; ">" : Duration, Duration -> Boolean; "<" : Duration, Duration -> Boolean; ">=" : Duration, Duration -> Boolean; "<=" : Duration, Duration -> Boolean; "*" : Duration, Real -> Duration; "*" : Real, Duration -> Duration; "/" : Duration, Real -> Duration; ENDNEWTYPE Duration; NEWTYPE Time LITERALS NAMECLASS ('0' : '9')+ or (('0' : '9')* '.' ('0' : '9')+); OPERATORS "<" : Time, Time -> Boolean; "<=" : Time, Time -> Boolean; ">" : Time, Time -> Boolean; ">=" : Time, Time -> Boolean; "+" : Time, Duration -> Time; "+" : Duration, Time -> Time; "-" : Time, Duration -> Time; "-" : Time, Time -> Duration; ENDNEWTYPE Time; NEWTYPE Bit LITERALS 0, 1; OPERATORS "not" : Bit -> Bit; "and" : Bit, Bit -> Bit; "or" : Bit, Bit -> Bit; "xor" : Bit, Bit -> Bit; "=>" : Bit, Bit -> Bit; ENDNEWTYPE Bit; NEWTYPE Bit_string LITERALS NAMECLASS ''''((('0' or '1')*'''B') or (('0':'9') or ('A':'F'))*'''H'); OPERATORS mkstring : Bit -> Bit_string; length : Bit_string -> Integer; first : Bit_string -> Bit; last : Bit_string -> Bit; "//" : Bit_string, Bit_string -> Bit_string; extract! : Bit_string, Integer -> Bit; modify! : Bit_string, Integer, Bit -> Bit_string; substring : Bit_string, Integer, Integer -> Bit_string; bitstr : Charstring -> Bit_string; hexstr : Charstring -> Bit_string; "not" : Bit_string -> Bit_string; "and" : Bit_string, Bit_string -> Bit_string; "or" : Bit_string, Bit_string -> Bit_string; "xor" : Bit_string, Bit_string -> Bit_string; "=>" : Bit_string, Bit_string -> Bit_string; ENDNEWTYPE Bit_string; NEWTYPE Octet LITERALS NAMECLASS ''''((('0' or '1')*'''B') or (('0':'9') or ('A':'F'))*'''H'); OPERATORS extract! : Octet, Integer -> Bit; modify! : Octet, Integer, Bit -> Octet; bitstr : Charstring -> Octet; hexstr : Charstring -> Octet; "not" : Octet -> Octet; "and" : Octet, Octet -> Octet; "or" : Octet, Octet -> Octet; "xor" : Octet, Octet -> Octet; "=>" : Octet, Octet -> Octet; "<" : Octet, Octet -> Boolean; "<=" : Octet, Octet -> Boolean; ">" : Octet, Octet -> Boolean; ">=" : Octet, Octet -> Boolean; shiftl : Octet, Integer -> Octet; shiftr : Octet, Integer -> Octet; "+" : Octet, Octet -> Octet; "-" : Octet, Octet -> Octet; "*" : Octet, Octet -> Octet; "/" : Octet, Octet -> Octet; "mod" : Octet, Octet -> Octet; "rem" : Octet, Octet -> Octet; i2o : Integer -> Octet; o2i : Octet -> Integer; ENDNEWTYPE Octet; /*SYNTYPE Octet = Bit_string CONSTANTS SIZE( 8) ENDSYNTYPE Octet;*/ NEWTYPE Octet_string LITERALS NAMECLASS ''''((('0' or '1')*'''B') or (('0':'9') or ('A':'F'))*'''H'); OPERATORS mkstring : Octet -> Octet_string; length : Octet_string -> Integer; first : Octet_string -> Octet; last : Octet_string -> Octet; "//" : Octet_string, Octet_string -> Octet_string; extract! : Octet_string, Integer -> Octet; modify! : Octet_string, Integer, Octet -> Octet_string; substring : Octet_string, Integer, Integer -> Octet_string; bitstr : Charstring -> Octet_string; hexstr : Charstring -> Octet_string; bit_string : Octet_string -> Bit_string; octet_string : Bit_string -> Octet_string; ENDNEWTYPE Octet_string; NEWTYPE NULL LITERALS NULL; ENDNEWTYPE NULL; NEWTYPE Object_identifier LITERALS emptystring; OPERATORS mkstring : Natural -> Object_identifier; length : Object_identifier -> Integer; first : Object_identifier -> Natural; last : Object_identifier -> Natural; "//" : Object_identifier, Object_identifier -> Object_identifier; extract! : Object_identifier, Integer -> Natural; modify! : Object_identifier, Integer, Natural -> Object_identifier; substring : Object_identifier, Integer, Integer -> Object_identifier; make! : * Natural -> Object_identifier; append : in/out Object_identifier, Natural; ENDNEWTYPE Object_identifier; NEWTYPE Any_type ENDNEWTYPE Any_type; GENERATOR Own (TYPE Itemsort) LITERALS Null; OPERATORS "*>" : Own, Itemsort -> Own; "*>" : Own -> Itemsort; make! : Itemsort -> Own; DEFAULT Null; ENDGENERATOR Own; GENERATOR Oref (TYPE Itemsort) LITERALS Null; OPERATORS "*>" : Oref, Itemsort -> Oref; "*>" : Oref -> Itemsort; "&" : Itemsort -> Oref; "=" : Oref, Itemsort -> Boolean; "=" : Itemsort, Oref -> Boolean; "/=" : Oref, Itemsort -> Boolean; "/=" : Itemsort, Oref -> Boolean; DEFAULT Null; ENDGENERATOR Oref; endpackage Predefined;