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

⟦1422a420b⟧ TextFile

    Length: 5895 (0x1707)
    Types: TextFile
    Names: »V«

Derivation

└─⟦f64eaa120⟧ Bits:30000752 8mm tape, Rational 1000, !projects 93 02 16
    └─ ⟦6f12a12be⟧ »DATA« 
        └─⟦this⟧ 

TextFile

with Generic_Expression;
with Generic_Fact_Base;
with Generic_Rule_Base;
with System_Operators;

generic

    Max_Frame_Count                : Positive := 200;
    Max_Slots                      : Positive := 20;
    Max_Condition_Elements_By_Rule : Positive := 10;  
    Max_Condition_Elements         : Positive := 200;
    Max_Rules                      : Positive := 50;
    Max_Expression_Count           : Positive := 200;

    type User_Defined_Operators is (<>);
    with function User_Defined_Match (Using_Operator : User_Defined_Operators;
                                      Value : Integer;
                                      Against : Integer) return Boolean is <>;
    with function User_Defined_Evaluate
                     (Using_Operator : User_Defined_Operators;
                      Left, Right    : Integer) return Integer is <>;
    type Rule_Bundles is (<>);

package Generic_Kbs is

    package Expression is  
       new Generic_Expression
              (Max_Expression_Count     => Max_Expression_Count,
               System_Defined_Operators => System_Operators.Operators,
               System_Defined_Match     => System_Operators.Match,
               System_Defined_Evaluate  => System_Operators.Evaluate,
               User_Defined_Operators   => User_Defined_Operators,
               User_Defined_Match       => User_Defined_Match,
               User_Defined_Evaluate    => User_Defined_Evaluate);

    package Fact_Base is  
       new Generic_Fact_Base (Max_Frame_Count   => Max_Frame_Count,
                              Max_Slots         => Max_Slots,
                              Expression_Object => Expression.Object,
                              Null_Expression   => Expression.Null_Expression,
                              Expression_Match  => Expression.Match,
                              Expression_Put    => Expression.Put);

    package Rule_Base is
       new  
           Generic_Rule_Base
              (Max_Rules                      => Max_Rules,
               Max_Condition_Elements_By_Rule => Max_Condition_Elements_By_Rule,
               Max_Condition_Elements         => Max_Condition_Elements,
               Rule_Bundles                   => Rule_Bundles,
               Fact_Name                      => Fact_Base.Object,
               Fact_Collection                => Fact_Base.Collection,
               Empty_Fact_Collection          => Fact_Base.Empty_Collection,
               Fact_Put                       => Fact_Base.Put,
               Fact_Query                     => Fact_Base.Query,
               Null_Fact_Query                => Fact_Base.Null_Query,
               Fact_Queries                   => Fact_Base.Queries,
               Null_Premiss                   => Fact_Base.Null_Premiss,
               Retrieve                       => Fact_Base.Retrieve,
               Queries_Put                    => Fact_Base.Put);

    package System_Defined_Expression is

        function Is_Equal is  
           new Expression.Binary_System_Predicate
                  (Operator => System_Operators.Is_Equal_Op);

        function Is_Less is  
           new Expression.Binary_System_Predicate
                  (Operator => System_Operators.Is_Less_Op);

        function Is_Less_Or_Equal is
           new Expression.Binary_System_Predicate
                  (Operator => System_Operators.Is_Less_Or_Equal_Op);

        function Is_Greater is
           new Expression.Binary_System_Predicate
                  (Operator => System_Operators.Is_Greater_Op);

        function Is_Greater_Or_Equal is
           new Expression.Binary_System_Predicate
                  (Operator => System_Operators.Is_Greater_Or_Equal_Op);

        function Is_Different is
           new Expression.Binary_System_Predicate
                  (Operator => System_Operators.Is_Different_Op);

        function Is_Any is  
           new Expression.Unary_System_Predicate
                  (Operator => System_Operators.Is_Any_Op);

        -- value predicate shortcuts

        function Is_Equal            (Value : Integer) return Expression.Object;
        function Is_Less             (Value : Integer) return Expression.Object;
        function Is_Less_Or_Equal    (Value : Integer) return Expression.Object;
        function Is_Greater          (Value : Integer) return Expression.Object;
        function Is_Greater_Or_Equal (Value : Integer) return Expression.Object;
        function Is_Different        (Value : Integer) return Expression.Object;

        -- alias predicate shortcuts

        function Is_Equal (Value : Expression.Alias) return Expression.Object;
        function Is_Less (Value : Expression.Alias) return Expression.Object;
        function Is_Less_Or_Equal
                    (Value : Expression.Alias) return Expression.Object;
        function Is_Greater (Value : Expression.Alias) return Expression.Object;
        function Is_Greater_Or_Equal
                    (Value : Expression.Alias) return Expression.Object;
        function Is_Different (Value : Expression.Alias)
                              return Expression.Object;

        -- arithmetic expressions

        function "+" is new Expression.Binary_System_Expression
                               (Operator => System_Operators.'+');

        function "-" is new Expression.Binary_System_Expression
                               (Operator => System_Operators.'-');

        function "*" is new Expression.Binary_System_Expression
                               (Operator => System_Operators.'*');

        function "/" is new Expression.Binary_System_Expression
                               (Operator => System_Operators.'/');

        function "abs" is new Expression.Unary_System_Expression
                                 (Operator => System_Operators.Abs_Op);


    end System_Defined_Expression;



end Generic_Kbs;