ASPL User's Guide v 1.00
© 2024 by SetSphere.com


A

   ASPL Synopsis

aspl [-wsdir repos] [-wsname workspace] [-groupingclass elemgroupclass] [-verbose] [-bridgeless] [-dbgsess] [-STDIN] [-showonly] [-verb verb] [-keeps n,n,n,n] [-ddmconf conffile] [-script asplscript] [-SCT] [-singlepass] [-nostrictld] [-globalvar] [-persistvar] [-syncwks] [-assignonce] [-arcvar] [-tattler] [-noansi] [-nocheck] [-noreloadGG] [-extendedsimilarity] [-logfile filename] [-dm displaymode] [-gB 8bits] [-dv 32bits] [-jE] [-jV] [-jF] [-jG] [-jL] [-jZ]

The ASPL interpreter is started with the aspl command that can be followed by options that are summarized in the following table. Typing the command aspl on the UNIX shell prompt without any option will start the interpreter with its default options, and ASPL will default to the predefined configuration data that is already preset in its environment variables. These environment variables can be added to the user UNIX profile, or being set per user in the user Shell profile. For instance, if you are using the BASH Shell, then you can edit the .bashrc profile found in your home directory and add them.

       a yellow note
 -T- Tab. A.1   [SPL Command Options][ASPL Interpreter Options]
   
-help  Print this summary 
-version  Print the program version 
-wsname WORKSPACE  Following argument is the workspace name 
-wsdir WSPREPOS  Following argument is the directory where workspaces are saved 
-groupingclass ELMGC  Following argument is the element grouping class 
-verbose  Display verbose information at startup 
-bridgeless  Start ASPL without the grouping class container 
-dbgsess  Print debugging info from sessions manager 
-STDIN  Pipe to the STDIN of ASPL, must be the last option 
-showonly  Print what is set in ASPL startup variables and exit 
-verb  VERB Execute an ASPL verb command and exit the interpreter 
-ddmconf  Following argument is the ddm.conf passed explicitly 
-script SCRIPTNAME  Following argument is ASPL script file; remaining arguments are passed to script. 
-SCT  Emit tracing information while executing the script. 
-singlepass  Execute the srcipt in a single pass, default is two passes 
-nostrictld  No stricture on loading workspaces within a script 
-globalvar  ASPL variables are all global variables; ignore it for v.1 
-persistvar  Persist ASPL variables commiting them to the symbol table 
-syncwks  Manually sync the workspace 
-assignonce  Each variable symbol cannot be assigned more than once 
-arcvar  Archiving variables is enabled 
-tattler  Toggle the tattler 
-noansi  Disable ANSI colors 
-nocheck  Load a saved workspace without checking for its grouping class 
-noreloadGG  Load the GGs functions container only at startup and disable it from being reloaded at run time 
-extendedsimilarity  Set similarity to extended 
-logfile LOGFILE  Attach a log file 
-dm DISPLAYMODE  Set the display mode of ASPL symbol tables and answer stacks; where DISPLAYMODE is one of 1,2,3,4,5,1A,2A,3A,4A,5A 
-dv 32bits  32 bits vector for tracing execution 
-gB 8bits  8 bits vector for tracing branching on predicate 
-kH  enable AUTO Kvec for hooked attributes, at startup only 
-kC  enable AUTO Kvec for lamdba code attributes, at startup only 
-jH  verbose for hooked attributes that are tied asynchroneous, at startup only but reloadable 
-jC  verbose for lamdba code attributes and tied asynchroneous attributes, at startup only but reloadable 
-jE  GR reloading verbose 
-jV  Element Grouping Class VERBUM for Enode initialization normalization formatting preprocessing visor etc. will cause reloading EG_VERBUM INTERNAL USE 
-jF  passed to GG function to allow verbose or whatever the programmer want to do with it 
-jG  verbose when reloading the GGs, also enable GGs reloading: reloadGG 1 
-noreloadGG  disable GGs reloading, by default reloading GGs is enabled 
-jL  print long logger line, if -logfile is specified then logging is written to the logfile otherwise printed to STDOUT 
-jZ  extra debug 
aspl commands options

ASPL uses five environment variables:

For instance if you have installed ASPL in /opt/ASPLv1.00 then you can export these environment variables by adding the following to your .bashrc:

export ASPL1_00_BRIDGE=/opt/ASPLv1.00/BRIDGE
export ASPL1_00_HOME=/opt/ASPLv1.00
export ASPL1_00_PROMPT='prompt:{tm} {u}@{h} {cwd}  aspl:{no} > ;promptcolor:bold_black;logocolor:bold_black;loadcolors:colors3'
export ASPL1_00_TMP=/root/.aspl/tmp
export ASPL_CLI_CONFIG=/root/.aspl/WSP/WORKSPACES1,WS1,10,10,10,1000,30,2,0,0,0,0

ASPL bin and shared directory should be added to your PATH.

PATH=$PATH:/opt/ASPLv1.00/bin:/opt/ASPLv1.00/shared:/opt/ASPLv1.00/BRIDGE/bin

The basic distribution of ASPL that is distributed with this book may not have the BRIDGE component enabled. The BRIDGE is distributed with the regular or professional version of ASPL. The BRIDGE component allows you to create additional grouping class module.
The basic version of ASPL will mock the grouping class.

The environment variable ASPL_CLI_CONFIG can be viewed from within ASPL by typing the command envvar that will displaythe value its value as being seen by ASPL. In particular this is useful in case you have overwritten some of its values explicitly by using some of the corresponding options. The following figure shows the environment variable as seen by ASPL in a user session.

1:4:33 root@mm01 /opt/ASPLv1.00/shared  aspl:1 > envvar

CURRENTLY FROM WITHIN THE APPLICATION:
--------------------------------------
ASPL_CLI_CONFIG=/root/.aspl/WSP/WORKSPACES1,TRIVIAL,10,10,10,1000,30,2,0,0,0,0
                             |                 |     |  |  |   |   | | | | | +--> synchronize workspace container
                             |                 |     |  |  |   |   | | | | +----> make variables global
                             |                 |     |  |  |   |   | | | +------> persist data changes
                             |                 |     |  |  |   |   | | +--------> assign once
                             |                 |     |  |  |   |   | +----------> display mode
                             |                 |     |  |  |   |   +------------> wksp keep, keep lessons
                             |                 |     |  |  |   +----------------> history size
                             |                 |     |  |  +--------------------> unswer size
                             |                 |     |  +-----------------------> enswer size
                             |                 |     +--------------------------> answer size
                             |                 +--------------------------------> workspace name
                             +--------------------------------------------------> workspace directory


The above variable is the current ASPL_CLI_CONFIG variable that is being used by ASPL client.
Some values may have been changed. Compare them to the initial values as set in the shell.

AS BEING SET IN THE SHELL:
--------------------------
ASPL_CLI_CONFIG=/root/.aspl/WSP/WORKSPACES1,WS1,10,10,10,1000,30,2,0,0,0,0
                             |               |   |  |  |   |   | | | | | +--> synchronize workspace container
                             |               |   |  |  |   |   | | | | +----> make variables global
                             |               |   |  |  |   |   | | | +------> persist data changes
                             |               |   |  |  |   |   | | +--------> assign once
                             |               |   |  |  |   |   | +----------> display mode
                             |               |   |  |  |   |   +------------> wksp keep, keep lessons
                             |               |   |  |  |   +----------------> history size
                             |               |   |  |  +--------------------> unswer size
                             |               |   |  +-----------------------> enswer size
                             |               |   +--------------------------> answer size
                             |               +------------------------------> workspace name
                             +----------------------------------------------> workspace directory


1:4:37 root@mm01 /opt/ASPLv1.00/shared  aspl:2 > 

You can notice that the workspace name has been changed from WS1 (that is coded in the environment variable ASPL_CLI_CONFIG) to TRIVIAL that is explicitly set by specifying it following the -wsname option.

Starting ASPL on the UNIX shell prompt is shown in the following figure.

       [Top Text]

 -L- Listing. A.1   [ASPL Startup on the UNIX Shell Prompt][ASPL Startup on the UNIX Shell Prompt]
(raw text)
1.     02:04 root@vienna: ~ #  aspl WS1 -verbose
2.     
3.       ASPL # 1.00
4.     
5.       ASPL PROGRAM INSTALLED IN /opt/ASPLv1.00
6.       ASPL WORKSPACE WILL IGNORE SESSIONS MANAGEMENT
7.       ASPL WORKSPACE VARIABLES HAVE QUOTIENT-VARIABLES ENABLED
8.     
9.     
10.      ASPL CLI # 1.00
11.    
12.      PROGRAM DIRECTORY: /opt/ASPLv1.00
13.      GROUPING CLASS NAME: POSIX
14.      WORKSPACE REPOSITORY: /root/.aspl/WSP/WORKSPACES1
15.      WORKSPACE NAME: WS1
16.      LAST SAVED: 2023-02-21 02:37:07.655478
17.      ELEMENT GROUPINGS CLASS: /opt/ASPLv1.00/BRIDGE/ASPL/Groupings
18.      LOADABLE GGs DIRECTORY: /opt/ASPLv1.00/lib/ASPL/GGs
19.      DDM CONFIGURATION: /opt/ASPLv1.00/etc/ddm.conf
20.      DDM POOL: /root/.aspl/dev/DDM_DATA
21.      MEMORY USED:  344408K
22.    
23.      DISPLAY MODE: 2
24.      LOGGING TO STDOUT
25.      PERSIST VARIABLES IS OFF
26.      RUN ASPL SCRIPT IN TWO PASSES
27.      VARIABLES FREELY ASSIGNED
28.    
29.    
30.          ______  ____    ______  __
31.         / __  / / ___\  / __  / / /
32.        / /_/ /  \ \    / ____/ / /
33.       / __  /  __  \  / /     / /
34.      / / / /  / __ / / /     / /____
35.     /_/ /_/   \___/ /_/     /______/
36.    
37.    
38.      STARTING ASPL SESSION WITH WORKSPACE:  WS1
39.      NAMED GROUP:  POSIX
40.         last saved 2023-02-21 02:37:07.667119
41.    
42.    aspl:1 2:4:28> 
43.    
ASPL (C) 2024 Bassem Jamaleddine

The startup of ASPL is explained in the following figure that has been labeled to detail the various components involved while the interpreter is setting its runtime environment.

ASPL locates the WS1 workspace in the workspace repository /root/.aspl/WSP/WORKSPACES1. WS1 meta data has the POSIX as the element-grouping-class, therefore ASPL will load POSIX class as the grouping container of WS1. ASPL bridge is located in /opt/ASPLv1.00/BRIDGE/Groupings: this serves as the repository for ASPL grouping class container. The grouping functions GGs are located in /opt/ASPLv1.00/lib/ASPL/GGs. ASPL has two containers: a grouping class container, and a grouping functions container. Both containers are dynamically loaded within ASPL and the user is offered options to control them.

       ASPL Startup on the UNIX Shell Prompt Explained
full view

Image File

 -F- Fig. A.1   [ASPL Startup on the UNIX Shell Prompt Explained]
ASPL (C) 2024 Bassem Jamaleddine