ASPL User Guide v 1.00
© 2025 Bassem W. Jamaleddine


I

   Shortcut Commands


By typing aspl by itself on the command prompt, then pressing ENTER, you will start the interpreter with the default namedspace that is defined in the environment variable ASPL_CLI_CONFIG. To start ASPL loading the namedspace WS1, you can enter the short form:

# aspl WS1

or the explicit short form

# aspl -wsname WS1

or the explicit long form

# aspl -wsname WS1 -groupingclass POSIX

All the three commands work the same for the saved namedspace WS1 shipped with the sample workspaces. For a saved namedspace, ASPL will detect its element-grouping-class from its saved MGRP file. However, if you deleted the namedspace WS1, then you started ASPL with the short form, in which case WS1 element-grouping-class will fallback on the default ZEROGROUP (simply because WS1 is treated as a new namedspace). For this reason, use the explicit long form until you get used to ASPL startup process. The short form is convenient for these operators who get accustomed to using the interpreter.

Use the asplcmd command to pass instructions to run through ASPL interpreter, then exit. These instructions are passed within a quoted string to asplcmd. You can pass any of the tilde-expansion as part of the instructions.

#  asplcmd wls

#  asplcmd "load WS1; v"
    load namedspace WS1, print the symbol table, then exit

#  asplcmd envvar
    print the env var of the namedspace loaded by default

# asplcmd ~gg
    print the location of the GG-Container

# asplcmd ~ggs
    ~gg or ~ggs are the same

#  ls -l $(asplcmd ~gg)
    passing result to the shell

#  ls -l `asplcmd ~gg`





 DO NOT CONFUSE asplcmd FOR aspl 
Entering aspl is not the same as asplcmd. While the following two commands work fine on your system:

①  #  asplcmd wls
     passing the command wls through ASPL

②  #  aspl wls
     starting the interpreter on a namedspace wls

In the first command, we meant to pass to ASPL the wls command to list the workspace directory. In this case, ASPL will start (in the background) with its default namedspace TRIVIAL, issue the command wls to list the workspace directory, then exit. In the second command, we called the ASPL interpreter on some namedspace "wls", hence ASPL will start by checking if such a namedspace exist, then load it; if not, then create one in memory, and shows the ASPL prompt: aspl>

You may choose to alias asplcmd with something else

#  alias ascmd=asplcmd

or add this alias to your shell profile, so that everytime you type ascmd is the same as typing asplcmd.. can be less confusing for some..

#  ls `ascmd ~gg`





Remember all namedspaces are uppercase words, the following three commands are equivaleent as they load the same namedspace ACMESPACE

#  aspl ACMESPACE

#  aspl Acmespace

#  aspl acmespace



The following is a list of one liner commands that are useful to work around
ASPL. Casual users of ASPL do not need to work with any of these commands;
however, if you are a developer, or your aim is to maintain ASPL on your UNIX
system, then you may find some of the following commands helpful.



▪ You want to see the tilde-expansions

#  asplcmd tilde

#  asplcmd tilde | grep "^\s*~"
     show nothing but tilde-expansion

▪ The tilde (or envvar) output can be different when loading a specific namedspace

#  asplcmd "load WS1; tilde"

#  asplcmd "load TIERANDGAUSSIAN; tilde"

In particular see the directory associated with each tilde expansion.

▪ You want to display the ANSI colors used by ASPL

#  ttycolors

▪ You want to edit the colors config file

#  asplcmd ~colorsfile

▪ You want to use the nano editor to edit the colors file

#  ASPL_EDITOR=nano asplcmd ~colorsfile



▪ You want to use nano as the program editor, then export ASPL_EDITOR or set it in your .bashrc

#  export ASPL_EDITOR=nano



▪ You want to list the workspace

#  asplcmd wls

▪ You want to list the workspace names by grouping classes

#  asplcmd "wls sort by grouping"

▪ You want to list the workspace names by name

#  asplcmd "wls sort by name"

#  asplcmd "wlls sort by name"



▪ You want to list the namedGClasses in the egC-Container

#  metagrouping -listnamed

#  metagrouping -listnamedphrases
    this will list them including the description in DisplayPhrase

#  metagrouping -list
    this will ping every namedGClass in the egC-Container



▪ You want to ping the ZEROGROUP in the egC-Container

#  metagrouping -egcping ZEROGROUP



▪ You want to print whatever was written in the scratchpad of namedspace ACMEGROUP

#  asplmgrp -catscratchpad `asplcmd ~wsp`/ACMEGROUP.mgrp



▪ You want to list the GG-functions in concordance with namedGClass ZEROGROUP

#  xrgg -listggs -gcn ZEROGROUP



▪ You want to list all GG-functions in the GG-Container

#  asplcmd ggls

You want to list all GG-functions matching gg*osci*

#  asplcmd "ggls gg*osci*"



▪ You want to list all GG-functions matching ggtierandomgaussian

#  asplcmd "ggls ggtierandomgaussian"

#  ls -l $(echo $ASPL1_00_BRIDGE)/ASPL/GGs/ggtierandomgaussian*

#  ls -l $(echo $ASPL1_00_BRIDGE)/ASPL/GGs/ggtierandomgaussian.pm



▪ To find the namedspaces name in your default workspace repository whose groupingclass is TIERANDGAUSSIANGROUP, here is a dumb search by using grep:

#  asplcmd wls | grep TIERANDGAUSSIANGROUP



▪ To find the namedspaces name in your default workspace repository that contain the work JMXJAR, here is a dumb search by using grep:

#  asplcmd wls | grep JMXJAR



▪ You want to compare two directories /tmp/aa1 and /tmp/aa2

#  dircompare.aspl /tmp/aa1 /tmp/aa2



SESSIONS FOR ASPL ENTERPRISE:
▪ You want to know if you have ASPL Enterprise installed

#  aspl -vv

▪ You want to know the users who are in sessions (ASPL Enterprise only, installed with itype 4 and 4c)

#  asplcmd sessions

Note that asplcmd does not use any session, but only when starting aspl intepreter a session is consumed.
▪ You want to see the session timeout and max number of sessions

#  asplcmd ~asplconf

Note that only the master (who has installed ASPL as itype 4) can make changes to ~asplconf (aspl.conf file)

PROGRAMMER VIEW OF TIED ATTRIBUTES:
▪ Let's look at some oscillating GG-functions, use ggs or ggls

#  asplcmd 'ggs gg*osci*'

#  asplcmd 'ggls gg*osci*'

• Print information about ggthreadedtimedoscillatorS()

#  asplcmd 'ggs ggthreadedtimedoscillatorS()'

#  asplcmd 'ggls ggthreadedtimedoscillatorS()'

• Call the function in a TRANSIENT temporary space, TRANSIENT will disappear after aspl exit

#  asplcmd "createworkspace TRANSIENT TIE_OSCILLATORS_AREA_VARY_TIME_ATIME_GROUP;ggthreadedtimedoscillatorS(points,300,frequency1,2,frequency2,3,roundfrac,1)"

• Query the ~tmp for the last files created that contain the oscillating data

#  ls -ltr `asplcmd ~tmp`

You can head the file and use gpdata3 to plot the data.
• Peek inside the GG-function ggthreadedtimedoscillatorS() by editing its module

#  vi `asplcmd ~gg`/ggthreadedtimedoscillatorS.pm

• Peek inside the feeder of the oscillating function TIE_OSCILLATORS_AREA_VARY_TIME_ATIME_GROUP's grouping class

# whichexp $ASPL1_00_BRIDGE/ASPL/GGs "TIE_OSCILLATORS_AREA_VARY_TIME_ATIME_GROUP/*feed*"

# whichexp $(echo $ASPL1_00_BRIDGE)/ASPL/GGs "TIE_OSCILLATORS_AREA_VARY_TIME_ATIME_GROUP/*feed*"

#  whichexp $(asplcmd ~gg) "TIE_OSCILLATORS_AREA_VARY_TIME_ATIME_GROUP/*feed*"

• Peek inside the anon lambda module of the oscillating function TIE_OSCILLATORS_AREA_VARY_TIME_ATIME_GROUP's grouping class

# whichexp $(echo $ASPL1_00_BRIDGE)/ASPL/GGs "TIE_OSCILLATORS_AREA_VARY_TIME_ATIME_GROUP/*anon*"

# whichexp $ASPL1_00_BRIDGE/ASPL/GGs "TIE_OSCILLATORS_AREA_VARY_TIME_ATIME_GROUP/*anon*"

#  whichexp $(asplcmd ~gg) "TIE_OSCILLATORS_AREA_VARY_TIME_ATIME_GROUP/*Anon*"

You can edit and reprogram the Udev.pm and Anoncode.pm. Making a change in either one of the files will affect any namedspace and GG-function using TIE_OSCILLATORS_AREA_VARY_TIME_ATIME_GROUP, so be careful.

▪ so let's query the workspaces and see what namedspace is using TIE_OSCILLATORS_AREA_VARY_TIME_ATIME_GROUP

#  asplcmd wls | grep TIE_OSCILLATORS_AREA_VARY_TIME_ATIME_GROUP
     this will show TIEDOSCI_SYSTIMED

• You want to load the TIEDOSCI_SYSTIMED and edit Udev.pm with the default editor

#  asplcmd "load TIEDOSCI_SYSTIMED; ~udev"

• You want to use the emacs editor instead

#  ASPL_EDITOR=emacs asplcmd "load TIEDOSCI_SYSTIMED; ~udev"



• List the directory for the processor modules of TIE_OSCILLATORS_AREA_VARY_TIME_ATIME_GROUP

#  ls -l $(echo $ASPL1_00_BRIDGE)/ASPL/GGs/TIE_OSCILLATORS_AREA_VARY_TIME_ATIME_GROUP/

• A tree view of the processor modules of TIE_OSCILLATORS_AREA_VARY_TIME_ATIME_GROUP

#  tree $(echo $ASPL1_00_BRIDGE)/ASPL/GGs/TIE_OSCILLATORS_AREA_VARY_TIME_ATIME_GROUP/

• Find the location of the ELMD for TIE_OSCILLATORS_AREA_VARY_TIME_ATIME_GROUP

#  metagrouping -listnamedphrases | grep TIE_OSCILLATORS_AREA_VARY_TIME_ATIME_GROUP

• Edit the ELMD of TIE_OSCILLATORS_AREA_VARY_TIME_ATIME_GROUP

#  vi `asplcmd ~elmddir`/TIE_OSCILLATORS_AREA_VARY_TIME_ATIME_GROUP.ELMD

• Ping the egC-Container to view the Enode module definition of TIE_OSCILLATORS_AREA_VARY_TIME_ATIME_GROUP

#  metagrouping -egcping TIE_OSCILLATORS_AREA_VARY_TIME_ATIME_GROUP



BACKUP AND RESTORE:
▪ You want to copy the namedspace WS1VIENNA from your current host to the remote host vienna

#  (cd `asplcmd ~wsp` && tar czf - WS1VIENNA.*) | ssh vienna 'cd `asplcmd ~wsp` && tar xzf -'



▪ You want to backup your workspace directory to /tmp/MYBACKUP on your current system

#  (cd `asplcmd ~wsp` && tar czf - * ) | (cd /tmp/MYBACKUP && tar xzf -)

▪ You want to restore the workspace from /tmp/MYBACKUP to your ASPL workspace directory

#  (cd /tmp/MYBACKUP && tar czf - * ) | (cd `asplcmd ~wsp` && tar xzf -)



▪ You want to backup the namedspace WS1 to remote host vienna's directory /tmp/VIENNABACKUP

#  (cd `asplcmd ~wsp` && tar czf - WS1.*) | ssh vienna 'cd /tmp/VIENNABACKUP && tar xzf -'

▪ You want to backup all namedspaces to remote host vienna's directory /tmp/VIENNABACKUP

#  (cd `asplcmd ~wsp` && tar czf - *) | ssh vienna 'cd /tmp/VIENNABACKUP && tar xzf -'

▪ You want to restore all namedspaces from remote vienna's /tmp/VIENNABACKUP to your current workspace host

#  ssh vienna 'cd /tmp/VIENNABACKUP && tar czf - *' | (cd `asplcmd ~wsp` && tar xzf - )





CHECK NAMEDSPACES FOR CONSISTENCY AND DANGLING:
▪ You want to list and validate the namedspaces in a repository ~wsp

#  asplmgrp -list `asplcmd ~wsp`



▪ You want to list the attributes of namedspace TRIVIAL

#  asplmgrp -attributes $(echo $ASPL_CLI_CONFIG | sed s/,.*//)/TRIVIAL.mgrp

#  asplmgrp -attributes `asplcmd ~wsp`/TRIVIAL.mgrp

Note that namedspace TRIVIAL attributes are described in its groupingclass ZEROGROUP

EXPORTING A GROUPINGCLASS:
▪ You want to export the groupingclass ACMEGROUP from machine mm01 to machine newyork.
•On machine mm01, create a temporary directory /tmp/Groo, then export the groupingclass ACMEGROUP:

#  metagrouping -exportgrouping ACMEGROUP -targetdir "/tmp/Groo"

•On machine newyork, make sure you have ASPL environment variable ASPL1_00_BRIDGE exported properly, then issue the command:

#  scp -p -r root@mm01:/tmp/Groo/ASPL $ASPL1_00_BRIDGE

•once exported, test by pinging ACMEGROUP in the egC-Container

# metagrouping -egcping ACMEGROUP
    check that ACMEGROUP is in egC-Container

•or list the namedGClasses and grep for ACMEGROUP

# metagrouping -listnamedphrases | grep ACMEGROUP



ASPL ~tmp DIRECTORY:
▪ You want to look into ~tmp, any of the following command will do

#  asplcmd ~tmp

#  ls -ltr $(asplcmd ~tmp)

#  ls -ltr `asplcmd ~tmp`

#  du -ms $(asplcmd ~tmp)



SHALLOW SET OPERATIONS MODULE ShallowMatches.pm:
▪ You want to edit the shallow matching module ShallowMatches.pm

#  asplcmd ~shallowed



WORKSPACE REPOSITORY:
▪ You want to find where the workspaces are being loaded from

#  echo $ASPL_CLI_CONFIG | sed s/,.*//
    print the workspace directory location

# asplcmd ~wsp



▪ You want to query the workspace repository location for the namedspace WS1

#  find $(echo $ASPL_CLI_CONFIG | sed s/,.*//) -name "WS1.*"



▪ Here is a dumb search for WS1 in the list of workspace

#  asplcmd wls | grep WS1
     list namedspaces and dumb search for WS1

▪ Here is a dumb search for POSIX in the list of workspace

#  asplcmd wls | grep POSIX
     list namedspaces and dumb search for POSIX



▪ You want to check if TIERANDGAUSSIAN is a namedspace in the workspace directory

#  ls -l $(echo $ASPL_CLI_CONFIG | sed s/,.*//) | grep TIERANDGAUSSIAN
    list namedspaces matching TIERANDGAUSSIAN

#  find $(echo $ASPL_CLI_CONFIG | sed s/,.*//) | grep TIERANDGAUSSIAN
    find namedspaces matching TIERANDGAUSSIAN

#  find $(echo $ASPL_CLI_CONFIG | sed s/,.*//) -name "TIERANDGAUSSIAN.*"
     find namedspaces matching name TIERANDGAUSSIAN

#  ls -ld $(echo $ASPL_CLI_CONFIG | sed s/,.*//)/TIERANDGAUSSIAN*

#  ls -l $(asplcmd ~wsp) | grep TIERANDGAUSSIAN

#  ls -l $(asplcmd ~wsp)/TIERANDGAUSSIAN*





 aspl -verb:  envvar  hs  description  scratchpad  vars  arcvars  wls 
When aspl is followed by the namedspace then a verb, the interpreter will do the action of the verb then exit.
If aspl is not followed explicitly by the namedspace, then the default namedspace TRIVIAL is assumed.
▪ You want to list the arcvars of namedspace RATECHANGES_RANDBIT

#  aspl RATECHANGES_RANDBIT -verb arcvars

▪ You want to delete the namedspace JUNKSPACE

#  aspl JUNKSPACE -verb wrm

▪ You want to print the history in namedspace RATECHANGES_RANDBIT

#  aspl RATECHANGES_RANDBIT -verb hs

▪ You want to print the description in namedspace JMXJARQR

#  aspl JMXJARQR -verb description





▪ Any of the following three commands shows the history in namedspace JMXJARQR

#  asplcmd "load JMXJARQR; hs"

#  asplmgrp -caths `asplcmd ~wsp`/JMXJARQR.mgrp

#  aspl JMXJARQR -verb hs
     show history saved in the namedspace





▪ Any of the following three commands shows the description in namedspace JMXJARQR

#  asplcmd "load JMXJARQR; description"

#  asplmgrp -catdescription `asplcmd ~wsp`/JMXJARQR.mgrp

#  aspl JMXJARQR -verb description



▪ You want to see the attributes of namedspace TIERANDGAUSSIAN

#  asplcmd "load TIERANDGAUSSIAN; attributes"

#  asplmgrp -attributes `asplcmd ~wsp`/TIERANDGAUSSIAN.mgrp



▪ You want to know if monitordir.aspl is in your PATH

#  which monitordir.aspl

#  whichma monitordir.aspl

#  ls -l $(asplcmd ~shared)/monitordir.aspl



▪ You want to locate any script containing *monitor*aspl* in your PATH

#  whichma *monitor*aspl*

▪ You want to locate any script containing *jmx*aspl* in your PATH

#  whichma *jmx*aspl*

▪ You want to locate any script containing *jmx*pl* in your PATH

#  whichma *jmx*pl*

▪ You want to locate any script containing *jar*pl* in your PATH

#  whichma *jar*pl*



 QUICKLY LOOK INTO NAMED FILES AND THEIR CONTENTS IN UNIX DIRECTORIES 
▪ You want to locate these named files with same names but different contents

#  asplcmd 'createworkspace TRANSIENT POSIX; ggdir(dir,/tmp/edu1);ggdir(dir,/tmp/edu2);f&`c~'

▪ You want to locate these named files with different names and having same contents

#  asplcmd 'createworkspace TRANSIENT POSIX; ggdir(dir,/tmp/edu1);ggdir(dir,/tmp/edu2);c&`ks~'

Recall the namedspace TRANSIENT is a temporary space that is not persisted by ASPL