TapEnv¶
-
public final class
TapEnv
¶ Environment containing parameters useful during Tapenade analysis.
Fields¶
FORTRAN¶
-
public static final int
FORTRAN
¶ The “language” of files written in FORTRAN (77 or 90 or up).
FORTRAN2003¶
-
public static final int
FORTRAN2003
¶ The “language” of files written in FORTRAN2003 or up.
MAC_CPP_COMMAND¶
MAX_DIFF_SORTS¶
-
public static final int
MAX_DIFF_SORTS
¶ The max number of differemtiation “sorts”, Currently 5 is enough, for e.g. functions F_FWD, F_BWD, F_B, F_D, or for variables vd, vb, (alternative)vb0…
STD_CPP_COMMAND¶
bootstrapCss¶
-
public static final String
bootstrapCss
¶ tapenade -html with https://getbootstrap.com/ style sheet.
Methods¶
activeMark¶
adActivityAnalyzer¶
-
public static final ADActivityAnalyzer
adActivityAnalyzer
()¶
adTbrAnalyzer¶
-
public static final ADTBRAnalyzer
adTbrAnalyzer
()¶
addMessageAnnotation¶
addMixedLanguageInfos¶
-
public static final void
addMixedLanguageInfos
(MixedLanguageInfos infos)¶
closeOutputStream¶
-
public static final void
closeOutputStream
()¶ Close the current OutputStream that was used for all Strings printed and all messages emitted through this TapEnv.
commandWarning¶
commentStart¶
curOutputStream¶
-
public static final OutputStream
curOutputStream
()¶
currentIncludeInstruction¶
-
public static final Instruction
currentIncludeInstruction
()¶
currentTranslationUnitSymbolTable¶
-
public static final SymbolTable
currentTranslationUnitSymbolTable
()¶
debugAdMode¶
-
public static final int
debugAdMode
()¶ Debug mode of differentiated programs.
- Returns
debug mode.
depsAnalyzer¶
-
public static final DepsAnalyzer
depsAnalyzer
()¶
diffLivenessAnalyzer¶
-
public static final DiffLivenessAnalyzer
diffLivenessAnalyzer
()¶
differentiateIncludeName¶
disambigNewName¶
dumpBoolMatrixOnTrace¶
-
public static final void
dumpBoolMatrixOnTrace
(BoolMatrix boolMatrix, int[] rowMap, int[] colMap)¶ Prints a dump of a BoolMatrix on the traceOutputStream, knowing its row and column Maps.
dumpBoolVector¶
-
public static final void
dumpBoolVector
(BoolVector boolVector, int[] map, String mapName)¶ Prints in detail the contents of “boolVector”, using the given map, onto this.curOutputStream.
dumpObject¶
dumpOnTrace¶
dumpSymbolTableIfNew¶
-
protected static final void
dumpSymbolTableIfNew
(SymbolTable symbolTable, int indent)¶
enclosingIncludeIsEmptyOr¶
extendReplica¶
extendStringWithSuffix¶
fileError¶
fileWarning¶
fileWarning¶
filterIncludeFileName¶
get¶
-
public static TapEnvForThread
get
()¶
getAllMessages¶
-
public static final TapList<PositionAndMessage>
getAllMessages
(CallGraph origCallGraph, CallGraph diffCallGraph, TapList<Unit> transformedUnits, boolean showMessagesOfAllUnits)¶ - Returns
the list of all messages (of type PositionAndMessage) that have been emitted about the given “origCallGraph” and also possibly about its differentiated “diffCallGraph”.
getExtension¶
getNewPushPopNumber¶
-
public static final int
getNewPushPopNumber
()¶ - Returns
a new free number to identify matching PUSH/POP’s.
getSeenSymbolTableShortName¶
-
public static final String
getSeenSymbolTableShortName
(SymbolTable symbolTable)¶ Retrieves the short name of a SymbolTable that has already been printed.
- Returns
null if not already printed.
getSetDiffIncludeInfo¶
inOutAnalyzer¶
-
public static final InOutAnalyzer
inOutAnalyzer
()¶
inStdCIncludeFile¶
-
public static final boolean
inStdCIncludeFile
()¶ - Returns
True if we are inside a C standard include file.
indent¶
-
public static final void
indent
(int indent)¶ Prints “indent” white spaces onto this TapEnv’s current OutputStream.
indentOnTrace¶
-
public static final void
indentOnTrace
(int amount)¶ Prints indentation on the traceOutputStream.
indentPrint¶
indentPrintln¶
indentprintOnTrace¶
indentprintlnOnTrace¶
indentprintlnOnTrace¶
-
public static final void
indentprintlnOnTrace
()¶ Same as printlnOnTrace(), but indents first.
initializeSourceMessageCorrespondence¶
-
public static final void
initializeSourceMessageCorrespondence
()¶ Reset counters for source-message correspondence.
inputLanguage¶
-
public static final int
inputLanguage
()¶ - Returns
the given input language of the current source code.
isC¶
-
public static final boolean
isC
(int language)¶ - Parameters
language – integer value.
- Returns
true when the given language family is C (C, Cuda, C++…).
isCPlusPlus¶
-
public static final boolean
isCPlusPlus
(int language)¶ - Parameters
language – integer value.
- Returns
true when the given language C++.
isDistribVersion¶
-
public static final boolean
isDistribVersion
()¶ - Returns
true when this is a distribution version.
isFortran¶
-
public static final boolean
isFortran
(int language)¶ - Parameters
language – integer value.
- Returns
true when the given language is Fortran.
isFortran2003¶
-
public static final boolean
isFortran2003
(int language)¶ - Parameters
language – integer value.
- Returns
true when the given language is Fortran 2003 or higher.
isFortran9x¶
-
public static final boolean
isFortran9x
(int language)¶ - Parameters
language – integer value.
- Returns
true when the given language is Fortran 90 or higher.
isServlet¶
-
public static boolean
isServlet
()¶ A marker to distinguish “servlet” Tapenade from standard “command-line” Tapenade.
- Returns
true if Tapenade is used as a web server, else false.
isStdCInclude¶
-
public static final boolean
isStdCInclude
(Instruction curInclude)¶
languageName¶
mixedLanguageInfos¶
-
public static final TapList<MixedLanguageInfos>
mixedLanguageInfos
()¶ - Returns
a TapList (Language1 Language2 byReference_or_byResult bind_info_list).
multithreadAnalyzer¶
-
public static final MultithreadAnalyzer
multithreadAnalyzer
()¶
outputExtension¶
outputLanguage¶
-
public static final int
outputLanguage
()¶ - Returns
the wanted output language of the resulting code.
parserError¶
parserFileSeparator¶
pointerAnalyzer¶
-
public static final PointerAnalyzer
pointerAnalyzer
()¶
popOutputStream¶
-
public static final void
popOutputStream
()¶ Pop back to the previous current OutputStream for all Strings printed and all messages emitted through this TapEnv.
print¶
-
public static final void
print
(String str)¶ Prints String “str” onto this TapEnv’s current OutputStream, i.e. either the top of the stack of pushed OutputStream’s, or System.out. Used in printOnTrace, printOnDump, dump methods.
- Parameters
str – String to print.
- Throws
java.io.IOException – if an output error is detected.
printOnDump¶
printOnTrace¶
-
public static final void
printOnTrace
(int level, String str)¶ When the “level” of the given message “str” is under trace threshold (traceLevel), prints “str” then newline, on the traceOutputStream.
- Parameters
level – this message level e.g. 5:topmost, 10:one phase, 15:one phase on one Unit…
str – the message to print (must not be null)
printOnTrace¶
println¶
-
public static final void
println
(String str)¶ println to avoid system dependent “string\n” or string concatenation “string” + “\n”.
- Throws
java.io.IOException – if an output error is detected.
printlnMappedBoolVector¶
-
public static final void
printlnMappedBoolVector
(String text, BoolVector boolVector, int[] map, String mapName)¶ Prints in detail the contents of data-flow info “boolVector” onto this.curOutputStream, prefixed with the given description “text” and a description “mapName” of its map “map”.
printlnMappedBoolVectorWithDiffPtr¶
-
public static final void
printlnMappedBoolVectorWithDiffPtr
(String text, TapPair<BoolVector, BoolVector> boolVectorPair, int[] map, String mapName, int[] ptrMap, String ptrMapName)¶ Prints in detail the contents of data-flow info “boolVectorPair” onto this.curOutputStream, prefixed with the given description “text”. We assume boolVectorPair is a pair of data-flow info, first part on standard zones following “map”, second part on pointer zones following ptrMap. The second part is needed e.g in diffLiveness or TBR analyses, and stands for differentiated pointers.
printlnMappedBoolVectorWithDiffPtr¶
-
public static final void
printlnMappedBoolVectorWithDiffPtr
(String text, BoolVector boolVector, int[] map, String mapName, BoolVector ptrBoolVector, int[] ptrMap, String ptrMapName)¶ Same as printlnMappedBoolVectorWithDiffPtr(TapPair,…), but the two BoolVectors are passed individually
printlnOnTrace¶
-
public static final void
printlnOnTrace
(int level, String str)¶ When the “level” of the given message “str” is under trace threshold (traceLevel), prints “str” on the traceOutputStream.
- Parameters
level – this message level e.g. 5:topmost, 10:one phase, 15:one phase on one Unit…
str – the message to print (must not be null)
printlnOnTrace¶
pushOutputStream¶
-
public static final void
pushOutputStream
(OutputStream newOutputStream)¶ Push the given “newOutputStream” as the new current OutputStream for all Strings printed and all messages emitted through this TapEnv.
reqExplicitAnalyzer¶
-
public static final ReqExplicit
reqExplicitAnalyzer
()¶
reqXMark¶
resetIncludeManager¶
-
public static final void
resetIncludeManager
()¶ Say that we are no longer in an include file.
resetPushPopNumber¶
-
public static final void
resetPushPopNumber
()¶ reset to zero the next number to identify matching PUSH/POP’s.
resetSeenSymbolTables¶
-
public static final void
resetSeenSymbolTables
()¶ Resets the mechanism that ensures that a SymbolTable is printed only once.
sameFinalIncludeFile¶
sameLanguageFamily¶
-
public static final boolean
sameLanguageFamily
(int lang1, int lang2)¶ - Parameters
lang1 – integer.
lang2 – integer.
- Returns
true when lang1 and lang2 are Fortran, or when lang1 and lang2 are C (or C++).
saveAllMessagesAsHTML¶
saveAllMessagesAsText¶
-
public static final void
saveAllMessagesAsText
(TapList<PositionAndMessage> msgs, String msgFileName)¶ Save all messages as a text file named “msgFileName”.
setADActivityAnalyzer¶
-
public static final void
setADActivityAnalyzer
(ADActivityAnalyzer analyzer)¶
setADTBRAnalyzer¶
-
public static final void
setADTBRAnalyzer
(ADTBRAnalyzer analyzer)¶
setActiveMark¶
setCurOutputStream¶
-
public static final void
setCurOutputStream
(OutputStream outStream)¶
setCurrentDirectory¶
setCurrentIncludeInstruction¶
-
public static final void
setCurrentIncludeInstruction
(Instruction instruction)¶
setCurrentTranslationUnitSymbolTable¶
-
public static final void
setCurrentTranslationUnitSymbolTable
(SymbolTable symbolTable)¶
setDebugAdMode¶
-
public static final void
setDebugAdMode
(int value)¶ Set debug mode of differentiated program.
- Parameters
value – debug mode.
setDepsAnalyzer¶
-
public static final void
setDepsAnalyzer
(DepsAnalyzer analyzer)¶
setDiffLivenessAnalyzer¶
-
public static final void
setDiffLivenessAnalyzer
(DiffLivenessAnalyzer analyzer)¶
setDistribVersion¶
-
public static void
setDistribVersion
(boolean value)¶ Initialize isDistribVersion.
- Parameters
value – true for distribution.
setInIncludeFile¶
setInOutAnalyzer¶
-
public static final void
setInOutAnalyzer
(InOutAnalyzer analyzer)¶
setMixedLanguageInfos¶
-
public static final void
setMixedLanguageInfos
(TapList<MixedLanguageInfos> infos)¶
setModeNoDiff¶
-
public static final void
setModeNoDiff
()¶ Set current differentiation mode to “PREPROCESS_NODE”.
setMsgLevel¶
-
public static final void
setMsgLevel
(int level)¶ Maximum inverse severity of shown messages. Messages with inverse severity above “msgLevel” are not shown.
setMultithreadAnalyzer¶
-
public static final void
setMultithreadAnalyzer
(MultithreadAnalyzer analyzer)¶
setParserFileSeparator¶
setPointerAnalyzer¶
-
public static final void
setPointerAnalyzer
(PointerAnalyzer analyzer)¶
setRelatedLanguage¶
-
public static final void
setRelatedLanguage
(SymbolTable symbolTable)¶
setReqExplicitAnalyzer¶
-
public static final void
setReqExplicitAnalyzer
(ReqExplicit analyzer)¶
setReqXMark¶
setSourceCodeCorrespondence¶
setSpareDiffReinitializations¶
-
public static final void
setSpareDiffReinitializations
(boolean value)¶
setTapenadeHome¶
setTraceLevel¶
-
public static final void
setTraceLevel
(int level)¶ Maximum trace detail level. Traces and Milestones with a detail level above “traceLevel” are not shown.
str3¶
systemError¶
systemWarning¶
toolError¶
toolWarning¶
-
public static final void
toolWarning
(int inverseSeverity, String message)¶ Message that indicates a problem with Tapenade implementation, but Tapenade will try to go on. e.g. “Unexpected operator” or “not yet implemented”.
- Parameters
inverseSeverity – Indicates problem severity, from 0 (very serious) up (less and less serious). May also be -1, in which case the message is always shown.