QUICKTRICK(ID:8417/)


Simulation language based on cells/heuristics devised by Ledley.


People:
References:
  • Ledley, R S "Programming and Utilizing Digital Computers", McGraw-Hill Book Co., New York, 1965. view details
  • Ledley, RS "Use of Computers in Biology and Medicine", McGraw-Hill Book Co., New York, 1965 view details Extract: The Items of the QUICKTRICK Program
    The Items of the QUICKTRICK Program.

    Now we can turn to the description of the compiler-interpreter for simulations. When a simulation is formulated in terms of a collection of isolated events, as described above, utilizing the digital computer is greatly simplified. The computer program QUICKTRICK is designed to facilitate the compiling of a simulation into the computer as well as to enable the computer automatically to sequence the events and compute the statements of the simulation. There are three main advantages to the computer program: First, with its use, only statements of the simulation need be coded. In addition, if an automatic algebraic compiler (Sec. 6-4) is not available, the program enables the coding of the statements of the simulation as if each occurred in the same location, thereby enabling different persons to code statements independently. Second, by means of QUICKTRICK any event can be changed, replaced, added, or omitted at any stage of the simulation, with no additional coding except for new statements. Similarly individual statements can be changed or omitted. And third, the program embodies the notion of sequencing events according to the timing model described above, common to all appropriately organized simulations.

    Four types of items that comprise a simulation are distinguished by the simulation automatic program:

    1. the general variables. These are the variables whose values describe the overall, "state" of the simulation at any simulated time, variables that in general are utilized by (i.e., referred to by statements of) several events from different places or areas of the simulation. Since these variables are utilized in many places or areas, they are located in a special part of the computer memory not associated with any particular place or area of the simulation.

    2. place or area variables. These are variables whose values characterize each place in the simulation at any simulated time. There is one such set of variables associated with each place or area, and each such set is located in that part of the computer's memory reserved for the events of, and labeled by the name of, that place or area.

    3. the collection of event clocks. All the clocks of the events are located together in a part of the memory reserved for this purpose. Each clock is labeled by the name of its event and the name of the place or area of that event.

    4. the statements that comprise each event. The previous items were all associated with the computer-memory locations of the values of the variables that enter into the simulation. The statements that comprise the events, on the other hand, are the formulas or other decision processes that operate to change the variables. The collection of statements that comprise each event is located in a contiguous section of the memory, in the order in which they are to be computed; in turn, the collection of events for each place or area is located in a contiguous section of the memory, but without special regard for order. Each statement is labeled with its own name, with the name of the event of which it is a part, and with the name of the place or area in which the event takes place.

    Of these four types of items only the statements require coding; the other items are essentially just lists of locations in the computer memory for the variables of the simulation, The analogy between the computer memory and a bookshelf can be made (see Fig, 6-10), on which items of types 1 and 3 are in separate parts of the shelf (memory), items of type 4 are located together on the shelf (memory) like volumes of the same set, and each set is preceded by corresponding items of type 3.
    Extract: Brief Description of the Simulation Compiler-Interpreter QUICKTRICK
    Brief Description of the Simulation Compiler-Interpreter QUICKTRICK.

    There are two phases to the automatic program, the first concerned with compiling the simulation on the computer, and the second concerned with performing the simulation on the computer. The program, whose main features will now be briefly outlined, makes the computer appear as if it were a special "simulation computer," with special automatic operations and special automatic-processing features. It embodies the cellular-systems approach described at the beginning of this section.  The purpose of phase I is to compile the simulation and make changes. This phase has six basic automatic operations:

    1. Compile a new event. This automatic-programming operation directs the computer to compile in its memory the label of an event, with its place, the set of its statements, and any new overall, or state, variables and place variables.

    Omit an event. This operation directs the computer to erase from its memory the label and statements of an event.

    3. Change or replace an event. This operation is a combination, of operations 1 and 2? Where an old event is erased and a new event with its statements is compiled in its stead.

    4. Compile a new statement. This operation directs the computer to compile the label of a statement, the code that comprises the statement, and any new overall variables and new place variables.

    5. Omit a statement. This erases from the computer's memory the label and code of a statement.

    6. Change or replace a statement. An old statement is omitted and replaced by the code for a new or changed statement.

    Other operations can add to or erase some overall variables or place variables; can look through the statements and make a list of where specified variables are utilized in the simulation, by noting in which statements of which events the variables occur; can print out specified events and their statements; can print out current values of specified variables; and so forth.

    To use an automatic, operation, the operation code, followed by the required information associated with its use, is read into the computer; the QUICKTRICK program in the computer then interprets the operation, directing the computer to perform the required functions. For example, to compile a new event, the operation code, say "01," is read into the computer, followed by the label of the event and place, the codes for the statements of the event, and any required new overall and place variables.

    […] After the simulation has been compiled or altered, phase II of the QUICKTRICK program is utilized […] The program first directs the computer to search all the event clocks for the next scheduled event. If more than one event is scheduled for this time, the computer arbitrarily chooses one of them, returning for another in the next round. For since all the events of the simulation are isolated, it makes no difference which one of several simultaneous events is computed first. The label of the clock chosen denotes the event which is to be performed. The program then directs the computer to search for the variables of the place of the event and to transfer them to a prearranged memory location reserved for this purpose. Then the computer is directed to locate the statements of the event to be performed, and the first statement is transferred to another prearranged memory location reserved for computing statements. The program next gives control of the computer to the code for this first statement, which is then calculated. When the calculation is completed, the program again resumes control and the second statement of the event is transferred to the statement-computing memory location; this next statement is computed, and so forth, until all the statements of the first event have been computed. Next the program returns the place variables, which have been altered by the event, to their original location; the computer is directed by the program to search once more for the next scheduled event, and so on. The reason for transferring the place variables and each statement code of an event that is in progress to particular reserved memory locations before performing the calculations is that by this means the programmers who code the formulas will all know the precise locations of the variables and can code every statement to be computed in one set of memory locations. It is this standardization of memory locations for the computation that enables many different persons to work independently on different events