ASPL Manual v 1.00
© 2024 by SetSphere.COM


3-1

   ASPL Grouping Containment


ASPL has two containers: Element Grouping Class Container (denoted with egC-container) and Global Grouping Class Container (denoted with GG-container). Both of these containers are dynamically loaded and managed by ASPL.

While the user does not need to manage any of these containers, introducing ASPL containment will facilitate understanding the workspace and its stored datasets.

In ASPL, a group consists of groups, subgroups, elements and their corresponding attributes. The elements of a group, the attributes of a group, and the attributes of the elements are described in their related modules contained in the egC-container. Therefore, a group meta data is described in their related classes or modules contained in the egC-container.

When you load a workspace, you can issue the command egCwhoami to ping its active class loaded in the egC-container. One can type attributes at the ASPL prompt to display the list of attributes defined for the loaded workspace.

Recall from Chapter CCC that the egC-container contains the classes that describe the meta data characteristics of ASPL groups.

The first time a set-variable is vivified (and come to exist) it is assigned the dataset of a GADg object (returned by a function named GG-func). GG-functions refer to the set of global grouping functions that resides in the GGs-container. All GG-functions start with the prefix 'gg' followed by a word. One can type ggls at the ASPL prompt to list the GG-functions managed by GGs-container. If reloading is enabled, the ggls command will also reload the container before displaying the GGs functions.

The GG-container is a loadable container managing all GG-functions (GGs). (* Note that few GG-functions are primitive as they are internally coded, such as ggdir()).

For example, the following statement
a1 = ggdir(dir,/tmp/aa1)
causes the set-variable to be vivified and assigned the result of ggdir() function. In the absence of a lvar (left variable) the result is saved on the stack and can be viewed by printing the answer stack with the ans command. The ggdir() should exist and loaded in the GG-Container, the command
ggls ggdir()
displays information about ggdir(). The command displays all GG-functions with the prefix ggdir.

The GADg object are

However, other variables can be the result of setadic operations.

Three essential charac While the meta data describing a group, its subgroups, and its elements is held in its corresponding modules in the egC-container, the processing routines delivering the grouping objects are held in the GG-container. Once a GADg is returned, ASPL will normalize the object according to its meta data described by its modules stored in the egC-container. (This is an essential step to make sure that the dataset structure adhere to ASPL algorithmic processors.)

Typically, an object stores structured data and subroutines code, but ASPL decouples the attributes meta data from their processors.



The dataset consists of groups, subgroups, elements and their corresponding attributes. The attribute of an element or group may be updated during run time whenever it is bound to an anonymous subroutine. That is the element attributes do not need to be static data as they can be refreshed when transitionning from one instance to another. This allows to keep historical data of a dataset and archive it (within the variable name representing it).

and attributes can be tied or execC code - but they are described elsewhere in their Elem Group Class within ASPL container, ASPL binds (links) these attributes to their corresponding processors The user does not need to keep track of the binding process, rather just create Elem Group Class and define the attribute of the elem and can further add named processors and restrict their DOMAIN



ASPL stores its datasets as hash objects that may have different layouts that we refer to as shapes. Shapes refer to the layout of a dataset, and ASPL set variabless have shapes. To display the shape of a set variable, use the shape command. For example

The following shows the known shapes of ASPL variables:

ASPL set variables have shapes, are hashes holding the information of subrgoups and elements, all of which described by their attributes,




■ Metagrouping Tied Attributes

ASPL can provide hooks to egC so tie attributes can be updated in GG function

Tied attributes allow to specify a domain or RANGE. The metagroup will parse a RANGE, it is written as

-attributes "point1,t" "point2,t" "point3,t"

which says that the attribute with names point1 point2 point3 are tied attribute

"mean123,c,__mean123 point1 point2 point3 /[0.0,4.99] 1-5feet/[5.0,6.5] 5-6feet/>6.5 above7feet/"

which says that the attribute mean123 is CODE with subroutine __mean123 to be executed, and point1 point2 point3 are

passed as actual parameters; also the range

 

■ Accessing Symbols from within GG-functions

Datasets are cumbersome, copying a set-variable into another to be temporarily manipulated will eventually munch the memory.

The design of ASPL was geared toward avoiding implementing functions with actual parameters so to avoid expanding internal data structure

with activation records (because that will aggressively consume the system memory).

The ASPL interpreter is lightweight, and its variables are global typeless variables.

Sometimes you want alter the internal of a set-variable on the fly:

ASPL can provide access to symbol table via to GG-function (the DNA case) partial update w/o archiving

 

bof bof bof

The following example shows how ASPL variables get to exist once they are assigned

aspl> a1 = ggdir /tmp/aa1
    (result is assigned to a1)

aspl> a2 = ggdir /tmp/aa2
    (result is assigned to a2)

aspl> a12 = f& a1 a2
    (a12 is assigned the intersection of a1 and a2)

aspl> v
    (print the variables)

 

Anchor Tit Placeholder

①  aspl> c123 = c& a1 a2 a3
    (c123 is assigned all checksums intersections of a1 a2 a3)

②  aspl> adisplay c123
    (print out c123)

aspl> av c123
    (view internals of set variable c123)

③   Just dump the rest to a file

AS BEING SET IN THE SHELL:
--------------------------
ASPL_CONFIG=/root/WS,WS3,10,10,10,1000,30,2,0,0,0