.. java:import:: fr.inria.tapenade.analysis ActivityPattern SymbolDecl ========== .. java:package:: fr.inria.tapenade.representation :noindex: .. java:type:: public class SymbolDecl A symbol declaration, i.e. and entry in a SymbolTable. Fields ------ accessInfo ^^^^^^^^^^ .. java:field:: public TapList accessInfo :outertype: SymbolDecl Access info on this symbol e.g. "const" etc. className ^^^^^^^^^ .. java:field:: protected String className :outertype: SymbolDecl copySymbolDecl ^^^^^^^^^^^^^^ .. java:field:: protected SymbolDecl copySymbolDecl :outertype: SymbolDecl Temporary: link to the copy of this SymbolDecl. defPositions ^^^^^^^^^^^^ .. java:field:: public TapList defPositions :outertype: SymbolDecl dependsOn ^^^^^^^^^ .. java:field:: public TapList dependsOn :outertype: SymbolDecl The list of symbols defined in the same SymbolTable level, that are used by this symbol declaration, and must therefore be declared before this symbol is declared. hasAllocatableInstruction ^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:field:: public boolean hasAllocatableInstruction :outertype: SymbolDecl importedFrom ^^^^^^^^^^^^ .. java:field:: public TapPair importedFrom :outertype: SymbolDecl When this SymbolDecl was IMPORTed from another SymbolTable, keeps the link to the original SymbolDecl and SymbolTable inheritanceTree ^^^^^^^^^^^^^^^ .. java:field:: protected InheritanceTree inheritanceTree :outertype: SymbolDecl Useful to know what are the different notations leading to the same copy (a tree of this list) isATrueSymbolDecl ^^^^^^^^^^^^^^^^^ .. java:field:: public boolean isATrueSymbolDecl :outertype: SymbolDecl isConsideredRemoved ^^^^^^^^^^^^^^^^^^^ .. java:field:: public boolean isConsideredRemoved :outertype: SymbolDecl Sometimes a SymbolDecl must be replaced with another, but the old SymbolDecl must remain for a while because someone will look for it (see all the "update" functions that replace FOO with FOO_NODIFF). Instead of actually removing the SymbolDecl in a later sweep, we may just mark it as "isConsideredRemoved" to ensure TreeGen will not regenerate a declaration for it. kind ^^^^ .. java:field:: public int kind :outertype: SymbolDecl nameTree ^^^^^^^^ .. java:field:: public Tree nameTree :outertype: SymbolDecl symbol ^^^^^^ .. java:field:: public String symbol :outertype: SymbolDecl toIsActive ^^^^^^^^^^ .. java:field:: protected ToBool toIsActive :outertype: SymbolDecl Wrapper around a boolean so that every copy of the same original symbolDecl shares the same differentiation status. underscoreToFortran ^^^^^^^^^^^^^^^^^^^ .. java:field:: public boolean underscoreToFortran :outertype: SymbolDecl True for C symbol names ending in "_" that represent a Fortran symbol, thus using the old/default convention that does not require the BIND declaration. Constructors ------------ SymbolDecl ^^^^^^^^^^ .. java:constructor:: protected SymbolDecl() :outertype: SymbolDecl SymbolDecl ^^^^^^^^^^ .. java:constructor:: protected SymbolDecl(String name, int kind) :outertype: SymbolDecl SymbolDecl ^^^^^^^^^^ .. java:constructor:: protected SymbolDecl(Tree identTree, int kind) :outertype: SymbolDecl Methods ------- accumulateZones ^^^^^^^^^^^^^^^ .. java:method:: public void accumulateZones(TapList intTree) :outertype: SymbolDecl addExtraInfo ^^^^^^^^^^^^ .. java:method:: public void addExtraInfo(TapList info) :outertype: SymbolDecl addInfosInList ^^^^^^^^^^^^^^ .. java:method:: public static TapList addInfosInList(TapList extraInfo, TapList newInfos, SymbolDecl symbolDecl) :outertype: SymbolDecl addUsedSymbolsInExpr ^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static void addUsedSymbolsInExpr(Tree expression, TapList toUsedSymbols, SymbolTable symbolTable, TapList undeclaredSymbols, boolean top, boolean strict) :outertype: SymbolDecl Finds all symbols used in "expression", that must be declared before "expression", and that are defined in (the current top level of) "symbolTable". When "top" is true, accumulates only symbols found in the top of "symbolTable". Accumulates them in the tail of "toUsedSymbols". :param toUsedSymbols: a hatted list (TapList starting with a null) that accumulates the used symbols :param top: when true, searches VariableDecl's only in the top of "symbolTable". :param strict: true, variable in Common are added to its "UsedSymbols" allocateZones ^^^^^^^^^^^^^ .. java:method:: public void allocateZones(ZoneAllocator zoneAllocator, SymbolTable symbolTable, Unit declarationUnit) :outertype: SymbolDecl Assuming that this SymbolDecl has associated memory, allocate the zones for this memory, and create the corresponding ZoneInfo's. When these zones are already allocated/created, it means this SymbolDecl is a global, and we must tell the enclosing importsSymbolTable to later build a proxy ZoneInfo for it. build ^^^^^ .. java:method:: public static SymbolDecl build(WrapperTypeSpec typeSpec, TapList accessInfo, boolean isPointer, Tree declarator, int flag, SymbolTable symbolTable, Instruction instruction, TapList typeUsedSymbols) :outertype: SymbolDecl buildTypeSpecFromArgs ^^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected static TapList buildTypeSpecFromArgs(SymbolTable symbolTable, Instruction instruction, TapList toTypeUsedSymbols, Tree[] argDecls, ToBool isVariableArgList) :outertype: SymbolDecl collectImportedSiblingsDecls ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static void collectImportedSiblingsDecls(SymbolDecl symbolDecl, TapList>> siblingDecls) :outertype: SymbolDecl collects into siblingDecls (must be a hatted list) for each SymbolDecl's of which the given "symbolDecl" is a same-name copy built by an import (aka USE), the pair of the original SymbolDecl and the SymbolTable it belongs to. collectSiblingDecl ^^^^^^^^^^^^^^^^^^ .. java:method:: public static void collectSiblingDecl(TapList>> siblingDecls, SymbolDecl symbolDecl, SymbolTable symbolTable) :outertype: SymbolDecl Collects into the collection "siblingDecls" the pair of "symbolDecl" and the SymbolTable "symbolDecl" belongs to. :param siblingDecls: the current list of "sibling" declarations collected. It is a hatted list, ans all declarations must concern the same symbol with same name. All found declarations are grouped per owner SymbolTable, rootmost last. :param symbolDecl: The symbolDecl we want to collect into "siblingDecls" :param symbolTable: The SymbolTable that owns "symbolDecl". collectUsedTrees ^^^^^^^^^^^^^^^^ .. java:method:: public void collectUsedTrees(TapList toUsedTrees, TapList toDejaVu) :outertype: SymbolDecl Collects into toUsedTrees all expressions that are needed for the declaration of this SymbolDecl. :param toUsedTrees: TapList of used Tree :param toDejaVu: TapList of TypeSpec copy ^^^^ .. java:method:: protected static SymbolDecl copy(SymbolDecl symbol2copy) :outertype: SymbolDecl copy ^^^^ .. java:method:: protected SymbolDecl copy(TapList> associationsST, UnitStorage associationsUnits) :outertype: SymbolDecl Build a rather shallow copy of this SymbolDecl, suitable for SymbolTable.copy() TypeDecl's are not copied. Remember the copy in this symbolDecl's "copySymbolDecl" field, so as to build a single copy. copyLinksIntoCopy ^^^^^^^^^^^^^^^^^ .. java:method:: protected void copyLinksIntoCopy(SymbolDecl copyDecl, TapList> associationsST) :outertype: SymbolDecl dependsOn ^^^^^^^^^ .. java:method:: public TapList dependsOn() :outertype: SymbolDecl dump ^^^^ .. java:method:: public void dump(int indent) throws java.io.IOException :outertype: SymbolDecl Prints in detail the contents of this SymbolDecl, onto TapEnv.curOutputStream(). :param indent: the amount of indentation to be used for this printing (not used at present). eraseDiffSymbolHolder ^^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected void eraseDiffSymbolHolder(int diffSort) :outertype: SymbolDecl extraInfo ^^^^^^^^^ .. java:method:: public TapList extraInfo() :outertype: SymbolDecl formalArgRankOrResultZero ^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public int formalArgRankOrResultZero() :outertype: SymbolDecl fromImplicitType ^^^^^^^^^^^^^^^^ .. java:method:: public final TypeSpec fromImplicitType() :outertype: SymbolDecl fromInclude ^^^^^^^^^^^ .. java:method:: protected Instruction fromInclude() :outertype: SymbolDecl getDiffSymbolHolder ^^^^^^^^^^^^^^^^^^^ .. java:method:: public NewSymbolHolder getDiffSymbolHolder(int diffSort, ActivityPattern pattern, int replica) :outertype: SymbolDecl :return: the NewSymbolHolder that has been stored by setDiffSymbolHolder() as the differentiated symbol of this SymbolDecl for the given diffSort. hasDiffSymbolHolders ^^^^^^^^^^^^^^^^^^^^ .. java:method:: public boolean hasDiffSymbolHolders() :outertype: SymbolDecl hasInstructionWithRootOperator ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public boolean hasInstructionWithRootOperator(int operator, String value) :outertype: SymbolDecl hasInstructionWithRootOperatorAndArrayDeclarator ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public boolean hasInstructionWithRootOperatorAndArrayDeclarator(int operator) :outertype: SymbolDecl hasInterfaceInstruction ^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public boolean hasInterfaceInstruction() :outertype: SymbolDecl hasMainInstruction ^^^^^^^^^^^^^^^^^^ .. java:method:: public boolean hasMainInstruction() :outertype: SymbolDecl hasModifier ^^^^^^^^^^^ .. java:method:: public boolean hasModifier(String modifier) :outertype: SymbolDecl hasOtherCombinableDeclarationPart ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public boolean hasOtherCombinableDeclarationPart() :outertype: SymbolDecl hasOtherInstruction ^^^^^^^^^^^^^^^^^^^ .. java:method:: public boolean hasOtherInstruction() :outertype: SymbolDecl hasPrivateModifier ^^^^^^^^^^^^^^^^^^ .. java:method:: protected boolean hasPrivateModifier(TapList addSymbolDecls) :outertype: SymbolDecl hasProtectedModifier ^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected boolean hasProtectedModifier(TapList addSymbolDecls) :outertype: SymbolDecl hasPublicModifier ^^^^^^^^^^^^^^^^^ .. java:method:: protected boolean hasPublicModifier(TapList addSymbolDecls) :outertype: SymbolDecl isA ^^^ .. java:method:: public boolean isA(int testKind) :outertype: SymbolDecl :return: true when this SymbolDecl is of the given kind "testKind" The kind may be SYMBOL, VARIABLE, FIELD, FUNCTION, TYPE, CONSTANT, FUNCNAME, INTERFACE, CLASS, NAMESPACE. isActive ^^^^^^^^ .. java:method:: public boolean isActive() :outertype: SymbolDecl isActive true means: for this SymbolDecl, there exists a derivative, i.e. another symbolDecl which contains the derivative of this one. isActiveSymbolDecl ^^^^^^^^^^^^^^^^^^ .. java:method:: public boolean isActiveSymbolDecl() :outertype: SymbolDecl isCconst ^^^^^^^^ .. java:method:: public boolean isCconst() :outertype: SymbolDecl isContainedFunctionDeclDeclared ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public boolean isContainedFunctionDeclDeclared(Unit inUnit) :outertype: SymbolDecl isDifferentiableSymbolDecl ^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public boolean isDifferentiableSymbolDecl(int diffKind, boolean diffConstants) :outertype: SymbolDecl isExtern ^^^^^^^^ .. java:method:: public boolean isExtern() :outertype: SymbolDecl isExternal ^^^^^^^^^^ .. java:method:: public boolean isExternal() :outertype: SymbolDecl isExternalDeclared ^^^^^^^^^^^^^^^^^^ .. java:method:: public boolean isExternalDeclared(TapList instructions) :outertype: SymbolDecl isExternalDeclared ^^^^^^^^^^^^^^^^^^ .. java:method:: public boolean isExternalDeclared(Instruction instruction) :outertype: SymbolDecl isIntrinsicDeclared ^^^^^^^^^^^^^^^^^^^ .. java:method:: public boolean isIntrinsicDeclared(TapList instructions) :outertype: SymbolDecl isIntrinsicDeclared ^^^^^^^^^^^^^^^^^^^ .. java:method:: public boolean isIntrinsicDeclared(Instruction instruction) :outertype: SymbolDecl isOptional ^^^^^^^^^^ .. java:method:: public boolean isOptional() :outertype: SymbolDecl isPrivate ^^^^^^^^^ .. java:method:: public boolean isPrivate() :outertype: SymbolDecl isProtected ^^^^^^^^^^^ .. java:method:: public boolean isProtected() :outertype: SymbolDecl isPublic ^^^^^^^^ .. java:method:: public boolean isPublic() :outertype: SymbolDecl isReference ^^^^^^^^^^^ .. java:method:: public boolean isReference() :outertype: SymbolDecl isShared ^^^^^^^^ .. java:method:: public boolean isShared() :outertype: SymbolDecl isSystemPredefined ^^^^^^^^^^^^^^^^^^ .. java:method:: public boolean isSystemPredefined() :outertype: SymbolDecl isTarget ^^^^^^^^ .. java:method:: public boolean isTarget(WrapperTypeSpec modelTypeSpec) :outertype: SymbolDecl :return: true when this SymbolDecl is a target and its type matches the given "modelTypeSpec". isVarDeclared ^^^^^^^^^^^^^ .. java:method:: public boolean isVarDeclared(TapList instructions) :outertype: SymbolDecl kind ^^^^ .. java:method:: public int kind() :outertype: SymbolDecl recomputeDependsOn ^^^^^^^^^^^^^^^^^^ .. java:method:: protected void recomputeDependsOn(SymbolTable symbolTable) :outertype: SymbolDecl replaceDiffSymbolHolder ^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected void replaceDiffSymbolHolder(NewSymbolHolder oldNSH, NewSymbolHolder newNSH) :outertype: SymbolDecl For every NewSymbolHolder that is stored in this SymbolDecl (in provision of the moment when this Symboldecl will receive its finalname), replace it with newNSH if it was oldNSH. This is used when oldNSH is absorbed by newNSH. sameOriginDecl ^^^^^^^^^^^^^^ .. java:method:: public static boolean sameOriginDecl(SymbolDecl decl1, SymbolDecl decl2) :outertype: SymbolDecl setActive ^^^^^^^^^ .. java:method:: public void setActive(boolean act) :outertype: SymbolDecl setActive ^^^^^^^^^ .. java:method:: public void setActive() :outertype: SymbolDecl setCommonInstr ^^^^^^^^^^^^^^ .. java:method:: public void setCommonInstr(boolean val) :outertype: SymbolDecl setCommonWithArrayDeclaratorInstr ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public void setCommonWithArrayDeclaratorInstr(boolean val) :outertype: SymbolDecl setConstantKind ^^^^^^^^^^^^^^^ .. java:method:: public void setConstantKind() :outertype: SymbolDecl setDiffSymbolHolder ^^^^^^^^^^^^^^^^^^^ .. java:method:: public void setDiffSymbolHolder(int diffSort, ActivityPattern pattern, int replica, NewSymbolHolder nSH) :outertype: SymbolDecl Puts the NewSymbolHolder "nSH" as the differentiated symbol of this SymbolDecl, for the given diffSort and for the given ActivityPattern and for the given replica number. This is the default implementation, that uses only "diffSort", not "pattern" not "replica". "diffSort" is here because there may be different coexisting derivative symbols for a given original symbol, for example F_FWD, F_BWD, F_B for a given function F. "pattern" is used only for FunctionDecl's. "replica" is used only for VariableDecl's. setExternalInstr ^^^^^^^^^^^^^^^^ .. java:method:: public void setExternalInstr(boolean val) :outertype: SymbolDecl setExtraInfo ^^^^^^^^^^^^ .. java:method:: public void setExtraInfo(TapList info) :outertype: SymbolDecl setFromImplicitType ^^^^^^^^^^^^^^^^^^^ .. java:method:: public final void setFromImplicitType(TypeSpec implicitType) :outertype: SymbolDecl setFromInclude ^^^^^^^^^^^^^^ .. java:method:: protected void setFromInclude(Instruction fromInc) :outertype: SymbolDecl setInstruction ^^^^^^^^^^^^^^ .. java:method:: public void setInstruction(Instruction instr) :outertype: SymbolDecl Declare that this SymbolDecl already has an existing declaration, made by Instruction "instr" that is located in the given "code". :param instr: The Instruction that contains the existing declaration of SymbolDecl. setInstruction ^^^^^^^^^^^^^^ .. java:method:: public void setInstruction(SymbolDecl model) :outertype: SymbolDecl setInterfaceInstr ^^^^^^^^^^^^^^^^^ .. java:method:: public void setInterfaceInstr(boolean val) :outertype: SymbolDecl setMainDeclInstr ^^^^^^^^^^^^^^^^ .. java:method:: public void setMainDeclInstr(boolean val) :outertype: SymbolDecl setNoneInstruction ^^^^^^^^^^^^^^^^^^ .. java:method:: public void setNoneInstruction() :outertype: SymbolDecl setNullInstruction ^^^^^^^^^^^^^^^^^^ .. java:method:: public void setNullInstruction() :outertype: SymbolDecl setNullInstructionIfNone ^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected void setNullInstructionIfNone() :outertype: SymbolDecl setReference ^^^^^^^^^^^^ .. java:method:: public void setReference() :outertype: SymbolDecl setShared ^^^^^^^^^ .. java:method:: public void setShared() :outertype: SymbolDecl setSystemPredefined ^^^^^^^^^^^^^^^^^^^ .. java:method:: public void setSystemPredefined() :outertype: SymbolDecl setZones ^^^^^^^^ .. java:method:: public void setZones(TapList intTree) :outertype: SymbolDecl shareActivity ^^^^^^^^^^^^^ .. java:method:: public void shareActivity(SymbolDecl model) :outertype: SymbolDecl shareActivity ^^^^^^^^^^^^^ .. java:method:: public void shareActivity(ToBool sharedActivity) :outertype: SymbolDecl toString ^^^^^^^^ .. java:method:: @Override public String toString() :outertype: SymbolDecl type ^^^^ .. java:method:: public WrapperTypeSpec type() :outertype: SymbolDecl zones ^^^^^ .. java:method:: public TapList zones() :outertype: SymbolDecl