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