edu.isi.stella
Class Stella_Object

java.lang.Object
  extended by edu.isi.stella.Stella_Object
Direct Known Subclasses:
Quantity, ReferenceCountObject, StandardObject, Wrapper

public abstract class Stella_Object
extends java.lang.Object

A reflective object that can participate in dynamically-typed contexts. Either a STANDARD-OBJECT or a WRAPPER or a GENERIC-OBJECT. Also, either an OBJECT-WITH-INHERITED-TYPE or an OBJECT-WITH-OWN-TYPE.


Constructor Summary
Stella_Object()
           
 
Method Summary
static Stella_Object _(Stella_Object place, Cons decrement)
          Decrement the value of place and return the result.
static Stella_Object accessInContext(Stella_Object value, Context homecontext, boolean dontinheritP)
           
static void addPropertyValue(Stella_Object property, Stella_Object value)
          Add value to the end of propertys (a string or symbol) value list in the configuration table.
static Symbol amPm(Stella_Object string)
           
static boolean anchoredTypeSpecifierP(Stella_Object x)
           
static boolean andOrNotTreeP(Stella_Object tree)
           
static Stella_Object applyCoercionMethod(Stella_Object expression, Surrogate sourcetype, Surrogate targettype, Stella_Object coercionmethod, java.lang.Object[] MV_returnarray)
           
static boolean atomicExpressionP(Stella_Object tree)
           
static boolean bindToSurrogateP(Stella_Object self, java.lang.String name, boolean clipoldvalueP, boolean askforpermissionP, java.lang.Object[] MV_returnarray)
           
static boolean booleanP(Stella_Object x)
           
static boolean bootstrapIsaP(Stella_Object x, Surrogate type)
           
static Stella_Object bquotify(Stella_Object tree)
           
static Stella_Object cast(Stella_Object value, Surrogate type)
          Perform a run-time type check, and then return value.
static boolean characterP(Stella_Object x)
           
static java.lang.reflect.Method chooseSortPredicate(Stella_Object firstelement)
           
static Stella_Object clConditionalizeTypeDeclarationTree(Stella_Object declaration)
           
 Stella_Object clTranslateAtomicTree()
           
static Stella_Object clTranslateATree(Stella_Object tree)
           
static Stella_Object clTranslateBooleanTest(Stella_Object tree, boolean invertP)
           
static Stella_Object clTranslatePlainBooleanTest(Stella_Object tree, boolean invertP)
           
static Stella_Object clTranslateVerbatimBodySymbols(Stella_Object body, List parameters)
           
static Stella_Object clYieldTypedExpressionTree(Stella_Object tree, StandardObject type)
           
static Stella_Object coerceATree(Stella_Object tree, StandardObject sourcetype, StandardObject targettype, java.lang.Object[] MV_returnarray)
           
static Stella_Object coerceEvaluatedTree(Stella_Object tree, Stella_Object sourcetree, StandardObject sourcetype, StandardObject targettype, boolean evaluateP, java.lang.Object[] MV_returnarray)
           
static Stella_Object coerceMvTree(Stella_Object tree, Symbol operator, List sourcetypes, List targettypes, java.lang.Object[] MV_returnarray)
           
static Stella_Object coerceOptionValue(Stella_Object value, Surrogate type)
          Coerce value to type.
static BooleanWrapper coerceToBoolean(Stella_Object renamed_Object)
          Return the boolean object represented by renamed_Object.
static double coerceToFloat(Stella_Object renamed_Object)
          Coerce number to a float value or NULL if not possible.
static HashSet coerceToHashSet(Stella_Object self, boolean equaltestP)
          Coerce the collection self into a HASH-SET.
static Module coerceToModule(Stella_Object renamed_Object, boolean warnP)
           
static java.lang.String coerceToModuleName(Stella_Object namespec, boolean warnP)
           
static java.lang.String coerceToString(Stella_Object renamed_Object)
          Coerce renamed_Object into a string.
static GeneralizedSymbol coerceToSymbol(Stella_Object name)
          Return the (generalized) symbol represented by name.
static XmlElement coerceToXmlElement(Stella_Object regiontag)
           
static BooleanWrapper coerceValueToBoolean(Stella_Object value, boolean errorP)
          Return the boolean object represented by value.
static double coerceValueToFloat(Stella_Object value, boolean errorP)
          Coerce value to a float value if possible, return NULL otherwise or raise an error if errorP is true.
static java.lang.String coerceValueToString(Stella_Object value, boolean errorP)
          Coerce value into a string if possible, return NULL otherwise or raise an error if errorP is true.
static Stella_Object coerceValueToType(Stella_Object value, Surrogate type, boolean errorP)
          Coerce value to type.
static boolean coercibleP(Stella_Object tree, StandardObject sourcetype, StandardObject targettype)
           
static List collectFeatureList(Stella_Object tree)
           
static KeyValueList collectKeyValueList(Stella_Object tree)
           
static boolean commonLispSymbolP(Stella_Object self)
           
static StandardObject computeExpressionType(Stella_Object expression, boolean wrapP)
           
 Cons consify()
          If renamed_Object is a CONS, return it.
static Stella_Object consifyListsAndIterators(Stella_Object tree)
           
static boolean consP(Stella_Object x)
           
static boolean consTreeMatchP(Stella_Object tree, Stella_Object pattern)
          Predicate version of matchConsTree (which see).
static Stella_Object convertToLiteral(Stella_Object renamed_Object)
           
static Stella_Object copyConsTree(Stella_Object self)
          Return a copy of the cons tree self.
static boolean cppArgumentIsStreamP(Stella_Object arg)
           
static boolean cppBinaryOperatorP(Stella_Object statement)
           
static boolean cppBlockP(Stella_Object tree)
           
static void cppMaybeOutputStatementWithParentheses(Stella_Object statement)
           
static boolean cppOperatorP(Stella_Object statement)
           
static void cppOutputAtomicExpression(Stella_Object atom)
           
 void cppOutputLiteral()
           
static void cppOutputOneActualParameter(Stella_Object parameter)
           
static void cppOutputStatement(Stella_Object statement)
           
static void cppOutputTypedEntity(Stella_Object type, Stella_Object entity, Stella_Object initialvalue)
           
static Cons cppPrognifyStatement(Stella_Object statement)
           
static boolean cppPrognP(Stella_Object tree)
           
static Cons cppStatementToList(Stella_Object statement)
           
static boolean cppStreamIsStandardOutputP(Stella_Object tree)
           
static void cpptrans(Stella_Object statement)
          Translate statement to C++ and print the result.
 Cons cppTranslateAtomicTree()
           
static Stella_Object cppTranslateATree(Stella_Object tree)
           
static boolean cppTranslatedArrayTypeP(Stella_Object translatedtype)
           
static boolean csValueP(Stella_Object self)
           
static BooleanWrapper dateDivider(Stella_Object thecharacter)
           
static BooleanWrapper dateTimeDivider(Stella_Object thecharacter)
           
static BooleanWrapper day(Stella_Object number)
           
static void dealWithAmPm(Stella_Object formValue, DecodedDateTime parsedValues)
           
static void dealWithEra(Stella_Object formValue, DecodedDateTime parsedValues)
           
static void dealWithNoonMidn(Stella_Object formValue, DecodedDateTime parsedValues)
           
 void decrementReferenceCount()
           
static void defaultOptionHandler(Stella_Object self, StorageSlot slot, Stella_Object tree)
           
static SystemDefinition defineSystem(Stella_Object name, Cons options)
           
static void defmodule(Stella_Object name, Cons options)
          Define (or redefine) a module named name.
 boolean deletedP()
          Default deletedP method which always returns FALSE.
static void describe(Stella_Object name, Cons mode)
          Print a description of an object in :verbose, :terse, or :source modes.
 void describeObject(OutputStream stream, Keyword mode)
          Prints a description of 'self' to stream 'stream'.
static void describeTersely(Stella_Object self, OutputStream stream)
           
static Symbol destructureMethodNameTree(Stella_Object nametree, java.lang.Object[] MV_returnarray)
           
static Stella_Object deUglifyParseTree(Stella_Object tree)
           
static Stella_Object either(Stella_Object value1, Stella_Object value2)
          If 'value1' is defined, return that, else return 'value2'.
static boolean eqlP(Stella_Object x, Stella_Object y)
          Return true if x and y are eqP or equivalent literals such as strings that also might be wrapped in non-identical wrappers.
static boolean eqlToBooleanP(Stella_Object y, boolean x)
           
static boolean eqlToCharacterP(Stella_Object y, char x)
           
static boolean eqlToFloatP(Stella_Object y, double x)
           
static boolean eqlToIntegerP(Stella_Object y, int x)
           
static boolean eqlToLongIntegerP(Stella_Object y, long x)
           
static boolean eqlToStringP(Stella_Object y, java.lang.String x)
           
static boolean equalConsTreesP(Stella_Object tree1, Stella_Object tree2)
          Return true iff the cons trees tree1 and tree2 are structurally equivalent.
 int equalHashCode()
          Return a hash code for self (can be negative).
static boolean equalP(Stella_Object x, Stella_Object y)
          Return true if x and y are eqlP or considered equal by a user-defined objectEqualP method.
static Symbol era(Stella_Object string)
           
static int estimatedEvaluationCost(Stella_Object tree)
           
static Stella_Object evaluate(Stella_Object expression)
          Evaluate the expression expression and return the result.
static Stella_Object evaluateArgumentTree(Stella_Object tree, boolean evaluateP, java.lang.Object[] MV_returnarray)
           
static Stella_Object evaluateAtomicTree(Stella_Object tree, java.lang.Object[] MV_returnarray)
           
static Stella_Object evaluateCommand(Stella_Object command, boolean finalizeP)
           
static Stella_Object expandBquoteTree(Stella_Object tree)
           
static boolean filterModuleP(Stella_Object self, AllPurposeIterator iterator)
           
static boolean floatP(Stella_Object x)
           
 void free()
          Default method.
static Stella_Object get(Stella_Object name, Cons type)
           
 Stella_Object getObject(Stella_Object type)
           
static Stella_Object getProperty(Stella_Object property, Cons defaultvalue)
          Lookup property (a string or symbol) in the configuration table and return its value.
 int hashCode_()
          Return a hash code for self (can be negative).
static Stella_Object hashlist(Stella_Object list, Stella_Object table)
           
static int hashMemoizedArguments(Stella_Object arg1, Stella_Object arg2, Stella_Object arg3, Stella_Object arg4, int eqvector)
           
static Stella_Object helpBquotify(Stella_Object tree)
           
static Stella_Object helpClTranslateATree(Stella_Object tree)
           
static Stella_Object helpCoerceATree(Stella_Object tree, StandardObject sourcetype, StandardObject targettype, boolean testonlyP, java.lang.Object[] MV_returnarray)
           
static void helpLptrans(Stella_Object statement)
           
 void helpPrintOutline(OutputStream stream, int currentDepth, int depth, boolean namedP)
          Helper method for printOutline
static Cons helpTransformBooleanProceduralExpression(Stella_Object expression, Symbol testvariable)
           
static Stella_Object helpWalkATree(Stella_Object tree, java.lang.Object[] MV_returnarray)
           
 Module homeModule()
          Return the home module of self.
static BooleanWrapper hour(Stella_Object number)
           
static void idlOutputAtomicExpression(Stella_Object atom)
           
 void idlOutputLiteral()
           
static void idlOutputStatement(Stella_Object statement)
           
 Cons idlTranslateAtomicTree()
           
static Stella_Object idlTranslateATree(Stella_Object tree)
           
static boolean illegalTreeP(Stella_Object tree)
           
static java.lang.String implodePathname(Stella_Object filepath)
           
static Stella_Object incrementallyTranslate(Stella_Object tree)
          Translate a single Stella expression tree and return the result.
 void incrementReferenceCount()
           
static Stella_Object inlineUnwrapBoolean(Stella_Object expression)
           
static Stella_Object inlineWrapBoolean(Stella_Object expression)
           
static Module inModule(Stella_Object name)
          Change the current module to the module named name.
static boolean integerP(Stella_Object x)
           
static boolean isaP(Stella_Object renamed_Object, Surrogate type)
          Return true iff renamed_Object is an instance of the class named type.
static boolean javaBinaryOperatorP(Stella_Object statement)
           
static boolean javaBlockP(Stella_Object tree)
           
static boolean javaEndOfLineTokenP(Stella_Object token)
           
static void javaHelpOutputPrintStream(Stella_Object stream, Cons exps, boolean nativestreamP, boolean endoflineP)
           
static void javaMaybeOutputStatementWithParentheses(Stella_Object statement)
           
static boolean javaOperatorP(Stella_Object statement)
           
 void javaOutputLiteral()
           
static void javaOutputStatement(Stella_Object statement)
           
static boolean javaPrognP(Stella_Object tree)
           
static boolean javaStreamIsStandardOutputP(Stella_Object tree)
           
static boolean javaSymbolCaseP(Stella_Object keyform)
           
 Cons javaTranslateAtomicTree()
           
static Stella_Object javaTranslateATree(Stella_Object tree)
           
static Cons javaTranslateWithNativeWrapper(Stella_Object tree, StandardObject type)
           
static void jptrans(Stella_Object statement)
          Translate statement to C++ and print the result.
static boolean keywordP(Stella_Object x)
           
static boolean legalTokenizerFromStateP(Stella_Object x)
           
static boolean legalTokenizerStateP(Stella_Object x)
           
static boolean legalTokenizerToStateP(Stella_Object x)
           
static boolean literalEqlP(Stella_Object x, Stella_Object y)
           
static boolean logLevelLE(Stella_Object level, java.lang.String module)
          Return TRUE if level is lower than or equal to the current log level of module.
static boolean longIntegerP(Stella_Object x)
           
static void lptrans(Stella_Object statement)
          Translate statement to Common-Lisp and print the result.
static Stella_Object makeEvaluatableBquoteTree(Stella_Object tree)
           
static java.lang.String makeFileNameFromRelativePath(Stella_Object filepath, Keyword type)
           
static Cons makeMemoizedValueEntry(Stella_Object value, Stella_Object arg1, Stella_Object arg2, Stella_Object arg3, Stella_Object arg4)
           
static Cons makeMemoizedValueEntryn(Stella_Object value, Cons args)
           
static KeyValueList matchConsTree(Stella_Object tree, Stella_Object pattern, KeyValueList bindings)
          Match pattern against tree and return a list of variable bindings if they match, or NULL otherwise.
static boolean methodSlotP(Stella_Object x)
           
static BooleanWrapper minute(Stella_Object number)
           
static IntegerWrapper month(Stella_Object thing)
           
static java.lang.String nameToString(Stella_Object name)
          Return the string represented by name.
static boolean nilP(Stella_Object x)
          Return true iff x equals nil.
static Symbol noonMidn(Stella_Object string)
           
 double numberWrapperToFloat()
           
 boolean objectEqlP(Stella_Object y)
           
 boolean objectEqualP(Stella_Object y)
          Return true if x and y are eqP.
static int objectHashCode(Stella_Object self)
          Return a hash code for self (can be negative).
static Stella_Object one(Stella_Object expression)
          Subtract 1 from 'expression' and return the result.
static Stella_Object oneI(Stella_Object expression)
          Add 1 to 'expression' and return the result.
static Stella_Object onlyIf(Stella_Object test, Stella_Object expression)
          If 'test' is TRUE, return the result of evaluating 'expression'.
static boolean parametricTypeSpecifierP(Stella_Object x)
           
static List parseArrayDimensionsSpec(Stella_Object dimensionsspec)
           
static PropertyList parseOptions(Stella_Object options, Cons legaloptionsAtypes, boolean coercionerrorP, boolean allowotherkeysP)
          Parse options, check their validity according to legalOptionsATypes and return the result as a PROPERTY-LIST.
static Cons parseTokenizerCharacterSpec(Stella_Object characterspec, List allcharactersets)
           
static int parseTokenizerStateModifiers(Stella_Object modifier)
           
static Stella_Object permanentCopy(Stella_Object tree)
           
 Stella_Object permanentify()
           
static Stella_Object permanentifyForm(Stella_Object form)
           
static void po(Stella_Object thing)
           
static void prettyPrintLiteral(Stella_Object literal, OutputStream stream)
           
 Stella_Class primaryClass()
           
 Surrogate primaryType()
          Returns the primary type of self.
 void printObject(java.io.PrintStream stream)
           
static void printOutline(Stella_Object thing, OutputStream stream, int depth, boolean namedP)
          Print an outline of thing and its subparts on stream.
static void printStellaCode(Stella_Object tree, java.io.PrintStream stream)
           
static void printStellaDefinition(Stella_Object tree, java.io.PrintStream stream)
           
static void printUndefinedSuperClasses(Stella_Object renamed_Class)
          Print all undefined or bad (indirect) super classes of renamed_Class.
static boolean proceduralExpressionP(Stella_Object tree)
           
static void ptrans(Stella_Object statement)
          Translate statement to Common-Lisp and print the result.
 Iterator publicSlots()
          Return an iterator over public slots of self.
static void registerRecycledItem(Stella_Object item)
           
static boolean runOptionHandlerP(Stella_Object renamed_Object, Keyword option, Stella_Object valuetree)
           
static int safeEqualHashCode(Stella_Object self)
          Return a hash code for self.
static int safeHashCode(Stella_Object self)
          Return a hash code for self.
static Surrogate safePrimaryType(Stella_Object x)
           
static StandardObject safeYieldTypeSpecifier(Stella_Object typetree)
           
static boolean searchConsTreeP(Stella_Object tree, Stella_Object value)
          Return true iff the value value is embedded within the cons tree tree.
static boolean searchConsTreeWithFilterP(Stella_Object tree, Stella_Object value, Cons filter)
          Return true iff the value value is embedded within the cons tree tree.
static Stella_Object searchForObject(Stella_Object self, Stella_Object typeref)
          If self is a string or a symbol, search for an object named self of type type.
static BooleanWrapper secondp(Stella_Object number)
           
static void setProperty(Stella_Object property, Stella_Object value)
          Set property (a string or symbol) in the configuration table to value.
static boolean sideEffectFreeExpressionP(Stella_Object tree)
           
static Stella_Object simplifyBquoteTree(Stella_Object tree)
           
static Symbol specialp(Stella_Object string)
           
 boolean standardObjectP()
           
static Stella_Object stella_Increment(Stella_Object place, Cons increment)
          Increment the value of place and return the result.
static boolean stellaClassP(Stella_Object x)
           
static boolean stellaCollectionP(Stella_Object self)
          Return true if self is a native collection.
static boolean stellaNeedToCompileP(Stella_Object file)
           
static boolean stellaNeedToTranslateP(Stella_Object file, Keyword language)
           
static boolean stellaObjectP(Stella_Object self)
          Return true if self is a member of the STELLA class OBJECT.
static Stella_Object stellify(Stella_Object self)
          Convert a Lisp object into a STELLA object.
static boolean storageSlotP(Stella_Object x)
           
static java.lang.String stringifyInModule(Stella_Object tree, Module module)
          Stringify a parse tree relative to module, or $MODULE$ if no module is specified.
static boolean stringP(Stella_Object x)
           
static Stella_Object substituteConsTree(Stella_Object tree, Stella_Object newvalue, Stella_Object oldvalue)
          Destructively replace each appearance of oldvalue by newvalue in the cons tree tree.
static boolean substituteOnce(Stella_Object expression, Stella_Object newtree, Stella_Object oldtree)
           
static boolean surrogateP(Stella_Object x)
           
 Surrogate surrogatify()
           
 void sweep()
          Default method.
static boolean symbolCaseP(Stella_Object keyform)
           
static boolean symbolP(Stella_Object x)
           
static Cons sysTree(Stella_Object tree, StandardObject typespec, java.lang.Object[] MV_returnarray)
           
static Surrogate targetLanguageType(Stella_Object tree)
           
static boolean taxonomyIsaP(Stella_Object renamed_Object, Surrogate type)
           
static BooleanWrapper timeDivider(Stella_Object thecharacter)
           
static TimeDuration timeMultiply(Stella_Object t1, Stella_Object t2)
          Multiplies a relative date by a wrapped number.
static boolean tokenizerIncludeSpecP(Stella_Object x)
           
static GeneralizedSymbol tokenizerToStateAlias(Stella_Object state)
           
static GeneralizedSymbol tokenizerToStateName(Stella_Object state)
           
 java.lang.String toString()
           
static Stella_Object traceIf(Stella_Object keyword, Cons body)
          If keyword is a trace keyword that has been enabled with addTrace print all the elements in body to standard output.
static boolean traceKeywordP(Stella_Object keyword)
           
static Stella_Object transientifyForm(Stella_Object form)
           
static boolean transientObjectP(Stella_Object renamed_Object)
           
static boolean transientSymbolP(Stella_Object x)
           
static Stella_Object translateWalkedTree(Stella_Object codetree)
           
static int treeSize(Stella_Object self)
           
static Cons treeToTrees(Stella_Object tree)
           
static boolean trueOptionP(Stella_Object value)
           
static Stella_Object tryToEvaluate(Stella_Object tree)
          Variant of evaluate that only evaluates tree if it represents an evaluable expression.
static boolean typeP(Stella_Object x)
           
static Surrogate typify(Stella_Object self)
           
static void unmake(Stella_Object self)
           
static void unregisterRecycledItem(Stella_Object item)
           
static Stella_Object updateInContext(Stella_Object oldvalue, Stella_Object newvalue, Context homecontext, boolean copytochildrenP)
           
static boolean valuesTreeP(Stella_Object tree)
           
static boolean variableExpressionP(Stella_Object tree)
           
static boolean verbatimStringP(Stella_Object x)
           
static boolean verbatimTreeP(Stella_Object tree)
           
static PropertyList vetOptions(Stella_Object plist, Cons legaloptions)
           
static boolean vrletExpressionP(Stella_Object tree)
           
 Stella_Object walkAtomicTree(java.lang.Object[] MV_returnarray)
           
static Stella_Object walkATree(Stella_Object tree, java.lang.Object[] MV_returnarray)
           
static Stella_Object walkCollectionTree(Stella_Object tree, boolean dontoptimizeP, java.lang.Object[] MV_returnarray)
           
static Cons walkDontCallMeTree(Stella_Object tree, StandardObject returntype, java.lang.Object[] MV_returnarray)
           
static Stella_Object walkedExpressionExpression(Stella_Object tree)
           
static StandardObject walkedExpressionType(Stella_Object tree)
           
static Stella_Object walkExpressionTree(Stella_Object exptree, StandardObject targettype, Symbol operatorname, boolean vrletisokP, java.lang.Object[] MV_returnarray)
           
static Stella_Object walkMvExpressionTree(Stella_Object tree, List targettypes, Symbol operator, java.lang.Object[] MV_returnarray)
           
static Stella_Object walkMvTree(Stella_Object tree, java.lang.Object[] MV_returnarray)
           
static Stella_Object walkStatement(Stella_Object tree, boolean warnonatomP)
           
static Stella_Object walkTopLevelExpression(Stella_Object tree)
           
static Stella_Object walkWithoutTypeTree(Stella_Object tree)
           
static void warnAboutUnknownSourceType(Stella_Object tree)
           
static Keyword weekday(Stella_Object thing)
           
static Stella_Object withinContext(Stella_Object contextform, Cons body)
          Execute body within the context resulting from contextform.
static Stella_Object withinModule(Stella_Object moduleform, Cons body)
          Execute body within the module resulting from moduleform.
static Stella_Object withinWorld(Stella_Object worldform, Cons body)
          Execute body within the world resulting from worldform.
static Stella_Object withStellaTokenizer(Stella_Object input, Cons body)
           
static Stella_Object withSystemDefinition(Stella_Object systemnameexpression, Cons body)
          Set *currentSystemDefinition* to the system definition named system.
static Stella_Object withTokenizer(Stella_Object table, Stella_Object input, Cons body)
           
static boolean wrapperP(Stella_Object x)
           
static Cons wrapWhereTest(Stella_Object wheretest, Cons actions)
           
static boolean xmlAttributeP(Stella_Object item)
          Return true if item is an XML attribute object
static boolean xmlBaseAttributeP(Stella_Object item)
          Return true if item is an XML attribute object
static boolean xmlCdataFormP(Stella_Object form)
          Return true if form is a CONS headed by a CDATA tag
static boolean xmlCdataP(Stella_Object item)
          Return true if item is an XML CDATA tag object
static boolean xmlDeclarationFormP(Stella_Object form)
          Return true if form is a CONS headed by an XML DECLARATION tag
static boolean xmlDeclarationP(Stella_Object item)
          Return true if item is an XML declaration object
static boolean xmlDoctypeFormP(Stella_Object form)
          Return true if form is a CONS headed by a DOCTYPE tag
static boolean xmlElementFormP(Stella_Object form)
          Return true if form is a CONS headed by an XML ELEMENT tag
static boolean xmlElementP(Stella_Object item)
          Return true if item is an XML element object
static boolean xmlGlobalAttributeP(Stella_Object item)
          Return true if item is an XML attribute object
static boolean xmlLocalAttributeP(Stella_Object item)
          Return true if item is an XML attribute object
static boolean xmlnsAttributeP(Stella_Object attribute)
           
static boolean xmlProcessingInstructionFormP(Stella_Object form)
          Return true if form is a CONS headed by an XML PROCESSING INSTRUCTION tag
static boolean xmlProcessingInstructionP(Stella_Object item)
          Return true if item is an XML processing instruction object
static Stella_Object xmlTagCase(Stella_Object item, Cons clauses)
          A case form for matching item against XML element tags.
static BooleanWrapper year(Stella_Object number)
           
static Cons yieldCondTest(Stella_Object casetest, Stella_Object testvariable, Symbol equalitytest)
           
static Stella_Object yieldCondTestOrTests(Stella_Object casetest, Stella_Object testvariable, Symbol equalitytest)
           
static Stella_Object yieldHardcodedCaseSymbolIdOrIds(Stella_Object casetest)
           
static Cons yieldInCursorClausesForArgumentList(Stella_Object collectiontree, StandardObject collectiontype, Symbol keyvar, Symbol valuevar, java.lang.Object[] MV_returnarray)
           
static Cons yieldInCursorClausesForGeneralCollection(Stella_Object collectiontree, StandardObject collectiontype, Symbol keyvar, Symbol valuevar, java.lang.Object[] MV_returnarray)
           
static Cons yieldInCursorClausesForVector(Stella_Object collectiontree, StandardObject collectiontype, Symbol keyvar, Symbol valuevar, java.lang.Object[] MV_returnarray)
           
 StandardObject yieldTypeSpecifier()
           
static FloatWrapper zone(Stella_Object thing)
           
static BooleanWrapper zoneMinute(Stella_Object number)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Stella_Object

public Stella_Object()
Method Detail

helpPrintOutline

public void helpPrintOutline(OutputStream stream,
                             int currentDepth,
                             int depth,
                             boolean namedP)
Helper method for printOutline

Parameters:
stream -
currentDepth -
depth -
namedP -

printOutline

public static void printOutline(Stella_Object thing,
                                OutputStream stream,
                                int depth,
                                boolean namedP)
Print an outline of thing and its subparts on stream. If depth is non-negative, only depth levels will be printed. If namedP is 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.

Parameters:
thing -
stream -
depth -
namedP -

idlOutputAtomicExpression

public static void idlOutputAtomicExpression(Stella_Object atom)

idlOutputLiteral

public void idlOutputLiteral()

idlOutputStatement

public static void idlOutputStatement(Stella_Object statement)

idlTranslateAtomicTree

public Cons idlTranslateAtomicTree()

idlTranslateATree

public static Stella_Object idlTranslateATree(Stella_Object tree)

javaOperatorP

public static boolean javaOperatorP(Stella_Object statement)

javaBinaryOperatorP

public static boolean javaBinaryOperatorP(Stella_Object statement)

javaHelpOutputPrintStream

public static void javaHelpOutputPrintStream(Stella_Object stream,
                                             Cons exps,
                                             boolean nativestreamP,
                                             boolean endoflineP)

javaEndOfLineTokenP

public static boolean javaEndOfLineTokenP(Stella_Object token)

javaBlockP

public static boolean javaBlockP(Stella_Object tree)

javaPrognP

public static boolean javaPrognP(Stella_Object tree)

javaOutputLiteral

public void javaOutputLiteral()

javaMaybeOutputStatementWithParentheses

public static void javaMaybeOutputStatementWithParentheses(Stella_Object statement)

javaOutputStatement

public static void javaOutputStatement(Stella_Object statement)

javaTranslateAtomicTree

public Cons javaTranslateAtomicTree()

javaStreamIsStandardOutputP

public static boolean javaStreamIsStandardOutputP(Stella_Object tree)

javaTranslateWithNativeWrapper

public static Cons javaTranslateWithNativeWrapper(Stella_Object tree,
                                                  StandardObject type)

javaSymbolCaseP

public static boolean javaSymbolCaseP(Stella_Object keyform)

javaTranslateATree

public static Stella_Object javaTranslateATree(Stella_Object tree)

jptrans

public static void jptrans(Stella_Object statement)
Translate statement to C++ and print the result.

Parameters:
statement -

cppOutputOneActualParameter

public static void cppOutputOneActualParameter(Stella_Object parameter)

cppArgumentIsStreamP

public static boolean cppArgumentIsStreamP(Stella_Object arg)

cppOutputTypedEntity

public static void cppOutputTypedEntity(Stella_Object type,
                                        Stella_Object entity,
                                        Stella_Object initialvalue)

cppOperatorP

public static boolean cppOperatorP(Stella_Object statement)

cppBinaryOperatorP

public static boolean cppBinaryOperatorP(Stella_Object statement)

cppMaybeOutputStatementWithParentheses

public static void cppMaybeOutputStatementWithParentheses(Stella_Object statement)

cppOutputAtomicExpression

public static void cppOutputAtomicExpression(Stella_Object atom)

cppOutputLiteral

public void cppOutputLiteral()

cppBlockP

public static boolean cppBlockP(Stella_Object tree)

cppPrognP

public static boolean cppPrognP(Stella_Object tree)

cppOutputStatement

public static void cppOutputStatement(Stella_Object statement)

cppStatementToList

public static Cons cppStatementToList(Stella_Object statement)

cppPrognifyStatement

public static Cons cppPrognifyStatement(Stella_Object statement)

cppTranslatedArrayTypeP

public static boolean cppTranslatedArrayTypeP(Stella_Object translatedtype)

cppTranslateAtomicTree

public Cons cppTranslateAtomicTree()

cppStreamIsStandardOutputP

public static boolean cppStreamIsStandardOutputP(Stella_Object tree)

symbolCaseP

public static boolean symbolCaseP(Stella_Object keyform)

cppTranslateATree

public static Stella_Object cppTranslateATree(Stella_Object tree)

cpptrans

public static void cpptrans(Stella_Object statement)
Translate statement to C++ and print the result.

Parameters:
statement -

describeObject

public void describeObject(OutputStream stream,
                           Keyword mode)
Prints a description of 'self' to stream 'stream'. 'mode' can be :terse, :verbose, or :source. The :terse mode is often equivalent to the standard print function.

Parameters:
stream -
mode -

convertToLiteral

public static Stella_Object convertToLiteral(Stella_Object renamed_Object)

literalEqlP

public static boolean literalEqlP(Stella_Object x,
                                  Stella_Object y)

prettyPrintLiteral

public static void prettyPrintLiteral(Stella_Object literal,
                                      OutputStream stream)

consifyListsAndIterators

public static Stella_Object consifyListsAndIterators(Stella_Object tree)

describeTersely

public static void describeTersely(Stella_Object self,
                                   OutputStream stream)

describe

public static void describe(Stella_Object name,
                            Cons mode)
Print a description of an object in :verbose, :terse, or :source modes.

Parameters:
name -
mode -

searchForObject

public static Stella_Object searchForObject(Stella_Object self,
                                            Stella_Object typeref)
If self is a string or a symbol, search for an object named self of type type. Otherwise, if self is an object, return it.

Parameters:
self -
typeref -
Returns:
Stella_Object

getObject

public Stella_Object getObject(Stella_Object type)

get

public static Stella_Object get(Stella_Object name,
                                Cons type)

addPropertyValue

public static void addPropertyValue(Stella_Object property,
                                    Stella_Object value)
Add value to the end of propertys (a string or symbol) value list in the configuration table. Coerces the current value to a list or initializes the list if it is as yet undefined. Allows incremental addition of values to list-valued propertys. Note that property is evaluated and will need to be quoted if supplied as a symbol. Symbols will also be upcased if this command is run in a non-case-sensitive module.

Parameters:
property -
value -

setProperty

public static void setProperty(Stella_Object property,
                               Stella_Object value)
Set property (a string or symbol) in the configuration table to value. Note that property is evaluated and will need to be quoted if supplied as a symbol. Symbols will also be upcased if this command is run in a non-case-sensitive module.

Parameters:
property -
value -

getProperty

public static Stella_Object getProperty(Stella_Object property,
                                        Cons defaultvalue)
Lookup property (a string or symbol) in the configuration table and return its value. If it is undefined, return the optional defaultvalue. Note that property is evaluated and will need to be quoted if supplied as a symbol. Symbols will also be upcased if this command is run in a non-case- sensitive module.

Parameters:
property -
defaultvalue -
Returns:
Stella_Object

defineSystem

public static SystemDefinition defineSystem(Stella_Object name,
                                            Cons options)

evaluateCommand

public static Stella_Object evaluateCommand(Stella_Object command,
                                            boolean finalizeP)

parseOptions

public static PropertyList parseOptions(Stella_Object options,
                                        Cons legaloptionsAtypes,
                                        boolean coercionerrorP,
                                        boolean allowotherkeysP)
Parse options, check their validity according to legalOptionsATypes and return the result as a PROPERTY-LIST. legalOptionsATypes has to either be NULL or a flat list of legal <keyword> <coercionType> pairs. A type specifcation of @IDENTITY means don't perform any coercion. If coercionErrorP is TRUE, raise an error if a coercion failed. If allowOtherKeysP is TRUE options other than those specified in legalOptionsATypes are allowed but won't be coerced since we don't know their type.

Parameters:
options -
legaloptionsAtypes -
coercionerrorP -
allowotherkeysP -
Returns:
PropertyList

vetOptions

public static PropertyList vetOptions(Stella_Object plist,
                                      Cons legaloptions)

coerceOptionValue

public static Stella_Object coerceOptionValue(Stella_Object value,
                                              Surrogate type)
Coerce value to type. Return NULL if not possible.

Parameters:
value -
type -
Returns:
Stella_Object

coerceValueToType

public static Stella_Object coerceValueToType(Stella_Object value,
                                              Surrogate type,
                                              boolean errorP)
Coerce value to type. Return NULL if not possible or raise an error if errorP is TRUE.

Parameters:
value -
type -
errorP -
Returns:
Stella_Object

coerceToFloat

public static double coerceToFloat(Stella_Object renamed_Object)
Coerce number to a float value or NULL if not possible.

Parameters:
renamed_Object -
Returns:
double

coerceValueToFloat

public static double coerceValueToFloat(Stella_Object value,
                                        boolean errorP)
Coerce value to a float value if possible, return NULL otherwise or raise an error if errorP is true.

Parameters:
value -
errorP -
Returns:
double

coerceToString

public static java.lang.String coerceToString(Stella_Object renamed_Object)
Coerce renamed_Object into a string. If no standard coercion is possible, simply stringify renamed_Object.

Parameters:
renamed_Object -
Returns:
String

coerceValueToString

public static java.lang.String coerceValueToString(Stella_Object value,
                                                   boolean errorP)
Coerce value into a string if possible, return NULL otherwise or raise an error if errorP is true.

Parameters:
value -
errorP -
Returns:
String

coerceToBoolean

public static BooleanWrapper coerceToBoolean(Stella_Object renamed_Object)
Return the boolean object represented by renamed_Object. Return NULL if coercion is not possible.

Parameters:
renamed_Object -
Returns:
BooleanWrapper

coerceValueToBoolean

public static BooleanWrapper coerceValueToBoolean(Stella_Object value,
                                                  boolean errorP)
Return the boolean object represented by value. Return NULL if coercion is not possible or raise an error if errorP is TRUE.

Parameters:
value -
errorP -
Returns:
BooleanWrapper

stellaNeedToCompileP

public static boolean stellaNeedToCompileP(Stella_Object file)

stellaNeedToTranslateP

public static boolean stellaNeedToTranslateP(Stella_Object file,
                                             Keyword language)

implodePathname

public static java.lang.String implodePathname(Stella_Object filepath)

makeFileNameFromRelativePath

public static java.lang.String makeFileNameFromRelativePath(Stella_Object filepath,
                                                            Keyword type)

makeMemoizedValueEntryn

public static Cons makeMemoizedValueEntryn(Stella_Object value,
                                           Cons args)

makeMemoizedValueEntry

public static Cons makeMemoizedValueEntry(Stella_Object value,
                                          Stella_Object arg1,
                                          Stella_Object arg2,
                                          Stella_Object arg3,
                                          Stella_Object arg4)

hashMemoizedArguments

public static int hashMemoizedArguments(Stella_Object arg1,
                                        Stella_Object arg2,
                                        Stella_Object arg3,
                                        Stella_Object arg4,
                                        int eqvector)

withSystemDefinition

public static Stella_Object withSystemDefinition(Stella_Object systemnameexpression,
                                                 Cons body)
Set *currentSystemDefinition* to the system definition named system. Set *currentSystemDefinitionSubdirectory* to match. Execute body within that scope.

Parameters:
systemnameexpression -
body -
Returns:
Stella_Object

withinModule

public static Stella_Object withinModule(Stella_Object moduleform,
                                         Cons body)
Execute body within the module resulting from moduleform. $MODULE$ is an acceptable moduleform. It will locally rebind $MODULE$ and $CONTEXT$ and shield the outer bindings from changes.

Parameters:
moduleform -
body -
Returns:
Stella_Object

withinContext

public static Stella_Object withinContext(Stella_Object contextform,
                                          Cons body)
Execute body within the context resulting from contextform.

Parameters:
contextform -
body -
Returns:
Stella_Object

withinWorld

public static Stella_Object withinWorld(Stella_Object worldform,
                                        Cons body)
Execute body within the world resulting from worldform.

Parameters:
worldform -
body -
Returns:
Stella_Object

onlyIf

public static Stella_Object onlyIf(Stella_Object test,
                                   Stella_Object expression)
If 'test' is TRUE, return the result of evaluating 'expression'.

Parameters:
test -
expression -
Returns:
Stella_Object

either

public static Stella_Object either(Stella_Object value1,
                                   Stella_Object value2)
If 'value1' is defined, return that, else return 'value2'.

Parameters:
value1 -
value2 -
Returns:
Stella_Object

one

public static Stella_Object one(Stella_Object expression)
Subtract 1 from 'expression' and return the result.

Parameters:
expression -
Returns:
Stella_Object

oneI

public static Stella_Object oneI(Stella_Object expression)
Add 1 to 'expression' and return the result.

Parameters:
expression -
Returns:
Stella_Object

_

public static Stella_Object _(Stella_Object place,
                              Cons decrement)
Decrement the value of place and return the result. place can be either a variable name or a slot reference. Decrement by the optional decrement (which can be a float) or 1 otherwise.

Parameters:
place -
decrement -
Returns:
Stella_Object

stella_Increment

public static Stella_Object stella_Increment(Stella_Object place,
                                             Cons increment)
Increment the value of place and return the result. place can be either a variable name or a slot reference. Increment by the optional increment (which can be a float) or 1 otherwise.

Parameters:
place -
increment -
Returns:
Stella_Object

xmlTagCase

public static Stella_Object xmlTagCase(Stella_Object item,
                                       Cons clauses)
A case form for matching item against XML element tags. Each element of clauses should be a clause with the form ("tagname" ...) or (("tagname" "namespace-uri") ...) The clause heads can optionally be symbols instead of strings. The key forms the parameters to the method xmlElementMatchP, 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.

Parameters:
item -
clauses -
Returns:
Stella_Object

xmlCdataFormP

public static boolean xmlCdataFormP(Stella_Object form)
Return true if form is a CONS headed by a CDATA tag

Parameters:
form -
Returns:
boolean

xmlDoctypeFormP

public static boolean xmlDoctypeFormP(Stella_Object form)
Return true if form is a CONS headed by a DOCTYPE tag

Parameters:
form -
Returns:
boolean

xmlDeclarationFormP

public static boolean xmlDeclarationFormP(Stella_Object form)
Return true if form is a CONS headed by an XML DECLARATION tag

Parameters:
form -
Returns:
boolean

xmlProcessingInstructionFormP

public static boolean xmlProcessingInstructionFormP(Stella_Object form)
Return true if form is a CONS headed by an XML PROCESSING INSTRUCTION tag

Parameters:
form -
Returns:
boolean

xmlElementFormP

public static boolean xmlElementFormP(Stella_Object form)
Return true if form is a CONS headed by an XML ELEMENT tag

Parameters:
form -
Returns:
boolean

xmlProcessingInstructionP

public static boolean xmlProcessingInstructionP(Stella_Object item)
Return true if item is an XML processing instruction object

Parameters:
item -
Returns:
boolean

xmlDeclarationP

public static boolean xmlDeclarationP(Stella_Object item)
Return true if item is an XML declaration object

Parameters:
item -
Returns:
boolean

xmlBaseAttributeP

public static boolean xmlBaseAttributeP(Stella_Object item)
Return true if item is an XML attribute object

Parameters:
item -
Returns:
boolean

xmlLocalAttributeP

public static boolean xmlLocalAttributeP(Stella_Object item)
Return true if item is an XML attribute object

Parameters:
item -
Returns:
boolean

xmlGlobalAttributeP

public static boolean xmlGlobalAttributeP(Stella_Object item)
Return true if item is an XML attribute object

Parameters:
item -
Returns:
boolean

xmlAttributeP

public static boolean xmlAttributeP(Stella_Object item)
Return true if item is an XML attribute object

Parameters:
item -
Returns:
boolean

xmlElementP

public static boolean xmlElementP(Stella_Object item)
Return true if item is an XML element object

Parameters:
item -
Returns:
boolean

xmlCdataP

public static boolean xmlCdataP(Stella_Object item)
Return true if item is an XML CDATA tag object

Parameters:
item -
Returns:
boolean

coerceToXmlElement

public static XmlElement coerceToXmlElement(Stella_Object regiontag)

xmlnsAttributeP

public static boolean xmlnsAttributeP(Stella_Object attribute)

withStellaTokenizer

public static Stella_Object withStellaTokenizer(Stella_Object input,
                                                Cons body)

withTokenizer

public static Stella_Object withTokenizer(Stella_Object table,
                                          Stella_Object input,
                                          Cons body)

parseTokenizerCharacterSpec

public static Cons parseTokenizerCharacterSpec(Stella_Object characterspec,
                                               List allcharactersets)

tokenizerIncludeSpecP

public static boolean tokenizerIncludeSpecP(Stella_Object x)

parseTokenizerStateModifiers

public static int parseTokenizerStateModifiers(Stella_Object modifier)

tokenizerToStateAlias

public static GeneralizedSymbol tokenizerToStateAlias(Stella_Object state)

tokenizerToStateName

public static GeneralizedSymbol tokenizerToStateName(Stella_Object state)

legalTokenizerToStateP

public static boolean legalTokenizerToStateP(Stella_Object x)

legalTokenizerFromStateP

public static boolean legalTokenizerFromStateP(Stella_Object x)

legalTokenizerStateP

public static boolean legalTokenizerStateP(Stella_Object x)

updateInContext

public static Stella_Object updateInContext(Stella_Object oldvalue,
                                            Stella_Object newvalue,
                                            Context homecontext,
                                            boolean copytochildrenP)

accessInContext

public static Stella_Object accessInContext(Stella_Object value,
                                            Context homecontext,
                                            boolean dontinheritP)

csValueP

public static boolean csValueP(Stella_Object self)

filterModuleP

public static boolean filterModuleP(Stella_Object self,
                                    AllPurposeIterator iterator)

inModule

public static Module inModule(Stella_Object name)
Change the current module to the module named name.

Parameters:
name -
Returns:
Module

defmodule

public static void defmodule(Stella_Object name,
                             Cons options)
Define (or redefine) a module named name. The accepted syntax is: (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 Cincludes option and/or a fully qualified module name, and (2) they inherit from used modules specified via the Cuses 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 Cincludes and Cuses 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 Cincludes specification(s) by a submodule 'B', then all definitions and facts asserted in 'A' are visible in 'B'. This is not the cases for Cuses; the Cuses options does not impact inheritance of propositions at all.

The list of modules specified in the Cincludes option plus (if supplied) the parent in the path used for name become the new module's parents. If no Cuses option was supplied, the new module will use the STELLA module by default, otherwise, it will use the set of specified modules.

If CcaseSensitiveP 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 Cshadow 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 ClispPackage, CjavaPackage, and CcppPackage 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 renamed_Synchronized.

Parameters:
name -
options -

trueOptionP

public static boolean trueOptionP(Stella_Object value)

coerceToModule

public static Module coerceToModule(Stella_Object renamed_Object,
                                    boolean warnP)

coerceToModuleName

public static java.lang.String coerceToModuleName(Stella_Object namespec,
                                                  boolean warnP)

helpLptrans

public static void helpLptrans(Stella_Object statement)

ptrans

public static void ptrans(Stella_Object statement)
Translate statement to Common-Lisp and print the result.

Parameters:
statement -

lptrans

public static void lptrans(Stella_Object statement)
Translate statement to Common-Lisp and print the result.

Parameters:
statement -

clConditionalizeTypeDeclarationTree

public static Stella_Object clConditionalizeTypeDeclarationTree(Stella_Object declaration)

clYieldTypedExpressionTree

public static Stella_Object clYieldTypedExpressionTree(Stella_Object tree,
                                                       StandardObject type)

clTranslateVerbatimBodySymbols

public static Stella_Object clTranslateVerbatimBodySymbols(Stella_Object body,
                                                           List parameters)

clTranslatePlainBooleanTest

public static Stella_Object clTranslatePlainBooleanTest(Stella_Object tree,
                                                        boolean invertP)

clTranslateBooleanTest

public static Stella_Object clTranslateBooleanTest(Stella_Object tree,
                                                   boolean invertP)

cast

public static Stella_Object cast(Stella_Object value,
                                 Surrogate type)
Perform a run-time type check, and then return value.

Parameters:
value -
type -
Returns:
Stella_Object

clTranslateAtomicTree

public Stella_Object clTranslateAtomicTree()

helpClTranslateATree

public static Stella_Object helpClTranslateATree(Stella_Object tree)

clTranslateATree

public static Stella_Object clTranslateATree(Stella_Object tree)

coerceEvaluatedTree

public static Stella_Object coerceEvaluatedTree(Stella_Object tree,
                                                Stella_Object sourcetree,
                                                StandardObject sourcetype,
                                                StandardObject targettype,
                                                boolean evaluateP,
                                                java.lang.Object[] MV_returnarray)

makeEvaluatableBquoteTree

public static Stella_Object makeEvaluatableBquoteTree(Stella_Object tree)

evaluateAtomicTree

public static Stella_Object evaluateAtomicTree(Stella_Object tree,
                                               java.lang.Object[] MV_returnarray)

evaluateArgumentTree

public static Stella_Object evaluateArgumentTree(Stella_Object tree,
                                                 boolean evaluateP,
                                                 java.lang.Object[] MV_returnarray)

tryToEvaluate

public static Stella_Object tryToEvaluate(Stella_Object tree)
Variant of 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.

Parameters:
tree -
Returns:
Stella_Object

evaluate

public static Stella_Object evaluate(Stella_Object expression)
Evaluate the expression expression and return the result. Currently, only the evaluation of (possibly nested) commands and global variables is supported. The second return value indicates the actual type of the result (which might have been wrapped), and the third return value indicates whether an error occurred during the evaluation. Expressions are simple to program in Common Lisp, since they are built into the language, and relatively awkward in Java and C++. Users of either of those languages are more likely to want to call evaluateString.

Parameters:
expression -
Returns:
Stella_Object

deUglifyParseTree

public static Stella_Object deUglifyParseTree(Stella_Object tree)

verbatimTreeP

public static boolean verbatimTreeP(Stella_Object tree)

estimatedEvaluationCost

public static int estimatedEvaluationCost(Stella_Object tree)

sideEffectFreeExpressionP

public static boolean sideEffectFreeExpressionP(Stella_Object tree)

yieldCondTestOrTests

public static Stella_Object yieldCondTestOrTests(Stella_Object casetest,
                                                 Stella_Object testvariable,
                                                 Symbol equalitytest)

yieldCondTest

public static Cons yieldCondTest(Stella_Object casetest,
                                 Stella_Object testvariable,
                                 Symbol equalitytest)

yieldHardcodedCaseSymbolIdOrIds

public static Stella_Object yieldHardcodedCaseSymbolIdOrIds(Stella_Object casetest)

andOrNotTreeP

public static boolean andOrNotTreeP(Stella_Object tree)

coerceMvTree

public static Stella_Object coerceMvTree(Stella_Object tree,
                                         Symbol operator,
                                         List sourcetypes,
                                         List targettypes,
                                         java.lang.Object[] MV_returnarray)

walkMvTree

public static Stella_Object walkMvTree(Stella_Object tree,
                                       java.lang.Object[] MV_returnarray)

walkMvExpressionTree

public static Stella_Object walkMvExpressionTree(Stella_Object tree,
                                                 List targettypes,
                                                 Symbol operator,
                                                 java.lang.Object[] MV_returnarray)

valuesTreeP

public static boolean valuesTreeP(Stella_Object tree)

safeYieldTypeSpecifier

public static StandardObject safeYieldTypeSpecifier(Stella_Object typetree)

helpTransformBooleanProceduralExpression

public static Cons helpTransformBooleanProceduralExpression(Stella_Object expression,
                                                            Symbol testvariable)

substituteOnce

public static boolean substituteOnce(Stella_Object expression,
                                     Stella_Object newtree,
                                     Stella_Object oldtree)

proceduralExpressionP

public static boolean proceduralExpressionP(Stella_Object tree)

vrletExpressionP

public static boolean vrletExpressionP(Stella_Object tree)

variableExpressionP

public static boolean variableExpressionP(Stella_Object tree)

atomicExpressionP

public static boolean atomicExpressionP(Stella_Object tree)

walkAtomicTree

public Stella_Object walkAtomicTree(java.lang.Object[] MV_returnarray)

helpWalkATree

public static Stella_Object helpWalkATree(Stella_Object tree,
                                          java.lang.Object[] MV_returnarray)

walkATree

public static Stella_Object walkATree(Stella_Object tree,
                                      java.lang.Object[] MV_returnarray)

targetLanguageType

public static Surrogate targetLanguageType(Stella_Object tree)

walkedExpressionExpression

public static Stella_Object walkedExpressionExpression(Stella_Object tree)

walkedExpressionType

public static StandardObject walkedExpressionType(Stella_Object tree)

sysTree

public static Cons sysTree(Stella_Object tree,
                           StandardObject typespec,
                           java.lang.Object[] MV_returnarray)

walkStatement

public static Stella_Object walkStatement(Stella_Object tree,
                                          boolean warnonatomP)

walkWithoutTypeTree

public static Stella_Object walkWithoutTypeTree(Stella_Object tree)

computeExpressionType

public static StandardObject computeExpressionType(Stella_Object expression,
                                                   boolean wrapP)

walkExpressionTree

public static Stella_Object walkExpressionTree(Stella_Object exptree,
                                               StandardObject targettype,
                                               Symbol operatorname,
                                               boolean vrletisokP,
                                               java.lang.Object[] MV_returnarray)

coercibleP

public static boolean coercibleP(Stella_Object tree,
                                 StandardObject sourcetype,
                                 StandardObject targettype)

helpCoerceATree

public static Stella_Object helpCoerceATree(Stella_Object tree,
                                            StandardObject sourcetype,
                                            StandardObject targettype,
                                            boolean testonlyP,
                                            java.lang.Object[] MV_returnarray)

coerceATree

public static Stella_Object coerceATree(Stella_Object tree,
                                        StandardObject sourcetype,
                                        StandardObject targettype,
                                        java.lang.Object[] MV_returnarray)

warnAboutUnknownSourceType

public static void warnAboutUnknownSourceType(Stella_Object tree)

applyCoercionMethod

public static Stella_Object applyCoercionMethod(Stella_Object expression,
                                                Surrogate sourcetype,
                                                Surrogate targettype,
                                                Stella_Object coercionmethod,
                                                java.lang.Object[] MV_returnarray)

treeToTrees

public static Cons treeToTrees(Stella_Object tree)

illegalTreeP

public static boolean illegalTreeP(Stella_Object tree)

walkDontCallMeTree

public static Cons walkDontCallMeTree(Stella_Object tree,
                                      StandardObject returntype,
                                      java.lang.Object[] MV_returnarray)

po

public static void po(Stella_Object thing)

incrementallyTranslate

public static Stella_Object incrementallyTranslate(Stella_Object tree)
Translate a single Stella expression tree and return the result. For C++ and Java print the translation to standard output and return NIL instead.

Parameters:
tree -
Returns:
Stella_Object

translateWalkedTree

public static Stella_Object translateWalkedTree(Stella_Object codetree)

walkTopLevelExpression

public static Stella_Object walkTopLevelExpression(Stella_Object tree)

traceKeywordP

public static boolean traceKeywordP(Stella_Object keyword)

traceIf

public static Stella_Object traceIf(Stella_Object keyword,
                                    Cons body)
If keyword is a trace keyword that has been enabled with addTrace 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.

Parameters:
keyword -
body -
Returns:
Stella_Object

wrapWhereTest

public static Cons wrapWhereTest(Stella_Object wheretest,
                                 Cons actions)

yieldInCursorClausesForArgumentList

public static Cons yieldInCursorClausesForArgumentList(Stella_Object collectiontree,
                                                       StandardObject collectiontype,
                                                       Symbol keyvar,
                                                       Symbol valuevar,
                                                       java.lang.Object[] MV_returnarray)

yieldInCursorClausesForVector

public static Cons yieldInCursorClausesForVector(Stella_Object collectiontree,
                                                 StandardObject collectiontype,
                                                 Symbol keyvar,
                                                 Symbol valuevar,
                                                 java.lang.Object[] MV_returnarray)

yieldInCursorClausesForGeneralCollection

public static Cons yieldInCursorClausesForGeneralCollection(Stella_Object collectiontree,
                                                            StandardObject collectiontype,
                                                            Symbol keyvar,
                                                            Symbol valuevar,
                                                            java.lang.Object[] MV_returnarray)

walkCollectionTree

public static Stella_Object walkCollectionTree(Stella_Object tree,
                                               boolean dontoptimizeP,
                                               java.lang.Object[] MV_returnarray)

defaultOptionHandler

public static void defaultOptionHandler(Stella_Object self,
                                        StorageSlot slot,
                                        Stella_Object tree)

runOptionHandlerP

public static boolean runOptionHandlerP(Stella_Object renamed_Object,
                                        Keyword option,
                                        Stella_Object valuetree)

destructureMethodNameTree

public static Symbol destructureMethodNameTree(Stella_Object nametree,
                                               java.lang.Object[] MV_returnarray)

collectKeyValueList

public static KeyValueList collectKeyValueList(Stella_Object tree)

collectFeatureList

public static List collectFeatureList(Stella_Object tree)

stringifyInModule

public static java.lang.String stringifyInModule(Stella_Object tree,
                                                 Module module)
Stringify a parse tree relative to module, or $MODULE$ if no module is specified.

Parameters:
tree -
module -
Returns:
String

transientifyForm

public static Stella_Object transientifyForm(Stella_Object form)

permanentifyForm

public static Stella_Object permanentifyForm(Stella_Object form)

dealWithEra

public static void dealWithEra(Stella_Object formValue,
                               DecodedDateTime parsedValues)

dealWithAmPm

public static void dealWithAmPm(Stella_Object formValue,
                                DecodedDateTime parsedValues)

dealWithNoonMidn

public static void dealWithNoonMidn(Stella_Object formValue,
                                    DecodedDateTime parsedValues)

dateTimeDivider

public static BooleanWrapper dateTimeDivider(Stella_Object thecharacter)

dateDivider

public static BooleanWrapper dateDivider(Stella_Object thecharacter)

timeDivider

public static BooleanWrapper timeDivider(Stella_Object thecharacter)

year

public static BooleanWrapper year(Stella_Object number)

day

public static BooleanWrapper day(Stella_Object number)

hour

public static BooleanWrapper hour(Stella_Object number)

zoneMinute

public static BooleanWrapper zoneMinute(Stella_Object number)

minute

public static BooleanWrapper minute(Stella_Object number)

secondp

public static BooleanWrapper secondp(Stella_Object number)

specialp

public static Symbol specialp(Stella_Object string)

zone

public static FloatWrapper zone(Stella_Object thing)

month

public static IntegerWrapper month(Stella_Object thing)

weekday

public static Keyword weekday(Stella_Object thing)

noonMidn

public static Symbol noonMidn(Stella_Object string)

era

public static Symbol era(Stella_Object string)

amPm

public static Symbol amPm(Stella_Object string)

hashlist

public static Stella_Object hashlist(Stella_Object list,
                                     Stella_Object table)

timeMultiply

public static TimeDuration timeMultiply(Stella_Object t1,
                                        Stella_Object t2)
Multiplies a relative date by a wrapped number. One of t1 or t2 must be a relative date and the other a wrapped number.

Parameters:
t1 -
t2 -
Returns:
TimeDuration

transientObjectP

public static boolean transientObjectP(Stella_Object renamed_Object)

unregisterRecycledItem

public static void unregisterRecycledItem(Stella_Object item)

registerRecycledItem

public static void registerRecycledItem(Stella_Object item)

sweep

public void sweep()
Default method. Sweep up all self-type objects.


parseArrayDimensionsSpec

public static List parseArrayDimensionsSpec(Stella_Object dimensionsspec)

yieldTypeSpecifier

public StandardObject yieldTypeSpecifier()

taxonomyIsaP

public static boolean taxonomyIsaP(Stella_Object renamed_Object,
                                   Surrogate type)

isaP

public static boolean isaP(Stella_Object renamed_Object,
                           Surrogate type)
Return true iff renamed_Object is an instance of the class named type.

Parameters:
renamed_Object -
type -
Returns:
boolean

printUndefinedSuperClasses

public static void printUndefinedSuperClasses(Stella_Object renamed_Class)
Print all undefined or bad (indirect) super classes of renamed_Class.

Parameters:
renamed_Class -

coerceToSymbol

public static GeneralizedSymbol coerceToSymbol(Stella_Object name)
Return the (generalized) symbol represented by name. Return null if name is undefined or does not represent a string.

Parameters:
name -
Returns:
GeneralizedSymbol

nameToString

public static java.lang.String nameToString(Stella_Object name)
Return the string represented by name. Return null if name is undefined or does not represent a string.

Parameters:
name -
Returns:
String

publicSlots

public Iterator publicSlots()
Return an iterator over public slots of self.

Returns:
Iterator

free

public void free()
Default method. Deallocate storage for self.


bindToSurrogateP

public static boolean bindToSurrogateP(Stella_Object self,
                                       java.lang.String name,
                                       boolean clipoldvalueP,
                                       boolean askforpermissionP,
                                       java.lang.Object[] MV_returnarray)

primaryClass

public Stella_Class primaryClass()

numberWrapperToFloat

public double numberWrapperToFloat()

permanentCopy

public static Stella_Object permanentCopy(Stella_Object tree)

permanentify

public Stella_Object permanentify()

simplifyBquoteTree

public static Stella_Object simplifyBquoteTree(Stella_Object tree)

expandBquoteTree

public static Stella_Object expandBquoteTree(Stella_Object tree)

bquotify

public static Stella_Object bquotify(Stella_Object tree)

helpBquotify

public static Stella_Object helpBquotify(Stella_Object tree)

eqlToCharacterP

public static boolean eqlToCharacterP(Stella_Object y,
                                      char x)

eqlToStringP

public static boolean eqlToStringP(Stella_Object y,
                                   java.lang.String x)

eqlToFloatP

public static boolean eqlToFloatP(Stella_Object y,
                                  double x)

eqlToLongIntegerP

public static boolean eqlToLongIntegerP(Stella_Object y,
                                        long x)

eqlToIntegerP

public static boolean eqlToIntegerP(Stella_Object y,
                                    int x)

eqlToBooleanP

public static boolean eqlToBooleanP(Stella_Object y,
                                    boolean x)

objectEqlP

public boolean objectEqlP(Stella_Object y)

inlineUnwrapBoolean

public static Stella_Object inlineUnwrapBoolean(Stella_Object expression)

inlineWrapBoolean

public static Stella_Object inlineWrapBoolean(Stella_Object expression)

typify

public static Surrogate typify(Stella_Object self)

surrogatify

public Surrogate surrogatify()

commonLispSymbolP

public static boolean commonLispSymbolP(Stella_Object self)

coerceToHashSet

public static HashSet coerceToHashSet(Stella_Object self,
                                      boolean equaltestP)
Coerce the collection self into a HASH-SET. Use an equal test if equalTestP is TRUE (equalTestP will be ignored if self already is a HASH-SET).

Parameters:
self -
equaltestP -
Returns:
HashSet

stellaCollectionP

public static boolean stellaCollectionP(Stella_Object self)
Return true if self is a native collection.

Parameters:
self -
Returns:
boolean

treeSize

public static int treeSize(Stella_Object self)

printStellaDefinition

public static void printStellaDefinition(Stella_Object tree,
                                         java.io.PrintStream stream)

printStellaCode

public static void printStellaCode(Stella_Object tree,
                                   java.io.PrintStream stream)

consTreeMatchP

public static boolean consTreeMatchP(Stella_Object tree,
                                     Stella_Object pattern)
Predicate version of matchConsTree (which see).

Parameters:
tree -
pattern -
Returns:
boolean

matchConsTree

public static KeyValueList matchConsTree(Stella_Object tree,
                                         Stella_Object pattern,
                                         KeyValueList bindings)
Match pattern against tree and return a list of variable bindings if they match, or NULL otherwise. bindings can be NULL or an initial list of bindings to consider. Pattern variables use KIF syntax, i.e., they need to start with a P 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.

Parameters:
tree -
pattern -
bindings -
Returns:
KeyValueList

substituteConsTree

public static Stella_Object substituteConsTree(Stella_Object tree,
                                               Stella_Object newvalue,
                                               Stella_Object oldvalue)
Destructively replace each appearance of oldvalue by newvalue in the cons tree tree. Return the tree. Uses an eqlP test.

Parameters:
tree -
newvalue -
oldvalue -
Returns:
Stella_Object

equalConsTreesP

public static boolean equalConsTreesP(Stella_Object tree1,
                                      Stella_Object tree2)
Return true iff the cons trees tree1 and tree2 are structurally equivalent. Uses an eqlP test.

Parameters:
tree1 -
tree2 -
Returns:
boolean

copyConsTree

public static Stella_Object copyConsTree(Stella_Object self)
Return a copy of the cons tree self.

Parameters:
self -
Returns:
Stella_Object

searchConsTreeWithFilterP

public static boolean searchConsTreeWithFilterP(Stella_Object tree,
                                                Stella_Object value,
                                                Cons filter)
Return true iff the value value is embedded within the cons tree tree. Uses an eqlP test. Does not descend into any cons whose first element matches an element of filter.

Parameters:
tree -
value -
filter -
Returns:
boolean

searchConsTreeP

public static boolean searchConsTreeP(Stella_Object tree,
                                      Stella_Object value)
Return true iff the value value is embedded within the cons tree tree. Uses an eqlP test.

Parameters:
tree -
value -
Returns:
boolean

chooseSortPredicate

public static java.lang.reflect.Method chooseSortPredicate(Stella_Object firstelement)

consify

public Cons consify()
If renamed_Object is a CONS, return it. Otherwise, return a singleton cons list containing it.

Returns:
Cons

nilP

public static boolean nilP(Stella_Object x)
Return true iff x equals nil.

Parameters:
x -
Returns:
boolean

standardObjectP

public boolean standardObjectP()

parametricTypeSpecifierP

public static boolean parametricTypeSpecifierP(Stella_Object x)

anchoredTypeSpecifierP

public static boolean anchoredTypeSpecifierP(Stella_Object x)

methodSlotP

public static boolean methodSlotP(Stella_Object x)

storageSlotP

public static boolean storageSlotP(Stella_Object x)

stellaClassP

public static boolean stellaClassP(Stella_Object x)

consP

public static boolean consP(Stella_Object x)

keywordP

public static boolean keywordP(Stella_Object x)

transientSymbolP

public static boolean transientSymbolP(Stella_Object x)

symbolP

public static boolean symbolP(Stella_Object x)

typeP

public static boolean typeP(Stella_Object x)

surrogateP

public static boolean surrogateP(Stella_Object x)

wrapperP

public static boolean wrapperP(Stella_Object x)

characterP

public static boolean characterP(Stella_Object x)

verbatimStringP

public static boolean verbatimStringP(Stella_Object x)

stringP

public static boolean stringP(Stella_Object x)

floatP

public static boolean floatP(Stella_Object x)

longIntegerP

public static boolean longIntegerP(Stella_Object x)

integerP

public static boolean integerP(Stella_Object x)

booleanP

public static boolean booleanP(Stella_Object x)

bootstrapIsaP

public static boolean bootstrapIsaP(Stella_Object x,
                                    Surrogate type)

safePrimaryType

public static Surrogate safePrimaryType(Stella_Object x)

stellaObjectP

public static boolean stellaObjectP(Stella_Object self)
Return true if self is a member of the STELLA class OBJECT.

Parameters:
self -
Returns:
boolean

stellify

public static Stella_Object stellify(Stella_Object self)
Convert a Lisp object into a STELLA object.

Parameters:
self -
Returns:
Stella_Object

unmake

public static void unmake(Stella_Object self)

safeEqualHashCode

public static int safeEqualHashCode(Stella_Object self)
Return a hash code for self. Just like equalHashCode - which see, but also works for NULL. equalHashCode methods that expect to handle NULL components should use this function for recursive calls.

Parameters:
self -
Returns:
int

equalHashCode

public int equalHashCode()
Return a hash code for self (can be negative). Two objects that are equalP are guaranteed to generate the same hash code (provided, that writers of objectEqualP methods also implemented the appropriate equalHashCode method). Two objects that are not equalPdo not necessarily generate different hash codes.

Returns:
int

safeHashCode

public static int safeHashCode(Stella_Object self)
Return a hash code for self. Just like hashCode - which see, but also works for NULL.

Parameters:
self -
Returns:
int

hashCode_

public int hashCode_()
Return a hash code for self (can be negative). Two objects that are eqlP are guaranteed to generate the same hash code. Two objects that are not eqlP do not necessarily generate different hash codes.

Returns:
int

objectHashCode

public static int objectHashCode(Stella_Object self)
Return a hash code for self (can be negative). Two objects that are eqP are guaranteed to generate the same hash code. Two objects that are not eqP do not necessarily generate different hash codes. Similar to hashCode but always hashes on the address of self even if it is a wrapper.

Parameters:
self -
Returns:
int

objectEqualP

public boolean objectEqualP(Stella_Object y)
Return true if x and y are eqP.

Parameters:
y -
Returns:
boolean

equalP

public static boolean equalP(Stella_Object x,
                             Stella_Object y)
Return true if x and y are eqlP or considered equal by a user-defined objectEqualP method. This implements a fully extensible equality test similar to Java's equals method. Note that writers of custom objectEqualP methods must also implement a corresponding equalHashCode method.

Parameters:
x -
y -
Returns:
boolean

eqlP

public static boolean eqlP(Stella_Object x,
                           Stella_Object y)
Return true if x and y are eqP 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 eqP test inline.

Parameters:
x -
y -
Returns:
boolean

logLevelLE

public static boolean logLevelLE(Stella_Object level,
                                 java.lang.String module)
Return TRUE if level is lower than or equal to the current log level of module. Return FALSE if any of them are undefined.

Parameters:
level -
module -
Returns:
boolean

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

printObject

public void printObject(java.io.PrintStream stream)

decrementReferenceCount

public void decrementReferenceCount()

incrementReferenceCount

public void incrementReferenceCount()

deletedP

public boolean deletedP()
Default deletedP method which always returns FALSE. Objects that inherit DYNAMIC-SLOTS-MIXIN also inherit the dynamically-allocated slot deletedObjectP which is read/writable with specializations of this method.

Returns:
boolean

homeModule

public Module homeModule()
Return the home module of self.

Returns:
Module

primaryType

public Surrogate primaryType()
Returns the primary type of self. Gets defined automatically for every non-abstract subclass of OBJECT.

Returns:
Surrogate