|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 5120 (0x1400) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, generic, package Expression_Utilities, seg_004627
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─⟦5a81ac88f⟧ »Space Info Vol 1« └─⟦this⟧
--| @SUMMARY This package provides utilities for analyzing expressions. --| The Value functions will compute the static value of an expression by --| performing any operations used in the expression (ie the expression --| 4 + 5 will return 9, 4 + A will return 2 if A is a constant with --| value -2. --| @INDICES (Ada_Analysis, Value_Computation) with Ada_Program; package Expression_Utilities is function Is_Expression (Elem : Ada_Program.Element) return Boolean; --| @DESCRIPTION Computes the static value of an integer expression --| the formal Non_Static_Value is used to query for values which --| and not static in the code. If Has_Value is false the exception --| Not_Static is raised. --| @RAISES (Not_Static) generic with procedure Non_Static_Value (For_Name_Expression : Ada_Program.Expression; Value : out Long_Integer; Has_Value : out Boolean); function Integer_Value (Integer_Expression : Ada_Program.Expression) return Long_Integer; --| @DESCRIPTION Computes the static value of an float expression --| the formal Non_Static_Value is used to query for values which --| and not static in the code. If Has_Value is false the exception --| Not_Static is raised. --| @RAISES (Not_Static) generic with procedure Non_Static_Value (For_Name_Expression : Ada_Program.Expression; Value : out Float; Has_Value : out Boolean); function Float_Value (Float_Expression : Ada_Program.Expression) return Float; --| @DESCRIPTION Computes the static value of an string expression --| the formal Non_Static_Value is used to query for values which --| and not static in the code. If Has_Value is false the exception --| Not_Static is raised. --| @RAISES (Not_Static) generic with procedure Non_Static_Value (For_Name_Expression : Ada_Program.Expression; Value : out String; Last : out Positive; Has_Value : out Boolean); function String_Value (String_Expression : Ada_Program.Expression) return String; --| @DESCRIPTION Raise if the value of the expression cannot be statically --| computed. Not_Static : exception; type Operator_Kind is (Concatenate, Plus, Minus, Times, Divide, Unary_Minus, Unary_Plus, Other_Operator, Not_An_Operator_Expression); function Expression_Operator (Expr : Ada_Program.Expression) return Operator_Kind; --| @DESCRIPTION Returns the left operand of a binary expression --| or the only operand of a unary expression. function Left_Operand (Expr : Ada_Program.Expression) return Ada_Program.Expression; --| @DESCRIPTION Returns the right operand of a binary expression. function Right_Operand (Expr : Ada_Program.Expression) return Ada_Program.Expression; end Expression_Utilities;
nblk1=4 nid=0 hdr6=8 [0x00] rec0=17 rec1=00 rec2=01 rec3=038 [0x01] rec0=15 rec1=00 rec2=02 rec3=062 [0x02] rec0=19 rec1=00 rec2=03 rec3=030 [0x03] rec0=0e rec1=00 rec2=04 rec3=001 tail 0x2150043ce815c65e109db 0x42a00088462061e03