DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦d503af688⟧ Ada Source

    Length: 5120 (0x1400)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Bench_Actions_D, seg_011a96

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦5a81ac88f⟧ »Space Info Vol 1« 
        └─⟦this⟧ 

E3 Source Code



with Text_Io;
with Tuple;

with Etat_D, Nombre_D, Point_D;

package body Bench_Actions_D is

    Max_Point_D : constant := 30;
    Max_Iter    : constant := 100;

------------------------------------------------------------------------------
    procedure Creation_Objets_Action (The_Tuple : Tuple.Object) is
        Un_Etat_D   : Etat_D.Object;
        Un_Nombre_D : Nombre_D.Object;
        Un_Point_D  : Point_D.Object;
    begin  
        Tuple.Split (The_Tuple, Un_Etat_D, Un_Nombre_D);
        Nombre_D.Change (Un_Nombre_D,
                         With_Value => Nombre_D.Value (Un_Nombre_D) + 1);
        Un_Point_D := Point_D.Add (With_X => Nombre_D.Value (Un_Nombre_D),
                                   With_Y => Nombre_D.Value (Un_Nombre_D) * 2);
    end Creation_Objets_Action;


------------------------------------------------------------------------------
    procedure Fin_Creation_Action (The_Tuple : Tuple.Object) is
        Un_Etat_D : Etat_D.Object;
    begin
        Tuple.Split (The_Tuple, Un_Etat_D);
        Etat_D.Change (Un_Etat_D, With_Value => 1);
    end Fin_Creation_Action;


------------------------------------------------------------------------------
    procedure Recherche_Objet_Action (The_Tuple : Tuple.Object) is
        Un_Etat_D   : Etat_D.Object;
        Un_Nombre_D : Nombre_D.Object;
        Un_Point_D  : Point_D.Object;
    begin
        Tuple.Split (The_Tuple, Un_Etat_D, Un_Nombre_D, Un_Point_D);
        Nombre_D.Change (Un_Nombre_D,
                         With_Value => Nombre_D.Value (Un_Nombre_D) - 1);
        -- Text_Io.Put_Line ("Rule RECHERCHE_OBJET  : point x = " &
        --                   Natural'Image (point_d.X (Un_point_d)) & " / y = " &
        --                   Natural'Image (point_d.Y (Un_point_d)));
    end Recherche_Objet_Action;


------------------------------------------------------------------------------
    procedure Iteration_Action (The_Tuple : Tuple.Object) is
        Un_Etat_D   : Etat_D.Object;
        Un_Nombre_D : Nombre_D.Object;
    begin
        Tuple.Split (The_Tuple, Un_Etat_D, Un_Nombre_D);
        Nombre_D.Change (Un_Nombre_D, With_Value => Max_Point_D);
        Etat_D.Change (Un_Etat_D, With_Value => Etat_D.Value (Un_Etat_D) + 1);
        -- Text_Io.Put_Line ("Rule ITERATION  : FIN   etat_d = " &
        --                   Natural'Image (etat_d.Value (Un_etat_d)));
    end Iteration_Action;

end Bench_Actions_D;

E3 Meta Data

    nblk1=4
    nid=3
    hdr6=6
        [0x00] rec0=1c rec1=00 rec2=01 rec3=034
        [0x01] rec0=17 rec1=00 rec2=02 rec3=052
        [0x02] rec0=0c rec1=00 rec2=04 rec3=000
        [0x03] rec0=0c rec1=00 rec2=03 rec3=000
    tail 0x2170d7af682396728ada0 0x42a00088462063c03
Free Block Chain:
  0x3: 0000  00 00 02 06 80 0f 75 70 6c 65 2e 4f 62 6a 65 63  ┆      uple.Objec┆