|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: B T
Length: 2289 (0x8f1)
Types: TextFile
Names: »B«
└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
└─⟦129cab021⟧ »DATA«
└─⟦this⟧
separate (Generic_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 : Generic_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 : Generic_Predicate.Objects) return Object is
begin
return Object'(Kind => Predicate_Collection,
The_Collection =>
new Generic_Predicate.Objects'(Of_Objects));
end Make_Collection;
function Get_Collection (From_Object : Object)
return Generic_Predicate.Objects is
begin
return From_Object.The_Collection.all;
end Get_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 =>
return False;
end case;
end Match;
end Primary_Predicate;