daikon
Class VarInfoAux

Object
  extended by VarInfoAux
All Implemented Interfaces:
Serializable, Cloneable

public final class VarInfoAux
extends Object
implements Cloneable, Serializable

Represents additional information about a VarInfo that frontends tell Daikon. For example, whether order matters in a collection. This is immutable and interned.

See Also:
Serialized Form

Field Summary
static Logger debug
          General debug tracer.
static String FALSE
           
static String HAS_DUPLICATES
          Whether repeated elements can exist in this collection.
static String HAS_NULL
          Whether null has a special meaning for this variable or its members.
static String HAS_ORDER
          Whether order matters.
static String HAS_SIZE
          Whether taking the size of this matters.
static String IS_PARAM
          Whether this variable is a parameter to a method, or derived from a parameter to a method.
static String IS_STRUCT
          Whether this variable is an inline structure or a reference to a structure (class).
static String NO_PACKAGE_NAME
           
static String NULL_TERMINATING
          Whether the elements in this collection are all the meaningful elements, or whether there is a null at the end of this collection that ends the collection.
static String PACKAGE_NAME
          Java-specific.
static String TRUE
           
 
Method Summary
 VarInfoAux clone()
          Creates and returns a copy of this.
 boolean equals(Object o)
           
 boolean equals(VarInfoAux o)
           
static VarInfoAux getDefault()
          Create a new VarInfoAux with default options.
 boolean getFlag(String key)
           
 String getValue(String key)
          Returns the value for the given key.
 int hashCode()
           
 boolean isParam()
          Returns whether or not this is a parameter
static VarInfoAux parse(String inString)
          Return an interned VarInfoAux that represents a given string.
 VarInfoAux setValue(String key, String value)
          Return a new VarInfoAux with the desired value set.
 String toString()
           
 
Methods inherited from class Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

debug

public static final Logger debug
General debug tracer.


NULL_TERMINATING

public static final String NULL_TERMINATING
Whether the elements in this collection are all the meaningful elements, or whether there is a null at the end of this collection that ends the collection.

See Also:
Constant Field Values

IS_PARAM

public static final String IS_PARAM
Whether this variable is a parameter to a method, or derived from a parameter to a method. By default, if p is a parameter, then some EXIT invariants related to p aren't printed. Frontends are responsible for setting if p is a parameter and if p.a is a parameter. In Java, p.a is not a parameter, whereas in IOA, it is.

See Also:
Constant Field Values

HAS_DUPLICATES

public static final String HAS_DUPLICATES
Whether repeated elements can exist in this collection.

See Also:
Constant Field Values

HAS_ORDER

public static final String HAS_ORDER
Whether order matters.

See Also:
Constant Field Values

HAS_SIZE

public static final String HAS_SIZE
Whether taking the size of this matters.

See Also:
Constant Field Values

PACKAGE_NAME

public static final String PACKAGE_NAME
Java-specific. The package name of the class that declares this variable, if the variable is a field. If it's not a field of some class, the value of this key is "no_package_name_string".

See Also:
Constant Field Values

NO_PACKAGE_NAME

public static final String NO_PACKAGE_NAME
See Also:
Constant Field Values

HAS_NULL

public static final String HAS_NULL
Whether null has a special meaning for this variable or its members.

See Also:
Constant Field Values

TRUE

public static final String TRUE
See Also:
Constant Field Values

FALSE

public static final String FALSE
See Also:
Constant Field Values

IS_STRUCT

public static final String IS_STRUCT
Whether this variable is an inline structure or a reference to a structure (class). By default it is a reference. If it is an inlined structure (or array), it doesn't make sense to look for invariants over its hashcode. Front ends include references to inlined structures as variables because some tools that follow daikon need other information about the variable.

See Also:
Constant Field Values
Method Detail

parse

public static VarInfoAux parse(String inString)
                        throws IOException
Return an interned VarInfoAux that represents a given string. Elements are separated by commas, in the form:
  • x = a, "a key" = "a value"
    Parse allow for quoted elements. White space to the left and right of keys and values do not matter, but inbetween does.

    Throws:
    IOException

  • getDefault

    public static VarInfoAux getDefault()
    Create a new VarInfoAux with default options.


    clone

    public VarInfoAux clone()
                     throws CloneNotSupportedException
    Creates and returns a copy of this.

    Overrides:
    clone in class Object
    Throws:
    CloneNotSupportedException

    toString

    public String toString()
    Overrides:
    toString in class Object

    hashCode

    public int hashCode()
    Overrides:
    hashCode in class Object

    equals

    public boolean equals(Object o)
    Overrides:
    equals in class Object

    equals

    public boolean equals(VarInfoAux o)

    getValue

    public String getValue(String key)
    Returns the value for the given key.


    getFlag

    public boolean getFlag(String key)

    isParam

    public boolean isParam()
    Returns whether or not this is a parameter


    setValue

    public VarInfoAux setValue(String key,
                               String value)
    Return a new VarInfoAux with the desired value set. Does not modify this.