1LGWAM(1)                         User Commands                        LGWAM(1)
2
3
4

NAME

6       lgwam - Logiweb Abstract Machine
7

SYNOPSIS

9       lgwam command [file arg1 ...  argn]
10

DESCRIPTION

12       In  normal use, the lgwam command is installed in /usr/bin/lgwam and is
13       used as the first line of Logiweb  scripts.  The  first  line  of  such
14       scripts typically read
15
16           #!/usr/bin/lgwam script
17
18       The  Logiweb  compiler  lgc(1)  generates  such  scripts. The format of
19       scripts is described in SCRIPT FORMAT below.
20

OPTIONS

22       The lgwam command may take the following forms:
23
24       lgwam script FILE ARG1 ... ARGn
25              Execute the given file as a Logiweb program.  Pass  the  command
26              line  arguments to the program with FILE as ARG0. For the format
27              of FILE see SCRIPT FORMAT below.
28
29       lgwam test
30              Execute basic built in testsuite.
31
32       lgwam testrun FILE
33              Load the Logiweb page referenced in FILE and  all  pages  refer‐
34              enced  transitively  from  that  page.  Then execute an extended
35              testsuite. The extended testsuite first executes the basic test‐
36              suite. Then the extended testsuite looks for pages named 'base',
37              'check', 'Peano', and 'test'. If one or more of these are found,
38              the  extended  testsuite  executes a number of associated tests.
39              The FILE must be a Logiweb script, c.f. SCRIPT FORMAT below.
40
41       lgwam dry
42              Do dry run: initialize memory and exit.
43
44       lgwam { -h | help | --help }
45              Print help message
46
47       lgwam { -v | version | --version }
48              Print version and license information.
49
50       lgwam { pages | --pages }
51              List built in pages.
52

SCRIPT FORMAT

54       A Logiweb script file consists of lines of text. Blank lines and  lines
55       starting  with a hash mark (#) are ignored. Lines can be ended by arbi‐
56       trary sequences of CR and LF characters.
57
58       A script may look thus:
59
60           #!/usr/bin/lgwam script
61           string
62           015F43BE4A17DAD915936B7A773154A80946AEC82EFBEECDA4A7D7B80806
63           hello
64           execute
65           foo=bar
66           magicword=xyzzy
67
68       The first line starts with a hash mark so it is ignored.
69
70       The first proper line (the second line) indicates  the  format  of  the
71       rest of the script. The 'string' format is the only format which is not
72       deprecated, so the first proper line always says 'string'.
73
74       The second proper  line  contains  the  reference  of  a  Logiweb  page
75       expressed in mixed endian hexadecimal, c.f. REFERENCES below.
76
77       The  third  proper  line  indicates the name of the program ('hello' in
78       this case).
79
80       The fourth proper line indicates the aspect defining the  program.  The
81       lgc compiler always sets the aspect to 'execute'.
82
83       All  remaining lines define script options which are passed to the pro‐
84       gram.
85
86       When lgwam executes a Logiweb script, it  first  loads  the  referenced
87       page  and  all  its transitively referenced pages. It does so using the
88       LGW_PATH environment variable described under ENVIRONMENT below.
89
90       Then lgwam looks up the given aspect of the given name  on  the  refer‐
91       enced  page where both aspect and name are treated as strings. The base
92       page which comes with the distribution defines the 'execute' aspect  of
93       'hello' such that the resulting program prints 'Hello World'.
94
95       Then  lgwam  invokes  the  given  aspect  of  the given name in the way
96       described on the base page. See the base page for further information.
97

ENVIRONMENT

99       Whenever lgwam needs to load a page, it  locates  the  page  using  the
100       LGW_PATH environment variable. If that variable is not set, it defaults
101       to
102
103           $HOME/.logiweb/logiweb/:/rack.lgr
104
105       The value of LGW_PATH must be a list of locations  separated  by  semi‐
106       colons. The default path above contains only one location and, thus, no
107       semicolons.
108
109       To load a referenced page, lgwam tries each location in turn. For  each
110       location, lgwam replaces the rightmost colon character by the reference
111       of the page expressed in  mixed  endian  hexadecimal,  c.f.  REFERENCES
112       below.  Then  lgwam  reads  the file at the resulting path, if any. The
113       file must be a rack file, c.f. logiweb(5).
114

REFERENCES

116       The Logiweb reference of a Logiweb page is  a  sequence  of  around  30
117       bytes   which  identifies  the  page  uniquely.  References  are  often
118       expressed in mixed endian hexadecimal.
119
120       In mixed endian hexadecimal, each byte is represented by two  hexadeci‐
121       mal  digits  with  the most significant digit first. Bytes are given in
122       network order. Capital letters are used for the hex digits A to F.
123

AUTHOR

125       Klaus Grue, http://logiweb.eu/
126

SEE ALSO

128       lgc(1), lgc(5), lgc.conf(5), logiweb(5)
129
130
131
132Logiweb                            JULY 2009                          LGWAM(1)
Impressum