001    package daikon.inv.ternary;
002    
003    import daikon.PptSlice;
004    import daikon.inv.Invariant;
005    import daikon.inv.InvariantStatus;
006    
007    /**
008     * Exists simply to provide a more intelligent resusurrect_done method.
009     **/
010    public abstract class TernaryInvariant
011      extends Invariant
012    {
013      // We are Serializable, so we specify a version to allow changes to
014      // method signatures without breaking serialization.  If you add or
015      // remove fields, you should change this number to the current date.
016      static final long serialVersionUID = 20020122L;
017    
018      /** Pass-through. */
019      protected TernaryInvariant(/*@Dependent(result=Nullable.class, when=Prototype.class)*/ PptSlice ppt) {
020        super(ppt);
021      }
022    
023      // Check if swap occurred and call one of the other methods
024      protected Invariant resurrect_done(int[] permutation) {
025        assert permutation.length == 3;
026        // assert ArraysMDE.fn_is_permutation(permutation);
027        throw new Error("to implement");
028      }
029    
030      public abstract InvariantStatus add(Object val1, Object val2, Object val3, int mod_index, int count);
031    
032      public abstract InvariantStatus check(Object val1, Object val2, Object val3, int mod_index, int count);
033    
034    }