1.3. Command Set

1.3.1. Constant creation

C(name)

Defines a constant with the given name. Returns a descriptor of type CONST that cannot be bound.

CV(name, n)

Defines a vector of constants with names: \(name[0], name[1], ..., name[n-1]\). Returns a descriptor of type CVECTOR of length n that cannot be bound.

V([name])

Defines an empty vector. Optional parameter \(name\) assigns a name to the vector. Returns a descriptor of type VECTOR that can be optionally bound.

F(name[,i])

Finds a descriptor with the given name. Optional parameter \(i\) is an integer. \(name\) should refer to a descriptor of type CONST, VECTOR, or CVECTOR. Returns the descriptor associated with the name. Returns the \(i-th\) component of the descriptor associated to the \(name\), if \(i\) is given and the descriptor is of type VECTOR or CVECTOR.

1.3.2. Real-valued field usage and declaration

N(field, v)

If is the first use of the parameter field it declares a new real-valued numeric field. Generates a descriptor for the value v of the numeric field field. Returns a descriptors of type SET.

1.3.3. Duple creation

INC(l, h)

Defines a positive duple \(l \leq h\). \(l\) and \(h\) are descriptors or descriptor names of any type except type DUPLE. Returns a final descriptor of type DUPLE or TVECTOR that cannot be bound.

EXC(l, h)

Defines a negative duple \(l \nleq h\). \(l\) and \(h\) are descriptors or descriptor names of any type except type DUPLE. Returns a final descriptor of type DUPLE or TVECTOR that cannot be bound.

1.3.4. Term formation and manipulation

The arguments \(p_i\) in the following commands are descriptors or the names assigned to descriptors.

M(p[, …])

Calculates an idempotent summation. The argument or arguments \(p\) are descriptors of any type except of type DUPLE. Returns a descriptor of type SET. If some argument is of type TVECTOR, \(M\) returns a descriptor of type TVECTOR whose components are of type SET. The return value should be bound.

APP(p, pa)

Appends pa to \(p\). Argument \(p\) should be of type VECTOR. Modifies \(p\). No return value.

R(p, pr)

Removes \(pr\) from a copy of the vector \(p\). If argument \(pr\) is an integer, removes the \(pr-th\) component. Argument \(p\) is not modified. Argument \(p\) is of type VECTOR or TVECTOR. Returns a descriptor of the same type as \(p\) that should be bound.

CMP(p1, p2)

Declares \(p1\) and \(p2\) as the logical negation of each other. \(p1\), \(p2\) are of type CONST or CVECTOR of the same length. Operates component-wise if \(p1\), \(p2\) are CVECTORS. No return value.

CMP(p)

Finds or calculates a descriptor that is the complementary of p. \(p\) is a descriptor of type CONST, CVECTOR, or TVECTOR. Copies \(p\) recursively, replacing every CONST descriptor with its complementary. The argument \(p\) is not modified. Returns a descriptor of the same type as \(p\).

T(p[, i])

Associates an iterator to \(p\). The argument \(p\) is of any type except DUPLE. The optional parameter \(i\) is an integer that identifies the iterator. Returns a descriptor of type TVECTOR that should be bound.

1.3.5. Auxiliary commands

HEADER(name)

Guards a section of the program that should be read just once. Returns \(True\) when \(HEADER(name)\) has not been read yet.

SOME(p, prob[, atLeastOne, notAll])

Randomly chooses items with a probability \(prob\). Default values for optional parameters are \(False\). Boolean parameter:math: atLeastOne ensures at least one item is selected. Boolean parameter:math: notAll makes sure not all the items are selected. The argument:math: p is a descriptor, or the name assigned to a descriptor, of type VECTOR, CVECTOR, or TVECTOR. Returns a descriptor of the same type as \(p\).

REGION(n)

Assignes duples defined after the statement to region \(n\), where:math: n is a positive integer. The default region is 0. The assigned value remains unaltered until REGION is set to a different value.

1.3.6. Additional commands for unmanaged base languages

^p

Prevents the deletion of a descriptor p.

/p

Returns the memory of a preserved descriptor \(^p\).