Skip to main content

A Model for Datalanguage Semantics (Part 3)

4.6 Object environment​

There are three categories of objects in the model datacomputer. These are p/objects, t/objects, and i/objects.

P/objects are permanent objects created explicitly with language functions. They correspond to the idea of stored data in the real datacomputer. There are three special objects. These are special only in that they are created as part of initializing the environment, rather than as the result of executing a language function. These are named STAR, BLOCK and TOP/LEVEL. All three are of type DIR.

An object is a p/object if it is subordinate to STAR; it is a t/object if it is subordinate to BLOCK. TOP/LEVEL is subordinate to BLOCK. (see figures 4-5 and 4-6).

               _________________
| |
| _____________ |
| | STAR | |
| |_____________| |
| NAME | ____________
| _____________ | | ________ |
| | ____|_|______\| | DIR | |
| |_____________| | /| |________| |
| DESCRIPTION | | TYPE |
| _____________ | |____________|
| | | | DESCRIPTION
| |_________|___| |
| CHILD | |
|___________|_____|
OBJECT |
|
|
|
V

ALL P/OBJECTS

Figure 4-5
STAR and p/objects

T/objects are temporary objects, also created explicitly with language functions. However, these correspond to user-defined temporaries, both local to requests and "top-level" (i.e. not local to any request, but existing until deletion or logout.)

                _________________
| |
| _____________ |
| | BLOCK | |
| |_____________| |
| NAME | ____________
| _____________ | | ________ |
| | ____|_|______\| | DIR | |
| |_____________| | /| |________| |
| DESCRIPTION | | TYPE |
| _____________ | |____________|
| | | | DESCRIPTION
| |_________|___| |
| VALUE | |
|___________|_____|
OBJECT |
|
|
___________V_____
| |
| _____________ |
| | TOP/LEVEL | |
| |_____________| |
| NAME | ____________
| _____________ | | ________ |
| | ____|_|______\| | DIR | |
| |_____________| | /| |________| |
| DESCRIPTION | | TYPE |
| _____________ | |____________|
| | ____|_|___ DESCRIPTION
| |_____________| | |
| SIBLING | |
| _____________ | |
| | | | |___\ ALL BLOCKS AND
| |_________|___| | / LOCAL T/OBJECTS
| CHILD | |
|___________|_____|
|
|
V

ALL GLOBAL
T/OBJECTS

Figure 4-6
BLOCK, TOP/LEVEL and t/objects

I/objects are internal, system-defined objects whose creation and deletion is implicit in the execution of some language function.

I/objects are hung directly off of function calls (objects of type FUNC), and are always local to the execution of such function calls. They correspond to the notions of (1) literal, and (2) compiler- or interpreter-generated temporary.

4.7 Primitive Language Functions​

Here we discuss the primitive language functions presently implemented in the model and likely to be of most interest. In this section, the emphasis is on relating functions to one another. Section 4.8 contains more detail and examples.

Assign operates on a pair of objects, called the target and the source. The value of the source is copied into the value of the target. Figure 4-7 shows a pair of objects, X and Y, before and after execution of an assignment having X as target and Y as source. Presently, assignment is defined only for objects of type BOOL and objects of type STRING. The objects involved must have identical descriptions.

               _________________        _________________
              |                 |      |                 |
              |  _____________  |      |  _____________  |
              | |             | |      | |             | |
              | |      X      | |      | |      Y      | |
              | |_____________| |      | |_____________| |
              |  NAME           |      |  NAME           |
              |  _____________  |      |  _____________  |
              | |             | |      | |             | |
              | |_______|_____| |      | |_______|_____| |
              |  VALUE  |       |      |  VALUE  |       |
              |_________|_______|      |_________|_______|
               OBJECT   |             OBJECT     |
                        |                        |
               _________V_______        _________V_______
              |                 |      |                 |
              |      "ABC"      |      |      "DEF"      |
              |_________________|      |_________________|
               VALUE                    VALUE

                           BEFORE ASSIGNMENT

               _________________        _________________
              |                 |      |                 |
              |  _____________  |      |  _____________  |
              | |             | |      | |             | |
              | |     X       | |      | |     Y       | |
              | |_____________| |      | |_____________| |
              |  NAME           |      |  NAME           |
              |  _____________  |      |  _____________  |
              | |             | |      | |             | |
              | |_______|_____| |      | |_______|_____| |
              |  VALUE  |       |      |  VALUE  |       |
              |_________|_______|      |_________|_______|
               OBJECT   |             OBJECT     |
                        |                        |
               _________V_______        _________V_____
              |                 |      |                 |
              |     "DEF"       |      |     "DEF"       |
              |_________________|      |_________________|
               VALUE                    VALUE

                           AFTER ASSIGNMENT

                               Figure 4-7
                          Effect of assignment