Class SymbolAliasing

    • Field Detail

      • INFO_KEY

        public static final java.lang.String INFO_KEY
        The key to use for accessing instances of this class within a FixpointInfo instance.
        See Also:
        Constant Field Values
    • Constructor Detail

      • SymbolAliasing

        public SymbolAliasing()
        Builds an empty map of aliases.
    • Method Detail

      • putState

        public SymbolAliasing putState​(Symbol toAlias,
                                       Symbol alias)
        Registers an alias for the given symbol. Any previous aliases will be deleted.
        Parameters:
        toAlias - the symbol being aliased
        alias - the alias for toAlias
        Returns:
        a copy of this domain, with the new alias
      • top

        public SymbolAliasing top()
        Description copied from interface: Lattice
        Yields the top element of this lattice. The returned element should be unique across different calls to this method, since Lattice.isTop() uses reference equality by default. If the value returned by this method is not a singleton, override Lattice.isTop() accordingly to provide a coherent test.
        Returns:
        the top element
      • bottom

        public SymbolAliasing bottom()
        Description copied from interface: Lattice
        Yields the bottom element of this lattice. The returned element should be unique across different calls to this method, since Lattice.isBottom() uses reference equality by default. If the value returned by this method is not a singleton, override Lattice.isBottom() accordingly to provide a coherent test.
        Returns:
        the bottom element
      • mk

        public SymbolAliasing mk​(Aliases lattice,
                                 java.util.Map<Symbol,​Aliases> function)
        Description copied from class: FunctionalLattice
        Builds a instance of this class from the given lattice instance and the given mapping.
        Specified by:
        mk in class FunctionalLattice<SymbolAliasing,​Symbol,​Aliases>
        Parameters:
        lattice - an instance of lattice to be used during semantic operations to retrieve top and bottom values
        function - the function representing the mapping contained in the new environment; can be null
        Returns:
        a new instance of this class
      • alias

        public SymbolAliasing alias​(Symbol toAlias,
                                    Symbol alias)
        Registers an alias for the given symbol. Any previous aliases will be deleted.
        Parameters:
        toAlias - the symbol being aliased
        alias - the alias for toAlias
        Returns:
        a copy of this analysis state, with the new alias