Cache

class Cache
class Object
trait Matchable
class Any

Value members

Concrete methods

def assume(value: Value, expr: Tree, cacheResult: Boolean)(fun: => Value): () ?=> Value

Copy the value of (value, expr) from the last cache to the current cache

Copy the value of (value, expr) from the last cache to the current cache

It assumes the value is Hot if it doesn't exist in the last cache.

It updates the current caches if the values change.

The two caches are required because we want to make sure in a new iteration, an expression is evaluated once.

def backup(): Cache

Backup the state of the cache

Backup the state of the cache

All the shared data structures must be immutable.

def get(value: Value, expr: Tree): Option[Value]
def getObject(ref: Ref): Objekt

Prepare for checking next class

Prepare for checking next class

  1. Reset changed flag.

  2. Commit current cache to stable cache if not changed.

  3. Update stable heap if not changed.

  4. Reset last cache.

Prepare cache for the next iteration

Prepare cache for the next iteration

  1. Reset changed flag.

  2. Use current cache as last cache and set current cache to be empty.

  3. Revert heap to stable.

def restore(cache: Cache): Unit

Restore state from a backup

Restore state from a backup

def updateObject(ref: Ref, obj: Objekt): Unit