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

⟦7d5d37bb8⟧ Ada Source

    Length: 3072 (0xc00)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Rulemanager, seg_00c7d8, separate Expertsystem

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 Instancecounter;

separate (Expertsystem)

package body Rulemanager is

    type Rulestatearray is array (Contextid, Ruleid) of Boolean;
    Rulestate : Rulestatearray := (others => (others => False));

    function Ismasked (Context : Contextname; Rule : Ruleid) return Boolean is
        Ctx : Contextid := Instancecounter.Contextnumber (Context);
    begin
        if Rule = 0 then
            raise Badrule;
        end if;
        if Ctx = 0 then
            raise Badcontext;
        end if;
        return (Rulestate (Ctx, Rule));
    end Ismasked;

    function Ismasked (Context : Contextid; Rule : Ruleid) return Boolean is
    begin
        if Rule = 0 then
            raise Badrule;
        end if;
        if Context = 0 then
            raise Badcontext;
        end if;
        return (Rulestate (Context, Rule));
    end Ismasked;


    procedure Mask (Context : Contextname; Rule : Ruleid) is
        Ctx : Contextid := Instancecounter.Contextnumber (Context);
    begin
        if Rule = 0 then
            raise Badrule;
        end if;
        if Ctx = 0 then
            raise Badcontext;
        end if;
        Rulestate (Ctx, Rule) := True;
    end Mask;

    procedure Unmask (Context : Contextname; Rule : Ruleid) is
        Ctx : Contextid := Instancecounter.Contextnumber (Context);
    begin
        if Rule = 0 then
            raise Badrule;
        end if;
        if Ctx = 0 then
            raise Badcontext;
        end if;
        Rulestate (Ctx, Rule) := False;
    end Unmask;

end Rulemanager;

E3 Meta Data

    nblk1=2
    nid=0
    hdr6=4
        [0x00] rec0=24 rec1=00 rec2=01 rec3=03c
        [0x01] rec0=18 rec1=00 rec2=02 rec3=000
    tail 0x21508deea82074909263f 0x42a00088462060003