for Behaviors < List of Argument-Commands < [click go-back button to go-back] < Viivi's Cell < Entrance
The argument-commands listed here are used to specify Viivi's behaviors.
-aps <SYMBOL>
aps
"
is an abbreviation for "append predefined symbol".<SYMBOL>
is a symbol
whose binding will be appended to the current base-level.
When the symbol
<SYMBOL>
does not have a binding on the current base-level,
then its binding is appended onto the base-level.
When the symbol
<SYMBOL>
already has a binding on the current base-level,
nothing is done.
The argument-command
-dps <SYMBOL>
deletes the symbol
<SYMBOL>
from the current base-level.
[Example]
$ viivi -K -B 1 -aps atan
It appends the binding for the symbol
atan
to the base-level 1 which is composed only of the syntaxes of R5RS
(generated by "-B 1
").#<procedure:atan>
bound to the symbol
atan
.
[Equivalence]
This function is available only with the argument-command.
There are no equivalent procedure-calls or setting-panel items.
-B <BITSET>
B
'
is an acronym for "Base-level".<BITSET>
represents a collection of the groups of the predefined-symbols.(2^n [n=0,1,...,5])
,
respectively, as follows:
1 the group of the "syntaxes" defined in R5RS
2 the group of the "library-syntaxes" defined in R5RS
4 the group of the "procedures" defined in R5RS
8 the group of the "library-procedures" defined in R5RS
16 the group of the "optional-procedures" defined in R5RS
32 the group of the objects uniquely defined in Viivi
At the initial state,
Viivi has the base-level composed of everything
(represented by a bit-set value of 63
).
The user can go back to the previous base-level using the argument-command
-BX
.
[Example]
$ viivi -K -B 5
This example generates a new base-level composed only of
syntaxes
(represented by a bit-set value of 1)
and
procedures
(represented by 4)
defined in R5RS,
and set it as the current base-model.
[Equivalence]
This function is available only with the argument-command.
There are no equivalent procedure-calls or setting-panel items.
-BX
BX
'
is a combination of a capital letter 'B', an acronym for "Base-level",
and a capital letter
'X
'
representing a "closing" action.-B
",
Viivi does nothing. $ viivi -K -B 5 -i test1.scm -B 31 -i test2.scm -Bx -i test3.scm
Firstly Viivi generates a base-level (named as B5 here)
composed of
syntax
(represented by 1)
and
procedure
(represented by 4)
defined in R5RS and set it as the current base-level,
and then the contents of the file
"test1.scm
"
are evaluated.31=1+2+4+8+16
)
defined in R5RS,
set it as the current base-level,
and then evaluates the contents of the file
"test2.scm
".test3.scm
are evaluated.-D <BITSET>
The capital letter
'D
'
is an acronym for "Direct-input".
Using this argument-command,
the user can use the direct-input expressions,
such as
#<procedure:cons>
,
#<nil>
,
and
#<unspecified>
,
in the Scheme codes.
This function enables the user
to access the Scheme objects directly
(without worrying the binding relationships in between).
At the same time, the user can use hashcode-references,
such as #<hashcode:12345678>
,
to access the specific Scheme object instances.
The parameter
<BITSET>
is a bit-set of 1,2,4, and 8,
representing the respective kinds of the Scheme objects
which are able to be input directly in the format
"#<...>
".
1
enables direct-input for predefined-objects (constants and procedures)[Example]
#<constant:MATH-E> ... the bottom of the natural logarithm
#<procedure:cons> ... the predefined procedure cons
2 enables direct-input #<nil> for an empty list object
4 enables direct-input #<unspecified> object
8 enables hash-code direct-input in the format
#<hashcode:xxxxxxxx> or #<#xxxxxxxx>
for the corresponding Scheme-object instance
$ viivi -K -D 3
The argument-command
"-D 3
" enables
the user to input directly the predefined Scheme-objects (constants and procedures)
and the empty-list object.(viivi-set! direct-input-objects-bitset <BITSET>)
-dps <SYMBOL>
dps
"
is an abbreviation for "delete predefined symbol".-dps <SYMBOL>
"
unregisters the symbol
<SYMBOL>
from the current base-level.<SYMBOL>
is a symbol
whose binding will be deleted from the current base-level.
When the symbol
<SYMBOL>
already has a binding on the current base-level,
then its binding is deleted from the base-level.
When the symbol
<SYMBOL>
does not have a binding on the current base-level,
nothing is done.
The argument-command
-aps <SYMBOL>
append the symbol
<SYMBOL>
to the current base-level.
[Example]
$ viivi -K -dps cons
It deletes the binding from the symbol
atan
from the default base-level.#<procedure:cons>
bound to the symbol
cons
.
[Equivalence]
This function is available only with the argument-command.
There are no equivalent procedure-calls or setting-panel items.
-g
The argument command -g
is an command-line option generally used in many implementations for debugging.
Viivi prepares trace-outputs of moderate information for the beginners
(default).
It is equivalent to
"-Tinfo 0 -Titem 31
".
-g:full
-g
The argument command specifies to trace-output
all of the additional information and the trace-output items.
It is equivalent to
"-Tinfo 7 -Titem 31
".
-g:none
The argument command suppresses all the trace-output.
It is equivalent to
"-T false
".
-hi <BOOLEAN>
hi
'
is an abbreviation for "halt at a new input-port window". true halt when a new input-port window is opened in the IDE-mode (default)
false no halt when a new input-port window is opened
$ viivi -G -hi false -i test.scm
This argument-command specifies Viivi NOT to halt when a new input-port window is opened,
and then lets Viivi evaluate the contents in the file
#<input-port:test.scm>
.(viivi-set! halt-at-new-input-port [#t|#f])
-ho <BOOLEAN>
ho
'
is an abbreviation for "halt at a new output-port window". true halt when a new output-port window is opened in the IDE-mode
false no halt when a new output-port window is opened (default)
$ viivi -G -ho true -o result.out
This argument-command specifies Viivi to halt when a new output-port window is opened,
and then lets Viivi evaluate input from the standard-input.(viivi-set! halt-at-new-output-port [#t|#f])
-lang <LANGUAGE>
lang
'
is an abbreviation for "language".<LANGUAGE>
is a symbol representing the (natural) language
for the messages that Viivi will show. en English
ja Japanese
When no languages are specified,
or when the specified language is not supported,
then English (C-locale) is used. $ viivi -G -lang ja
This argument-command specifies Viivi to use Japanese for the messages.-P <STRING>
P
'
is an acronym for "Prompt".<STRING>
is a string to be set as the Viivi prompt. $ viivi -P 'EXP1>>'
This argument command changes Viivi prompt to
"EXP1>>
"(viivi-set! prompt <PROMPT>)
-srand <LONG>
srand
"
comes from the name
"srand()
"
of the Java API method.<LONG>
is a long value which is used for the randomizer initialization:
0 using the long value of the current time (default)
long value larger than 0 using the provided long value
The initialization of the randomizer is needed only once,
no matter how many times the procedure
#<procedure:rand>>
is called subsequently.
[Example]
$ viivi -K -srand 32345963
The randomizer uses the long value 32345963 given as the parameter for its initialization.
[Equivalence]
・procedure-call: (random-seed [<LONG>])
・There are no equivalent setting-panel items.
-T <BOOLEAN>
T
'
is an acronym for "Trace-output".<BOOLEAN>
specifies if the trace-output is allowed or not:
true sepcify to allow the trace-output (default)
false sepcify to prohibit the trace-output
When the parameter
true
is given,
the trace-output is performed in the kernel-mode,
and the trace-output can be controlled with the trace-button on the controller
in the IDE-mode.
When the parameter
false
is given,
no trace-output is performed regardless of the UI-mode,
until the Viivi boots again in the kernel-mode,
or
until the argument-commands are restarted from the beginning
in the IDE-mode.
Without the trace-output,
the evaluation speed is expected to get faster,
because the internal processes for the trace-output are skipped.
[Example]
$ viivi -K -T false
Viivi boots-up in the kernel-mode, but no trace-output is performed.
[Equivalence]
This function is available only with the argument-command.
There are no equivalent procedure-calls or setting-panel items.
-Tfold <INTEGER>
The string
"Tfold
"
is an abbreviation for "Trace-line folding number".
The parameter
<INTEGER>
is the number of the folded trace-lines.
<INTEGER> the number of the folded trace-lines
It is
<INTEGER>=20
by default.
[Example]
$ viivi -K -Tfold 10
The trace-lines will be folded every 10 lines.
[Equivalence]
・procedure-call: (viivi-set! trace-line-folding-number <INTEGER>)
・setting-panel: kernel setting-panel → "Trace-Output" → "Items of Trace-Output" → "Trace-Line Folding"
-Tinfo <BITSET>
The string
"Tinfo
"
is an abbreviation for "Trace-output additional information".
The parameter
<BITSET>
specifies the kinds of the additional information for the trace-output,
in which each information is represented with the following bit-flag.
<BITSET> kinds of additional information for the trace-output
1 previous values before re-binding or data-modification
2 location information for tokens
4 hashcodes
By default,
<BITSET>=0
(no additional information).
[Example]
$ viivi -K -Tinfo 5
The trace-output shows the previous values before re-binding or data-modification
and the hashcodes.
[Equivalence]
・procedure-call: (viivi-set! trace-output-additional-information-bitset <BITSET>)
・setting-panel: kernel setting-panel → "Trace-Output" → "Additional Info"
-Titem <BITSET>
Titem
"
is an abbreviation for "Trace-output items<BITSET>
specifies the trace-output items,
in which each item is represented with the following bit-flag. <BITSET> the trace-output items
1 evaluation counts
2 procedure calls
4 binding generation and modification
8 data-structure generation and modification
16 macro expansion
By default,
<BITSET>=31
(all the items) by default.
[Example]
$ viivi -K -Titem 6
Only procedure-calls (represented with 2)
and binding generations/updates (represented with 4)
will be trace-output.
[Equivalence]
・procedure-call: (viivi-set! trace-output-items-bitset <BITSET>)
・setting-panel: kernel setting-panel → "Trace-Output" → "Trace-Output Items"
-u <BOOLEAN>
The small character
'u
'
is an acronym for "flush".
This argument-command specifies if flushing
(to force the data, accumulated in the buffer in an output-port, to flow out)
after every output is to be done or not.
The parameter
<BOOLEAN>
specifies if the flushing is to be done or not:
true flush after every output (default)
false no-flushing just after every output
(the effect depends on the platform)
[Example]
$ viivi -K -u true
After every output,
the data accumulated in the buffer in an output-port is forced to flow out.
[Equivalence]
・procedure-call:
(viivi-set! flush-each-output <BOOLEAN>)
・setting-panel : kernel setting-panel → "I/O" → "Output-Port Flush"
-v <BITSET>
v
'
is an acronym for "verbosity".<BITSET>
represents a collection of the output items.(2^n [n=0,1,...,4])
,
respectively, as follows:
1 prompt (effective only in the kernel-mode)
2 output by the side-effects such as display, newline, and write
4 evaluation-values at the top-level
8 title at the boot-up time (effective only in the kernel-mode)
16 agreement at the boot-up time (effective only in the kernel-mode)
By default,
<BITSET>=31
(all the items).
[Example]
$ viivi -K -v 3
It specifies to output only the prompts and the output by the side-effects.
[Equivalence]
・procedure-call:
(viivi-set! verbosity-bitset <BITSET>)
・setting-panel: kernel setting-panel → "I/O" → "Verbosity"
-w <BOOLEAN>
The small character
'w
'
is an acronym for "overwrite".
R5RS does not have a distinction for the open-mode,
overwrite-mode and append-mode,
on existing output-files which are to be opened using the Scheme codes.
Once this argument-command is provided,
Viivi opens existing output-files
in the specified open-mode subsequently.
The parameter
<BOOLEAN>
is provided to open existing files
true in the overwrite-mode (default)
false in the append-mode
Note that,
Scheme codes open existing output-files in the overwrite-mode by default.
This means that,
if the user opens an existing output-file from a user code,
the contents before opening the file will be lost by default.
If you want to append the new output-contents to the end of an existing file,
please open the output-file after providing the argument-command
"-w false
".
The transcript-output file is only an exception:
it is ALWAYS opened in the append-mode.
Opening network-output-ports and virtual-output-ports
is not affected by this setting.
[Example]
$ viivi -i ioTest1.scm -w false -i ioTest2.scm
Firstly, the contents in the file
"ioTest1.scm
"
are evaluated.ioTest1.scm
",
the file is opened in the overwrite-mode.-w false
"
is provided to change the open-mode to the append-mode.ioTest2.scm
"
are evaluated.ioTest2.scm
",
the file is opened in the append-mode.(viivi-set! open-output-files-overwritten? <BOOLEAN>)
for Behaviors < List of Argument-Commands < [click go-back button to go-back] Viivi's Cell < Entrance
Exhibited on 2022/03/02
Copyright(C) 2003-2022 ilma <ilma@viivi.io> All rights reserved.