|
|
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: 1585 (0x631)
Types: TextFile
Names: »B«
└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
└─⟦129cab021⟧ »DATA«
└─⟦this⟧
└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
└─⟦129cab021⟧ »DATA«
└─⟦e24fb53b7⟧
└─⟦this⟧
separate (M_Rule_Bundle)
package body Change_Two_Notes_Rule is
use Alias;
use Slot;
use M_Frames;
use M_Kbs.Kbs.Predicate;
use M_Kbs.Kbs.Predicate.System_Defined_Predicate;
function Premiss return Fact_Queries is
begin
return (Bank_Notes.Exist ((Value => Define_As (X) and Is_Different (2),
Power => Define_As (P))),
Bank_Notes.Exist ((Value => Is_Equal (X),
Power => Is_Equal (P))));
end Premiss;
procedure Action (Objects : Fact_Collection) is
First_Note : Fact_Name renames Objects (1);
Second_Note : Fact_Name renames Objects (2);
The_Value : Integer := Bank_Notes.Get (First_Note, Value);
The_Power : Integer := Bank_Notes.Get (First_Note, Power);
use Output_Stream;
On_Screen : Output_Stream.Object := Standard_Output;
begin
New_Line (On_Screen);
Put_Line ("********** Changing two notes into one note **********",
On_Screen);
Bank_Notes.Delete (First_Note);
Bank_Notes.Delete (Second_Note);
if The_Value = 1 then
Bank_Notes.Add ((Value (2), Value (The_Power)));
elsif The_Value = 5 then
Bank_Notes.Add ((Value (1), Value (The_Power * 10)));
else
Put_Line ("********** Error in filtering **********", On_Screen);
end if;
M_Kbs.Kbs.Fact_Base.Working_Memory.Default_Put
(Output_Stream.Standard_Output);
end Action;
end Change_Two_Notes_Rule;