DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

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 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ T V

⟦da39797b9⟧ TextFile

    Length: 33856 (0x8440)
    Types: TextFile
    Names: »V«

Derivation

└─⟦149519bd4⟧ Bits:30000546 8mm tape, Rational 1000, !projects 93-07-13
    └─ ⟦124ff5788⟧ »DATA« 
        └─⟦this⟧ 
└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
    └─ ⟦129cab021⟧ »DATA« 
        └─⟦this⟧ 
└─⟦f64eaa120⟧ Bits:30000752 8mm tape, Rational 1000, !projects 93 02 16
    └─ ⟦6f12a12be⟧ »DATA« 
        └─⟦this⟧ 
└─⟦2f6cfab89⟧ Bits:30000547 8mm tape, Rational 1000, !projects 94-01-04
    └─ ⟦d65440be7⟧ »DATA« 
        └─⟦this⟧ 

TextFile

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);
        procedure 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_17, 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;