public class RenameTable
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private static class |
RenameTable.EmptyRenameTable |
Modifier and Type | Field and Description |
---|---|
static RenameTable |
EMPTY_TABLE |
private ImmutableMap<QuantifiableVariable,java.lang.Integer> |
localRenamingTable
local map mapping a QuantifiableVariable object to an abstract name.
|
private int |
max
the maximal value of an abstract name
|
private RenameTable |
parent
the parent renaming table
|
Constructor and Description |
---|
RenameTable(RenameTable parent,
ImmutableMap<QuantifiableVariable,java.lang.Integer> localTable,
int newMax) |
Modifier and Type | Method and Description |
---|---|
RenameTable |
assign(QuantifiableVariable n1,
QuantifiableVariable n2)
assigns both QuantifiableVariable objects the same abstract name
|
boolean |
contains(QuantifiableVariable n)
returns true iff the given variable is mapped to an abstract name.
|
boolean |
containsLocally(QuantifiableVariable n)
does nearly the same as
contains(QuantifiableVariable) but performs
the test only on the local table |
private java.lang.Integer |
createNewAbstractName() |
RenameTable |
extend()
creates a nested renaming table with
this
as parent |
RenameTable |
parent() |
boolean |
sameAbstractName(QuantifiableVariable n1,
QuantifiableVariable n2)
tests if both QuantifiableVariables are assigned to the same abstract
name (locally or by the parent)
|
java.lang.String |
toString()
toString
|
public static final RenameTable EMPTY_TABLE
private final ImmutableMap<QuantifiableVariable,java.lang.Integer> localRenamingTable
private final int max
private final RenameTable parent
public RenameTable(RenameTable parent, ImmutableMap<QuantifiableVariable,java.lang.Integer> localTable, int newMax)
public boolean contains(QuantifiableVariable n)
n
- the QuantifiableVariable object the existence of an abstract name is
checked.n
has been already assigned to an
abstract namepublic boolean containsLocally(QuantifiableVariable n)
contains(QuantifiableVariable)
but performs
the test only on the local tablen
- the QuantifiableVariable object the existence of an abstract name is
checked.n
has been already locally
assigned to an abstract namepublic boolean sameAbstractName(QuantifiableVariable n1, QuantifiableVariable n2)
n1
- one of the QuantifiableVariables to be tested iff they have
been assigned the same abstract namen2
- one of the QuantifiableVariables to be testedn1
and n2
are mapped
to the same abstract nameprivate java.lang.Integer createNewAbstractName()
public RenameTable assign(QuantifiableVariable n1, QuantifiableVariable n2)
public RenameTable extend()
this
as parentpublic java.lang.String toString()
toString
in class java.lang.Object
public RenameTable parent()