001package daikon.inv.unary;
002
003import daikon.PptSlice;
004import daikon.inv.Invariant;
005import daikon.inv.InvariantStatus;
006import org.checkerframework.checker.interning.qual.Interned;
007import typequals.prototype.qual.Prototype;
008
009/** Exists simply to provide the do-nothing resusurrect_done method and abstract add method. */
010public abstract class UnaryInvariant extends Invariant {
011  // We are Serializable, so we specify a version to allow changes to
012  // method signatures without breaking serialization.  If you add or
013  // remove fields, you should change this number to the current date.
014  static final long serialVersionUID = 20020122L;
015
016  protected UnaryInvariant(PptSlice ppt) {
017    super(ppt);
018  }
019
020  protected @Prototype UnaryInvariant() {
021    super();
022  }
023
024  /**
025   * Returns this.
026   *
027   * @return this
028   */
029  @Override
030  protected Invariant resurrect_done(int[] permutation) {
031    assert permutation.length == 1;
032    assert permutation[0] == 0;
033    return this;
034  }
035
036  public abstract InvariantStatus add(@Interned Object val, int mod_index, int count);
037
038  public abstract InvariantStatus check(@Interned Object val1, int mod_index, int count);
039}