A full description of RELSIM is given, with examples illustrating its use, and the implementation of the language on the REL system is also discussed. By structure we understand the determination of the boundary of the system and the establishment of entities, properties, and. In discrete simulation, on the other hand, the state of the system is considered to change in discrete steps.
Thus, the system is seen as consisting of elements that perform certain functions on the entities of the system. The state of the system may change due to an event that is considered to be a current event or an activity that is. All system variables and lists must be defined by the user at the beginning of the program.
Programming additions to language features is, and we believe will be, very simple.
DESCRIPTION OF THE LANGUAGE
MOTHER is a property of the entity GEORGE, so MOTHER OF GEORGE or MOTHER(GEORGE) can be used. The simulation log is updated with an instance of the event described by the named routine. Obviously, the second form cannot be used as a direct statement, since it cannot be executed before the declaration of the event routine.
One of the statements in the sequence is randomly selected and executed, with the probability of selection based on the number preceding the statement. Each language construct can be given a name, which can then be used instead of that construct. In the first case, the current entity of the class to which the specified entity belongs is set to that entity and the modified statement is executed.
In the second case, the current entity of the class is set to each of its elements in turn, and for each such change the modified statement is executed.
CPtATE 3 STAT!ONS~
If he is busy, it goes to the second inspector for another 2 minutes, and the same goes for the third inspector. Once all three are busy, the tape turns back to the first inspector and it takes six minutes for the tools to come back to him. The first inspector needs 4_±3 minutes to check each tool; the second lasts 5±3, and the third lasts 5±2 minutes.
We would like to know the average transit time of an approved tool and the percentage of time each inspector is occupied.
END,
LOCAL BUSY TIME(VR;,
AFTER TNTERVAL 2
CREATE 6 TERMINALS
When the terminal is free, the user first in line enters one of three types of messages. Once it's done, we output the line for our reference and change the terminal status accordingly. When the status of the terminal is set to free with the event below, this event is also generated, which takes the user out of the system and prepares the terminal for use by the next person in line, if there is one.
This is done by duplicate entries in the LINE queue; the first input is the number of the terminal we are working on, and the second input indicates the direction of the message to be sent, where 0 indicates a message from the terminal and I 0 a response from the computer. Now when the processor buffer unit detects that the line is free, it must consider whether the site buffer of the scanned terminal is free. If the location buffer is busy, the processor buffer waits another 80 msec., without receiving a signal back, and then releases the communications line (which, if there is a queue, is immediately seized) and continues scanning the next terminal .
If not, the line and site buffer are freed and the next terminal is scanned.
DECLARE 11 COMPUTER"=0
DECLARE 11 QUEUE OF COMPUTER 11 LIST
- AN INSIDE VIEW
Continuation pages have a simple header with an ID of its own, the ID of the first page, and the ID of the next page, followed by entity entries. Arrays have a simple header containing an ID of itself, an ID of the other page, and the dimensions of the array, followed by a single word . the entrances. All of the above, when declared, are placed in the lexicon and then parsed to their page ID, except for attributes.
These parse the ID of a page containing the class ID and attribute number within that class, for all classes that have attributes of that name. The event notification is set in this way: the first word, as we have noticed, indicates the next notification at the same simulation time; the second contains the parsed tree ID of the event routine, and the third points, if necessary, to another list element that acts as an information header. The central simulation processor, which is the semantic routine for the GO statement, essentially passes control to the REL semantic processor in a copy of the parse tree of each event routine of which the current notification becomes an instance.
The implementation of the FOR statement to meet the requirements set out in Chapter II is as follows: The. If the modifier is an entity, it is placed at the top of a stack, referenced by a pointer in the header of the class it is a member of. The routine then calls the REL semantic processor on a copy of the parsed tree of the sentence being modified by the FOR statement.
On return it is bumped; with a new current unit, the semantic processor is called on another copy of the sentence. When the stack of the class contains one element, the routine sets it as current and exits. The GENERATE semantics, on the other hand, stores the values of the parameters it sends in the event message.
The core language processing routine then takes these payloads and stores them on the page where they should be when it calls the event specified in the notification. The above examples give, hopefully, some sense of the types of tasks faced in language implementation.
EC - ENTITY CLASS
BLANKS ARE HANDLED ANO NUMBERS COLLECTED
CHK: -NAS
SEM:SEMRET
SEM: SEMSIN
SEM: SEMFP
SE~:VRY6
SE~:RINO
SE~:PASO
SYN:'OP'=)'NU SEM:SEMRET
SE~:NABT
SEM:LASC
SET:1-LIS+ELT
CHK:+LIS-LAT,,
SEM:BTST
SET:O+ENE SEM:CCl
SET:04ENE SfM:COl
CNO:CONPR
SEM:CD4
SE~:SFMRET
THE NEXT FEW RULES BUILD UP 800LF~NS ~ITH ATTRIBUTES I~ THEM ~~ICH ARE ~OT BOUND TO ANY ENTITY AT THIS
SEM:LTST
SEM:BPIL
SEM:BREV
CHK:+ENT,~ENT+AOP SET:2
SE~:SEMPET
CNC:BFOE
CHK:+LIS
SET:O-+FP~
CNO:CNAC
SEM:SEMRF.T
SEM:DER4(G)
SYN: 'DE'=)'DE =VR'
CNC:CNTS SEM:SSRl
SE~:VCR4(G)
CHK:+CRE,+PBP CNO:CNNPB
CHK:-OOV-SEL-CON CNO:POSR
SF~:SEMRET
CHK:+LIS-SEC-SCR-LAT CNC:SIFN
SE~:VCF4
SET:O+CSP SFM:V(02
SEM:VCE6
SET:2
SEM:SS2
SF.T:O+ENT SEt-:VlNU
SET:O+FPN SEfll:VTNU
SET:O+ENT
SET:O+FP~+LIS+LAT SEM:VTNU
SET:O+LIS-LAT+ENT
CNO:NOAR
CI\C:NGVRJN
SE-M:SE~RET
SEM.:SEMRET
SEM:POA2
VEN T 1
THE LAST FEW RULES HANOLE THE WRITING OUT CF COMPLEX LINES
SET:O+WLD SEM:SFMPET
SE~:SEMRET
ROUTINE DOCUMENTATION In this appendix we describe the workings of all syntax
This is done by checking the parsing graph to the right of the attribute, and following it if there is a comparator or a right parenthesis immediately following. BFOE (STC3): Allow a parse only if the first two parts of speech on the right side of the line are both numeric expressions or entity expressions. CHXTO@ (STCZ): This routine is applied to the function given in a DENSITY statement and changes all instances of the free variable X in the graph to signs, and the parentheses surrounding the function to double quotes.
CNAC (STCl): Collects all characters to the right of a double quote until it reaches the next double quote in the parsing graph, and places their PIs as constituent elements of the left part of the speech. This is done by checking that there is no comma on the left of the parsing graph. Places a dummy component under the left part of speech so that a transformation of the form takes place.
The area under the function is too small compared to the area of the rectangle it encloses, making the calculation too inefficient. If successful, it inserts the string into the lexicon with a newly created, blank page as its payload; and it also places that payload, under an event PI, as a constituent of the left-hand part of speech. CNTSEV (STC3): First call the condition routine PASLOC; then collects the name of the event, fails if it is an already defined event name, and otherwise puts it in the lexicon.
Thus, in the rescan that is already triggered by PASLOC, all self-references of the event can be parsed correctly. CONBR ( STC 1): Allows parsing if there is a blank to the right of the string being parsed. FTFOE (STC3}: Same as BFOE, except it examines the first and third parts of speech on the right side of the rule.
NOAB (STC3): examines parsing components and fails if there is a single attribute as a component. NOVRIN (STC3): Enables splitting if the first component of the split quantity does not have its own components.
RETURN
CHCL
BEGIN
KTON
C BEGIN )
DER5 (PSM3): Places the parse tree for an attribute definition on a page and a pointer to that page in the header of the appropriate entity class. ECR2B,(PSM9): Same as ECR2, but the complement of the list obtained in ECR2 is placed in the scratch list. LMNC (PSM2): Given a class and a number n, returns the nth from the bottom unit of the class.
Places the ID of each element in the current entity queue of the corresponding class. VCC4 (PSM20): Given an array and a string of numbers, sequentially places the numbers (last index moves fastest) into the array. VCF8 (PSM21): Frees all log pages and deletes all event notification names from the lexicon.
This routine places an entry for the name of this part of speech in the lexicon. DELPOS (PSMl 1): Upon arrival, Rl contains the ID of a part of speech in the bottom byte. Upon entry, RO contains the number of characters in the name of a part of speech;
Rl points to the. string; and RZ refers to the p-list of the part of speech. Leave just the last page and put the ID from the top of it back into the appropriate word of the context area. The action is the same as FIPID, but on return R2 contains the length of the referring lexical string, and R3 contains the page ID in the lexicon where the string begins.
On return, Rl points to the evaluated copy of the p-list and FPR-0 remains unchanged. On entry, R3 contains the page ID of the list being copied and R4 that of the list being copied.