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

⟦272e8a519⟧ Ada Source

    Length: 4096 (0x1000)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, procedure Mb_Test, seg_03c4e8

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 Mb_Kbs;  
with Mb_Frames;
with Mb_Do_Action;
with Slot;

use Mb_Kbs;  
use Mb_Frames;
procedure Mb_Test is

    procedure Infere is new Kbs.Rule_Base.Infere_With_Conflict_Set
                               (Retrieve  => Kbs.Retrieve,
                                Do_Action => Mb_Do_Action);

    ---------------------------------------------------------------------

    type Response_Type is range 0 .. 21;

    package Response is new Text_Io.Integer_Io (Response_Type);

    The_Response : Response_Type := 1;

    ---------------------------------------------------------------------

    procedure Handle_Choice (The_Response : Response_Type) is
    begin
        case The_Response is
            when 0 =>
                null;
            when 1 =>
                Testcase.Add ((Goal_Type => General,
                               Name      => Slot.Value ("start")));
            when 2 =>
                Testcase.Add ((Goal_Type => General,
                               Name      => Slot.Value ("on_ladder")));
            when 3 .. 15 =>
                null;
            when 16 =>
                Testcase.Add ((Goal_Type => Goal_At,
                               Name      => Slot.Value ("at_monkey")));
            when 17 =>
                Testcase.Add ((Goal_Type => Goal_At,
                               Name      => Slot.Value ("at_monkey_object")));
            when 18 =>
                Testcase.Add ((Goal_Type => Goal_At,
                               Name      => Slot.Value ("at_monkey_on")));
            when 19 =>
                Testcase.Add ((Goal_Type => Goal_At,
                               Name      => Slot.Value ("at_object")));
            when 20 =>
                Testcase.Add ((Goal_Type => Goal_At,
                               Name      => Slot.Value ("at_object_on_floor")));
            when 21 =>
                Testcase.Add ((Goal_Type => Goal_At,
                               Name      => Slot.Value ("at_object_holds")));
        end case;
    end Handle_Choice;



begin
    loop
        Mb_Kbs.Kbs.Fact_Base.Working_Memory.Make_Empty;
        Text_Io.New_Line;
        Text_Io.Put_Line
           ("Choisissez une configuration de depart [1..21]  (0 -> Quit)");
        declare
        begin
            Response.Get (The_Response);
            Handle_Choice (The_Response);
            Infere;
        exception
            when Constraint_Error =>
                Text_Io.Put_Line ("Mauvais choix !!  Recommencez...");
        end;
        exit when The_Response = 0;
    end loop;
end Mb_Test;

E3 Meta Data

    nblk1=3
    nid=0
    hdr6=6
        [0x00] rec0=23 rec1=00 rec2=01 rec3=032
        [0x01] rec0=14 rec1=00 rec2=03 rec3=05a
        [0x02] rec0=19 rec1=00 rec2=02 rec3=000
    tail 0x2173a619685823fbbaced 0x42a00088462063c03