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: ┃ B T

⟦638d81a6a⟧ TextFile

    Length: 1562 (0x61a)
    Types: TextFile
    Names: »B«

Derivation

└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
    └─ ⟦129cab021⟧ »DATA« 
        └─⟦this⟧ 

TextFile

with Text_Io;
separate (R_Rule_Bundle)
package body Find_Rectangle_Rule is

    use Alias;
    use R_Frames;
    use Slot;
    use R_Kbs.Kbs.Predicate;
    use R_Kbs.Kbs.Predicate.System_Defined_Predicate;
    use R_Kbs.Kbs.Fact_Base;
    use R_Kbs.Kbs.Fact_Base.Query.Operators;
    use R_Kbs.Kbs.Expression.System_Defined_Expression;

    function Premiss return Fact_Queries is

    begin

        return (1 => Windows.Exist
                        ((Bounds =>  
                             Rectangles.Such_As
                                ((Top_Left     =>
                                     Points.Such_As ((X => Is_Equal (10),
                                                      Y => Is_Equal (20))),
                                  Bottom_Right =>
                                     Points.Such_As ((X => Is_Equal (100),
                                                      Y => Is_Equal (150))))),
                          Title  => Is_Any)));

    end Premiss;


    procedure Action (Objects : Fact_Collection) is
        The_Window : Fact_Name renames Objects (1);
        use Output_Stream;  
        The_Rectangle : Slot.Object;  
    begin  
        Class.Default_Put
           (Windows.Get (The_Fact => The_Window, The_Slot => Bounds),
            Standard_Output);
        Put_Line ("------- Found the window:", Standard_Output);
        Class.Default_Put (The_Window, Standard_Output);
        Put_Line ("------- Deleting the window:", Standard_Output);
        Windows.Delete (The_Window);
    end Action;
end Find_Rectangle_Rule;