|
|
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: 23552 (0x5c00)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, procedure Test_Instruction_List, seg_0472f0
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦this⟧
with Text_Io, Condition, Order, Index_List, View, View_List, Affectation,
Instruction_List, Attribute, Field_Identifier_Array, Objet, The_Order,
Animate_List, The_Hero, The_Place, Identifier, Moving_String, Detail,
Group_Array, Complement, Complement_Array, Enumeration_Array, Expression;
use Text_Io, Instruction_List;
procedure Test_Instruction_List is
I1 : Instruction_List.Object := Instruction_List.Null_Object;
I2 : Instruction_List.Object := Instruction_List.Null_Object;
I3 : Instruction_List.Object := Instruction_List.Null_Object;
Ind_List : Index_List.Object;
An_Order : Order.Object;
Ia : Order.Index_Array;
Vi : View.Object;
Vi_List : View_List.Object;
Af : Affectation.Object;
C1 : Condition.Object := Condition.Null_Object;
C2 : Condition.Object := Condition.Null_Object;
C3 : Condition.Object := Condition.Null_Object;
D1 : Detail.Object;
A1, A2, A3, A4, A5 : Attribute.Object;
Ob : Objet.Object;
Id : Identifier.Object;
Index : Natural;
Ok : Boolean;
F : Expression.Object := Expression.Null_Object;
L : Expression.Object := Expression.Null_Object;
R : Expression.Object := Expression.Null_Object;
F1 : Expression.Object := Expression.Null_Object;
F2 : Expression.Object := Expression.Null_Object;
F3 : Expression.Object := Expression.Null_Object;
F4 : Expression.Object := Expression.Null_Object;
F5 : Expression.Object := Expression.Null_Object;
begin
Enumeration_Array.Put_Literal (Identifier.From_String ("normal"),
Identifier.From_String ("fermee"), Ok);
Enumeration_Array.Put_Literal (Identifier.From_String ("normal"),
Identifier.From_String ("ouverte"), Ok);
Enumeration_Array.Put_Literal (Identifier.From_String ("couleur"),
Identifier.From_String ("rouge"), Ok);
Enumeration_Array.Put_Literal (Identifier.From_String ("couleur"),
Identifier.From_String ("jaune"), Ok);
Enumeration_Array.Put_Literal (Identifier.From_String ("couleur"),
Identifier.From_String ("vert"), Ok);
Enumeration_Array.Put_Literal (Identifier.From_String ("couleur"),
Identifier.From_String ("bleu"), Ok);
Enumeration_Array.Show;
Field_Identifier_Array.Put (Identifier.From_String ("vie"));
Field_Identifier_Array.Put (Identifier.From_String ("nord"));
Field_Identifier_Array.Put (Identifier.From_String ("sud"));
Field_Identifier_Array.Put (Identifier.From_String ("age"));
Field_Identifier_Array.Put (Identifier.From_String ("nom"));
Field_Identifier_Array.Put (Identifier.From_String ("couleur"));
Field_Identifier_Array.Put (Identifier.From_String ("description"));
Field_Identifier_Array.Show;
Complement_Array.Put (Complement.Entity_Object,
Identifier.From_String ("xavier"), Ok);
Complement_Array.Put (Complement.Entity_Object,
Identifier.From_String ("fred"), Ok);
Complement_Array.Put (Complement.Animate_Object,
Identifier.From_String ("gedeon"), Ok);
Complement_Array.Put (Complement.Entity_Object,
Identifier.From_String ("gaston"), Ok);
Complement_Array.Put (Complement.Entity_Object,
Identifier.From_String ("alfred"), Ok);
Complement_Array.Put (Complement.Entity_Object,
Identifier.From_String ("table"), Ok);
Complement_Array.Put_Verb (Identifier.From_String ("courir"),
Identifier.From_String ("aller"), Ok);
Complement_Array.Put_Verb (Identifier.From_String ("aller"),
Identifier.From_String ("aller"), Ok);
Complement_Array.Put_Word (Identifier.From_String ("de"), Ok);
Complement_Array.Put_Word (Identifier.From_String ("nord"), Ok);
Complement_Array.Put_Word (Identifier.From_String ("est"), Ok);
Complement_Array.Put_Word (Identifier.From_String ("sud"), Ok);
Complement_Array.Put_Word (Identifier.From_String ("ouest"), Ok);
Complement_Array.Put_Word (Identifier.From_String ("vie"), Ok);
Complement_Array.Put_Word (Identifier.From_String ("age"), Ok);
Complement_Array.Put_Word (Identifier.From_String ("nom"), Ok);
Complement_Array.Put_Word (Identifier.From_String ("couleur"), Ok);
Complement_Array.Put_Word (Identifier.From_String ("description"), Ok);
Complement_Array.Put_Word (Identifier.From_String ("porte"), Ok);
Complement_Array.Put_Word (Identifier.From_String ("trou"), Ok);
Complement_Array.Put (Complement.Place_Object,
Identifier.From_String ("cuisine"), Ok);
Complement_Array.Put (Complement.Place_Object,
Identifier.From_String ("chambre"), Ok);
Complement_Array.Put (Complement.Place_Object,
Identifier.From_String ("salon"), Ok);
Complement_Array.Create_Enumerate_Field
(Complement_Array.Index ("cuisine"),
Field_Identifier_Array.Index ("nord"), Ok);
Index := Enumeration_Array.Enum ("normal");
Complement_Array.Field_Put_Enumerate
(Complement_Array.Index ("cuisine"),
Field_Identifier_Array.Index ("nord"), Index,
Enumeration_Array.Literal (Index, "fermee"), Ok);
Complement_Array.Create_Enumerate_Field
(Complement_Array.Index ("chambre"),
Field_Identifier_Array.Index ("sud"), Ok);
Index := Enumeration_Array.Enum ("normal");
Complement_Array.Field_Put_Enumerate
(Complement_Array.Index ("chambre"),
Field_Identifier_Array.Index ("sud"), Index,
Enumeration_Array.Literal (Index, "fermee"), Ok);
Complement_Array.Put_Place (Complement_Array.Index ("gaston"),
Complement_Array.Index ("cuisine"), Ok);
Complement_Array.Put_Movement (Identifier.From_String ("gedeon"),
Complement_Array.Index ("cuisine"));
Complement_Array.Put_Movement (Identifier.From_String ("gedeon"),
Complement_Array.Index ("salon"));
Complement_Array.Put_Movement (Identifier.From_String ("gedeon"),
Complement_Array.Index ("chambre"));
Complement_Array.Put_Movement (Identifier.From_String ("gedeon"),
Complement_Array.Index ("chambre"));
Complement_Array.Put_Movement (Identifier.From_String ("gedeon"),
Complement_Array.Index ("cuisine"));
Complement_Array.Put_Movement (Identifier.From_String ("gedeon"),
Complement_Array.Index ("chambre"));
Animate_List.Put (Complement_Array.Index ("gedeon"), Ok); -- a tester
Animate_List.Show;
Complement_Array.Create_Number_Field
(Complement_Array.Index ("gaston"),
Field_Identifier_Array.Index ("age"), Ok);
Complement_Array.Field_Put_Number
(Complement_Array.Index ("gaston"),
Field_Identifier_Array.Index ("age"), 13, Ok);
Complement_Array.Create_Number_Field
(Complement_Array.Index ("gaston"),
Field_Identifier_Array.Index ("vie"), Ok);
Complement_Array.Field_Put_Number
(Complement_Array.Index ("gaston"),
Field_Identifier_Array.Index ("vie"), 123, Ok);
Complement_Array.Create_Enumerate_Field
(Complement_Array.Index ("gaston"),
Field_Identifier_Array.Index ("couleur"), Ok);
Index := Enumeration_Array.Enum ("couleur");
Complement_Array.Field_Put_Enumerate
(Complement_Array.Index ("gaston"),
Field_Identifier_Array.Index ("couleur"), Index,
Enumeration_Array.Literal (Index, "rouge"), Ok);
Complement_Array.Put_Place (Complement_Array.Index ("gaston"),
Complement_Array.Index ("cuisine"), Ok);
Complement_Array.Put_Place (Complement_Array.Index ("table"),
Complement_Array.Index ("cuisine"), Ok);
Complement_Array.Create_Sentence_Field
(Complement_Array.Index ("cuisine"),
Field_Identifier_Array.Index ("description"), Ok);
Complement_Array.Field_Put_Sentence
(Complement_Array.Index ("cuisine"),
Field_Identifier_Array.Index ("description"),
Identifier.From_String ("C'est une belle cuisine"), Ok);
Complement_Array.Put_Exit (Complement_Array.Index ("cuisine"),
Complement_Array.Index ("porte"),
Complement_Array.Index ("cuisine"),
Complement_Array.Index ("nord"),
Complement_Array.Index ("chambre"),
Complement_Array.Index ("sud"), Ok);
Complement_Array.Put_Exit (Complement_Array.Index ("cuisine"),
Complement_Array.Index ("trou"),
Complement_Array.Index ("cuisine"),
Complement_Array.Index ("ouest"),
Complement_Array.Index ("salon"),
Complement_Array.Index ("est"), Ok);
Complement_Array.Create_Sentence_Field
(Complement_Array.Index ("chambre"),
Field_Identifier_Array.Index ("description"), Ok);
Complement_Array.Field_Put_Sentence
(Complement_Array.Index ("chambre"),
Field_Identifier_Array.Index ("description"),
Identifier.From_String ("C'est une belle et grande chambre"), Ok);
Complement_Array.Put_Exit (Complement_Array.Index ("chambre"),
Complement_Array.Index ("porte"),
Complement_Array.Index ("chambre"),
Complement_Array.Index ("sud"),
Complement_Array.Index ("cuisine"),
Complement_Array.Index ("nord"), Ok);
Complement_Array.Create_Sentence_Field
(Complement_Array.Index ("salon"),
Field_Identifier_Array.Index ("description"), Ok);
Complement_Array.Field_Put_Sentence
(Complement_Array.Index ("salon"),
Field_Identifier_Array.Index ("description"),
Identifier.From_String ("C'est un grand salon"), Ok);
Complement_Array.Put_Exit (Complement_Array.Index ("salon"),
Complement_Array.Index ("trou"),
Complement_Array.Index ("salon"),
Complement_Array.Index ("est"),
Complement_Array.Index ("cuisine"),
Complement_Array.Index ("ouest"), Ok);
Identifier.Put (Id, "salle");
Group_Array.Put (Id, Complement_Array.Index ("chambre"), Ok);
Group_Array.Put (Id, Complement_Array.Index ("salon"), Ok);
Group_Array.Put (Id, Complement_Array.Index ("cuisine"), Ok);
Group_Array.Show;
Identifier.Put (Id, "nombre");
Group_Array.Put (Id, Complement_Array.Index ("vie"), Ok);
Group_Array.Put (Id, Complement_Array.Index ("age"), Ok);
Group_Array.Show;
Complement_Array.Show;
Order.Put_Place (An_Order, Moving_String.From_String ("cuisine"));
Order.Put_First_Complement (An_Order, Moving_String.From_String ("aller"));
Order.Put_Second_Complement (An_Order, Moving_String.From_String ("nord"));
Order.Put_Third_Complement (An_Order,
Moving_String.From_String ("cuisine"));
Order.Put_Fourth_Complement (An_Order, Moving_String.From_String (""));
Ia := (1, 2, 3, 3, 4);
Order.Put_Redirection (An_Order, Ia);
The_Order.Put (An_Order);
The_Order.Show;
The_Hero.Put (Complement_Array.Index ("gaston"));
Put_Line ("index the hero : " & Natural'Image (The_Hero.Index));
The_Hero.Show;
The_Place.Put (Complement_Array.Index ("cuisine"));
Put_Line ("index the place : " & Natural'Image (The_Place.Index));
The_Place.Show;
Objet.Create_Real (Ob, Complement_Array.Index ("gaston"));
Detail.Create_Real_Field (D1, Field_Identifier_Array.Index ("age"));
Attribute.Put (A1, Ob, D1);
-- Attribute.Show (A1);
Objet.Create_Real (Ob, Complement_Array.Index ("gaston"));
Detail.Create_Real_Field (D1, Field_Identifier_Array.Index ("nord"));
Attribute.Put (A5, Ob, D1);
-- Attribute.Show (A5);
Objet.Create_Group (Ob, 5);
Detail.Create_Field_Group (D1, 3);
Attribute.Put (A2, Ob, D1);
--Attribute.Show (A2);
Objet.Create_Hero (Ob);
Detail.Create_Real_Field (D1, Field_Identifier_Array.Index ("couleur"));
Attribute.Put (A3, Ob, D1);
-- Attribute.Show (A3);
Objet.Create_Place (Ob);
Detail.Create_Real_Field (D1, Field_Identifier_Array.Index ("nord"));
Attribute.Put (A4, Ob, D1);
-- Attribute.Show (A4);
Expression.Create (F4, Enumeration_Array.Enum ("normal"),
Enumeration_Array.Literal
(Enumeration_Array.Enum ("normal"), "ouverte"));
Put_Line ("evaluate f4 : " & Integer'Image (Expression.Evaluate (F4)));
-- Expression.Show (F4);
Expression.Create (F5, Enumeration_Array.Enum ("normal"),
Enumeration_Array.Literal
(Enumeration_Array.Enum ("normal"), "fermee"));
Put_Line ("evaluate f5 : " & Integer'Image (Expression.Evaluate (F5)));
-- Expression.Show (F5);
Expression.Create (L, 5);
Expression.Create (R, 8);
Expression.Create (F1, Expression.Add, L, R, Ok);
Put_Line ("ok : " & Boolean'Image (Ok));
Put_Line ("evaluate f1 : " & Integer'Image (Expression.Evaluate (F1)));
-- Expression.Show (F1);
Expression.Create (F2, Expression.Substract, L, R, Ok);
Put_Line ("ok : " & Boolean'Image (Ok));
Put_Line ("evaluate f2 : " & Integer'Image (Expression.Evaluate (F2)));
-- Expression.Show (F2);
Expression.Create (L, A1);
Expression.Create (R, 3);
Expression.Create (F3, Expression.Add, L, R, Ok);
Put_Line ("ok : " & Boolean'Image (Ok));
Put_Line ("evaluate f3 : " & Integer'Image (Expression.Evaluate (F3)));
-- Expression.Show (F3);
Expression.Create (L, 10);
Expression.Create (R, 20);
Expression.Create (F, Expression.Add, L, R, Ok);
Put_Line ("ok : " & Boolean'Image (Ok));
Condition.Create_Compare (C1, A1, Condition.Visible.Equal, F, Ok); -- faux
Put_Line ("ok : " & Boolean'Image (Ok));
Put_Line ("is right vide : " & Boolean'Image (Condition.Is_Right (C1)));
Condition.Create_Compare (C2, A1, Condition.Visible.Less, F, Ok); -- vrai
Put_Line ("ok : " & Boolean'Image (Ok));
-- Condition.Show (C2);
Put_Line ("is right: " & Boolean'Image (Condition.Is_Right (C2)));
Condition.Create_Compare (C3, A4, Condition.Visible.Equal, F4, Ok); -- faux
Put_Line ("ok : " & Boolean'Image (Ok));
-- Condition.Show (C3);
Put_Line ("is right : " & Boolean'Image (Condition.Is_Right (C3)));
Detail.Create_Real_Complement (D1, Complement_Array.Index ("alfred"));
Affectation.Create_Hero (Af, D1);
-- Affectation.Show (Af);
View.Create_Sentence (Vi, Identifier.From_String ("Ca marche !!!"));
View_List.Put (Vi_List, Vi);
View.Create_Number (Vi, 2345);
View_List.Put (Vi_List, Vi);
View.Create_Attribute (Vi, A1);
View_List.Put (Vi_List, Vi);
Put_Line ("display view list :");
View_List.Display (Vi_List);
New_Line;
Put_Line ("show i1 vide");
Show (I1);
Insert_Change (I1, Af);
Put_Line ("show i1 affectation ");
Insert_Display (I1, Vi_List);
Put_Line ("show i1 affectation display ");
Insert_Next_Line (I1);
Put_Line ("show i1 affectation display next line");
Insert_Move (I1);
Put_Line ("show i1 affectation display next line move");
Detail.Create_Real_Complement (D1, Complement_Array.Index ("xavier"));
Objet.Create_Place (Ob);
Insert_Put (I1, D1, Ob);
Put_Line ("show i1 affectation display next line move put");
Detail.Create_Real_Complement (D1, Complement_Array.Index ("table"));
Objet.Create_Hero (Ob);
Insert_Put (I1, D1, Ob);
Detail.Create_Real_Complement (D1, Complement_Array.Index ("fred"));
Objet.Create_Hero (Ob);
Insert_Put (I1, D1, Ob);
Put_Line ("show i1 affectation display next line move put put put ");
Detail.Create_Real_Complement (D1, Complement_Array.Index ("nord"));
Insert_Go (I1, D1);
Put_Line ("show i1 affectation display next line move put put put go");
Run (I1);
Run (I1);
Put_Line ("stop :" & Boolean'Image (Is_At_End));
Run (I1);
Put_Line ("stop :" & Boolean'Image (Is_At_End));
Run (I1);
Put_Line ("stop :" & Boolean'Image (Is_At_End));
Run (I1);
Put_Line ("stop :" & Boolean'Image (Is_At_End));
Insert_Erase (I1);
Put ("show i1 affectation display next line move put put put go erase");
--show(i1);
Insert_Stop (I1);
Put
("show i1 affectation display next line move put put put go erase stop");
--show(i1);
Run (I1);
Put_Line ("stop :" & Boolean'Image (Is_At_End));
I1 := Null_Object;
Put_Line ("show i1 vide");
Show (I1);
Insert_Display (I2, Vi_List);
View.Create_Sentence (Vi, Identifier.From_String (" super"));
View_List.Put (Vi_List, Vi);
View.Create_Number (Vi, 555);
View_List.Put (Vi_List, Vi);
Insert_Display (I3, Vi_List);
Insert_If (I1, C1, I2, I3);
Put_Line ("condition fausse");
Run (I1);
New_Line;
Put_Line ("condition fausse");
I1 := Null_Object;
Insert_If (I1, C2, I2, I3);
Show (I1);
Put_Line ("condition vraie");
Run (I1);
New_Line;
Put_Line ("condition vraie");
Complement_Array.Show;
The_Hero.Show;
The_Place.Show;
end Test_Instruction_List;
nblk1=16
nid=5
hdr6=28
[0x00] rec0=18 rec1=00 rec2=01 rec3=054
[0x01] rec0=17 rec1=00 rec2=0f rec3=012
[0x02] rec0=00 rec1=00 rec2=02 rec3=070
[0x03] rec0=12 rec1=00 rec2=0e rec3=034
[0x04] rec0=10 rec1=00 rec2=0d rec3=022
[0x05] rec0=0f rec1=00 rec2=12 rec3=004
[0x06] rec0=16 rec1=00 rec2=0c rec3=02a
[0x07] rec0=10 rec1=00 rec2=14 rec3=00c
[0x08] rec0=18 rec1=00 rec2=0b rec3=01e
[0x09] rec0=12 rec1=00 rec2=0a rec3=048
[0x0a] rec0=13 rec1=00 rec2=09 rec3=072
[0x0b] rec0=15 rec1=00 rec2=08 rec3=034
[0x0c] rec0=18 rec1=00 rec2=13 rec3=014
[0x0d] rec0=1b rec1=00 rec2=07 rec3=03a
[0x0e] rec0=18 rec1=00 rec2=11 rec3=03a
[0x0f] rec0=19 rec1=00 rec2=03 rec3=05c
[0x10] rec0=1e rec1=00 rec2=15 rec3=036
[0x11] rec0=24 rec1=00 rec2=16 rec3=020
[0x12] rec0=28 rec1=00 rec2=06 rec3=00e
[0x13] rec0=15 rec1=00 rec2=04 rec3=000
[0x14] rec0=12 rec1=00 rec2=05 rec3=000
[0x15] rec0=00 rec1=00 rec2=00 rec3=000
tail 0x2174a66da865365a267b7 0x42a00088462060003
Free Block Chain:
0x5: 0000 00 10 01 4b 80 0e 28 56 69 5f 4c 69 73 74 2c 20 ┆ K (Vi_List, ┆
0x10: 0000 00 00 00 11 80 02 29 3b 02 00 09 20 20 20 20 4f ┆ ); O┆