kodkod.engine.fol2sat
Class TranslationLog

java.lang.Object
  extended by kodkod.engine.fol2sat.TranslationLog

public abstract class TranslationLog
extends java.lang.Object

A log of the translations of the descendants of a given formula that are either formulas or that desugar to formulas.

Author:
Emina Torlak
invariant:
all r: records | r.node in formula.*children
specfield:
formula: Formula
bounds: Bounds
records: set TranslationRecord

Method Summary
abstract  Formula formula()
          Returns this.formula.
 java.util.Iterator<TranslationRecord> replay()
          Returns an iterator over all translation records in this log.
abstract  java.util.Iterator<TranslationRecord> replay(RecordFilter filter)
          Returns an iterator over the translation records in this log that are accepted by the given filter.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

formula

public abstract Formula formula()
Returns this.formula.

Returns:
this.formula

replay

public abstract java.util.Iterator<TranslationRecord> replay(RecordFilter filter)
Returns an iterator over the translation records in this log that are accepted by the given filter. The iterator returns the records in the order in which they were generated. This guarantees that records for the descendents of a node are always returned before the record for the node itself.

Note:The record objects returned by the iterator are not required to be immutable. In particular, the state of a record object returned by next() is guaranteed to remain the same only until the subsequent call to next().

Returns:
an iterator over the translation records in this log that contain the given literals

replay

public final java.util.Iterator<TranslationRecord> replay()
Returns an iterator over all translation records in this log. The iterator returns the records in the order in which they were generated. This guarantees that records for the descendents of a node are always returned before the record for the node itself. The effect of this method is the same as calling replay(RecordFilter.ALL).

Note:The record objects returned by the iterator are not required to be immutable. In particular, the state of a record object returned by next() is guaranteed to remain the same only until the subsequent call to next().

Returns:
an iterator over all translation records in this.log.
See Also:
replay(RecordFilter)