.. java:import:: fr.inria.tapenade.utils BoolVector .. java:import:: fr.inria.tapenade.utils ILLang .. java:import:: fr.inria.tapenade.utils Int2ZoneInfo .. java:import:: fr.inria.tapenade.utils TapIntList .. java:import:: fr.inria.tapenade.utils TapPair .. java:import:: fr.inria.tapenade.utils TapTriplet .. java:import:: fr.inria.tapenade.utils ToBool .. java:import:: fr.inria.tapenade.utils ToObject .. java:import:: fr.inria.tapenade.utils Tree .. java:import:: java.util NoSuchElementException .. java:import:: java.util StringTokenizer TapList ======= .. java:package:: fr.inria.tapenade.representation :noindex: .. java:type:: public final class TapList implements Iterable List of Objects, simply chained forward. Fields ------ head ^^^^ .. java:field:: public T head :outertype: TapList The head Object in this list. tail ^^^^ .. java:field:: public TapList tail :outertype: TapList The tail of this list. Constructors ------------ TapList ^^^^^^^ .. java:constructor:: public TapList() :outertype: TapList Creates a new list cell and initializes it to null. TapList ^^^^^^^ .. java:constructor:: public TapList(T head, TapList tail) :outertype: TapList Creates a new list cell with given "head" and "tail". Methods ------- addAll ^^^^^^ .. java:method:: public static TapList addAll(TapList list1, TapList list2) :outertype: TapList :return: a new TapList containing all elements of "list1" or "list2". addIntoLeaves ^^^^^^^^^^^^^ .. java:method:: public static void addIntoLeaves(TapList zonesTree, TapIntList newInts) :outertype: TapList Adds all integers in TapIntList "newInts" into each TapIntList leaf of the TapList tree "zonesTree". addLast ^^^^^^^ .. java:method:: public static TapList addLast(TapList list, T object) :outertype: TapList :return: the list made of the given "list" plus the "object" at the end. Modifies the original "list" when non-null. addUnlessPresent ^^^^^^^^^^^^^^^^ .. java:method:: public static TapList addUnlessPresent(TapList list, T obj) :outertype: TapList addUnlessPresentEquals ^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected static TapList addUnlessPresentEquals(TapList list, T obj) :outertype: TapList allSingletonLeaves ^^^^^^^^^^^^^^^^^^ .. java:method:: public static boolean allSingletonLeaves(TapList tree) :outertype: TapList :return: true when all the (TapIntList) leaves are singletons. Takes care of infinite cycles in the tree. append ^^^^^^ .. java:method:: public static TapList append(TapList list1, TapList list2) :outertype: TapList :return: a new TapList, concatenation of "list1" followed by "list2". Caution: the result shares structure with "list2". assq ^^^^ .. java:method:: public static TapPair assq(KEYTYPE key, TapList> list) :outertype: TapList Return the element matching "key" in the association list "list". Comparison is done with == . :param list: The association list, assumed to be a list of TapPair. :return: null if no matching association is found. assq ^^^^ .. java:method:: public static Int2ZoneInfo assq(int key, TapList list) :outertype: TapList :param list: The association list, assumed to be a list of Int2ZoneInfo. :return: null if no matching association is found. Comparison is done with == . assqOne ^^^^^^^ .. java:method:: public static TapPair assqOne(int key, TapList> list) :outertype: TapList :param list: The association list, assumed to be a list of TapPair, with first elements being TapIntList :return: null if no matching association is found. Comparison is done with == . assqString ^^^^^^^^^^ .. java:method:: public static TapPair assqString(String string, TapList> list) :outertype: TapList Same as assq, but looks for "string" with String.equals(). assqStringInTriplet ^^^^^^^^^^^^^^^^^^^ .. java:method:: public static TapTriplet assqStringInTriplet(String string, TapList> list) :outertype: TapList Same as assqString, but the association list is made of TapTriplet. assqTree ^^^^^^^^ .. java:method:: public static TapPair assqTree(Tree tree, TapList> list) :outertype: TapList cassq ^^^^^ .. java:method:: public static VALUETYPE cassq(KEYTYPE key, TapList> list) :outertype: TapList Return the value in the element matching "key" in the association list "list". Comparison is done with == . :param list: The association list, assumed to be a list of TapPair :return: null if no matching association is found. cassq ^^^^^ .. java:method:: public static ZoneInfo cassq(int key, TapList list) :outertype: TapList :param list: The association list, assumed to be a list of Int2ZoneInfo. :return: null if no matching association is found. Comparison is done with == . cassqString ^^^^^^^^^^^ .. java:method:: public static T cassqString(String string, TapList> list) :outertype: TapList Same as cassq, but looks for "string" with String.equals(). cleanExtraInfoValue ^^^^^^^^^^^^^^^^^^^ .. java:method:: public static TapList cleanExtraInfoValue(TapList extraInfo, String lcValue) :outertype: TapList Removes the given "lcValue" from the given list of "extraInfo". To be made cleaner and less specific. contains ^^^^^^^^ .. java:method:: public static boolean contains(TapList list, T obj) :outertype: TapList :return: true if "obj" is found in the given list Comparison is done with ==. containsEquals ^^^^^^^^^^^^^^ .. java:method:: public static boolean containsEquals(TapList list, T obj) :outertype: TapList :return: true if "obj" is found in the given list Comparison is done with equals(). containsEqualsObjectPair ^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static boolean containsEqualsObjectPair(TapList> list, Unit first, String second) :outertype: TapList containsObjectPair ^^^^^^^^^^^^^^^^^^ .. java:method:: protected static boolean containsObjectPair(TapList> list, T first, U second) :outertype: TapList :return: true if an TapPair containing the given first and second is found in the given list. containsOneOfStrings ^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static boolean containsOneOfStrings(TapList list, String[] searched, boolean caseSensitive) :outertype: TapList :param caseSensitive: when true, the string equality is case sensitive. :return: true if "list" contains one String that is in "searched". containsSameNameSymbolDecl ^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static boolean containsSameNameSymbolDecl(TapList list, SymbolDecl symbolDecl) :outertype: TapList :return: true if the given list contains a SymbolDecl with the same name as for the given "symbolDecl". containsString ^^^^^^^^^^^^^^ .. java:method:: public static boolean containsString(TapList list, String str, boolean caseSensitive) :outertype: TapList :param caseSensitive: when true, the string equality is case sensitive. :return: true if the string "str" is found in "list". containsTree ^^^^^^^^^^^^ .. java:method:: public static boolean containsTree(TapList list, Tree tree) :outertype: TapList :return: true if the given list contains the given "tree". Comparison is done with ILUtils.eqOrDisjointRef and not Tree.equals(). TODO: does not work well with pointers ! containsTreeEquals ^^^^^^^^^^^^^^^^^^ .. java:method:: public static boolean containsTreeEquals(TapList list, Tree tree) :outertype: TapList :return: true if the given "tree" is found in the given list. Comparison is done with t1.equalsTree(t2). containsVariableDecl ^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static boolean containsVariableDecl(TapList list, VariableDecl varDecl) :outertype: TapList :return: true if the given "varDecl" is found in the given list. Comparison is done with VariableDecl.equalsOther(). copy ^^^^ .. java:method:: public static TapList copy(TapList list) :outertype: TapList :return: a copy of the given list. copyTree ^^^^^^^^ .. java:method:: public static TapList copyTree(TapList model) :outertype: TapList :return: a deep copy of this TapList, which must be a tree of TapIntList's, Boolean's, or ToBool's . Takes care of infinite trees that come from variables of recursive type. copyTreeNoPointed ^^^^^^^^^^^^^^^^^ .. java:method:: public static TapList copyTreeNoPointed(TapList model) :outertype: TapList :return: a deep copy of this TapList, which must be a tree of TapIntList's, Boolean's, or ToBool's . Shares (i.e. does not copy) the leaves of the tree. Does not copy pointer destination part. Therefore there is no risk of infinite looping. cumulOr ^^^^^^^ .. java:method:: public static BoolVector cumulOr(TapList tree) :outertype: TapList OR-accumulates all leaves of tree, which are BoolVector's, into a single BoolVector and returns it. Does not go inside pointers, therefore there is no risk of infinite looping. cumulWithOper ^^^^^^^^^^^^^ .. java:method:: public static TapList cumulWithOper(TapList target, Object added, int oper) :outertype: TapList Recursively accumulates tree "added" into tree "target", using operation "oper". :return: the resulting tree, which in general is the new contents of "target". Takes care of cycles in the trees. The leaves of the tree may be all Boolean's or all BoolVector's or all TapIntList's. The result will maybe share structure with the original "target", but will never share structure with "added". In other words, the parts of "added" which appear in the result will be deep copies. dagSize ^^^^^^^ .. java:method:: public int dagSize(TapList dejaVu) :outertype: TapList delete ^^^^^^ .. java:method:: public static TapList delete(T delElem, TapList list) :outertype: TapList :return: a TapList containing all elements of "list" that are not == to "delElem". Caution: the result shares structure with "list". deleteAll ^^^^^^^^^ .. java:method:: public static TapList deleteAll(TapList delList, TapList list) :outertype: TapList :return: a TapList containing all elements of "list" that are not in "delList". Caution: the result shares structure with "list". deleteContainsString ^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static TapList deleteContainsString(String delElem, TapList list) :outertype: TapList :return: a TapList containing all elements of "list" that are a String containing "delElem". Caution: the result shares structure with "list". deleteNth ^^^^^^^^^ .. java:method:: public static TapList deleteNth(TapList list, int n) :outertype: TapList :return: a copy of "list" with the n-th element deleted Elements are counted from 0 up. Caution: the result shares structure with "list". deleteString ^^^^^^^^^^^^ .. java:method:: public static TapList deleteString(String delElem, TapList list) :outertype: TapList :return: a TapList containing all elements of "list" that are not String.equals() to "delElem". Caution: the result shares structure with "list". dump ^^^^ .. java:method:: public void dump() throws java.io.IOException :outertype: TapList Prints the contents of this TapList onto TapEnv.curOutputStream(). equalsImportedModules ^^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected static boolean equalsImportedModules(TapList l1, TapList l2) :outertype: TapList findExtraInfos ^^^^^^^^^^^^^^ .. java:method:: public TapList> findExtraInfos(Unit unit) :outertype: TapList findNamedSymbolDecl ^^^^^^^^^^^^^^^^^^^ .. java:method:: public static SymbolDecl findNamedSymbolDecl(TapList list, String name) :outertype: TapList :return: null if no element is found. Comparison is done with String.equals(). findTypeSpec ^^^^^^^^^^^^ .. java:method:: public static WrapperTypeSpec findTypeSpec(TapList list, WrapperTypeSpec typeSpec) :outertype: TapList :return: null if no element is found. Comparison is done with WrapperTypeSpec.equalLiterally. fromObjectArray ^^^^^^^^^^^^^^^ .. java:method:: public static TapList fromObjectArray(T[] array) :outertype: TapList Convert an array of Object to a TapList. getSetFieldLocation ^^^^^^^^^^^^^^^^^^^ .. java:method:: public static TapList getSetFieldLocation(TapList infoTree, Tree accessTree, boolean createIfAbsent) :outertype: TapList :return: (or creates and returns) the sub-tree of the given tree "infoTree" which is accessed through the given "accessTree" (e.g. %x[3]%toto). When "createIfAbsent" is true, this function never returns null ! When "createIfAbsent" is false, doesn't modify "infoTree" and may return null if nothing found. This function assumes that it is given a non-null "infoTree" ! CONVENTION [Jan 2008] on the placement of pointer destination info: REMAIN IN SYNC with CONVENTION in DataFlowAnalyzer.includePointedElementsInTreeRec(). intersectTreeEquals ^^^^^^^^^^^^^^^^^^^ .. java:method:: public static boolean intersectTreeEquals(TapList list1, TapList list2) :outertype: TapList iterator ^^^^^^^^ .. java:method:: @Override public java.util.Iterator iterator() :outertype: TapList TapList implements Iterable. last ^^^^ .. java:method:: public static T last(TapList list) :outertype: TapList :return: the last element of the given list. length ^^^^^^ .. java:method:: public static int length(TapList list) :outertype: TapList :return: the length of given list. Returns 0 if list is null. lengthWithCycle ^^^^^^^^^^^^^^^ .. java:method:: public static int lengthWithCycle(TapList list) :outertype: TapList Same as length, but stops on a cycle. :return: the length of given list. negateBooleans ^^^^^^^^^^^^^^ .. java:method:: public static void negateBooleans(TapList tree) :outertype: TapList Modifies inside the given tree, which is a TapList tree of Booleans, replacing all Boolean leaves with their negation. newR ^^^^ .. java:method:: public void newR(T object) :outertype: TapList Adds element "object" at the end of this list. nreverse ^^^^^^^^ .. java:method:: public static TapList nreverse(TapList list) :outertype: TapList Physically reverses the given "list" and returns it. nth ^^^ .. java:method:: public static Object nth(TapList list, int rank) :outertype: TapList :return: the rank'th element in "list". When rank=0, this returns the first element. oneFalse ^^^^^^^^ .. java:method:: public static boolean oneFalse(TapList boolsTree) :outertype: TapList oneNonSingleton ^^^^^^^^^^^^^^^ .. java:method:: public static boolean oneNonSingleton(TapList boolsTree) :outertype: TapList :return: true if at least one leaf of the given "boolsTree" is a TapIntList with more than one element. Takes care of infinite cycles in the tree. boolsTree must be a TapList tree of TapIntList's. oneTrue ^^^^^^^ .. java:method:: public static boolean oneTrue(TapList boolsTree) :outertype: TapList :return: true if at least one leaf of the given "boolsTree" is true. Takes care of infinite cycles in the tree. boolsTree must be a TapList tree of Boolean's. oneTrueInHead ^^^^^^^^^^^^^ .. java:method:: public static boolean oneTrueInHead(TapList boolsTree) :outertype: TapList :return: true if at least one leaf in the HEAD of the given TapList of Boolean's "boolsTree" is true. parseIdentifier ^^^^^^^^^^^^^^^ .. java:method:: public static TapList parseIdentifier(String ident) :outertype: TapList Parses an identifier String of the form \ ``toto.x.z``\ or \ ``toto%x%z``\ into a list of Strings \ ``("toto" "x" "y")``\ . To handle pointers, parsing of \ ``toto**.y``\ returns \ ``("toto" "*" "*" "y")``\ , representing (C-style) \ ``(*toto)->y``\ . placdl ^^^^^^ .. java:method:: public TapList placdl(T obj) :outertype: TapList Replaces the tail of this list by a new list cell, whose head is "obj", and whose tail is the previous tail of this list. :return: this new list cell. prependNoDups ^^^^^^^^^^^^^ .. java:method:: public static TapList prependNoDups(TapList newElems, TapList oldList) :outertype: TapList Prepends the elements of "newElems" in front of "oldList", discarding duplicates. @return the resulting list. So far, we don't try to preserve the order of newElems. rank ^^^^ .. java:method:: public int rank(Object obj) :outertype: TapList :return: the rank of the Object "obj" in the current list. Comparison is done with == . First is 0, and "not found" is -1. rankString ^^^^^^^^^^ .. java:method:: public int rankString(String str) :outertype: TapList :return: the rank of the string "str" in the current list. Comparison is done with String.equals(). First is 0, and "not found" is -1. rassq ^^^^^ .. java:method:: public static TapPair rassq(VALUETYPE value, TapList> list) :outertype: TapList Return the first element containing "value" in the association list "list". Comparison is done with == . :param list: The association list, assumed to be a list of TapPair :return: null if no matching association is found. rassqString ^^^^^^^^^^^ .. java:method:: public static TapPair rassqString(String string, TapList> list) :outertype: TapList Same as rassq, but looks for "string" with String.equals(). removeLast ^^^^^^^^^^ .. java:method:: public static TapList removeLast(TapList list) :outertype: TapList Removes the last element of the given "list". removeNonWritableZones ^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static void removeNonWritableZones(TapList tree) :outertype: TapList Remove zones Null, UnknownDests and IO (generally 0, 1, and 2) in all TapIntLists in tree replace ^^^^^^^ .. java:method:: public static void replace(TapList list, T from, T to) :outertype: TapList Replaces all occurences of "from" into "to" in "list". replaceExtraInfoValue ^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static void replaceExtraInfoValue(TapList extraInfo, String lcValue, String lcValue2) :outertype: TapList replaceIntsWithValueInts ^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static void replaceIntsWithValueInts(TapList zonesTree, int[] values, int offset) :outertype: TapList Sweeps through the given (TapList tree of TapIntList) "zonesTree", replacing each integer by the value at this rank (plus offset) in the given array "values". reverse ^^^^^^^ .. java:method:: public static TapList reverse(TapList list) :outertype: TapList :return: a reversed copy of the given "list". safeDelete ^^^^^^^^^^ .. java:method:: public static TapList safeDelete(T delElem, TapList list) :outertype: TapList Variant of delete() that does not modify the given list. Still, the resulting list shares a part with "list". sameTree ^^^^^^^^ .. java:method:: public static boolean sameTree(TapList tree1, TapList tree2) :outertype: TapList :return: true if the two TapList-trees are the same, even if not ==. setAll ^^^^^^ .. java:method:: public void setAll(boolean value) :outertype: TapList Sets all Boolean leaves to the given value. Assumes this is a TapList tree of Boolean Skips pointer derefs. split ^^^^^ .. java:method:: public static TapList[] split(TapList list, TapIntList listRank) :outertype: TapList coupe la liste en 2n+1 sous-listes n longueur de la liste des positions de coupure suppose que listRank est une liste ordonnee croissante des positions retourne un tableau de 2n+1 Object les indices impairs du tableau correspondent aux contenus reperes par listRank. toLast ^^^^^^ .. java:method:: public static TapList toLast(TapList list) :outertype: TapList :return: the last cell of the given list, i.e. the one that contains its last element. toString ^^^^^^^^ .. java:method:: @Override public String toString() :outertype: TapList toString ^^^^^^^^ .. java:method:: public String toString(Object info) :outertype: TapList trueForAll ^^^^^^^^^^ .. java:method:: public static boolean trueForAll(TapList boolsTree) :outertype: TapList Utility for RefDescriptor ignoreXXX mechanism. Not very general yet. union ^^^^^ .. java:method:: public static TapList union(TapList list1, TapList list2) :outertype: TapList :return: the set union of "list1" and "list2". "list1" is assumed to be already a set (no duplicates). Apart for removed duplicate elements, the result preserves the order of "list1" followed by "list2". unionString ^^^^^^^^^^^ .. java:method:: public static TapList unionString(TapList list1, TapList list2) :outertype: TapList Same as "union()", but equality test is on Strings. unique ^^^^^^ .. java:method:: public static TapList unique(TapList list) :outertype: TapList :return: a copy of "list" with duplicated elements removed.