Organization of data in the LADA system

    Organization of objects.

    1. General principles.

    Organization of data is one of the main tasks not only in programming, and the possibility of structuring objects and their grouping and, ultimately, the possibility of language depends on its solution. Recall at least the importance of set theory for the development of mathematics. The simplicity and generality of this theory is the foundation of many theoretical and practical research. For effective implementation, when defining a set, it is necessary to effectively implement the following operations:
    1.  The object belongs to the set.
    2. Not belong to the set.
    3. Inclusion.
    4. Inclusion.
    5. Inclusion on the right.
    6.Inclusion with closing on the right.
    7.Not turning on.
    8. Unification.
    9. Intersection.
    10 ¬ Supplement. It is a negation.

    Perhaps we did not include the difference between the two sets or something else that is often encountered, which is quite enough to implement the rest. Below we consider in detail the implementation of these operations. Noting that, for practical implementation, access to the objects of the set is of interest. Here on these grounds and formulate different methods of organizing sets.

    1. Classes, types. Class, Type
    Classes and types represent a description of the structure of an object and serve as information carriers for creating an object. The created object stores information about its class or type. An additional function of classes and types is the analysis of references to the legality of access to an object. Check for belonging to the class and type is carried out by checking the stored information about the class of the object when checking legality. For example, when entering the procedure. Access to objects of a class or type is carried out directly by links. Note that the definition of a set in this case occurs before the creation of objects, just as classes and types are a kind of template for creating objects.
    2. Arrays. Array
    Typically, languages ​​do not provide for checking whether an object belongs to an array. The main goal, which is set in this data organization, is an arbitrary quick access to the objects of a given group (or set, or array) using the index. An array can be created in the absence of objects. The objects themselves making up the array can be created later. It should be noted that in this structure there can be objects of the same class or type.
    3. The tape. Tape. Group.
    A tape is a group of objects that can only be accessed sequentially. First the first, then the second object, etc. to the end of the tape. This structure is used for sequential access to objects. For example, to commands executed by a computer sequentially. It is convenient for external access, since it does not require an index, and access can be done from outside by automatically increasing the index (or address). The same property is used in the analysis of the input chain of objects in its analysis. For example, when broadcasting. Checking whether an object belongs to this group is carried out by enumerating all the objects of the group (taking into account the properties of the selection). An important feature of tape grouping is the presence of objects in the group during the definition of the Tape group. And does not allow the addition or exclusion of objects of their group, and moreover,
    4. The group. Group
    A group combines existing objects. Depending on the properties and when the object is included in the group, it creates a link to itself. In this case, checking the object for group membership consists in checking if the object has the corresponding link (Indexed = Yes property). And, the rest is similar to the container in JAVA. This group allows you to add and remove objects from the group. It is allowed to belong to several groups at the same time. Allows access by index (Item).

    List (list), which stores groups of elements in the specified order.
    Set (set), which allows adding one element of each type.
    Map (map) stores key-value pairs, which looks like a mini database.
    Besides objects, a group can contain other groups.
    5. Many. Multitude.
    The set is determined by formal parameters and a predicate with respect to these parameters. The belonging of an object to a set is established by the truth of the predicate included in the definition of the set. Based on this definition, it is clear that at the time the set is defined, the presence of objects is not necessary.

    So, as the first part is given, I’ll say that, for example, such a form of Private Sub (X: Mu) is possible, where Mu is not only a class or type, but also a group or a set.
    And that grouping and sets create the so-called “horizontal hierarchy” of objects as opposed to the “vertical hierarchy” created by the inheritance of classes and types. For example:
    Multitude HavingColor: (X: Object) {Color "here the mark belongs" X.Properties}
    So the set HavingColor contains objects of any class having the Color property.

    Also popular now: