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 // 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 TernaryInvariant(PptSlice ppt) { 017 super(ppt); 018 } 019 020 protected @Prototype TernaryInvariant() { 021 super(); 022 } 023 024 // Check if swap occurred and call one of the other methods 025 @Override 026 protected Invariant resurrect_done(int[] permutation) { 027 assert permutation.length == 3; 028 // assert ArraysPlume.fn_is_permutation(permutation); 029 throw new Error("to implement"); 030 } 031 032 public abstract InvariantStatus add( 033 @Interned Object val1, 034 @Interned Object val2, 035 @Interned Object val3, 036 int mod_index, 037 int count); 038 039 public abstract InvariantStatus check( 040 @Interned Object val1, 041 @Interned Object val2, 042 @Interned Object val3, 043 int mod_index, 044 int count); 045}