Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ESC/Java2 © 2003,2004,2005 David Cok and Joseph Kiniry © 2005 UCD Dublin © 2003,2004 Radboud University Nijmegen © 1999,2000 Compaq Computer Corporation © 1997,1998,1999 Digital Equipment Corporation All Rights Reserved
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## escjava.translate
Class Purity

    java.lang.Object
      escjava.translate.Purity

public abstract class Purity
extends java.lang.Object

Field Summary
`(package private) static ASTDecoration` | `translateDecoration` Decorates `VarInit` nodes with purity information.

Constructor Summary
`Purity()`

Method Summary
`static void` | `decorate(VarInit expr)` Decorate `expr` and its subexpressions with purity information.
`static boolean` | `impure(VarInit expr)` Return true iff `expr` or any of its subexpressions mutates the heap or local variables.
`private static void` | `makeImpure(VarInit expr)` Set the decoration indicating the `expr` is impure.
`static boolean` | `pure(VarInit expr)` Return true iff neither `expr` nor any of its subexpressions mutate the heap or local variables.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### translateDecoration

    static ASTDecoration translateDecoration

  Decorates `VarInit` nodes with purity information. Null means a `VarInit` is pure; non-null means it's impure. Also used by `Translate` class to decorate `LocalVarDecl`s marked with "uninitialized" with the declaration of the corresponding boolean that keeps track of the variable's initialization state.

Constructor Detail

### Purity

    public Purity()

Method Detail

### impure

    public static boolean impure(VarInit expr)

  Return true iff `expr` or any of its subexpressions mutates the heap or local variables. Requires that `expr` or an expression containing it has been decorated by a call to `decorate`.

### pure

    public static boolean pure(VarInit expr)

  Return true iff neither `expr` nor any of its subexpressions mutate the heap or local variables. Requires that `expr` or an expression containing it has been decorated by a call to `decorate`.

### makeImpure

    private static void makeImpure(VarInit expr)

  Set the decoration indicating the `expr` is impure.

### decorate

    public static void decorate(VarInit expr)

  Decorate `expr` and its subexpressions with purity information.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ESC/Java2 © 2003,2004,2005 David Cok and Joseph Kiniry © 2005 UCD Dublin © 2003,2004 Radboud University Nijmegen © 1999,2000 Compaq Computer Corporation © 1997,1998,1999 Digital Equipment Corporation All Rights Reserved
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

The ESC/Java2 Project Homepage