001package daikon.inv.ternary;
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 a more intelligent {@link #resurrect_done} method. */
010public abstract class TernaryInvariant extends Invariant {
011  static final long serialVersionUID = 20020122L;
012
013  protected TernaryInvariant(PptSlice ppt) {
014    super(ppt);
015  }
016
017  protected @Prototype TernaryInvariant() {
018    super();
019  }
020
021  // Check if swap occurred and call one of the other methods
022  @Override
023  protected Invariant resurrect_done(int[] permutation) {
024    assert permutation.length == 3;
025    // assert ArraysPlume.fn_is_permutation(permutation);
026    throw new Error("to implement");
027  }
028
029  public abstract InvariantStatus add(
030      @Interned Object val1,
031      @Interned Object val2,
032      @Interned Object val3,
033      int mod_index,
034      int count);
035
036  public abstract InvariantStatus check(
037      @Interned Object val1,
038      @Interned Object val2,
039      @Interned Object val3,
040      int mod_index,
041      int count);
042}