SPARK Documentation

Module Name: SPARK (spark.lang.builtin)
Organization(s): SRI International
Generated On: 02 Aug 2006 11:37AM

Listing for module spark.lang.builtin

This is auto-generated documentation.

Contents:

Actions

applyact $action rest: args
Apply the given action to the arguments
consultUser $a $b $c $d $e
loadModpath $modpath
Load the given module if it is not already loaded
print $format $values
Formatted print - $format is a Python format string and $values is a list of values.
setAttr $obj $attr_name $attr_val
Set the specified attribute of the object (Python or JavaBean attribute).
sleep $seconds
Sleep for the specified number of seconds
unloadModpath $modpath
Unload the declarations from the given module and anything that depends upon that module

Predicates

!= $x $y
Are $x and $y not equal?
Properties: (<S|(static)>,)
< $x $y
Is $x less than $y?
Properties: (<S|(static)>,)
<= $x $y
Is $x less than or equal to $y?
Properties: (<S|(static)>,)
= $arg1 $arg2
Properties: (<S|(static)>,)
> $x $y
Is $x greater than $y?
Properties: (<S|(static)>,)
>= $x $y
Is $x greater than or equal to $y?
Properties: (<S|(static)>,)
Achieve $predsymbol $procedure $name
$procedure is to be invoked to achieve a predicate
AdoptedTask $task
Event 'predicate' a do goal was posted
Advice $label $kind $gppc $doc
Procedure TFrame has failed
AppliedAdvice $task $advice_label
Event 'predicate' advice was used in the selection of procedures for $task
ApplyPred
Properties: (<S|(dynamic)>,)
ArgNames $symbol $args
The names of arguments for $symbol
Properties: (<S|(static)>,)
ArgTypes $symbol $argtypes
Argument types associated with a symbol
Properties: (<S|(static)>,)
CompletedProcedure $ptframe
Procedure TFrame has succeeded
CompletedTask $task
Event 'predicate' a do goal succeeded
Concat $item1 $item2 $itemfull
concatenate 2 lists or strings
Properties: (<S|(static)>,)
Consult $label $event_tframes_pc
Procedure TFrame has failed
CurrentlyIntended $tframe
$tframe is in the intention structure
Properties: (<S|(dynamic)>,)
Do $actsymbol $procedure $name
$procedure is to be invoked to do a named task
Doc $symbol $docstring
FailedProcedure $ptframe $reason
Procedure TFrame has failed
FailedTask $task $reason
Event 'predicate' a do goal failed
False
Properties: (<S|(static)>,)
Features $symbol $featurelist
Feature list associated with an action symbol
Properties: (<S|(static)>,)
Ground $var
Non-logical predicate to test whether its argument is Ground
Properties: (<S|(static)>,)
Implementation
Index $index $elt $item
return the specified index in a list or a string
Properties: (<S|(static)>,)
IntBetween $low $x $high
$x is an integer such that $low <= $x < $high
Properties: (<S|(static)>,)
Length $item $length
find the length of the list
Properties: (<S|(static)>,)
LoadedFileFacts $filename $asserted $retracted
List of facts $asserted and $retracted by loading file $filename
LoadedFileObjects $filename $spuIndex $objectsList
SPARK INTERNAL PREDICATE. List of objects used in the persistence file for the SPU $filename. The fact has two uses. Firstly, persisting this predicate will ensure that all the objects that have been referenced in the per-SPU persistence files will be persisted. Secondly, the per-SPU persistence file names for SPUs still loaded can be generated from the $spuIndex of each fact.
NewFact $predsymbol $procedure $name
$procedure is to be invoked whenever a new fact is added
NewSparkAgent $name
ephemeral predicate that is raised when agent resumes from a persisted state
Properties: (<S|(dynamic)>,)
NumRequiredArgs $symbol $numargs
The number of arguments that must always be present for $symbol
Properties: (<S|(static)>,)
ObjectExists $idnumber $classname $initargs
predicate used only for persistence to save the init arguments of persistent objects
Properties: (<S|(dynamic)>,)
ObjectId $obj $id
Properties: (<S|(static)>,)
ObjectNextId $idnumber
The next available object id
Properties: (<S|(dynamic)>,)
ObjectProperty $object $propertyName $value
Association arbitrary information with an object (an instance of ConstructibleValue). Use conclude:/retract:/retractall: to modify the associations. For the special case of concluding where $propertyName is an empty list, $value must be a list of [ ] pairs or [] singletons, indicating a group of property values to set or unset respectively. This has an effect on the behavior of the ObjectProperty change listeners.
ObjectPropertyChangeListener $propertyName $pythonFunction
$pythonFunction is a Python function called with the agent, object, propertyName, and value (or None) as arguments when the value of the $propertyName property of an object has changed (or been unset). Associating it with a property means that independent programmers can add their own properties (assuming they choose different names) without accidentally getting their listener called when a different property is set. For the special case of $propertyName is the empty list, the function will be called with the value being a SPARK List of SPARK [ ] pairs or [ None] pairs, being all those properties changed/unset *at the same time*. Note that for any property value change, both the property-specific and the generic listeners will be called. If more than one property is changed at once, the generic listeners will be called only once.
ObjectState $idnumber $stateargs
predicate used only for persistence to save the dynamic state of persistent objects
Properties: (<S|(dynamic)>,)
PersistSourceCounter $counter
Counter for persisting spark-l sources. Internal use only.
PersistenceIncarnation $incarnationNumber
This is the number of times an agent has been resumed
Print $format rest: values
Formatted print - $format is a Python format string and $values is a list of values.
Properties: (<S|(static)>,)
Properties $symbols $propertylist
Properties associated with a symbol
Properties: (<S|(static)>,)
RequiredArgNames $symbol $args
The arguments that must always be present for $symbol
Properties: (<S|(static)>,)
RestArgNames $symbol $arg
The names of extra arguments allowed for $symbol
Properties: (<S|(static)>,)
RestArgsAllowed $symbol
Are an arbitrary number of extra arguments allowed for $symbol
Properties: (<S|(static)>,)
Roles $symbol $rolevars
Roles associated with variables
Properties: (<S|(static)>,)
SOAPI $event $tframes
Event 'predicate' indicating a set of applicable procedure instances
SparkAgentRestored $name
ephemeral predicate that is raised when agent resumes from a persisted state
Properties: (<S|(dynamic)>,)
StartedProcedure $ptframe
Procedure TFrame has been intended (cue for asynchronous procedure)
StartedProcedureSynchronous $ptframe
Procedure TFrame has been intended (cue for synchronous procedure)
SymbolPackage $symbol $package
True
Properties: (<S|(static)>,)
and
Properties: (<S|(static)>,)
applypred
Properties: (<S|(dynamic)>,)
exists
Properties: (<S|(static)>,)
not
Properties: (<S|(static)>,)
once
Properties: (<S|(static)>,)
or
Properties: (<S|(static)>,)

Functions

* $x $y
Return the product of $x and $y.
Properties: (<S|(static)>,)
+ $x $y
Return the sum of $x and $y.
Properties: (<S|(static)>,)
- $x $y
Return the difference of $x and $y.
Properties: (<S|(static)>,)
/ $x $y
Return the quotient of $x divided by $y.
Properties: (<S|(static)>,)
@ $entityid
Entity with given id
Properties: (<S|(static)>,)
@+
Get value of global variable. Argument is a symbol or string, e.g., x. The value is accessible from Python as V.x.
@@ $functorid rest: args
Structure with given functorid
Properties: (<S|(static)>,)
`#
Properties: (<S|(static)>,)
applyfun
Properties: (<S|(dynamic)>,)
arg $struct $index
return the $index-th argument of a structure
Properties: (<S|(static)>,)
args $struct
Get arguments of a structure as a list
Properties: (<S|(static)>,)
builtinEvaluate $value
evaluate $value as if it were an expression, using only builtin functions, backquote, and comma
Properties: (<S|(static)>,)
builtinQuoted $value
evaluate $value as if it were a quoted expression, using only builtin functions, backquote, and comma
Properties: (<S|(static)>,)
concat $x $y rest: args
determined rest: determinedModes
An predicate implementation prototype that stores a predicate as a set of facts. The $determinedModes are mode strings for which the predicate is only allowed to return a single solution. If a new fact is asserted that would violate these constrints, then the old fact(s) are removed.
Properties: (<S|(static)>,)
displayString $displayFormatString
Property for tasks to indicate that (1) task execution should be displayed to the user and (2) how to display this task.
Properties: (<S|(static)>,)
dynamic
failure $classname $tframe $value
Properties: (<S|(static)>,)
functor $struct
Get name of functor
Properties: (<S|(static)>,)
functorString $struct
Get name of functor
Properties: (<S|(static)>,)
fun{}
Properties: (<S|(static)>,)
getAttr $obj $attr_name
Get the specified attribute of the object (Python or JavaBean attribute).
Properties: (<S|(dynamic)>,)
getAttrDefault $obj $attr_name $defaultValue
Get the specified attribute of the object (Python or JavaBean attribute) or return defaultValue if attribute is None.
Properties: (<S|(dynamic)>,)
idExpr $exprIndex
Return the Expr with index $exprIndex
idObject $idnumber
Properties: (<S|(static)>,)
if
Properties: (<S|(static)>,)
index $index $item
return the element with the specified index in a list or a string
Properties: (<S|(static)>,)
length $arg
Properties: (<S|(static)>,)
max $x $y rest: args
Properties: (<S|(static)>,)
min $x $y rest: args
Properties: (<S|(static)>,)
mod $x $y
Return $x modulo $y.
Properties: (<S|(static)>,)
multiModal rest: implementations
predicate implemented with multiple modes
Properties: (<S|(static)>,)
objectType $value
return the object type as a string
Properties: (<S|(static)>,)
pred{}
Properties: (<S|(static)>,)
proc{}
Properties: (<S|(static)>,)
pyAction $mode $function
action implemented in python
Properties: (<S|(static)>,)
pyActionThread $mode $function
action implemented in python
Properties: (<S|(static)>,)
pyConstant $value
global constant
Properties: (<S|(static)>,)
pyEval $python_expression
Value from evaluating a Python string
Properties: (<S|(dynamic)>,)
pyFunction
Properties: (<S|(static)>,)
pyMeth $methodname
Value extracted through attribute access
Properties: (<S|(static)>,)
pyMod
Properties: (<S|(dynamic)>,)
pyModRaw
Properties: (<S|(dynamic)>,)
pyPredicate $mode $function
predicate implemented in python
Properties: (<S|(static)>,)
pyPredicateSeq $mode $function
predicate implemented in python returning sequence of solution
Properties: (<S|(static)>,)
pyPropertyPredicate $propertyName
Returns a predicate implementation generator equivalent to {pred [$object $value] (ObjectProperty $object $$propertyName $value)}
pyReversible $mode $fun $inverse_fun
Function implemented in python
Properties: (<S|(static)>,)
qent
Properties: (<S|(static)>,)
solutionspat
Properties: (<S|(static)>,)
solutionspred
Properties: (<S|(static)>,)
static
sub $item $start $end
Get a new sublist or substring of $item from $start to $end.
Properties: (<S|(static)>,)
task{}
Properties: (<S|(static)>,)