edu.isi.stella
Class Surrogate

java.lang.Object
  extended by edu.isi.stella.Stella_Object
      extended by edu.isi.stella.StandardObject
          extended by edu.isi.stella.ContextSensitiveObject
              extended by edu.isi.stella.GeneralizedSymbol
                  extended by edu.isi.stella.Surrogate

public class Surrogate
extends GeneralizedSymbol

Rigid surrogate.


Field Summary
 Stella_Object surrogateValue
           
 
Fields inherited from class edu.isi.stella.GeneralizedSymbol
symbolId, symbolName
 
Fields inherited from class edu.isi.stella.ContextSensitiveObject
homeContext
 
Constructor Summary
Surrogate()
           
 
Method Summary
static Stella_Object accessSurrogateSlotValue(Surrogate self, Symbol slotname, Stella_Object value, boolean setvalueP)
           
static boolean bootstrapSubtypeOfP(Surrogate subtype, Surrogate supertype)
           
static Surrogate canonicalType(Surrogate type)
           
 Stella_Object clTranslateAtomicTree()
           
static List collectBadSuperClasses(Surrogate type, List badones)
           
static Surrogate collectionToActiveCollection(Surrogate type)
           
 void cppOutputLiteral()
           
 Cons cppTranslateAtomicTree()
           
static Cons cppTranslateDefinedPMethodCall(Surrogate argumenttype, Stella_Object argument, boolean nullP)
           
static StringWrapper cppTranslateSurrogateId(Surrogate surrogate)
           
static StringWrapper cppTranslateSurrogateName(Surrogate surrogate)
           
static Stella_Object createObject(Surrogate type, Cons initialValuePairs)
          Funcallable version of the renamed_New operator.
static RecycleList createRecycleList(Surrogate classtype, int itemsize)
           
static boolean definedTypeP(Surrogate type)
           
static Stella_Class defineStellaClass(Surrogate name, List supers, List slots, KeywordKeyValueList options)
          Return a Stella class with name name.
 void destroyClass()
           
static AbstractDictionary dictionary(Surrogate collectiontype, Cons alternatingkeysandvalues)
          Return a dictionary of collectiontype containing values, in order.
static boolean filterUnboundSurrogateP(Surrogate self, AllPurposeIterator iterator)
           
static boolean genericallyAccessibleTypeP(Surrogate type)
           
static Stella_Object getGlobalValue(Surrogate self)
          Return the (possibly-wrapped) value of the global variable for the surrogate 'self'.
 Stella_Class getStellaClass(boolean errorP)
          Return a class with name className.
 void idlOutputLiteral()
           
static StringWrapper idlTranslateSurrogateId(Surrogate surrogate)
           
static StringWrapper idlTranslateSurrogateName(Surrogate surrogate)
           
static Surrogate importSurrogate(Surrogate surrogate, Module module)
          Import surrogate into module and return the imported surrogate.
static void initializeMemoizationTable(Surrogate memotablesurrogate, java.lang.String options)
           
static void insertPrimitiveSuper(Surrogate newsuper, List supers)
           
 void javaOutputLiteral()
           
static Cons javaTranslateDefinedOrNull(Surrogate classtype, Stella_Object renamed_Object, boolean nullP)
           
static StringWrapper javaTranslateSurrogateId(Surrogate surrogate)
           
static StringWrapper javaTranslateSurrogateName(Surrogate surrogate)
           
 java.lang.String localPrintName()
           
static Stella_Object lookupCoersionMethod(Surrogate sourcetype, Surrogate targettype, Stella_Object expression)
           
 GlobalVariable lookupGlobalVariable()
          Return a global variable with name 'self'.
static Stella_Object lookupLiteralTypeInfo(Surrogate type, Keyword key)
           
static StorageSlot lookupSlotFromOptionKeyword(Surrogate owner, Keyword keyword)
           
static Slot lookupSlotFromSlotref(Surrogate slotref)
           
static Surrogate lookupSlotref(Surrogate self, Symbol slotname)
           
static Surrogate moreGeneralNumericType(Surrogate type1, Surrogate type2)
           
static Surrogate newSurrogate(java.lang.String symbolName)
           
static boolean optimisticSubtypeOfP(Surrogate subtype, Surrogate supertype)
           
 Surrogate primaryType()
          Returns the primary type of self.
 void printObject(java.io.PrintStream stream)
           
static void printSurrogate(Surrogate self, java.io.PrintStream stream)
           
static StandardObject realTypeSpecifier(Surrogate type)
           
static Surrogate safeImportSurrogate(Surrogate surrogate, Module module)
          Safe version of importSurrogate (which see).
static boolean safeSubtypeOfP(Surrogate subtype, Surrogate supertype)
           
static Sequence sequence(Surrogate collectiontype, Cons values)
          Return a sequence containing values, in order.
static Stella_Object setGlobalValue(Surrogate self, Stella_Object value)
          Set the value of the global variable for the surrogate 'self' to 'value'.
static void setLiteralTypeInfo(Surrogate type, Keyword key, Stella_Object value)
           
static boolean slotrefP(Surrogate self)
           
static Surrogate slotrefType(Surrogate slotref)
           
static boolean subtypeOfAnchoredTypeSpecifierP(Surrogate type)
           
static boolean subtypeOfBooleanP(Surrogate type)
           
static boolean subtypeOfCharacterP(Surrogate type)
           
static boolean subtypeOfClassP(Surrogate type)
           
static boolean subtypeOfConsP(Surrogate type)
           
static boolean subtypeOfFloatP(Surrogate type)
           
static boolean subtypeOfIntegerP(Surrogate type)
           
static boolean subtypeOfKeywordP(Surrogate type)
           
static boolean subtypeOfMethodSlotP(Surrogate type)
           
static boolean subtypeOfP(Surrogate subType, Surrogate superType)
          Return true iff the class named subType is a subclass of the class named superType.
static boolean subtypeOfParametricTypeSpecifierP(Surrogate type)
           
static boolean subtypeOfStorageSlotP(Surrogate type)
           
static boolean subtypeOfStringP(Surrogate type)
           
static boolean subtypeOfSurrogateP(Surrogate type)
           
static boolean subtypeOfSymbolP(Surrogate type)
           
static boolean subtypeOfTransientSymbolP(Surrogate type)
           
static boolean subtypeOfTypeP(Surrogate type)
           
static boolean subtypeOfVerbatimStringP(Surrogate type)
           
static boolean subtypeOfWrapperP(Surrogate type)
           
static Symbol surrogateToSymbol(Surrogate self)
           
 Surrogate surrogatify()
          Converts 'self' into a surrogate.
static Symbol symbolize(Surrogate surrogate)
          Convert surrogate into a symbol with the same name and module.
static Stella_Class typeToClass(Surrogate type)
           
static Stella_Object typeToNullValueTree(Surrogate type)
           
static Symbol typeToSymbol(Surrogate type)
          Convert type into a symbol with the same name and module.
 Surrogate typeToWrappedType()
          Return the wrapped type for the type self, or 'self' if it is not a bare literal type.
static void uninternSurrogate(Surrogate self)
          Remove self from its home module and the surrogate table.
static boolean unknownTypeP(Surrogate type)
           
static boolean useVectorStyleIterationP(Surrogate collectiontype)
           
static Surrogate verifyType(Surrogate self)
           
static void verifyTypecaseClauseType(Surrogate testtype, Surrogate clausetype, List precedingclausetypes, Cons clause)
           
static boolean visibleSurrogateP(Surrogate self)
          Return true if self is visible from the current module.
 Stella_Object walkAtomicTree(java.lang.Object[] MV_returnarray)
           
static Surrogate wrappedTypeToType(Surrogate self)
          Return the unwrapped type for the wrapped type self, or self if it is not a wrapped type.
static Cons yieldIsaPCaseTest(Surrogate casekey, Stella_Object testexpression)
           
static Stella_Object yieldStructSlotAccessorName(Surrogate classtype, Symbol slotname)
           
static Cons yieldSubtypeOfPCaseTest(Surrogate casekey, Stella_Object testexpression)
           
 StandardObject yieldTypeSpecifier()
           
 
Methods inherited from class edu.isi.stella.GeneralizedSymbol
accessGeneralizedSymbolSlotValue, constructSymbolConstantName, cppChangeCase, cppQualifyNameP, cppTranslateClassName, cppTranslateClassTypename, cppTranslateSymbolConstantId, cppTranslateSymbolConstantName, cppYieldNamespacePrefix, createStartupSymbol, deletedP, explicitlyQualifiedNameP, generalizedSymbolLessThanP, helpCppChangeCase, idlChangeCase, idlTranslateClassName, idlTranslateSymbolConstantId, idlTranslateSymbolConstantName, internDerivedSurrogate, internDerivedSymbol, javaChangeCase, javaTranslateClassName, javaTranslateSymbolConstantId, javaTranslateSymbolConstantName, keywordify, registerSymbol, relativeName, shadowedSymbolP, visibleName, yieldSymbolConstantName
 
Methods inherited from class edu.isi.stella.ContextSensitiveObject
homeModule
 
Methods inherited from class edu.isi.stella.StandardObject
arrayTypeSpecifierP, baseTypeToTypeSpec, cantOverwriteActiveCollectionSlot, compatibleParameterTypesP, computeAnchoredTypeSpec, computeRelativeTypeSpec, conformingTypeSpecP, copyWrappedLiteral, cppReferenceTypeP, cppReferencizeType, cppTranslateAndPointerizeTypeSpec, cppTranslateAndReferencizeTypeSpec, cppTranslateTypeSpec, dropSlotValue, extractParameterType, extractRequiredArgumentValues, getSlot, hashCode_, idlTranslateTypeSpec, inverseSlotDemon, javaLiteralP, javaNativeLiteralWrapperNames, javaSpecialSetterName, javaTranslateArrayOfTypeSpec, javaTranslateTypeSpec, javaTranslateTypeSpecForFunction, javaTranslateTypeSpecHelper, javaYieldClassObjectArrayExpression, javaYieldClassObjectExpression, javaYieldFullyQualifiedTypeName, javaYieldTranslatedClassAndMethodNames, listifyTypeSpec, lookupClTypeFromStellaType, objectEqlP, putSlotValue, readSlotValue, runConstructorDemons, runDestructorDemons, runSlotDemons, runSlotGuardDemonsP, standardObjectP, subTypeSpecOfP, twoArgumentLeastCommonSupertype, typeSpecToBaseType, typeSpecToClass, typeToWalkedNullValueTree, validateTypeSpecifier, voidP, walkTypeSpecIsNativeTypeP, writeSlotValue, yieldTypeSpecTree
 
Methods inherited from class edu.isi.stella.Stella_Object
_, accessInContext, amPm, anchoredTypeSpecifierP, andOrNotTreeP, applyCoercionMethod, atomicExpressionP, bindToSurrogateP, booleanP, bootstrapIsaP, bquotify, cast, characterP, clTranslateATree, clTranslateBooleanTest, clTranslatePlainBooleanTest, clTranslateVerbatimBodySymbols, clYieldTypedExpressionTree, coerceATree, coerceEvaluatedTree, coerceMvTree, coerceToBoolean, coerceToModule, coerceToModuleName, coerceToSymbol, coerceToXmlElement, coercibleP, collectFeatureList, collectKeyValueList, commonLispSymbolP, computeExpressionType, cons, consify, consifyListsAndIterators, consP, consTreeMatchP, convertToLiteral, copyConsTree, cppArgumentIsStreamP, cppBinaryOperatorP, cppBlockP, cppMaybeOutputStatementWithParentheses, cppOperatorP, cppOutputAtomicExpression, cppOutputOneActualParameter, cppOutputStatement, cppOutputTypedEntity, cppPrognifyStatement, cppPrognP, cppStatementToList, cppStreamIsStandardOutputP, cpptrans, cppTranslateATree, cppTranslatedArrayTypeP, csValueP, dateDivider, dateTimeDivider, day, dealWithAmPm, dealWithEra, dealWithNoonMidn, decrementReferenceCount, defaultOptionHandler, defineSystem, defmodule, describe, describeObject, describeTersely, destructureMethodNameTree, deUglifyParseTree, either, eqlP, eqlToBooleanP, eqlToCharacterP, eqlToFloatP, eqlToIntegerP, eqlToStringP, equalConsTreesP, equalHashCode, equalP, era, estimatedEvaluationCost, evaluate, evaluateArgumentTree, evaluateAtomicTree, evaluateCommand, expandBquoteTree, filterModuleP, floatP, free, get, getObject, hashlist, hashMemoizedArguments, helpBquotify, helpClTranslateATree, helpCoerceATree, helpLptrans, helpPrintOutline, helpTransformBooleanProceduralExpression, helpWalkATree, hour, idlOutputAtomicExpression, idlOutputStatement, idlTranslateAtomicTree, idlTranslateATree, illegalTreeP, implodePathname, incrementallyTranslate, incrementReferenceCount, inlineUnwrapBoolean, inlineWrapBoolean, inModule, integerP, isaP, javaBinaryOperatorP, javaBlockP, javaEndOfLineTokenP, javaHelpOutputPrintStream, javaMaybeOutputStatementWithParentheses, javaOperatorP, javaOutputStatement, javaPrognP, javaStreamIsStandardOutputP, javaSymbolCaseP, javaTranslateAtomicTree, javaTranslateATree, javaTranslateWithNativeWrapper, jptrans, keywordP, kvCons, legalTokenizerFromStateP, legalTokenizerStateP, legalTokenizerToStateP, literalEqlP, logLevelLE, lptrans, makeFileNameFromRelativePath, makeMemoizedValueEntry, makeMemoizedValueEntryn, matchConsTree, methodSlotP, minute, month, nameToString, nilP, noonMidn, numberWrapperToFloat, objectEqualP, objectHashCode, one, oneI, onlyIf, parametricTypeSpecifierP, parseArrayDimensionsSpec, parseTokenizerCharacterSpec, parseTokenizerStateModifiers, permanentCopy, permanentify, permanentifyForm, po, prettyPrintLiteral, primaryClass, printOutline, printStellaCode, printStellaDefinition, printUndefinedSuperClasses, proceduralExpressionP, ptrans, publicSlots, registerRecycledItem, runOptionHandlerP, safeEqualHashCode, safeHashCode, safePrimaryType, safeYieldTypeSpecifier, searchConsTreeP, searchConsTreeWithFilterP, searchForObject, secondp, sideEffectFreeExpressionP, simplifyBquoteTree, specialp, stella_Increment, stellaClassP, stellaCollectionP, stellaNeedToCompileP, stellaNeedToTranslateP, stellaObjectP, stellify, storageSlotP, stringifyInModule, stringP, substituteConsTree, substituteOnce, surrogateP, sweep, symbolCaseP, symbolP, sysTree, targetLanguageType, taxonomyIsaP, timeDivider, timeMultiply, tokenizerIncludeSpecP, tokenizerToStateAlias, tokenizerToStateName, toString, traceIf, traceKeywordP, transientifyForm, transientObjectP, transientSymbolP, translateWalkedTree, treeSize, treeToTrees, trueOptionP, tryToEvaluate, typeP, typify, unmake, unregisterRecycledItem, updateInContext, valuesTreeP, variableExpressionP, verbatimStringP, verbatimTreeP, vetOptions, vrletExpressionP, walkATree, walkCollectionTree, walkDontCallMeTree, walkedExpressionType, walkExpressionTree, walkMvExpressionTree, walkMvTree, walkStatement, walkTopLevelExpression, walkWithoutTypeTree, warnAboutUnknownSourceType, weekday, withinContext, withinModule, withinWorld, withStellaTokenizer, withSystemDefinition, withTokenizer, wrapperP, wrapWhereTest, xmlAttributeP, xmlCdataFormP, xmlCdataP, xmlDeclarationFormP, xmlDeclarationP, xmlDoctypeFormP, xmlElementFormP, xmlElementP, xmlnsAttributeP, xmlProcessingInstructionFormP, xmlProcessingInstructionP, xmlTagCase, year, yieldCondTest, yieldCondTestOrTests, yieldHardcodedCaseSymbolIdOrIds, yieldInCursorClausesForArgumentList, yieldInCursorClausesForGeneralCollection, yieldInCursorClausesForVector, zone, zoneMinute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

surrogateValue

public Stella_Object surrogateValue
Constructor Detail

Surrogate

public Surrogate()
Method Detail

newSurrogate

public static Surrogate newSurrogate(java.lang.String symbolName)

idlOutputLiteral

public void idlOutputLiteral()
Overrides:
idlOutputLiteral in class Stella_Object

idlTranslateSurrogateId

public static StringWrapper idlTranslateSurrogateId(Surrogate surrogate)

idlTranslateSurrogateName

public static StringWrapper idlTranslateSurrogateName(Surrogate surrogate)

javaOutputLiteral

public void javaOutputLiteral()
Overrides:
javaOutputLiteral in class Stella_Object

javaTranslateDefinedOrNull

public static Cons javaTranslateDefinedOrNull(Surrogate classtype,
                                              Stella_Object renamed_Object,
                                              boolean nullP)

javaTranslateSurrogateId

public static StringWrapper javaTranslateSurrogateId(Surrogate surrogate)

javaTranslateSurrogateName

public static StringWrapper javaTranslateSurrogateName(Surrogate surrogate)

cppOutputLiteral

public void cppOutputLiteral()
Overrides:
cppOutputLiteral in class Stella_Object

cppTranslateDefinedPMethodCall

public static Cons cppTranslateDefinedPMethodCall(Surrogate argumenttype,
                                                  Stella_Object argument,
                                                  boolean nullP)

cppTranslateSurrogateId

public static StringWrapper cppTranslateSurrogateId(Surrogate surrogate)

cppTranslateSurrogateName

public static StringWrapper cppTranslateSurrogateName(Surrogate surrogate)

cppTranslateAtomicTree

public Cons cppTranslateAtomicTree()
Overrides:
cppTranslateAtomicTree in class Stella_Object

initializeMemoizationTable

public static void initializeMemoizationTable(Surrogate memotablesurrogate,
                                              java.lang.String options)

yieldStructSlotAccessorName

public static Stella_Object yieldStructSlotAccessorName(Surrogate classtype,
                                                        Symbol slotname)

clTranslateAtomicTree

public Stella_Object clTranslateAtomicTree()
Overrides:
clTranslateAtomicTree in class Stella_Object

moreGeneralNumericType

public static Surrogate moreGeneralNumericType(Surrogate type1,
                                               Surrogate type2)

verifyTypecaseClauseType

public static void verifyTypecaseClauseType(Surrogate testtype,
                                            Surrogate clausetype,
                                            List precedingclausetypes,
                                            Cons clause)

yieldSubtypeOfPCaseTest

public static Cons yieldSubtypeOfPCaseTest(Surrogate casekey,
                                           Stella_Object testexpression)

yieldIsaPCaseTest

public static Cons yieldIsaPCaseTest(Surrogate casekey,
                                     Stella_Object testexpression)

walkAtomicTree

public Stella_Object walkAtomicTree(java.lang.Object[] MV_returnarray)
Overrides:
walkAtomicTree in class Stella_Object

safeSubtypeOfP

public static boolean safeSubtypeOfP(Surrogate subtype,
                                     Surrogate supertype)

verifyType

public static Surrogate verifyType(Surrogate self)

lookupCoersionMethod

public static Stella_Object lookupCoersionMethod(Surrogate sourcetype,
                                                 Surrogate targettype,
                                                 Stella_Object expression)

typeToWrappedType

public Surrogate typeToWrappedType()
Return the wrapped type for the type self, or 'self' if it is not a bare literal type.

Returns:
Surrogate

wrappedTypeToType

public static Surrogate wrappedTypeToType(Surrogate self)
Return the unwrapped type for the wrapped type self, or self if it is not a wrapped type.

Parameters:
self -
Returns:
Surrogate

useVectorStyleIterationP

public static boolean useVectorStyleIterationP(Surrogate collectiontype)

lookupSlotFromOptionKeyword

public static StorageSlot lookupSlotFromOptionKeyword(Surrogate owner,
                                                      Keyword keyword)

genericallyAccessibleTypeP

public static boolean genericallyAccessibleTypeP(Surrogate type)

createRecycleList

public static RecycleList createRecycleList(Surrogate classtype,
                                            int itemsize)

unknownTypeP

public static boolean unknownTypeP(Surrogate type)

typeToNullValueTree

public static Stella_Object typeToNullValueTree(Surrogate type)

setGlobalValue

public static Stella_Object setGlobalValue(Surrogate self,
                                           Stella_Object value)
Set the value of the global variable for the surrogate 'self' to 'value'.

Parameters:
self -
value -
Returns:
Stella_Object

getGlobalValue

public static Stella_Object getGlobalValue(Surrogate self)
Return the (possibly-wrapped) value of the global variable for the surrogate 'self'.

Parameters:
self -
Returns:
Stella_Object

lookupGlobalVariable

public GlobalVariable lookupGlobalVariable()
Return a global variable with name 'self'.

Overrides:
lookupGlobalVariable in class GeneralizedSymbol
Returns:
GlobalVariable

optimisticSubtypeOfP

public static boolean optimisticSubtypeOfP(Surrogate subtype,
                                           Surrogate supertype)

yieldTypeSpecifier

public StandardObject yieldTypeSpecifier()
Overrides:
yieldTypeSpecifier in class Stella_Object

canonicalType

public static Surrogate canonicalType(Surrogate type)

realTypeSpecifier

public static