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

⟦86f6bb622⟧ Ada Source

    Length: 4096 (0x1000)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Mab, procedure B2, seg_00ca3b

Derivation

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

E3 Source Code



with Expertsystem;
use Expertsystem;

procedure B2 is

    Cpt : Natural;

    package Mab is
        procedure Ftb;
    end Mab;

    package body Mab is

        type Object is
            record
                Contenu : Natural := 1;
            end record;

        package Behavior is new Classbehavior (Object, "BIG FLOWER");

        function Castor_C return Tuplecollection.Object is
            Tc : Tuplecollection.Object;
        begin
            return Tc;
        end Castor_C;

        procedure Castor_A (Mg : Tuple.Object) is
        begin
            Put_Line (" What a famous castor !");
        end Castor_A;

        function Flower_C return Tuplecollection.Object is
            Tc : Tuplecollection.Object;
            Ref : Expertsystem.Reference := Nullreference;
            Fl : Object;
        begin
            if Cpt = 10 then
                return Tc;
            else
                Fl.Contenu := Cpt * 10;
                Ref := Behavior.Allocate (Fl);
                Tuplecollection.Add (Tc, Ref);
                return Tc;
            end if;
        end Flower_C;

        procedure Flower_A (Mg : Tuple.Object) is
        begin
            Put_Line (" What a beautiful flower !");
            Cpt := Cpt + 1;
        end Flower_A;

        package Lfb is new Engine (Context_Name => " Flowers  ",
                                   Resolution => Lex,
                                   Used_Rules => 12,
                                   Name_1 => "find a castor..",
                                   Condition_1 => Castor_C,
                                   Action_1 => Castor_A,
                                   Name_12 => "find a flower..",
                                   Condition_12 => Flower_C,
                                   Action_12 => Flower_A);


        procedure Ftb is
            Result : Boolean;
        begin
            Behavior.Clear;
            Put_Line ("---------------------------------------------------");
            Put_Line ("PROGRAM FLOWER : looking for flower in a green land");
            Put_Line ("---------------------------------------------------");
            Cpt := 0;
            Result := Lfb.Inference (Any);
        end Ftb;
    end Mab;

begin

    Debugger.Resetdebug (Debugger.Text);
    Debugger.Refreshdebug;
    Debugger.Setdebugon (Debugger.Conditionevalued);

    Mab.Ftb;

end B2;

E3 Meta Data

    nblk1=3
    nid=0
    hdr6=6
        [0x00] rec0=29 rec1=00 rec2=01 rec3=044
        [0x01] rec0=1b rec1=00 rec2=02 rec3=020
        [0x02] rec0=12 rec1=00 rec2=03 rec3=000
    tail 0x2170984d482074fc2e2aa 0x42a00088462060003