| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
eq? or equivalent literals
such as strings that also might be wrapped in non-identical wrappers. For
the case where x or y are plain literals such as strings or integers, the
STELLA translator substitutes the equality test appropriate for the particular
target language and does not actually call this function. For cases where
x or y are known to be of type STANDARD-OBJECT, the STELLA translator
substitutes the faster eq? test inline.
eql? or considered equal
by a user-defined object-equal? method. This implements a fully extensible
equality test similar to Java's equals method. Note that writers of custom
object-equal? methods must also implement a corresponding equal-hash-code
method.
eq?.
eql?.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
character-capitalize
should be used instead.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
eql? is applied
to strings.
setf).
setf).
setf).
setf).
setf).
null,
then the entire length of the string is used. The copy of characters is affected
by the case-conversion keyword which should be one of
:UPCASE :DOWNCASE :CAPITALIZE :PRESERVE.
The final value of target-index is returned.
*printReadably?* set to true and with *printPretty?*
set to false.
*module* if no module is specified.
read-s-expression-from-string.
*MODULE* if no
module is specified.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
CONS Lists and Trees true iff self equals nil.
true iff self is not equal to nil.
true iff x equals nil.
true iff the cons trees tree1 and tree2 are
structurally equivalent. Uses an eql? test.
true iff the cons trees tree1 and tree2 are
structurally equivalent. Uses equal? to test equality of subtrees.
equal? hash code for self. Note that this
is O(N) in the number of elements of self.
setf. Note that (first NIL) = null.
setf. Note that (second NIL) = null.
setf. Note that (third NIL) = null.
setf. Note that (fourth NIL) = null.
setf. Note, that (fifth NIL) = null.
setf. Note, that (nth NIL <pos>) = null.
rest position times to self.
true iff object is a member of the cons list
self (uses an eql? test).
true iff object is a member of the cons list
self (uses an eq? test).
null if object does not occur within
self (uses an eql? test). If start was supplied as non-`null', only
consider the sublist starting at start, however, the returned position
will always be relative to the entire list.
null if object does not occur within
self (uses an eql? test). If start was supplied as non-`null', only
consider the sublist ending at end, however, the returned position
will always be relative to the entire list.
nil, insure that the cons that
heads the list is unchanged.
true. test takes a single
argument of type OBJECT and returns true or false. Returns a cons list.
In case the first element is removed, the return result should be
assigned to a variable.
nil. Assumes that
at least one value is passed in.
eql? test.
true iff the value value is embedded within
the cons tree tree. Uses an eql? test.
(cons-tree-nth (quote (a (b (c d e) f) g)) 1 1 2) => e |
nth-rest of the previous
element (different from cons-tree-nth). Example:
(cons-tree-nth-rest (quote (a (b (c d e) f) g)) 1 1 1) => (d e) |
? character. A
single question mark is interpreted as the anonymous variable. Example:
(match-cons-tree (quote (a (b (a d) e) (a d) f g))
(quote (a (?x ?y ?) ?y ? g))
NULL)
=> |kv|(<?Y,(A D)> <?X,B>)
|
Variables can't be quoted but quoting can effectively be achieved by inserting to-be-quoted variables bound to themselves into bindings.
match-cons-tree (which see).
< semantics, the
result will be in ascending order. It is not guaranteed that self will
point to the beginning of the sorted result. If predicate is null, a
suitable < predicate is chosen depending on the first element of self,
and it is assumed that all elements of self have the same type (supported
element types are GENERALIZED-SYMBOL, STRING, INTEGER, and FLOAT).
sort but assumes each element of self is a tuple (a cons)
whose n-th element (0-based) will be used for comparison.
nil iff self is null or self otherwise.
true conses will be pretty printed.
true conses will be printed as readable Stella code.
true pretty-print Stella and translated code.
Since (Lisp) pretty-printing is somewhat slow, turning this off speeds up
file translation, but it also makes translated output very unreadable.
6.5.1 CONS Lists as Sets
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
eql? test and a simple quadratic-time algorithm. Note that
this does not check whether self and otherList actually are sets.
eql? test and a simple quadratic-time algorithm. Note that
this does not check whether self and otherList actually are sets.
eql? test
and a simple quadratic-time algorithm. Note that the result is only
guaranteed to be a set if both self and otherList are sets.
eql?
test and a simple quadratic-time algorithm. Note that the result is only
guaranteed to be a set if both self and otherList are sets.
otherSet). Uses an eql? test and a simple
quadratic-time algorithm. Note that the result is only guaranteed to be a
set if both self and otherList are sets.
eql?
test and a simple quadratic-time algorithm. Note that the result is only
guaranteed to be a set if self is a set.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
NIL-LIST.
NIL-LIST.
equal? to test equality of elements.
equal? hash code for self. Note that this
is O(N) in the number of elements of self.
eql? test).
eq? test).
eql? test). If start was supplied as non-NULL, only
consider the sublist starting at start, however, the returned position
will always be relative to the entire list.
eql? test). If end was supplied as non-NULL, only
consider the sublist ending at end, however, the returned position
will always be relative to the entire list.
test takes a single argument of type OBJECT and
returns TRUE or FALSE. Returns self.
< semantics, the
result will be in ascending order. If predicate is NULL, a suitable
< predicate is chosen depending on the first element of self, and it
is assumed that all elements of self have the same type (supported
element types are GENERALIZED-SYMBOL, STRING, INTEGER, and FLOAT).
6.6.1 Lists as Sets
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Similar to CONS lists LIST's can also be treated as sets
and support the set manipulations below. Note that LIST
constructors do not check for proper set-hood and may have surprising
results if a list contains duplicate elements.
eql? test and a simple quadratic-time algorithm. Note that
this does not check whether self and otherList actually are sets.
eql? test and a simple quadratic-time algorithm. Note that
this does not check whether self and otherList actually are sets.
eql? test
and a simple quadratic-time algorithm. Note that the result is only
guaranteed to be a set if both self and otherList are sets.
eql?
test and a simple quadratic-time algorithm. Note that the result is only
guaranteed to be a set if both self and otherList are sets.
otherSet). Uses an eql? test and a simple
quadratic-time algorithm. Note that the result is only guaranteed to be a
set if both self and otherList are sets.
eql?
test and a simple quadratic-time algorithm. Note that the result is only
guaranteed to be a set if self is a set.
SET is a subclass of LIST that overrides certain
LIST operations to prevent duplicate elements. The following
additional or modified operations are supported:
equal? to test equality of elements. This is more general than
equivalent-sets?, since that only uses an eql? test.
equal? hash code for self. Note that this
is O(N) in the number of elements of self.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
equal? hash code for self. Note that this
is O(N) in the number of entries of self.
consList.
equal? hash code for self. Note that this
is O(N) in the number of entries of self.
rest slot of value should be null, since it will be overwritten.
This might duplicate an existing entry. If a previous entry existed with the
same key as value, that entry is retained, but shadowed by this new entry.
null if
the list is empty.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
true if self has length 0.
true if self has length > 0.
equal? to test equality of elements.
equal? hash code for self.
null if object does not occur within
self (uses an eql? test). If start was supplied as non-`null', only
consider the portion starting at start, however, the returned position
will always be relative to the entire vector.
null if object does not occur within
self (uses an eql? test). If end was supplied as non-`null', only
consider the portion ending at index end, however, the returned position
will always be relative to the entire vector.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
STELLA provides its own implementation of hash tables for cases where language-native implementations are not available, or where additional features are needed.
equal? as the
equality test and equal-hash-code as the hash function, otherwise,
use eql? and hash-code (the default).
eql?
test by default or equal? if equal-test? of self is TRUE.
eql? test by default or equal? if equal-test? of self is TRUE.
eql? test by default or equal? if equal-test? of self is TRUE.
(<key> <value>) pairs and return the result.
equal? hash code for self. Note that this
is O(N) in the number of entries of self.
Hashing objects into STELLA hash tables is accomplished via
hash-code and equal-hash-code methods. These methods are
implemented for all built-in STELLA types but are user extensible for
cases where special functionality on user-defined objects is needed.
Defining new hash-code methods should only be necessary if new
wrapper types are defined, since for all types descending from
STANDARD-OBJECT the built-in method should be adequate.
eq?
are guaranteed to generate the same hash code. Two objects that are not eq?
do not necessarily generate different hash codes. Similar to hash-code but
always hashes on the address of self even if it is a wrapper.
eql?
are guaranteed to generate the same hash code. Two objects that are not eql?
do not necessarily generate different hash codes.
equal?
are guaranteed to generate the same hash code (provided, that writers of
object-equal? methods also implemented the appropriate equal-hash-code
method). Two objects that are not equal?do not necessarily generate different
hash codes.
The following low-level utilities are available to implement specialized
hashing schemes or for defining new versions of equal-hash-code.
rem for
positive hash codes but also works for negative hash codes by mapping those
onto a positive number first. Note, that the sign conversion mapping is not
equivalent to calling the abs function (it simply masks the sign bit for
speed) and therefore really only makes sense for hash codes.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
KEY-VALUE-MAP is a full-featured dictionary class that supports
eql? or extensible equal? equality tests, O(1) access
operations even for large numbers of entries by using a hash table,
light-weight KV-CONS representation for small tables and
iteration even if the dictionary is represented by a hash table (note
that in STELLA we cannot iterate over regular HASH-TABLE's, since
native Lisp hash tables do not allow us to implement a hash table
iterator). Since large KEY-VALUE-MAP's are implemented via
STELLA-HASH-TABLE's, we can support iteration.
eql? or
equal? equality tests, O(1) access operations even for large numbers
of entries by using a hash table, light-weight KV-CONS representation for
small tables and iteration even if the dictionary is represented by a
hash table.
equal? as the
equality test (and equal-hash-code as the hash function), otherwise,
use eql? (and hash-code) (the default).
eql?
test by default or equal? if equal-test? of self is TRUE.
eql? test by default or equal? if equal-test? of self is TRUE.
eql? test by default or equal? if equal-test? of self is TRUE.
(<key> <value>) pairs and return the result.
equal? hash code for self. Note that this
is O(N) in the number of entries of self.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
HASH-SET is a full-featured set class that supports eql?
or extensible equal? equality tests, O(1) insert and
member? operations, O(N) intersection etc. operations even
for large numbers of entries by using a STELLA hash table, light-weight
KV-CONS representation for small sets and iteration even if the
set is represented by a hash table. The only minor drawback right now
is that we waste one value slot per entry, since we piggy-back off
KEY-VALUE-MAP's, however, that wastes at most 25% space.
eql? or equal?
equality tests, O(1) insert and member? operations & O(N) intersection
etc. operations even for large numbers of entries by using a hash table,
light-weight KV-CONS representation for small sets and iteration even if the
set is represented by a hash table. The only minor drawback right now is that
this wastes a value slot per entry, since we piggy-back off KEY-VALUE-MAP's,
however, that wastes at most 25% space.
eql? HASH-SET containing values.
eql? test by default or equal? if equal-test? of self is TRUE.
eql? test by default or equal? if equal-test? of self is TRUE.
eql? test by default or equal? if equal-test? of
self is TRUE.
pop,
since the emptier the table gets, the longer it takes to find an element.
Therefore, it is usually better to use iteration with embedded removals for
such cases.
eql? test by default or equal?
if equal-test? of self is TRUE.
eql? test by default or equal? if equal-test? of self is TRUE.
eql? test by default or equal? if equal-test? of self is TRUE.
eql? test by default or equal? if equal-test? of self is TRUE.
eql? test by default or equal? if equal-test? of self is TRUE.
eql? test
by default or equal? if equal-test? of self is TRUE.
eql?
test by default or equal? if equal-test? of self is TRUE.
eql? test by default or equal? if equal-test? of self is TRUE.
This is equivalent to calling equivalent-sets?.
equal? hash code for self. Note that this
is O(N) in the number of elements of self.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
eql to 'value.
next? function to self.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
null, use *MODULE* instead.
true if self is visible from the current module.
visible-modules) come earlier in the list. If module is null, start
from *MODULE* instead. If enforceShadowing? is true, do not return any
symbols that are shadowed due to some :SHADOW declaration.
import-symbol (which see). Only imports symbol if
no symbol with that name is currently interned or visible in module.
Returns symbol if it was imported or the conflicting symbol in module
otherwise.
null, use *MODULE* instead.
true if self is visible from the current module.
visible-modules) come earlier in the list. If module is null, start
from *MODULE* instead. If enforceShadowing? is true, do not return any
surrogates that are shadowed due to some :SHADOW declaration.
import-surrogate (which see). Only imports surrogate if
no surrogate with that name is currently interned or visible in module.
Returns surrogate if it was imported or the conflicting surrogate in module
otherwise.
symbol-plist
of a symbol can be set with setf. IMPORTANT: Property list are modified
destructively, hence, if you supply it as a whole make sure to always supply
a modfiable copy, e.g., by using bquote.
eq? to key.
Symbol properties can be set with setf.
symbol-value is simply a special property that can always be accessed
in constant time. The symbol-value of a symbol can be changed with setf.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
null
if no such context exists. If error? is true, throw an exception
if no context is found, otherwise silently return null.
cc is a no-op if the
context reference cannot be successfully evaluated.
(defmodule <module-name>
[:documentation <docstring>]
[:includes {<module-name> | (<module-name>*)}]
[:uses {<module-name> | (<module-name>*)}]
[:lisp-package <package-name-string>]
[:java-package <package-specification-string>]
[:cpp-namespace <namespace-name-string>]
[:java-catchall-class
[:api? {TRUE | FALSE}]
[:case-sensitive? {TRUE | FALSE}]
[:shadow (<symbol>*)]
[:java-catchall-class <class-name-string>]
[<other-options>*])
|
name can be a string or a symbol.
Modules include objects from other modules via two separate mechanisms:
(1) they inherit from their parents specified via the :includes option
and/or a fully qualified module name, and (2) they inherit from used
modules specified via the :uses option. The main difference between
the two mechanisms is that inheritance from parents is transitive, while
uses-links are only followed one level deep. I.e., a module A that uses
B will see all objects of B (and any of B's parents) but not see anything
from modules used by B. Another difference is that only objects declared
as public can be inherited via uses-links (this is not yet enforced).
Note that - contrary to Lisp - there are separate name spaces for classes,
functions, and variables. For example, a module could inherit the class
CONS from the STELLA module, but shadow the function of the same name.
The above discussion of :includes and :uses semantics keyed on the
inheritance/visibility of symbols. The PowerLoom system makes another
very important distinction: If a module A is inherited directly or
indirectly via :includes specification(s) by a submodule B, then all
definitions and facts asserted in A are visible in B. This is not the
cases for :uses; the :uses options does not impact inheritance of
propositions at all.
The list of modules specified in the
:includes option plus (if supplied) the parent in the path used for
name become the new module's parents. If no :uses option was
supplied, the new module will use the STELLA module by default,
otherwise, it will use the set of specified modules.
If :case-sensitive? is supplied as TRUE, symbols in the module
will be interned case-sensitively, otherwise (the default), they
will be converted to uppercase before they get interned. That
means that any reference from inside a case-sensitive module to a
non-case-sensitive module will have to use uppercase names for
symbols in the non-case-sensitive module. The standard system
modules are all NOT case sensitive.
Modules can shadow definitions of functions and classes inherited
from parents or used modules. Shadowing is done automatically,
but generates a warning unless the shadowed type or function name
is listed in the :shadow option of the module definition .
Examples:
(defmodule "PL-KERNEL/PL-USER"
:uses ("LOGIC" "STELLA")
:package "PL-USER")
(defmodule PL-USER/GENEALOGY)
|
The remaining options are relevant only for modules that contain STELLA code. Modules used only to contain knowledge base definitions and assertions have no use for them:
The keywords :lisp-package, :java-package, and :cpp-package specify
the name of a native package or name space in which symbols of the module
should be allocated when they get translated into one of Lisp, Java, or
C++. By default, Lisp symbols are allocated in the STELLA package, and
C++ names are translated without any prefixes. The rules that the STELLA
translator uses to attach translated Java objects to classes and packages
are somewhat complex. Use :java-package option to specify a list of
package names (separated by periods) that prefix the Java object in this
module. Use :java-catchall-class to specify the name of the Java class to
contain all global & special variables, parameter-less functions and functions
defined on arguments that are not classes in the current module.
The default value will be the name of the module.
When set to TRUE, the :api? option tells the PowerLoom User Manual
generator that all functions defined in this module should be included in
the API section. Additionally, the Java translator makes all API
functions synchronized.
null
if no such module exists. The search looks at ancestors and top-most
(cardinal) modules. If error? is true, throw an exception if no
module is found.
*module*
if from is NULL. The generated modules are generated from most to
least-specific and will start with the module from.
*module* is an acceptable moduleForm. It will locally rebind
*module* and *context* and shield the outer bindings from changes.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
true as the second value on EOF.
native-read-line in that it is not platform-dependent.
It recognizes any of the three common line ending formats: CR, LF, CR-LF
in any combination. It is not as fast as native-read-line, however.
true as the second value on EOF.
true
if the input was y or false if the input was n. Loop until either
y or n was entered. If message is non-`null' prompt with it before
the input is read. See also special variable *USER-QUERY-ACTION*.
true
if the input was yes or false if the input was no. Loop until either
yes or no was entered. If message is non-`null' prompt with it before
the input is read. See also special variable *USER-QUERY-ACTION*.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
:IF-NOT-EXISTS (or :IF-NOT-EXISTS-ACTION) which
specifies what to do in case the file does not exist. If its value is
:ERROR then an error will be signaled. If it is :ABORT or :PROBE
the opening operation will be aborted and NULL will be returned.
:IF-EXISTS (or :IF-EXISTS-ACTION) is one of the options its value
specifies what to do in case the file already exists. If the value is
:SUPERSEDE the pre-existing file will be overwritten. If the value is
:APPEND the preexisting file will be appended to (if the file did not
yet exist the file will simply be created). If the value is :ERROR then
an error will be signaled. If it is :ABORT or :PROBE the opening operation
will be aborted and NULL will be returned.
If :IF-NOT-EXISTS (or :IF-NOT-EXISTS-ACTION) is one of the options its
value specifies what to do in case the file does not already exist. If the
value is :CREATE, the file will simply be created. If the value is
:ERROR then an error will be signaled. If it is :ABORT or :PROBE the
opening operation will be aborted and NULL will be returned.
(WITH-INPUT-FILE (var filename options*) body+) where options
can be any that are legal for open-input-file (which see).
(WITH-OUTPUT-FILE (var filename options*) body+) where options
can be any that are legal for open-output-file (which see).
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
null.
If error-on-mismatch? is true, parse-date-time will signal an error instead of
returning null.
Default values are 00:00:00 local time on the current date
null is returned.
julian-daystarts at noon.
ticktock-difference to measure the time difference between values
returned by this function. This is an attempt to provide some platform
independent support to measure (at least approximately) consumed CPU time.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
null, then the element will
be interned in the null namespace. namespace must otherwise be a URI.
true if item is an XML declaration object
true if item is an XML element object
true if item is an XML attribute object
true if item is an XML CDATA tag object
true if form is a CONS headed by a CDATA tag
true if tag is an XML element with the name name
in namespace namespace. Note that namespace is the full URI, not an abbreviation.
Also, namespace may be null, in which case tag must not have a namespace
associated with it.
true if attribute is an XML attribute with name name
in namespace namespace. Note that namespace is the full URI, not an
abbreviation. Also, namespace may be null, in which case attribute
must not have a namespace associated with it.
true if attribute is a global XML attribute with name name
in namespace namespace. Note that namespace is the full URI, not an
abbreviation. Also, namespace may be null, in which case attribute
must not have a namespace associated with it.
true if attribute is a local XML attribute with name name.
Note that namespace must be null and that the attributes parent element
element is not considered by the match. To take the parent element into
account use xml-local-attribute-match?.
xml-element-match?, with a missing namespace argument
passed as NULL.
The namespace argument will be evaluated, so one can use bound variables in place of a fixed string. As a special case, if the namespace argument is :ANY, then the test will be done for a match on the tag name alone.
xml-token-list-to-s-expression). If
startTagName is non-`null', skip all tags until a start tag matching start-tag
is encountered. XML namespaces are ignored for outside of the start tag.
Use s-expression representation to specify start-tag, e.g., (KIF (:version "1.0")).
The tag can be an XML element object, a symbol, a string or a cons. If the tag is a cons
the first element can also be (name namespace) pair.
Return true as the second value on EOF.
CHANGE WARNING: It is anticipated that this function will change to a) Properly take XML namespaces into account and b) require XML element objects instead of strings as the second argument. This change will not be backwards-compatible.
(KIF (:version "1.0")). The tag can be an XML element
object, a symbol, a string or a cons. If the tag is a cons the first element
can also be (name namespace) pair.
null integer, no indentation is
performed. Otherwise it should normally be specified as 0 (zero) for
top-level calls.
It is assumed that the xml-expression is a well-formed CONS-list
representation of an XML form. It expects a form like that form
returned by read-XML-expression.
Also handles a list of xml forms such as that returned by XML-expressions.
In that case, each of the forms is indented by indent spaces.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This is a catch-all section for functions and methods that haven't been categorized yet into any of the previous sections. They are in random order and many of them will never be part of the official STELLA interface. So beware!
[i].
[i].
This is useful for fast element-wise iteration that doesn't need arithmetic.
[i] to value
and return the result.
[i, j].
[i, j].
This is useful for fast element-wise iteration that doesn't need arithmetic.
[i, j] to value
and return the result.
add-trace <keyword>) code guarded by (trace-if <keyword> ...)
will be executed when it is encountered.
self (not including self) in the order specified by traversal (one
of :preorder, :inorder, :postorder or :topdown).
foreach statement).
clone-memoized-iterator.
false and a two
digit numeric value if numeric-month? is true. The value false is
recommended.
true.
Recommended values for the flag is true.
false and a two
digit numeric value if numeric-month? is true. The timezone as a
float offset z.z is included if include-timezone? is true.
Recommended values for the flags are false and true respectively.
true. The value true is recommended.
Milliseconds will be included if include-millis? is true.
Hours will be zero-padded to length 2 if pad-hours? is true.
cc is a no-op if the
context reference cannot be successfully evaluated.
In CommonLisp, if the new context is case sensitive, then change
the readtable case to :INVERT, otherwise to :UPCASE.
lispify). If dontConvert? is TRUE, the returned slot value
will not be lispified. Generate a warning if no such slot exists on object.
In a call directly from Lisp slotName can also be supplied as a Lisp symbol.
stellafy). If dontConvert? is TRUE, value
will not be stellafied before it gets assigned. Generate a warning if no
such slot exists on object, or if value has the wrong type. In a call
directly from Lisp slotName can also be supplied as a Lisp symbol.
*UNFINALIZED-CLASSES*,
and set *NEWLY-UNFINALIZED-CLASSES?* to false.
null, then clear out all system definitions. This function
is useful when changes have been made to the system definition, and one
wants to have it reloaded from the standard location in the file system.
add-trace.
clv stands for Common-Lisp Value
or Verbatim.
null if name is undefined or does not represent a string.
(collect <var> in <expression> [where <test> <var>])
(collect <collect-expression>
foreach <var> in <expression>
{as ...}*
[where <test> <var>]
[do ...])
|
The second form really accepts an arbitrary foreach expression following
the foreach keyword.
true if method is an evaluable command.
:prefix and :suffix are strings that will NOT be case-converted.
:case is one of :UPCASE :TitleCase :titleCaseX :downcase :Capitalize
default is :TitleCase
:separator is a string that should separate word elements. It does not
separate the prefix or suffix. Default is ""
:translation-table should be a STRING-HASH-TABLE hash table that strings into their
desired printed representation as a string. In general the argument
will be strings, but that is not strictly necessary.
compose-namestring, which will probably be
easier to use when called from non-Lisp languages.
object is a CONS, return it. Otherwise, return
a singleton cons list containing it.
new operator.
Return an instance of the class named by type. If initial-value-pairs
is supplied, it has to be a key/value list similar to what's accepted by new
and the named slots will be initialized with the supplied values. Similar to
new, all required arguments for type must be included. Since all the
slot initialization, etc. is handled dynamically at run time, create-object
is much slower than new; therefore, it should only be used if type cannot
be known at translation time.
DECOMPOSE-NAMESTRING returns a cons of STRING-WRAPPERS that are the decomposition of the
input STRING. The arguments are used as follows:
namestring is the input string.
:break-on-cap is a keyword controlling whether changes in capitalization is used
to indicate word boundaries. If :YES, then all capitalization
changes delineate words. If :CLEVER, then unbroken runs of
capitalized letters are treated as acronyms and remain grouped.
If :NO or NULL, there is no breaking of words based on capitalization.
:break-on-number is a flag controlling whether encountering a number indicates
a word boundary. If :YES, then each run of numbers is treated as
a word separate from surrounding words. If :CLEVER, then an
attempt is made to recognize ordinal numbers (ie, 101st) and
treat them as separate words. If :NO or NULL, there is no breaking
of words when numbers are encountered.
:break-on-separators A string of characters which constitute word delimiters in
the input word. This is used to determine how to break
the name into individual words. Defaults are space, - and _.
decompose-namestring, which will probably be
easier to use when called from non-Lisp languages.
(CL:logical-pathname-translations host) if we are
running in Lisp, which allows us to depend on the native
CL:translate-logical-pathname for more complex translation operations.
deleted? method which always returns FALSE. Objects
that inherit DYNAMIC-SLOTS-MIXIN also inherit the dynamically-allocated slot
deleted-object? which is read/writable with specializations of this method.
values, in order.
Currently supported collectionTypes are @HASH-TABLE, @STELLA-HASH-TABLE,
@KEY-VALUE-LIST, @KEY-VALUE-MAP and @PROPERTY-LIST.
drop-trace <keyword>) code guarded by (trace-if <keyword> ...)
will not be executed when it is encountered.
true if self has length 0.
FILE-ALREADY-EXISTS-EXCEPTION is thrown
with context supplying context for the error message.
NO-SUCH-FILE-EXCEPTION is thrown with context supplying
context for the error message.
true if the strings s1 and s2 are the same
except for the amounts of whitespace separating words. Leading or
trailing whitespace is also not considered.
evaluate-string.
(evaluate (unstringify expression)).
substitute-template-variables-in-string
null values are returned.
true, then the last value will be rounded to an integer.
This can be used to convert from decimal degree values to Degree-Minute-Second
or from decimal hours to Hour-Minute-Second format.
modulo.
Note: In C++ and Java, mod has more overhead than the similar
function rem. The answers returned by mod and rem are only
different when the signs of x and modulo are different.
mod function, and has less overhead in C++ and
Java, which don't have direct support for a true modulus function.
Take 16 random bytes (octets), put them all behind each other, for the description the numbering starts with byte 1 (most significant, first) to byte 16 (least significant, last). Then put in the version and variant. To put in the version, take the 7th byte and perform an and operation using 0x0f, followed by an or operation with 0x40. To put in the variant, take the 9th byte and perform an and operation using 0x3f, followed by an or operation with 0x80. To make the string representation, take the hexadecimal presentation of bytes 1-4 (without 0x in front of it) let them follow by a -, then take bytes 5 and 6, - bytes 7 and 8, - bytes 9 and 10, - then followed by bytes 11-16.
null.
null.
null.
predicate. Normally, this is not needed, since insert operations
preserve the heap property. However, this can be useful after bulk
insertion of values or if predicate has been changed.
advance-past-whitespace that requires end to be properly set.
find-matching-prefix that requires end1 and end2
to be properly set up.
null
if no such module exists. The search looks at ancestors and top-most
(cardinal) modules. If error? is true, throw an exception if no
module is found.
print-outline
print-outline
print-outline
print-outline
print-outline
setq statements.
*OUTLINE-INDENT-STRING*
null. The
initial value can be defined by the slot itself, inherited from an
equivalent slot, or inherit from the :initial-value option for the
class representing the type of self.
predicate has < semantics; otherwise as a Max-heap.
predicate has < semantics). In that case, replace the root of
self and restore the heap property. This is useful to build and maintain a
heap with some top-N elements (relative to predicate) where the root (or
minimum) of self is the currently weakest element at the end of the list.
Note that in the C++ version, only 8, 10 and 16 will work as base arguments,
since that is all the underlying implementation supports. Other argument
values will be treated as 10.
true if x is the floating point representation of an integer.
unstringify on name but 10-15
times faster.
true iff object is an instance of the class named type.
:.
true, then any modules which are code only or just namespaces are not returned.
in-module declaration that specifies
the module within which all remaining commands are to be evaluated
The remaining commands are evaluated one-by-one, applying the function
evaluate to each of them.
language-compile out-of-date translated files of system
systemName (only supported for Lisp at the moment) and then load them
into the running system. Return true if at least one file was compiled.
The following keyword/value options are recognized:
:language: can be used as an alternative to the optional language argument.
If not specified, the language of the running implementation is assumed.
:force-recompilation? (default false): if true, files will be compiled
whether or not their compilations are up-to-date.
:startup? (default true): if true, the system startup function will
be called once all files have been loaded.
EOL
or :EOL to print a line terminator.
EOL
or :EOL to print a line terminator.
null. Currently, commands are not
polymorphic, i.e., they can only be implemented by functions.
MAKE-MATCHING-NAME returns a matching name (a string) for the input name (a string).
A matching name is constructed by breaking the input into words and then applying
appropriate transforms. The arguments are used as follows:
original is the input name. It is a string.
:break-on-cap is a keyword controlling whether changes in capitalization is used
to indicate word boundaries. If :YES, then all capitalization
changes delineate words. If :CLEVER, then unbroken runs of
capitalized letters are treated as acronyms and remain grouped.
If :NO or NULL, there is no breaking of words based on capitalization.
:break-on-number is a flag controlling whether encountering a number indicates
a word boundary. If :YES, then each run of numbers is treated as
a word separate from surrounding words. If :CLEVER, then an
attempt is made to recognize ordinal numbers (ie, 101st) and
treat them as separate words. If :NO or NULL, there is no breaking
of words when numbers are encountered.
:break-on-separators A string of characters which constitute word delimiters in
the input word. This is used to determine how to break
the name into individual words. Defaults are space, - and _.
:remove-prefix Specifies a prefix or suffix that is stripped from the input
:remove-suffix name before any other processing. This allows the removal of
any naming convention dictated prefixes or suffixes.
:add-prefix Specifies a prefix or suffix that is added to the output name
:add-suffix after all other processing. This allows the addition of any
naming convention dictated prefixes or suffixes.
:case The case of the resulting name. This is applied to the name
before adding prefixes or suffixes. The two title case options
differ only in how the first word of the name is treated.
:TitleCase capitalizes the first letter of the first word and
also the first letter of all other words.
:TitleCaseX does not capitalizes the first letter of the first
word but capitalizes the first letter of all subsequent words.
:preserve results in no change in case.
:separator This is a string specifying the word separator to use in the
returned name. An empty string (the default) means that the
resulting words are concatenated without any separation. This
normally only makes sense when using one of the title case values
for the case keyword.
make-matching-name, which will probably be
easier to use when called from non-Lisp languages.
language (the first optional argument of language&options) and
then compile and load them (the latter is only possible for Lisp right now).
The following keyword/value options are recognized:
:language: can be used as an alternative to the optional language argument.
If not specified, the language of the running implementation is assumed.
:two-pass?: if true, all files will be scanned twice, once to
load the signatures of objects defined in them, and once to actually
translate the definitions. Otherwise, the translator will make one pass in
the case that the system is already loaded (and is being remade), and two
passes otherwise.
:development-settings? (default false): if true translation will favor
safe, readable and debuggable code over efficiency (according to the value
of :development-settings on the system definition). If false, efficiency
will be favored instead (according to the value of :production-settings
on the system definition).
:production-settings? (default true): inverse to :development-settings?.
:force-translation? (default false): if true, files will be translated
whether or not their translations are up-to-date.
:force-recompilation? (default false): if true, translated files will be
recompiled whether or not their compilations are up-to-date (only supported
in Lisp right now).
:load-system? (default true): if true, compiled files will be loaded into
the current STELLA image (only supported in Lisp and Java right now).
:startup? (default true): if true, the system startup function will
be called once all files have been loaded.
eql? to 'value.
memoize should be of the form
(memoize (<arg>+) {:<option> <value>}* <expression>)
and have the status of an expression. The following options are supported:
:timestamps A single or list of keywords specifying the names of
timestamps which when bumped should invalidate all
entries currently memoized in this table.
:name Names the memoization table so it can be shared by other
memoization sites. By default, a gensymed name is used.
CAUTION: IT IS ASSUMED THAT ALL ENTRIES IN A MEMOZATION
TABLE DEPEND ON THE SAME NUMBER OF ARGUMENTS!!
:max-values The maximum number of values to be memoized. Only the
:max-values most recently used values will be kept
in the memoization table, older values will be discarded
and recomputed if needed. Without a :max-values
specification, the memoization table will grow
indefinitely.
PERFORMANCE NOTES: For most efficient lookup, input arguments that vary the most should be listed first. Also, arguments of type STANDARD-OBJECT (and all its subtypes) can be memoized more efficiently than arguments of type OBJECT or wrapped literals (with the exception of BOOLEANs).
This can be useful when one doesn't want to extend the precision of the answer.
modulo.
Note: In C++ and Java, mod has more overhead than the similar
function rem. The answers returned by mod and rem are only
different when the signs of x and modulo are different.
modulo.
Note: In C++ and Java, mod has more overhead than the similar
function rem. The answers returned by mod and rem are only
different when the signs of x and modulo are different.
true if class has more than one direct superclass.
null
if name is undefined or does not represent a string.
null
base-iterator.
true if the collection self forbids duplicate values.
true if self has length > 0.
non-matching-position that requires end to not be null.
equal? to test equality of elements.
true if the collection self is ordered.
true if current-depth exceeds depth-limit.
This functions uses the convention that a null or negative value of
depth-limit means the depth is unlimited. In those cases it always
returns false.
null.
If error-on-mismatch? is true, parse-date-time will signal an error instead of
returning null.
Default values are 00:00:00 in the given timezone on the current date. If the
given time-zone value is null, then the local time zone for the given date
and time will be used as determined by the operating system.
null.
If error-on-mismatch? is true, parse-date-time will signal an error instead of
returning null.
Default values are passed in via base-date-time. If the timezone field that
is passed in is NULL, then the local time zone for the parsed date/time will
be used.
If merge-null-fields? is true, then default values from base-time-date
will be merged into missing components. If false, then they won't be merged
in for null components but can still be used as a basis for interpreatation of
relative time strings like "now" or "yesterday"
read-s-expression-from-string (or unstringify). If
enableCaseConversion? is TRUE, the returned symbol name will be upcased if
the current module is case-insensitive; otherwise, it will be returned as is.
Raises a read exception if name does not represent a symbol.
This function is available primarily for efficiency, since it is about
10-15 times faster than unstringify.
true if self is not a defined relation.
TRUE, then only named entities will be printed.
This function is intended to be used on things like modules, contexts, concepts, etc. that have hierarchical structure. If thing doesn't have a hierarchical structure, it will just be printed.
null was supplied. If the second argument is true, only consider
surrogates interned in the specified module.
true if self is not public.
/. Assumes that name
is the printed representation of a STELLA symbol (potentially containing
escape characters).
:CR :LF :CRLF or :EOF. This is not platform-dependent
and differs from read-line by returning a second value. It
may hang when used on interactive streams such as terminal or
network streams with only CR line endings. It should only be
used on file or string input streams.
true if x can be represented by a regular integer.
mod function, and has less overhead in C++ and
Java, which don't have direct support for a true modulus function.
mod function, and has less overhead in C++ and
Java, which don't have direct support for a true modulus function.
predicate has < semantics; otherwise as a Max-heap.
equal-hash-code
- which see, but also works for NULL. equal-hash-code methods that expect to
handle NULL components should use this function for recursive calls.
hash-code
- which see, but also works for NULL.
lookup-slot. Kept for backwards compatibility.
true iff the value value is embedded within
the cons tree tree. Uses an eql? test. Does not descend into any
cons whose first element matches an element of filter.
type. Otherwise, if self is an object, return it.
true if symbol is shadowed in its home module.
signal that throws a READ-EXCEPTION.
< semantics, the
result will be in ascending order. If predicate is null, a
suitable < predicate is chosen depending on the first element of self,
and it is assumed that all elements of self have the same type (supported
element types are GENERALIZED-SYMBOL, STRING, INTEGER, and FLOAT).
< semantics). If predicate
is NULL simply use selfs internal predicate (the normal case).
If it is different from selfs internal predicate, heapify self first
according to the new predicate, store the new predicate in self and
then sort the heap. Note that a sorted array automatically satisfies
the heap property. This is slightly different than a regular heap
sort due to the way HEAP's are maintained; however, the complexity is
the same.
true if self is a native collection.
OBJECT.
lispify. Convert the Lisp object
thing into a Stella analogue of type targetType.
Note: See also stellify. it is similar, but guesses targetType on its own,
and makes somewhat different translations.
stream and return it as a string.
null, the current date will be used. If a null set of
defaults is desired, use *NULL-DECODED-DATE-TIME*.
If no valid parse is found, null is returned.
null is returned.
null is returned.
true if subClass is a subclass of superClass.
true iff the class named sub-type is a subclass
of the class named super-type.
SURROGATE-PREFIX-CHARACTER.
symbol-to-surrogate which see).
string-to-surrogate, the search starts first
from the home context of self, and if that fails, then it restarts in
*module*.
true if system name has either been loaded
or initialized with its startup function.
true if system name has been loaded.
zone as an hh:mm string
(tokenize-string "for(i='fo^'o'; i>0; i++)" "()=<>+-;" "'" "^")
=>
(("for" :TEXT) ("(" :PUNCTUATION) ("i" :TEXT)
("=" :PUNCTUATION) ("'" :QUOTE) ("fo'o" :TEXT)
("'" :QUOTE) (";" :PUNCTUATION) ("i" :TEXT)
(">" :PUNCTUATION) ("0" :TEXT) (";" :PUNCTUATION)
("i" :TEXT) ("++)" :PUNCTUATION))
|
NOTE: this aggregates multiple punctuation characters that immediately
follow each other into a single token which is (generally) useful to pickup
multi-character operators such as ++, >=, etc. It's still easy to pick them
apart in a post-processing step if necessary (e.g., for the ++) case above),
so we leave this for now as a feature.
add-trace
print all the elements in body to standard output. Otherwise, do nothing.
keyword can also be a list of keywords in which case printing is done if
one or more of them are trace enabled.
language (the optional first argument). The following keyword/value
options are recognized:
:language: can be used as an alternative to the optional language argument.
If not specified, the language of the running implementation is assumed.
:two-pass? (default false): if true, all files will be scanned twice, once
to load the signatures of objects defined in them, and once to actually
translate the definitions.
:force-translation? (default false): if true, files will be translated
whether or not their translations are up-to-date.
:development-settings? (default false): if true translation will favor
safe, readable and debuggable code over efficiency (according to the value
of :development-settings on the system definition). If false, efficiency
will be favored instead (according to the value of :production-settings
on the system definition).
:production-settings? (default true): inverse to :development-settings?.
true if current output language is Common-Lisp.
true if current output language is C++
true if current output language is Java
evaluate that only evaluates tree if it
represents an evaluable expression. If it does not, tree is returned
unmodified. This can be used to implement commands with mixed argument
evaluation strategies.
null.
type of self.
null. If local?, only consider
surrogates interned in module.
*MODULE* if no module is specified. This function allocates transient
objects as opposed to unstringify-in-module or the regular unstringify.
next? methods of dictionary iterators MUST use the slot-value
paradigm to set the iterator value.
permanent (as opposed to transient)
objects within the scope of this declaration.
system.
Set *currentSystemDefinitionSubdirectory* to match. Execute body within
that scope.
transient (as opposed to permanent)
objects within the scope of this declaration.
CAUTION: The default assumption is the allocation of permanent objects.
The scope of with-transient-objects should be as small as possible, and
the user has to make sure that code that wasn't explicitly written to
account for transient objects will continue to work correctly.
true if form is a CONS headed by an XML DECLARATION tag
true if form is a CONS headed by a DOCTYPE tag
true if form is a CONS headed by an XML ELEMENT tag
true if form is a CONS headed by an XML PROCESSING INSTRUCTION tag
true if item is an XML processing instruction object
null. The
flag doctype-definition? should be true only when processing the DTD definition
of a DOCTYPE tag, since it enables substitution of parameter entity values.
Every XML tag is represented as a cons-list starting with the tag as its header, followed by a possibly empty list of keyword value pairs representing tag attributes, followed by a possibly empty list of content expressions which might themselves be XML expressions. For example, the expression
<a a1=v1 a2='v2'> foo <b a3=v3/> bar </a>
becomes
(<a> (<a1> "v1"
when represented as an s-expression. The tag names are subtypes of XML-OBJECT such as XML-ELEMENT, XML-LOCAL-ATTRIBUTE, XML-GLOBAL-ATTRIBUTE, etc. ?, ! and [ prefixed tags are encoded as their own subtypes of XML-OBJECT, namely XML-PROCESSING-INSTRUCTION, XML-DECLARATION, XML-SPECIAL, XML-COMMENT, etc. CDATA is an XML-SPECIAL tag with a name of CDATA.
The name is available using class accessors.
| [ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |