ASPL User Manual v 1.00
© 2025 SetSphere.com


3-1

   ASPL Grouping Containment

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

In ASPL, a group consists of groups, subgroups, elements and their corresponding attributes. The attributes of each group are described in their corresponding element-metadata-descriptor files (ELMD files), that are processed by the egC-Container. You will use the command metagrouping to create a named element-grouping-class; for instance to create the namedGClass ACMEGROUP:

metagrouping -creategrouping ACMEGROUP -displayphrase "TESTING WITH GROUPING CLASS: ACMEGROUP"

Now you can list the namedGClasses

metagrouping -listnamedphrases | grep ACMEGROUP

vi `asplcmd ~elmddir`/ACMEGROUP.ELMD
    edit ACMEGROUP ELMD file

addstubGG ACMEGROUP ggacme.pm
     create a GG-function ggacme()

aspl ACMESPACE -groupingclass ACMEGROUP -verbose
     start aspl with some namedspace ACMESPACE

aspl -wsname ACMESPACE -groupingclass ACMEGROUP -verbose
     same as the command above

aspl> egCwhoami
     ping ACMEGROUP

aspl> ggls ggacme()
     print inforamtion of GG-function ggacme()

aspl>  cd ~gg
     cd to GG-Container repository

aspl> edit ggacme.pm
     edit the module where ggacme() is defined

aspl> bye
     bye will save the namedspace ACMESPACE then quit ASPL

asplcmd wls | grep ACME
     list the workspace and grep for ACME

asplmgrp -list `asplcmd ~wsp` | grep ACMESPACE



You can delete the element grouping class ACMEGROUP

metagrouping -deletegrouping ACMEGROUP

Should you have saved the namedspace ACMESPACE, and deleted its corresponding ACMEGROUP, then the namedspace ACMESPACE becomes DANGLING, and so is the GG-function ggacme().

asplmgrp -list `asplcmd ~wsp` | grep ACMESPACE

  ... ACMESPACE.mgrp             ACMEGROUP                (NOT MOCKED)                  DANGLING


When you create an element grouping class, the group attributes are being created. These attributes are described in their related modules contained in the egC-Container. Therefore, a group meta data is described in their related classes or Enode modules contained in the egC-Container.

When you load a workspace, you can issue the command egCwhoami at the ASPL prompt to ping its active class loaded in the egC-Container. That is the command egCwhoami pings the egC-Container of the currently loaded workspace. The egC-Container contains the classes that describe the meta data characteristics of ASPL groups. Typing the command attributes at the ASPL prompt displays the list of attributes defined for the loaded workspace.

The first time a set-variable is vivified (and comes to exist) it is assigned the dataset of a GADg object (returned by a function named GG-function).GADg stands for Group-Algebraic-Data-groups. GG-functions are global grouping functions that are managed in the GG-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 the GG-Container. If reloading is enabled, the ggls command will also reload the container before displaying the GG-functions. By default the reloading of GG-Container is enabled, but it can be disabled by using the ASPL option -noreloadGG at its startup. For more information, see ASPL synopsis in ASPL User Guide.

We use the term GGs to refer to the GG-functions. These functions are programmable and are located in their own directory that you can determine their location by adding the option -verbose when starting ASPL. Use the tilde command ~gg at the ASPL prompt to change directory to the GG-Container repository.

The GG-Container is a loadable container managing all GG-functions (GGs). Note that some 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 ggls ggdir displays all GG-functions with the prefix ggdir. To display the information about ggdir(), just append the parentheses to the function: ggls ggdir().

While the meta data describing a group, its subgroups, and its elements is
held in its corresponding ELMD file, 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 adheres 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. Attributes are not static, as the attribute of an element or group may be updated during run time, for instance, 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: hence ASPL variables retain temporal changes, and become differential group variables. This allows to keep historical data of a group by archiving it (within the variable name representing it). Refer to "Differential Group Operations" in ASPL User Guide.

Also attributes can be tied to anonymous lambda functions (defined in their element grouping class), ASPL binds (links) these attributes to their corresponding processors. The user does not need to keep track of the binding process, rather just create a grouping class and define the attribute of the elements:

metagrouping -creategrouping ACMEGROUP -attributes "point1,t" "point2,t" "point3,t"

and can further add named processors and bracket their domain within a range:

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

For more clarity, we show the following equivalent command:
  # metagrouping -creategrouping ACMEGROUP  \
     -attributes "point1,t" "point2,t" "point3,t" \
     "mean123,c,__mean123 point1 point2 point3  /[0.0,4.99] 1-5feet/[5.0,6.5] 5-6feet/>6.5 above7feet/"



ASPL stores its datasets as hash objects that may have different layouts that we refer to as shapes. Shapes refer to the dataset layouts, and ASPL set-variables have shapes. To display the shape of a set-variable, use the shape command. Refer to ASPL User Guide for more information.