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

⟦9f3e38ed5⟧ Ada Source

    Length: 61440 (0xf000)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, generic, package Expertsystem, seg_00e3d1

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;

package Expertsystem is


    type Reference is private;

    Nullreference : constant Expertsystem.Reference;

    subtype Classname    is String (1 .. 10);
    subtype Objectname   is String (1 .. 10);
    subtype Rulename     is String (1 .. 15);
    subtype Contextname  is String (1 .. 10);
    subtype Strategyname is String (1 .. 5);

    subtype Ruleid    is Natural range 0 .. 30;
    subtype Contextid is Natural range 0 .. 8;

    type    Strategy          is (Lex, Mea, Lru, First);
    subtype Restrict_Strategy is Strategy range Lru .. First;

    Classsize : constant Positive := 200;
    Any       : constant          := 0;

    procedure Put (Aninteger : Integer);

    procedure Put (Achar : Character) renames Text_Io.Put;

    procedure Get (Achar : out Character) renames Text_Io.Get;

    procedure Put (Astring : String) renames Text_Io.Put;

    procedure Put_Line (Astring : String) renames Text_Io.Put_Line;


    package Collection is

        Max_Collection_Size : constant Natural := 200;
        subtype Collection_Index is Natural range 0 .. Max_Collection_Size;

        type Object (Size : Collection_Index := 20) is private;

        function Defaultname (Aref : Expertsystem.Reference) return Objectname;

        generic
            with function Predicate (Aref : Reference) return Boolean;
        function Restrict (Thecollection : Collection.Object;
                           Quantity : Natural := Any) return Collection.Object;

        generic
            with function Predicate
                             (Aref : Expertsystem.Reference) return Boolean;
        function Findone (Thecollection : Collection.Object)
                         return Expertsystem.Reference;

        generic
            with function Predicate
                             (Aref : Expertsystem.Reference) return Boolean;
        function Notexist (Thecollection : Collection.Object) return Boolean;

        generic
            with function Predicate
                             (Aref : Expertsystem.Reference) return Boolean;
        function Exist (Thecollection : Collection.Object) return Boolean;

        generic
            with function Predicate
                             (Thebest  : Expertsystem.Reference;
                              Anyother : Expertsystem.Reference) return Boolean;
        function Themost (Thecollection : Collection.Object)
                         return Expertsystem.Reference;


        function Cardinality (Thecollection : Collection.Object) return Natural;
        function Isnull      (Thecollection : Collection.Object) return Boolean;
        function Isnotnull   (Thecollection : Collection.Object) return Boolean;
        function Isnull      (Aref : Expertsystem.Reference)     return Boolean;
        function Isnotnull   (Aref : Expertsystem.Reference)     return Boolean;


        procedure Add (Thecollection : in out Collection.Object;
                       Aref          : in     Expertsystem.Reference);

        procedure Remove (Thecollection : in out Collection.Object;
                          Aref          : in     Expertsystem.Reference);

        procedure Update    (Thecollection : in out Collection.Object;
                             Aref          : in     Expertsystem.Reference);
        procedure Update    (Thecollection : in out Collection.Object;
                             Aref          : in     Expertsystem.Reference;
                             Withdate      : in     Long_Integer);
        procedure Updateall (Thecollection : in out Collection.Object);

        procedure Clear (Thecollection : in out Collection.Object);


        function Union (Collection1 : Collection.Object;
                        Collection2 : Collection.Object)
                       return Collection.Object;
        function "+" (Collection1 : Collection.Object;
                      Collection2 : Collection.Object) return Collection.Object
            renames Union;

        function Intersection (Collection1 : Collection.Object;
                               Collection2 : Collection.Object)
                              return Collection.Object;
        function "*" (Collection1 : Collection.Object;
                      Collection2 : Collection.Object) return Collection.Object
            renames Intersection;

        function Difference (Collection1 : Collection.Object;
                             Collection2 : Collection.Object)
                            return Collection.Object;
        function "-" (Collection1 : Collection.Object;
                      Collection2 : Collection.Object) return Collection.Object
            renames Difference;

        function Member (Thecollection : Collection.Object;
                         Aref          : Expertsystem.Reference) return Boolean;

        function Isinclude (Collection1 : Collection.Object;
                            Collection2 : Collection.Object) return Boolean;
        function "<"       (Collection1 : Collection.Object;
                            Collection2 : Collection.Object) return Boolean
            renames Isinclude;
        function "<="      (Collection1 : Collection.Object;
                            Collection2 : Collection.Object) return Boolean
            renames Isinclude;
        function ">"       (Collection1 : Collection.Object;
                            Collection2 : Collection.Object) return Boolean;
        function ">="      (Collection1 : Collection.Object;
                            Collection2 : Collection.Object) return Boolean
            renames ">";

        function Asobject (Aref : Expertsystem.Reference)
                          return Collection.Object;

        function Get (Thecollection : Collection.Object; Number : Positive := 1)
                     return Expertsystem.Reference;

        function Get (Thecollection : Collection.Object;
                      Frompos       : Positive := 1;
                      Topos         : Positive)  
                     return Collection.Object;

        function First (Thecollection : Collection.Object)
                       return Expertsystem.Reference;
        function Rest  (Thecollection : Collection.Object)
                      return Collection.Object;


        generic
            with procedure Action (Aref : Expertsystem.Reference);
        procedure Forall (Thecollection : Collection.Object);

        generic
            with function "<" (Refone, Reftwo : Expertsystem.Reference)
                              return Boolean;
        procedure Sort (Thecollection : in out Collection.Object);


        Badclass : exception;

        package Iterator is
            Illegalaccess : exception;

            type Iter is private;

            function Open  (Thecollection : Collection.Object) return Iter;
            function Get   (Thecollection : Collection.Object; I : Iter)
                         return Expertsystem.Reference;
            function Next  (Thecollection : Collection.Object; I : Iter)
                          return Iter;
            function Atend (Thecollection : Collection.Object; I : Iter)
                           return Boolean;

        private
            type Iter is range Natural'First .. Natural'Last;
        end Iterator;

    private
        type Collarray is array (Collection_Index range <>) of
                             Expertsystem.Reference;

        type Object (Size : Collection_Index := 20) is
            record
                Cells : Collarray (1 .. Size);
                Count : Natural  := 0;
                Unity : Positive := 1;

            end record;

    end Collection;


    package Classidentity is

        function Unknownclassname
                    (Aref : Expertsystem.Reference) return Classname;
        function Unknownobjectname
                    (Aref : Expertsystem.Reference) return Objectname;

    end Classidentity;


    generic
        type Element is private;
        Surname : in Classname := "NONAME    ";
        Taille  : in Positive  := Classsize;
        with function Refname
                         (Aref : Expertsystem.Reference) return Objectname is
           Collection.Defaultname;
    package Classbehavior is

        function  Allocate (Initvalue : Element) return Expertsystem.Reference;
        procedure Allocate (Initvalue : Element);
        procedure Dispose  (Aref : Expertsystem.Reference);
        procedure Clear;
        procedure Mask     (Aref : Expertsystem.Reference);
        procedure Maskall;
        procedure Unmask   (Aref : Expertsystem.Reference);
        procedure Unmaskall;

        function Instances return Collection.Object;
        function Allinstances return Collection.Object;
        function Cardinality return Natural;
        function Name return Classname;
        function Name (Aref : Expertsystem.Reference) return Objectname;

        function  Get (Aref : Expertsystem.Reference) return Element;
        procedure Set (Aref : Expertsystem.Reference; Withvalue : Element);

        Badclass, Badreference, Classfull : exception;

    end Classbehavior;


    package Tuple is  
        Max_Tuple_Size : constant Natural := 40;
        subtype Tuple_Index is Natural range 0 .. Max_Tuple_Size;
        type    Object (Size : Tuple_Index := 20) is private;

        function Cardinality (Thetuple : Tuple.Object) return Natural;
        function Isnull      (Thetuple : Tuple.Object) return Boolean;
        function Isnotnull   (Thetuple : Tuple.Object) return Boolean;

        generic
            with procedure Action (Aref : Expertsystem.Reference);
        procedure Forall (Thetuple : Tuple.Object);

        function First (Thetuple : Tuple.Object) return Expertsystem.Reference;
        function Second (Thetuple : Tuple.Object) return Expertsystem.Reference;
        function Third (Thetuple : Tuple.Object) return Expertsystem.Reference;
        function Fourth (Thetuple : Tuple.Object) return Expertsystem.Reference;
        function Fifth (Thetuple : Tuple.Object) return Expertsystem.Reference;
        function Sixth (Thetuple : Tuple.Object) return Expertsystem.Reference;
        function Seventh (Thetuple : Tuple.Object)
                         return Expertsystem.Reference;
        function Eighth (Thetuple : Tuple.Object) return Expertsystem.Reference;
        function Ninth (Thetuple : Tuple.Object) return Expertsystem.Reference;
        function Tenth (Thetuple : Tuple.Object) return Expertsystem.Reference;

        function Get (Thetuple : Tuple.Object; Item : Positive := 1)
                     return Expertsystem.Reference;

        procedure Add (Thetuple : in out Tuple.Object;
                       Aref     :        Expertsystem.Reference);
        procedure Merge (Thetuple : in out Tuple.Object;
                         R1       : Expertsystem.Reference := Nullreference;
                         R2       : Expertsystem.Reference := Nullreference;
                         R3       : Expertsystem.Reference := Nullreference;
                         R4       : Expertsystem.Reference := Nullreference;
                         R5       : Expertsystem.Reference := Nullreference;
                         R6       : Expertsystem.Reference := Nullreference;
                         R7       : Expertsystem.Reference := Nullreference;
                         R8       : Expertsystem.Reference := Nullreference;
                         R9       : Expertsystem.Reference := Nullreference;
                         R10      : Expertsystem.Reference := Nullreference);

        function Asobject (Aref : Expertsystem.Reference) return Tuple.Object;

        generic
            with function "<" (Refone, Reftwo : Expertsystem.Reference)
                              return Boolean;
        procedure Sort (Thetuple : in out Tuple.Object);

    private
        type Collarray is array (Tuple_Index range <>) of
                             Expertsystem.Reference;

        type Object (Size : Tuple_Index := 20) is
            record
                Cells : Collarray (1 .. Size);
                Count : Natural  := 0;
                Unity : Positive := 1;
            end record;
    end Tuple;


    package Tuplecollection is
        Max_Tuple_Collection_Size : constant Natural := 1000;
        subtype Tuple_Collection_Index                       is
           Natural range 0 .. Max_Tuple_Collection_Size;
        type    Object (Size : Tuple_Collection_Index := 20) is private;

        function Cardinality (Thetuplecollection : Tuplecollection.Object)
                             return Natural;
        function Isnull      (Thetuplecollection : Tuplecollection.Object)
                        return Boolean;
        function Isnotnull   (Thetuplecollection : Tuplecollection.Object)
                           return Boolean;

        generic
            with function Match (R1 : Expertsystem.Reference) return Boolean;
        function Join1 (C1 : Collection.Object; Quantity : Natural := 1)
                       return Tuplecollection.Object;

        generic
            with function Match
                             (R1, R2 : Expertsystem.Reference) return Boolean;
        function Join2 (C1, C2 : Collection.Object; Quantity : Natural := 1)
                       return Tuplecollection.Object;

        generic
            with function Match (R1, R2, R3 : Expertsystem.Reference)
                                return Boolean;
        function Join3 (C1, C2, C3 : Collection.Object; Quantity : Natural := 1)
                       return Tuplecollection.Object;

        generic
            with function Match (R1, R2, R3, R4 : Expertsystem.Reference)
                                return Boolean;
        function Join4 (C1, C2, C3, C4 : Collection.Object;
                        Quantity : Natural := 1) return Tuplecollection.Object;

        generic
            with function Match (R1, R2, R3, R4, R5 : Expertsystem.Reference)
                                return Boolean;
        function Join5 (C1, C2, C3, C4, C5 : Collection.Object;
                        Quantity : Natural := 1) return Tuplecollection.Object;

        generic
            with function Match
                             (R1, R2, R3, R4, R5, R6 : Expertsystem.Reference)
                             return Boolean;
        function Join6 (C1, C2, C3, C4, C5, C6 : Collection.Object;
                        Quantity : Natural := 1) return Tuplecollection.Object;

        generic
            with function Match (R1, R2, R3, R4, R5, R6, R7 :
                                    Expertsystem.Reference) return Boolean;
        function Join7 (C1, C2, C3, C4, C5, C6, C7 : Collection.Object;
                        Quantity : Natural := 1) return Tuplecollection.Object;

        generic
            with function Match (R1, R2, R3, R4, R5, R6, R7, R8 :
                                    Expertsystem.Reference) return Boolean;
        function Join8 (C1, C2, C3, C4, C5, C6, C7, C8 : Collection.Object;
                        Quantity : Natural := 1) return Tuplecollection.Object;

        generic
            with function Match (R1, R2, R3, R4, R5, R6, R7, R8, R9 :
                                    Expertsystem.Reference) return Boolean;
        function Join9 (C1, C2, C3, C4, C5, C6, C7, C8, C9 : Collection.Object;
                        Quantity : Natural := 1) return Tuplecollection.Object;

        generic
            with function Match (R1, R2, R3, R4, R5, R6, R7, R8, R9, R10 :
                                    Expertsystem.Reference) return Boolean;
        function Join10 (C1, C2, C3, C4, C5, C6, C7, C8, C9, C10 :
                            Collection.Object;
                         Quantity : Natural := 1) return Tuplecollection.Object;

        generic
            with function Predicate
                             (Thebest : Tuple.Object; Anyother : Tuple.Object)
                             return Boolean;
        function Themost (Thetuplecollection : Tuplecollection.Object)
                         return Tuple.Object;

        generic
            with function Predicate (T : Tuple.Object) return Boolean;
        function Restrict (Thetuplecollection : Tuplecollection.Object;
                           Quantity           : Natural := Any)
                          return Tuplecollection.Object;

        generic
            with function Predicate (T : Tuple.Object) return Boolean;
        function Findone (Thetuplecollection : Tuplecollection.Object)
                         return Tuple.Object;

        function Get (Thetuplecollection : Tuplecollection.Object;
                      Number             : Positive := 1) return Tuple.Object;

        function First (Thetuplecollection : Tuplecollection.Object)
                       return Tuple.Object;

        function Get (Thetuplecollection : Tuplecollection.Object;
                      Frompos            : Positive := 1;
                      Topos              : Positive)  
                     return Tuplecollection.Object;

        generic
            with procedure Action (Atuple : Tuple.Object);
        procedure Forall (Thetuplecollection : Tuplecollection.Object);

        package Iterator is
            Illegalaccess : exception;

            type Iter is private;

            function Open (Thetuplecollection : Tuplecollection.Object)
                          return Iter;
            function Get (Thetuplecollection : Tuplecollection.Object; I : Iter)
                         return Tuple.Object;
            function Next
                        (Thetuplecollection : Tuplecollection.Object; I : Iter)
                        return Iter;
            function Atend
                        (Thetuplecollection : Tuplecollection.Object; I : Iter)
                        return Boolean;
        private
            type Iter is range Natural'First .. Natural'Last;
        end Iterator;

    private
        type Collarray is array (Tuple_Collection_Index range <>) of
                             Expertsystem.Reference;

        type Object (Size : Tuple_Collection_Index := 20) is
            record
                Cells : Collarray (1 .. Size);
                Count : Natural  := 0;
                Unity : Positive := 1;
            end record;

    end Tuplecollection;


    package Rulemanager is
        function Ismasked (Context : Contextname; Rule : Ruleid) return Boolean;
        function Ismasked (Context : Contextid; Rule : Ruleid) return Boolean;
        procedure Mask (Context : Contextname; Rule : Ruleid);
        procedre Unmask (Context : Contextname; Rule : Ruleid);

        Badcontext, Badrule : exception;
    end Rulemanager;


    package Debugger is

        type Debuggingmode is (Text, Graphic);
        type Itemdebugged  is (Contextentered, Strategyused, Conflictsetstarted,
                               Conflictsetfinished, Conditionevalued,
                               Choosedrule, Choosedaction, Rulefacts,
                               Actionfact, Newstep, Failed, Completly);

        type Itemset is array (Positive range <>) of Itemdebugged;

        procedure Sendcontextentered (Name : Contextname; Number : Contextid);
        procedure Sendstrategyused (Name : Strategyname);
        procedure Sendconflictsetstarted;
        procedure Sendconflictsetfinished;
        procedure Sendconditionevalued (Name   : Rulename;
                                        Number : Natural;
                                        Result : Boolean;
                                        Facts  : Tuplecollection.Object);
        procedure Sendchoosedrule (Number : Natural; Fact : Tuple.Object);
        procedure Sendchoosedaction
                     (Name : Rulename; Number : Natural; Fact : Tuple.Object);
        procedure Sendnewstep;
        procedure Sendfailed;
        function  Isdebugged (What : Itemdebugged) return Boolean;
        procedure Setdebugon (Item : Itemdebugged);
        procedure Setdebugon (Item : Itemset);
        procedure Setdebugoff (Item : Itemdebugged);
        procedure Setdebugoff (Item : Itemset);
        procedure Resetdebug (Mode : Debuggingmode);
        procedure Refreshdebug;
        procedure Sendrulesnames
                     (Contextnumber : Contextid;
                      Ctxname : Contextname;
                      Name_1, Name_2, Name_3, Name_4, Name_5, Name_6,
                      Name_7, Name_8, Name_9, Name_10, Name_11, Name_12,
                      Name_13, Name_14, Name_15, Name_16, Name_7, Name_18,
                      Name_19, Name_20, Name_21, Name_22, Name_23, Name_24,
                      Name_25, Name_26, Name_27, Name_28, Name_29, Name_30 :
                         Rulename);
    end Debugger;



    package Nothing is
        procedure To_Do;
        function  To_Give return Tuplecollection.Object;
        procedure To_Do (T : Tuple.Object);
    end Nothing;


    generic
        Context_Name : in Contextname := " UNNAMED  ";
        Resolution   : in Strategy    := Lex;

        Name_1 : in Rulename := "Rule number  01";
        with function  Condition_1 return Tuplecollection.Object;
        with procedure Action_1 (T : Tuple.Object);

        Name_2 : in Rulename := "Rule number  02";
        with function  Condition_2 return Tuplecollection.Object is
           Nothing.To_Give;
        with procedure Action_2 (T : Tuple.Object) is Nothing.To_Do;

        Name_3 : in Rulename := "Rule number  03";
        with function  Condition_3 return Tuplecollection.Object is
           Nothing.To_Give;
        with procedure Action_3 (T : Tuple.Object) is Nothing.To_Do;

        Name_4 : in Rulename := "Rule number  04";
        with function  Condition_4 return Tuplecollection.Object is
           Nothing.To_Give;
        with procedure Action_4 (T : Tuple.Object) is Nothing.To_Do;

        Name_5 : in Rulename := "Rule number  05";
        with function  Condition_5 return Tuplecollection.Object is
           Nothing.To_Give;
        with procedure Action_5 (T : Tuple.Object) is Nothing.To_Do;

        Name_6 : in Rulename := "Rule number  06";
        with function  Condition_6 return Tuplecollection.Object is
           Nothing.To_Give;
        with procedure Action_6 (T : Tuple.Object) is Nothing.To_Do;

        Name_7 : in Rulename := "Rule number  07";
        with function  Condition_7 return Tuplecollection.Object is
           Nothing.To_Give;
        with procedure Action_7 (T : Tuple.Object) is Nothing.To_Do;

        Name_8 : in Rulename := "Rule number  08";
        with function  Condition_8 return Tuplecollection.Object is
           Nothing.To_Give;
        with procedure Action_8 (T : Tuple.Object) is Nothing.To_Do;

        Name_9 : in Rulename := "Rule number  09";
        with function  Condition_9 return Tuplecollection.Object is
           Nothing.To_Give;
        with procedure Action_9 (T : Tuple.Object) is Nothing.To_Do;

        Name_10 : in Rulename := "Rule number  10";
        with function  Condition_10 return Tuplecollection.Object is
           Nothing.To_Give;
        with procedure Action_10 (T : Tuple.Object) is Nothing.To_Do;

        Name_11 : in Rulename := "Rule number  11";
        with function  Condition_11 return Tuplecollection.Object is
           Nothing.To_Give;
        with procedure Action_11 (T : Tuple.Object) is Nothing.To_Do;

        Name_12 : in Rulename := "Rule number  12";
        with function  Condition_12 return Tuplecollection.Object is
           Nothing.To_Give;
        with procedure Action_12 (T : Tuple.Object) is Nothing.To_Do;

        Name_13 : in Rulename := "Rule number  13";
        with function  Condition_13 return Tuplecollection.Object is
           Nothing.To_Give;
        with procedure Action_13 (T : Tuple.Object) is Nothing.To_Do;

        Name_14 : in Rulename := "Rule number  14";
        with function  Condition_14 return Tuplecollection.Object is
           Nothing.To_Give;
        with procedure Action_14 (T : Tuple.Object) is Nothing.To_Do;

        Name_15 : in Rulename := "Rule number  15";
        with function  Condition_15 return Tuplecollection.Object is
           Nothing.To_Give;
        with procedure Action_15 (T : Tuple.Object) is Nothing.To_Do;

        Name_16 : in Rulename := "Rule number  16";
        with function  Condition_16 return Tuplecollection.Object is
           Nothing.To_Give;
        with procedure Action_16 (T : Tuple.Object) is Nothing.To_Do;

        Name_17 : in Rulename := "Rule number  17";
        with function  Condition_17 return Tuplecollection.Object is
           Nothing.To_Give;
        with procedure Action_17 (T : Tuple.Object) is Nothing.To_Do;

        Name_18 : in Rulename := "Rule number  18";
        with function  Condition_18 return Tuplecollection.Object is
           Nothing.To_Give;
        with procedure Action_18 (T : Tuple.Object) is Nothing.To_Do;

        Name_19 : in Rulename := "Rule number  19";
        with function  Condition_19 return Tuplecollection.Object is
           Nothing.To_Give;
        with procedure Action_19 (T : Tuple.Object) is Nothing.To_Do;

        Name_20 : in Rulename := "Rule number  20";
        with function  Condition_20 return Tuplecollection.Object is
           Nothing.To_Give;
        with procedure Action_20 (T : Tuple.Object) is Nothing.To_Do;

        Name_21 : in Rulename := "Rule number  21";
        with function  Condition_21 return Tuplecollection.Object is
           Nothing.To_Give;
        with procedure Action_21 (T : Tuple.Object) is Nothing.To_Do;

        Name_22 : in Rulename := "Rule number  22";
        with function  Condition_22 return Tuplecollection.Object is
           Nothing.To_Give;
        with procedure Action_22 (T : Tuple.Object) is Nothing.To_Do;

        Name_23 : in Rulename := "Rule number  23";
        with function  Condition_23 return Tuplecollection.Object is
           Nothing.To_Give;
        with procedure Action_23 (T : Tuple.Object) is Nothing.To_Do;

        Name_24 : in Rulename := "Rule number  24";
        with function  Condition_24 return Tuplecollection.Object is
           Nothing.To_Give;
        with procedure Action_24 (T : Tuple.Object) is Nothing.To_Do;

        Name_25 : in Rulename := "Rule number  25";
        with function  Condition_25 return Tuplecollection.Object is
           Nothing.To_Give;
        with procedure Action_25 (T : Tuple.Object) is Nothing.To_Do;

        Name_26 : in Rulename := "Rule number  26";
        with function  Condition_26 return Tuplecollection.Object is
           Nothing.To_Give;
        with procedure Action_26 (T : Tuple.Object) is Nothing.To_Do;

        Name_27 : in Rulename := "Rule number  27";
        with function  Condition_27 return Tuplecollection.Object is
           Nothing.To_Give;
        with procedure Action_27 (T : Tuple.Object) is Nothing.To_Do;

        Name_28 : in Rulename := "Rule number  28";
        with function  Condition_28 return Tuplecollection.Object is
           Nothing.To_Give;
        with procedure Action_28 (T : Tuple.Object) is Nothing.To_Do;

        Name_29 : in Rulename := "Rule number  29";
        with function  Condition_29 return Tuplecollection.Object is
           Nothing.To_Give;
        with procedure Action_29 (T : Tuple.Object) is Nothing.To_Do;

        Name_30 : in Rulename := "Rule number  30";
        with function  Condition_30 return Tuplecollection.Object is
           Nothing.To_Give;
        with procedure Action_30 (T : Tuple.Object) is Nothing.To_Do;

        Used_Rules : Positive := 30;

    package Engine is
        function Inference (Step : Natural := 1) return Boolean;
    end Engine;


    generic
        Context_Name : in Contextname       := " UNNAMED  ";
        Resolution   : in Restrict_Strategy := First;

        Name_1 : in Rulename := "Rule number  01";
        with function  Condition_1 return Boolean;
        with procedure Action_1;

        Name_2 : in Rulename := "Rule number  02";
        with function  Condition_2 return Boolean is False;
        with procedure Action_2                   is Nothing.To_Do;

        Name_3 : in Rulename := "Rule number  03";
        with function  Condition_3 return Boolean is False;
        with procedure Action_3                   is Nothing.To_Do;

        Name_4 : in Rulename := "Rule number  04";
        with function  Condition_4 return Boolean is False;
        with procedure Action_4                   is Nothing.To_Do;

        Name_5 : in Rulename := "Rule number  05";
        with function  Condition_5 return Boolean is False;
        with procedure Action_5                   is Nothing.To_Do;

        Name_6 : in Rulename := "Rule number  06";
        with function  Condition_6 return Boolean is False;
        with procedure Action_6                   is Nothing.To_Do;

        Name_7 : in Rulename := "Rule number  07";
        with function  Condition_7 return Boolean is False;
        with procedure Action_7                   is Nothing.To_Do;

        Name_8 : in Rulename := "Rule number  08";
        with function  Condition_8 return Boolean is False;
        with procedure Action_8                   is Nothing.To_Do;

        Name_9 : in Rulename := "Rule number  09";
        with function  Condition_9 return Boolean is False;
        with procedure Action_9                   is Nothing.To_Do;

        Name_10 : in Rulename := "Rule number  10";
        with function  Condition_10 return Boolean is False;
        with procedure Action_10                   is Nothing.To_Do;

        Name_11 : in Rulename := "Rule number  11";
        with function  Condition_11 return Boolean is False;
        with procedure Action_11                   is Nothing.To_Do;

        Name_12 : in Rulename := "Rule number  12";
        with function  Condition_12 return Boolean is False;
        with procedure Action_12                   is Nothing.To_Do;

        Name_13 : in Rulename := "Rule number  13";
        with function  Condition_13 return Boolean is False;
        with procedure Action_13                   is Nothing.To_Do;

        Name_14 : in Rulename := "Rule number  14";
        with function  Condition_14 return Boolean is False;
        with procedure Action_14                   is Nothing.To_Do;

        Name_15 : in Rulename := "Rule number  15";
        with function  Condition_15 return Boolean is False;
        with procedure Action_15                   is Nothing.To_Do;

        Name_16 : in Rulename := "Rule number  16";
        with function  Condition_16 return Boolean is False;
        with procedure Action_16                   is Nothing.To_Do;

        Name_17 : in Rulename := "Rule number  17";
        with function  Condition_17 return Boolean is False;
        with procedure Action_17                   is Nothing.To_Do;

        Name_18 : in Rulename := "Rule number  18";
        with function  Condition_18 return Boolean is False;
        with procedure Action_18                   is Nothing.To_Do;

        Name_19 : in Rulename := "Rule number  19";
        with function  Condition_19 return Boolean is False;
        with procedure Action_19                   is Nothing.To_Do;

        Name_20 : in Rulename := "Rule number  20";
        with function  Condition_20 return Boolean is False;
        with procedure Action_20                   is Nothing.To_Do;

        Name_21 : in Rulename := "Rule number  21";
        with function  Condition_21 return Boolean is False;
        with procedure Action_21                   is Nothing.To_Do;

        Name_22 : in Rulename := "Rule number  22";
        with function  Condition_22 return Boolean is False;
        with procedure Action_22                   is Nothing.To_Do;

        Name_23 : in Rulename := "Rule number  23";
        with function  Condition_23 return Boolean is False;
        with procedure Action_23                   is Nothing.To_Do;

        Name_24 : in Rulename := "Rule number  24";
        with function  Condition_24 return Boolean is False;
        with procedure Action_24                   is Nothing.To_Do;

        Name_25 : in Rulename := "Rule number  25";
        with function  Condition_25 return Boolean is False;
        with procedure Action_25                   is Nothing.To_Do;

        Name_26 : in Rulename := "Rule number  26";
        with function  Condition_26 return Boolean is False;
        with procedure Action_26                   is Nothing.To_Do;

        Name_27 : in Rulename := "Rule number  27";
        with function  Condition_27 return Boolean is False;
        with procedure Action_27                   is Nothing.To_Do;
        Name_28 : in Rulename := "Rule number  28";
        with function  Condition_28 return Boolean is False;
        with procedure Action_28                   is Nothing.To_Do;

        Name_29 : in Rulename := "Rule number  29";
        with function  Condition_29 return Boolean is False;
        with procedure Action_29                   is Nothing.To_Do;

        Name_30 : in Rulename := "Rule number  30";
        with function  Condition_30 return Boolean is False;
        with procedure Action_30                   is Nothing.To_Do;

        Used_Rules : Positive := 30;

    package Motor is
        function Inference (Step : Natural := 1) return Boolean;
    end Motor;


    package Terminal is
        procedure Atxy (X : Natural; Y : Natural);
        procedure Clear;
    end Terminal;


private
    subtype Ido is Natural;
    subtype Idc is Natural;

    type Reference is
        record
            Idobject : Ido;
            Idclass  : Idc;
            Date     : Long_Integer;
        end record;

    Nullreference : constant Expertsystem.Reference := (1, 0, 0);

end Expertsystem;


E3 Meta Data

    nblk1=3b
    nid=0
    hdr6=76
        [0x00] rec0=22 rec1=00 rec2=01 rec3=086
        [0x01] rec0=05 rec1=00 rec2=3b rec3=004
        [0x02] rec0=17 rec1=00 rec2=02 rec3=014
        [0x03] rec0=14 rec1=00 rec2=03 rec3=074
        [0x04] rec0=01 rec1=00 rec2=3a rec3=01a
        [0x05] rec0=13 rec1=00 rec2=04 rec3=06c
        [0x06] rec0=00 rec1=00 rec2=39 rec3=01e
        [0x07] rec0=15 rec1=00 rec2=05 rec3=042
        [0x08] rec0=13 rec1=00 rec2=06 rec3=06a
        [0x09] rec0=01 rec1=00 rec2=38 rec3=04c
        [0x0a] rec0=1c rec1=00 rec2=07 rec3=086
        [0x0b] rec0=00 rec1=00 rec2=37 rec3=008
        [0x0c] rec0=1f rec1=00 rec2=08 rec3=02c
        [0x0d] rec0=00 rec1=00 rec2=36 rec3=004
        [0x0e] rec0=1a rec1=00 rec2=09 rec3=046
        [0x0f] rec0=01 rec1=00 rec2=35 rec3=006
        [0x10] rec0=18 rec1=00 rec2=0a rec3=04e
        [0x11] rec0=00 rec1=00 rec2=34 rec3=016
        [0x12] rec0=10 rec1=00 rec2=0b rec3=052
        [0x13] rec0=10 rec1=00 rec2=0c rec3=03a
        [0x14] rec0=1a rec1=00 rec2=0d rec3=010
        [0x15] rec0=00 rec1=00 rec2=33 rec3=042
        [0x16] rec0=17 rec1=00 rec2=0e rec3=008
        [0x17] rec0=14 rec1=00 rec2=0f rec3=00c
        [0x18] rec0=12 rec1=00 rec2=10 rec3=044
        [0x19] rec0=16 rec1=00 rec2=11 rec3=03e
        [0x1a] rec0=18 rec1=00 rec2=12 rec3=074
        [0x1b] rec0=1b rec1=00 rec2=13 rec3=01c
        [0x1c] rec0=00 rec1=00 rec2=32 rec3=002
        [0x1d] rec0=17 rec1=00 rec2=14 rec3=032
        [0x1e] rec0=00 rec1=00 rec2=31 rec3=008
        [0x1f] rec0=12 rec1=00 rec2=15 rec3=07e
        [0x20] rec0=00 rec1=00 rec2=30 rec3=002
        [0x21] rec0=1d rec1=00 rec2=16 rec3=022
        [0x22] rec0=00 rec1=00 rec2=2f rec3=012
        [0x23] rec0=16 rec1=00 rec2=17 rec3=046
        [0x24] rec0=00 rec1=00 rec2=2e rec3=008
        [0x25] rec0=17 rec1=00 rec2=18 rec3=01c
        [0x26] rec0=00 rec1=00 rec2=2d rec3=008
        [0x27] rec0=16 rec1=00 rec2=19 rec3=01c
        [0x28] rec0=00 rec1=00 rec2=2c rec3=00a
        [0x29] rec0=16 rec1=00 rec2=1a rec3=052
        [0x2a] rec0=00 rec1=00 rec2=2b rec3=008
        [0x2b] rec0=16 rec1=00 rec2=1b rec3=022
        [0x2c] rec0=00 rec1=00 rec2=2a rec3=00a
        [0x2d] rec0=17 rec1=00 rec2=1c rec3=01c
        [0x2e] rec0=00 rec1=00 rec2=29 rec3=008
        [0x2f] rec0=1a rec1=00 rec2=1d rec3=082
        [0x30] rec0=02 rec1=00 rec2=28 rec3=050
        [0x31] rec0=16 rec1=00 rec2=1e rec3=004
        [0x32] rec0=02 rec1=00 rec2=27 rec3=056
        [0x33] rec0=15 rec1=00 rec2=1f rec3=066
        [0x34] rec0=03 rec1=00 rec2=26 rec3=038
        [0x35] rec0=15 rec1=00 rec2=20 rec3=048
        [0x36] rec0=03 rec1=00 rec2=25 rec3=01a
        [0x37] rec0=15 rec1=00 rec2=21 rec3=02a
        [0x38] rec0=02 rec1=00 rec2=24 rec3=000
        [0x39] rec0=21 rec1=00 rec2=22 rec3=01a
        [0x3a] rec0=09 rec1=00 rec2=23 rec3=000
    tail 0x2150a0198821e40cd9008 0x42a00088462063c03