|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 4096 (0x1000)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Primary_Predicate, seg_04a334, seg_04a9e6, seg_04b454, separate Generic_Fact_Base.Predicate
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦this⟧
separate (Generic_Fact_Base.Predicate)
package body Primary_Predicate is
function Make_Alias_Definition (The_Alias : Alias.Name) return Object is
begin
return Object'(Kind => Alias_Definition, The_Alias => The_Alias);
end Make_Alias_Definition;
function Make_Conjunction (Left, Right : Predicate.Object) return Object is
begin
return Object'(Kind => Predicate_Conjunction,
The_Left_Predicate => Left,
The_Right_Predicate => Right);
end Make_Conjunction;
function Make_Collection (Of_Objects : Predicate.Objects) return Object is
begin
return Object'(Kind => Predicate_Collection,
The_Collection => new Predicate.Objects'(Of_Objects));
end Make_Collection;
procedure Put (The_Object : Object; Where : Output_Stream.Object) is
use Output_Stream;
begin
case The_Object.Kind is
when Alias_Definition =>
Put ("Define_As(", Where);
Alias.Put (The_Object.The_Alias, Where);
Put (")", Where);
when Predicate_Conjunction =>
Put (The_Object.The_Left_Predicate, Where);
Put (" and ", Where);
Put (The_Object.The_Right_Predicate, Where);
when Predicate_Collection =>
Put ("Collection of predicates", Where);
end case;
end Put;
function Match (Value : Slot.Object; Against : Object) return Boolean is
begin
case Against.Kind is
when Alias_Definition =>
Alias.Set (Against.The_Alias, To => Value);
return True;
when Predicate_Conjunction =>
return Match (Value, Against.The_Left_Predicate) and then
Match (Value, Against.The_Right_Predicate);
when Predicate_Collection =>
declare
The_User_Object : Class.User_Object :=
Class.As_User_Object (Value);
The_Class : Class.Object :=
Class.Class_Of (The_User_Object);
The_Patterns : constant Query.Patterns :=
Against.The_Collection.all;
begin
return Class.Match (The_Instance =>
Class.Instance_Of (The_User_Object),
Against_Patterns => The_Patterns,
Using_Class => The_Class);
end;
end case;
end Match;
end Primary_Predicate;
nblk1=3
nid=0
hdr6=6
[0x00] rec0=1d rec1=00 rec2=01 rec3=03e
[0x01] rec0=18 rec1=00 rec2=02 rec3=04c
[0x02] rec0=12 rec1=00 rec2=03 rec3=000
tail 0x2174ea39c866e7cc6c160 0x42a00088462063c03