001    // ***** This file is automatically generated from FunctionBinary.java.jpp
002    // ***** (and files it recursively includes).
003    
004    package daikon.inv.ternary.threeScalar;
005    
006    import daikon.*;
007    import daikon.inv.*;
008    import daikon.inv.binary.twoScalar.*;
009    import daikon.inv.unary.scalar.*;
010    import daikon.derive.unary.*;
011    import daikon.suppress.*;
012    import plume.*;
013    import java.lang.reflect.*;
014    import java.util.*;
015    import java.util.logging.Logger;
016    
017    /**
018     * Base class for each of the FunctionBinary functions and permutatons.
019     * Most of the work is done here.  The subclasses basically define the
020     * function and return information describing the function and permutation
021     * to these methods
022     */
023    public abstract class FunctionBinary extends ThreeScalar {
024      // We are Serializable, so we specify a version to allow changes to
025      // method signatures without breaking serialization.  If you add or
026      // remove fields, you should change this number to the current date.
027      static final long serialVersionUID = 20031030L;
028    
029      /**
030       * Boolean. True if FunctionBinary invariants should be considered.
031       **/
032      public static boolean dkconfig_enabled = false;
033    
034      public static Logger debug
035        = Logger.getLogger("daikon.inv.ternary.threeScalar.#CLASSNAME");
036    
037      static final int[][] var_indices;
038      static {
039        var_indices = new int[7][];
040        var_indices[1] = new int[] { 0, 1, 2 };
041        var_indices[2] = new int[] { 1, 0, 2 };
042        var_indices[3] = new int[] { 2, 0, 1 };
043        var_indices[4] = new int[] { 0, 2, 1 };
044        var_indices[5] = new int[] { 1, 2, 0 };
045        var_indices[6] = new int[] { 2, 1, 0 };
046      }
047    
048      protected FunctionBinary (PptSlice ppt) {
049        super (ppt);
050      }
051    
052      protected /*@Prototype*/ FunctionBinary () {
053        super ();
054      }
055    
056      /** returns whether or not this invariant is enabled **/
057      public boolean enabled() {
058        return dkconfig_enabled;
059      }
060    
061      /** FunctionBinary is only valid on isIntegral() types **/
062      public boolean instantiate_ok (VarInfo[] vis) {
063    
064        if (!valid_types (vis))
065          return (false);
066    
067        // Make sure that each variable is integral (not boolean or hashcode)
068        if (!vis[0].file_rep_type.isIntegral()
069            || !vis[1].file_rep_type.isIntegral()
070            || !vis[2].file_rep_type.isIntegral())
071          return (false);
072    
073        return (true);
074      }
075    
076      // check_modified relies on func having no side effects.
077      abstract long func (long arg1, long arg2);
078      abstract boolean is_symmetric();
079      abstract String[] get_method_name();
080      abstract int get_var_order();
081      abstract void set_function_id (int function_id);
082      abstract int get_function_id ();
083    
084      /**
085       * Map from function name (eg, MultiplyLong, MinimumFloat) to an array
086       * of instances (one for each valid permutation) for that function.
087       */
088      private static Map<String,/*@Prototype*/ FunctionBinary[]> functions = new LinkedHashMap<String,/*@Prototype*/ FunctionBinary[]>();
089    
090      /**
091       * A list indexed by function number to an array of instances (one for
092       * each valid permutation) for that function.  The array is the same
093       * one as is stored in the functions Map.  This provides a faster access
094       * mechanism once we have the function id (which are calculated the first
095       * time through).
096       */
097      private static List</*@Prototype*/ FunctionBinary[]> func_list = new ArrayList</*@Prototype*/ FunctionBinary[]>();
098    
099      private static void build_func_list() {
100    
101        // Reflection seems to confuse clover
102        ///CLOVER:OFF
103    
104        // Build the map of functions to array of instances for that function
105        debug.fine ("Processing FunctionBinary");
106        functions = new LinkedHashMap<String,/*@Prototype*/ FunctionBinary[]>();
107        @SuppressWarnings("unchecked")
108        Class</*@Prototype*/ FunctionBinary>[] subclasses = (Class</*@Prototype*/ FunctionBinary>[]) FunctionBinary.class.getDeclaredClasses();
109        for (int ii = 0; ii < subclasses.length; ii++) {
110          Class</*@Prototype*/ FunctionBinary> subc = subclasses[ii];
111          String function = subc.getName();
112          if (function.indexOf ("CLOVER") >= 0)
113            continue;
114          function = function.replaceFirst (".*FunctionBinary\\$", "");
115          function = function.replaceFirst ("_.*", "");
116          if (function.equals ("SubClass"))
117            continue;
118          /*@Prototype*/ FunctionBinary[] fb_arr = functions.get (function);
119          if (fb_arr == null) {
120            fb_arr = new /*@Prototype*/ FunctionBinary[7];
121            functions.put (function, fb_arr);
122            func_list.add (fb_arr);
123          }
124          int func_id = func_list.indexOf (fb_arr);
125          @SuppressWarnings({"nonprototype"})
126          /*@Prototype*/ FunctionBinary fb = null;
127          try {
128            Constructor</*@Prototype*/ FunctionBinary> con = subc.getDeclaredConstructor (new Class<?>[] {});
129            fb = con.newInstance (new Object[] {});
130          }  catch (Exception e) {
131            throw new Error (" can't create instance for " + subc.getName()
132                            + ": '" + e + "' ii = " + ii);
133          }
134          assert fb_arr[fb.get_var_order()] == null;
135          fb_arr[fb.get_var_order()] = fb;
136          fb.set_function_id (func_id);
137          debug.fine ("Adding " + function + " " + fb.getClass().getName()
138                      + " " + fb.get_var_order() + " " + fb.get_function_id());
139        }
140        ///CLOVER:ON
141      }
142    
143      /**
144       * Returns a list of all of the FunctionBinary prototype invariants
145       */
146      public static List</*@Prototype*/ Invariant> get_proto_all() {
147    
148        List</*@Prototype*/ Invariant> result = new ArrayList</*@Prototype*/ Invariant>();
149    
150        // If this is the first call
151        if (functions.isEmpty()) {
152          build_func_list();
153        }
154    
155        // Get the proto invariant for all of the subclasses and return them
156        for (/*@Prototype*/ FunctionBinary[] fb_arr : func_list) {
157          for (int jj = 1; jj < fb_arr.length; jj++) {
158            /*@Prototype*/ FunctionBinary fb = fb_arr[jj];
159            if (fb != null) {
160              result.add (fb);
161            }
162          }
163        }
164        return (result);
165      }
166    
167      /** Permuted result var. */
168      public VarInfo resultVar() {
169        return ppt.var_infos[var_indices[get_var_order()][0]];
170      }
171    
172      /** Permuted arg1 var. */
173      public VarInfo argVar1() {
174        return ppt.var_infos[var_indices[get_var_order()][1]];
175      }
176    
177      /** Permuted arg2 var. */
178      public VarInfo argVar2() {
179        return ppt.var_infos[var_indices[get_var_order()][2]];
180      }
181    
182      /**
183       * Apply the specified sample to the function, returning the result
184       * The caller is responsible for permuting the arguments.
185       */
186      public InvariantStatus check_ordered (long result, long arg1,
187                                          long arg2, int count) {
188        // This implementation relies on func having no side effects.
189        try {
190          if (!((result) == ( func (arg1, arg2))))
191            return InvariantStatus.FALSIFIED;
192        } catch (Exception e) {
193            return InvariantStatus.FALSIFIED;
194        }
195        return InvariantStatus.NO_CHANGE;
196      }
197    
198      /**
199       * Apply the specified sample to the function, returning the result
200       * The caller is responsible for permuting the arguments.
201       */
202      public InvariantStatus add_ordered (long result, long arg1,
203                                          long arg2, int count) {
204        return check_ordered(result, arg1, arg2, count);
205      }
206    
207      /**
208       * Reorganize our already-seen state as if the variables had shifted
209       * order underneath us (re-arrangement given by the permutation).
210       * We accomplish this by returning the class that corresponds to the
211       * the new permutation.
212       */
213      protected Invariant resurrect_done (int[] permutation) {
214    
215        assert permutation.length == 3;
216        assert ArraysMDE.fn_is_permutation(permutation);
217    
218        int[] new_order = new int[3];
219        int[] old_order = var_indices[get_var_order()];
220    
221        // "permutation" is a permutation on the var_info array. old_order
222        // was the permutation that took the formatted invariant to the
223        // var_info array, so old_order^-1 is the permutation from the
224        // var_info array to the old formatted invariant. We want to find
225        // a new_order so that when we first do "permutation", then
226        // apply the new permutation from the var_info array to the
227        // formatted invariant, we get the same formatted invariant.
228        // What we want, then. is:
229        //    new_order^-1 o permutation = old_order^-1
230        // rearranging, this is equivalent to
231        //    new_order = permutation o old_order
232        new_order[0] = permutation[old_order[0]];
233        new_order[1] = permutation[old_order[1]];
234        new_order[2] = permutation[old_order[2]];
235    
236        // Force symmetric functions into a canonical form so that
237        // we can match them when necessary and they always print the same.
238        // For example, order of 0, 1, 2 and 0, 2, 1 represent the same
239        // invariant for a symmetric function.  This forces them to always
240        // be represented as 0, 1, 2
241        if (is_symmetric ()) {
242          if (new_order[2] < new_order[1]) {
243            int tmp = new_order[2];
244            new_order[2] = new_order[1];
245            new_order[1] = tmp;
246          }
247        }
248    
249        // Look for the new order in the list of possible orders
250        int var_order = -1;
251        for (int i=0; i < var_indices.length; i++) {
252          if (Arrays.equals(new_order, var_indices[i])) {
253            var_order = i;
254            break;
255          }
256        }
257        assert var_order != -1;
258    
259        // If the var order hasn't changed, we don't need to do anything
260        if (var_order == get_var_order())
261          return (this);
262    
263        // Find the class that corresponds to the new order
264        if (functions.isEmpty())
265          build_func_list();
266        int func_id = get_function_id();
267        /*@Prototype*/ FunctionBinary[] fb_arr = func_list.get (func_id);
268        assert fb_arr != null;
269        for (int ii = 0; ii < fb_arr.length; ii++)
270          if ((fb_arr[ii] != null) && (fb_arr[ii].get_var_order() == var_order))
271            return (fb_arr[ii].instantiate_dyn (ppt));
272    
273        throw new Error ("Could not find new ordering");
274      }
275    
276      public String repr() {
277        return format();
278      }
279    
280      public String format_using(OutputFormat format) {
281        if (format == OutputFormat.SIMPLIFY) {
282          return format_simplify();
283        }
284    
285        int var_order = get_var_order();
286        String[] methodname = get_method_name();
287    
288        VarInfo argresultvi = ppt.var_infos[var_indices[var_order][0]];
289        VarInfo arg1vi = ppt.var_infos[var_indices[var_order][1]];
290        VarInfo arg2vi = ppt.var_infos[var_indices[var_order][2]];
291    
292        String argresult_name = argresultvi.name_using(format);
293        String arg1_name = arg1vi.name_using(format);
294        String arg2_name = arg2vi.name_using(format);
295    
296        if (format == OutputFormat.DAIKON) {
297          return argresult_name + " == (" + methodname[0] + arg1_name
298            + methodname[1] + arg2_name + methodname[2] + ")";
299        }
300    
301        if (format.isJavaFamily()) {
302          if (methodname[1].equals(" || ") || methodname[1].equals(" && ")) {
303            return "(" +  argresult_name + " != 0) == ((" + methodname[0] + arg1_name + " != 0)"
304              + methodname[1] + "(" + arg2_name + methodname[2] + " != 0))";
305          } else {
306            return argresult_name + " == (" + methodname[0] + arg1_name
307              + methodname[1] + arg2_name + methodname[2] + ")";
308          }
309        }
310    
311        return format_unimplemented(format);
312      }
313    
314      public String format_simplify() {
315        int var_order = get_var_order();
316        String[] methodname = get_method_name();
317        VarInfo[] vis = ppt.var_infos;
318    
319        String result = vis[var_indices[var_order][0]].simplifyFixedupName();
320        String arg1 =   vis[var_indices[var_order][1]].simplifyFixedupName();
321        String arg2 =   vis[var_indices[var_order][2]].simplifyFixedupName();
322        String func = null;
323        if (methodname[1].equals(" * ")) {
324          func = "*";
325        } else if (methodname[1].equals(" | ")) {
326          func = "|java-bitwise-or|";
327        } else if (methodname[1].equals(" || ")) {
328          func = "|java-logical-or|";
329        } else if (methodname[1].equals(", ")) {
330          if (methodname[0].equals("java.lang.Math.min("))
331            func = "min";
332          else if (methodname[0].equals("java.lang.Math.max("))
333            func = "max";
334          else if (methodname[0].equals("plume.MathMDE.gcd("))
335            func = "gcd";
336          else if (methodname[0].equals("java.lang.Math.pow("))
337            func = "pow";
338          else if (methodname[0].equals("plume.MathMDE.logicalXor("))
339            func = "|java-logical-xor|";
340        } else {
341          assert methodname[0].equals("");
342          assert methodname[2].equals("");
343          func = "|java-" + methodname[1].trim() + "|";
344        }
345        if (func == null)
346          return "format_simplify() doesn't know function " + methodname[0] + "-" +
347            methodname[1] + "-" + methodname[2];
348        return "(EQ " + result + " (" + func + " " + arg1 + " " + arg2 + "))";
349      }
350    
351      // If our classes match, we must match
352      public boolean isSameFormula(Invariant other) {
353        return true;
354      }
355      public double computeConfidence() {
356        if (logOn()) {
357          VarInfo v1 = ppt.var_infos[0];
358          VarInfo v2 = ppt.var_infos[1];
359          VarInfo v3 = ppt.var_infos[2];
360          log("computeConfidence(" + format()
361             + ": num_values = " + ppt.num_values()
362             + ", num_values(" + v1.name() + ")=" + ppt.parent.num_values(v1)
363             + ", num_values(" + v2.name() + ")=" + ppt.parent.num_values(v2)
364             + ", num_values(" + v3.name() + ")=" + ppt.parent.num_values(v3));
365        }
366        return Invariant.conf_is_ge(ppt.num_values(), 5);
367      }
368    
369      /**
370       * If the arg is a sequence size, return the sequence; otherwise return null.
371       **/
372      private /*@Nullable*/ VarInfo sized_sequence(VarInfo size) {
373        if (size.derived instanceof SequenceLength) {
374          return ((SequenceLength)size.derived).base;
375        }
376        return null;
377      }
378    
379      public /*@Nullable*/ DiscardInfo isObviousDynamically(VarInfo[] vis) {
380    
381        DiscardInfo super_result = super.isObviousDynamically(vis);
382        if (super_result != null) {
383          return super_result;
384        }
385    
386        // Discard if any two of the three variables are the sizes of the
387        // same arrays.
388        VarInfo arr1 = sized_sequence(vis[0]);
389        VarInfo arr2 = sized_sequence(vis[1]);
390        VarInfo arr3 = sized_sequence(vis[2]);
391        if (((arr1 != null) && (arr1 == arr2))
392            || ((arr1 != null) && (arr1 == arr3))
393            || ((arr2 != null) && (arr2 == arr3))) {
394          return new DiscardInfo(this, DiscardCode.obvious,
395                        "two are sizes of same array:  "
396                        + vis[0].name() + " "
397                        + vis[1].name() + " "
398                        + vis[2].name());
399        }
400    
401        return null;
402      }
403    
404      // default is that it is not this function, overriden in the subclass
405      public boolean isMultiply () {
406        return (false);
407      }
408    
409    /**
410     * Represents the invariant <samp>x = Multiply (y, z)</samp>
411     * over three long scalars.
412     */
413    public static class MultiplyLong_xyz extends FunctionBinary {
414      // We are Serializable, so we specify a version to allow changes to
415      // method signatures without breaking serialization.  If you add or
416      // remove fields, you should change this number to the current date.
417      static final long serialVersionUID = 20031030L;
418    
419      private static /*@Prototype*/ MultiplyLong_xyz proto;
420    
421      /** Returns the prototype invariant for MultiplyLong_xyz **/
422      public static /*@Prototype*/ MultiplyLong_xyz get_proto() {
423        if (proto == null)
424          proto = new /*@Prototype*/ MultiplyLong_xyz ();
425        return (proto);
426      }
427    
428      /** instantiate an invariant on the specified slice **/
429      protected MultiplyLong_xyz instantiate_dyn (PptSlice slice) /*@Prototype*/ {
430        return new MultiplyLong_xyz (slice);
431      }
432    
433      private MultiplyLong_xyz (PptSlice slice) {
434        super (slice);
435      }
436    
437      public MultiplyLong_xyz () /*@Prototype*/ {
438        super ();
439      }
440    
441      private static String[] method_name = new String[] {"", " * ", ""};
442    
443      public String[] get_method_name () {
444        return (method_name);
445      }
446    
447      private static int function_id = -1;
448    
449      public int get_function_id() {
450        return (function_id);
451      }
452    
453      public void set_function_id (int function_id) {
454        assert MultiplyLong_xyz.function_id == -1;
455        MultiplyLong_xyz.function_id = function_id;
456      }
457    
458      private static int var_order = 1;
459    
460      public int get_var_order() {
461        return var_order;
462      }
463    
464      public boolean is_symmetric() {
465    
466          return (true);
467      }
468    
469      public long func (long y, long z) {
470    
471        return (y * z);
472      }
473    
474      public InvariantStatus check_modified(long x, long y,
475                                          long z, int count) {
476        return (check_ordered (x, y, z, count));
477      }
478    
479      public InvariantStatus add_modified(long x, long y,
480                                          long z, int count) {
481        if (Debug.logDetail())
482          log (Fmt.spf ("result=%s, arg1=%s, arg2=%s", "" + x, "" + y,
483                        "" + z));
484        return (add_ordered (x, y, z, count));
485      }
486    
487      public boolean isMultiply() {
488        return (true);
489      }
490    
491        public boolean isExact() { return true; }
492    
493      /**
494       * Returns a list of non-instantiating suppressions for this invariant.
495       */
496      public /*@Nullable*/ NISuppressionSet get_ni_suppressions() {
497        if (NIS.dkconfig_enabled && dkconfig_enabled)
498          return (suppressions);
499        else
500          return (null);
501      }
502    
503      /** definition of this invariant (the suppressee) **/
504      private static NISuppressee suppressee
505                        = new NISuppressee (MultiplyLong_xyz.class, 3);
506    
507      // suppressor definitions (used below)
508      private static NISuppressor result_eq_arg1
509        = new NISuppressor (0, 1, IntEqual.class);
510      private static NISuppressor result_eq_arg2
511        = new NISuppressor (0, 2, IntEqual.class);
512      private static NISuppressor arg1_eq_arg2
513        = new NISuppressor (1, 2, IntEqual.class);
514    
515      private static NISuppressor result_lt_arg1
516        = new NISuppressor (0, 1, IntLessThan.class);
517      private static NISuppressor result_lt_arg2
518        = new NISuppressor (0, 2, IntLessThan.class);
519      private static NISuppressor arg1_lt_arg2
520        = new NISuppressor (1, 2, IntLessThan.class);
521      private static NISuppressor arg2_lt_arg1
522        = new NISuppressor (2, 1, IntLessThan.class);
523    
524      private static NISuppressor result_le_arg1
525        = new NISuppressor (0, 1, IntLessEqual.class);
526      private static NISuppressor result_le_arg2
527        = new NISuppressor (0, 2, IntLessEqual.class);
528      private static NISuppressor arg1_le_arg2
529        = new NISuppressor (1, 2, IntLessEqual.class);
530      private static NISuppressor arg2_le_arg1
531        = new NISuppressor (2, 1, IntLessEqual.class);
532    
533      private static NISuppressor result_track0_arg1
534        = new NISuppressor (0, 1, NumericInt.ZeroTrack.class);
535      private static NISuppressor result_track0_arg2
536        = new NISuppressor (0, 2, NumericInt.ZeroTrack.class);
537      private static NISuppressor arg1_track0_arg2
538        = new NISuppressor (1, 2, NumericInt.ZeroTrack.class);
539      private static NISuppressor arg1_track0_result
540        = new NISuppressor (1, 0, NumericInt.ZeroTrack.class);
541      private static NISuppressor arg2_track0_result
542        = new NISuppressor (2, 0, NumericInt.ZeroTrack.class);
543      private static NISuppressor arg2_track0_arg1
544        = new NISuppressor (2, 1, NumericInt.ZeroTrack.class);
545    
546      private static NISuppressor result_eq_1
547        = new NISuppressor(0, RangeInt.EqualOne.class);
548      private static NISuppressor arg1_eq_1
549        = new NISuppressor (1, RangeInt.EqualOne.class);
550      private static NISuppressor arg2_eq_1
551        = new NISuppressor (2, RangeInt.EqualOne.class);
552    
553      private static NISuppressor result_eq_0
554        = new NISuppressor(0,RangeInt.EqualZero.class);
555      private static NISuppressor arg1_eq_0
556        = new NISuppressor (1, RangeInt.EqualZero.class);
557      private static NISuppressor arg2_eq_0
558        = new NISuppressor (2, RangeInt.EqualZero.class);
559    
560      private static NISuppressor result_ne_0
561        = new NISuppressor (0, NonZero.class);
562      private static NISuppressor arg1_ne_0
563        = new NISuppressor (1, NonZero.class);
564      private static NISuppressor arg2_ne_0
565        = new NISuppressor (2, NonZero.class);
566    
567      private static NISuppressor result_ge_0
568        = new NISuppressor (0, RangeInt.GreaterEqualZero.class);
569      private static NISuppressor arg1_ge_0
570        = new NISuppressor (1, RangeInt.GreaterEqualZero.class);
571      private static NISuppressor arg2_ge_0
572        = new NISuppressor (2, RangeInt.GreaterEqualZero.class);
573    
574      private static NISuppressor result_ge_64
575        = new NISuppressor (0, RangeInt.GreaterEqual64.class);
576      private static NISuppressor arg1_ge_64
577        = new NISuppressor (1, RangeInt.GreaterEqual64.class);
578      private static NISuppressor arg2_ge_64
579        = new NISuppressor (2, RangeInt.GreaterEqual64.class);
580    
581      private static NISuppressor result_boolean
582        = new NISuppressor(0,RangeInt.BooleanVal.class);
583      private static NISuppressor arg1_boolean
584        = new NISuppressor (1, RangeInt.BooleanVal.class);
585      private static NISuppressor arg2_boolean
586        = new NISuppressor (2, RangeInt.BooleanVal.class);
587    
588      private static NISuppressor result_even
589        = new NISuppressor (0, RangeInt.Even.class);
590      private static NISuppressor arg1_even
591        = new NISuppressor (1, RangeInt.Even.class);
592      private static NISuppressor arg2_even
593        = new NISuppressor (2, RangeInt.Even.class);
594    
595      private static NISuppressor result_power2
596        = new NISuppressor(0,RangeInt.PowerOfTwo.class);
597      private static NISuppressor arg1_power2
598        = new NISuppressor (1, RangeInt.PowerOfTwo.class);
599      private static NISuppressor arg2_power2
600        = new NISuppressor (2, RangeInt.PowerOfTwo.class);
601    
602      private static NISuppressor result_and0_arg1
603        = new NISuppressor (0, 1, NumericInt.BitwiseAndZero.class);
604      private static NISuppressor result_and0_arg2
605        = new NISuppressor (0, 2, NumericInt.BitwiseAndZero.class);
606      private static NISuppressor arg1_and0_arg2
607        = new NISuppressor (1, 2, NumericInt.BitwiseAndZero.class);
608    
609      // The arguments to bitwise subset are backwards from what one
610      // might expect.  The second argument is a subset of the first
611      // argument
612      private static NISuppressor arg1_bw_subset_arg2
613        = new NISuppressor (2, 1, NumericInt.BitwiseSubset.class);
614      private static NISuppressor arg2_bw_subset_arg1
615        = new NISuppressor (1, 2, NumericInt.BitwiseSubset.class);
616    
617      private static NISuppressor result_shift0_arg1
618        = new NISuppressor (0, 1, NumericInt.ShiftZero.class);
619      private static NISuppressor result_shift0_arg2
620        = new NISuppressor (0, 2, NumericInt.ShiftZero.class);
621      private static NISuppressor arg1_shift0_arg2
622        = new NISuppressor (1, 2, NumericInt.ShiftZero.class);
623    
624      private static NISuppressor arg2_divides_arg1
625        = new NISuppressor (1, 2, NumericInt.Divides.class);
626      private static NISuppressor arg1_divides_arg2
627        = new NISuppressor (2, 1, NumericInt.Divides.class);
628    
629      private static NISuppressor arg2_valid_shift
630        = new NISuppressor (2, RangeInt.Bound0_63.class);
631    
632        private static NISuppressionSet suppressions
633          = new NISuppressionSet (new NISuppression[] {
634    
635            // (r == 0) && (y == 0) ==> r = y * z
636            new NISuppression (result_eq_0, arg1_eq_0, suppressee),
637    
638            // (r == 0) && (z == 0) ==> r = y * z
639            new NISuppression (result_eq_0, arg2_eq_0, suppressee),
640    
641            // (r == y) && (z == 1) ==> r = y * z
642            new NISuppression (result_eq_arg1, arg2_eq_1, suppressee),
643    
644            // (r == z) && (y == 1) ==> r = y * z
645            new NISuppression (result_eq_arg2, arg1_eq_1, suppressee),
646    
647            // (r == y) && (z boolean) && (z==0 ==> y==0)
648            // x = x * 0 is true if x == 0
649            // x = x * 1 is true for all x
650            new NISuppression (arg2_boolean, arg2_track0_arg1, result_eq_arg1,
651                               suppressee),
652    
653            // (r == z) && (y boolean) && (y==0 ==> z=0)
654            new NISuppression (result_eq_arg2, arg1_track0_arg2, arg1_boolean,
655                               suppressee),
656    
657          });
658    
659      // Create a suppression factory for functionBinary
660    
661    }
662    
663    /**
664     * Represents the invariant <samp>y = Multiply (x, z)</samp>
665     * over three long scalars.
666     */
667    public static class MultiplyLong_yxz extends FunctionBinary {
668      // We are Serializable, so we specify a version to allow changes to
669      // method signatures without breaking serialization.  If you add or
670      // remove fields, you should change this number to the current date.
671      static final long serialVersionUID = 20031030L;
672    
673      private static /*@Prototype*/ MultiplyLong_yxz proto;
674    
675      /** Returns the prototype invariant for MultiplyLong_yxz **/
676      public static /*@Prototype*/ MultiplyLong_yxz get_proto() {
677        if (proto == null)
678          proto = new /*@Prototype*/ MultiplyLong_yxz ();
679        return (proto);
680      }
681    
682      /** instantiate an invariant on the specified slice **/
683      protected MultiplyLong_yxz instantiate_dyn (PptSlice slice) /*@Prototype*/ {
684        return new MultiplyLong_yxz (slice);
685      }
686    
687      private MultiplyLong_yxz (PptSlice slice) {
688        super (slice);
689      }
690    
691      public MultiplyLong_yxz () /*@Prototype*/ {
692        super ();
693      }
694    
695      private static String[] method_name = new String[] {"", " * ", ""};
696    
697      public String[] get_method_name () {
698        return (method_name);
699      }
700    
701      private static int function_id = -1;
702    
703      public int get_function_id() {
704        return (function_id);
705      }
706    
707      public void set_function_id (int function_id) {
708        assert MultiplyLong_yxz.function_id == -1;
709        MultiplyLong_yxz.function_id = function_id;
710      }
711    
712      private static int var_order = 2;
713    
714      public int get_var_order() {
715        return var_order;
716      }
717    
718      public boolean is_symmetric() {
719    
720          return (true);
721      }
722    
723      public long func (long x, long z) {
724    
725        return (x * z);
726      }
727    
728      public InvariantStatus check_modified(long x, long y,
729                                          long z, int count) {
730        return (check_ordered (y, x, z, count));
731      }
732    
733      public InvariantStatus add_modified(long x, long y,
734                                          long z, int count) {
735        if (Debug.logDetail())
736          log (Fmt.spf ("result=%s, arg1=%s, arg2=%s", "" + y, "" + x,
737                        "" + z));
738        return (add_ordered (y, x, z, count));
739      }
740    
741      public boolean isMultiply() {
742        return (true);
743      }
744    
745        public boolean isExact() { return true; }
746    
747      /**
748       * Returns a list of non-instantiating suppressions for this invariant.
749       */
750      public /*@Nullable*/ NISuppressionSet get_ni_suppressions() {
751        if (NIS.dkconfig_enabled && dkconfig_enabled)
752          return (suppressions);
753        else
754          return (null);
755      }
756    
757      /** definition of this invariant (the suppressee) **/
758      private static NISuppressee suppressee
759                        = new NISuppressee (MultiplyLong_yxz.class, 3);
760    
761      // suppressor definitions (used below)
762      private static NISuppressor result_eq_arg1
763        = new NISuppressor (1, 0, IntEqual.class);
764      private static NISuppressor result_eq_arg2
765        = new NISuppressor (1, 2, IntEqual.class);
766      private static NISuppressor arg1_eq_arg2
767        = new NISuppressor (0, 2, IntEqual.class);
768    
769      private static NISuppressor result_lt_arg1
770        = new NISuppressor (1, 0, IntLessThan.class);
771      private static NISuppressor result_lt_arg2
772        = new NISuppressor (1, 2, IntLessThan.class);
773      private static NISuppressor arg1_lt_arg2
774        = new NISuppressor (0, 2, IntLessThan.class);
775      private static NISuppressor arg2_lt_arg1
776        = new NISuppressor (2, 0, IntLessThan.class);
777    
778      private static NISuppressor result_le_arg1
779        = new NISuppressor (1, 0, IntLessEqual.class);
780      private static NISuppressor result_le_arg2
781        = new NISuppressor (1, 2, IntLessEqual.class);
782      private static NISuppressor arg1_le_arg2
783        = new NISuppressor (0, 2, IntLessEqual.class);
784      private static NISuppressor arg2_le_arg1
785        = new NISuppressor (2, 0, IntLessEqual.class);
786    
787      private static NISuppressor result_track0_arg1
788        = new NISuppressor (1, 0, NumericInt.ZeroTrack.class);
789      private static NISuppressor result_track0_arg2
790        = new NISuppressor (1, 2, NumericInt.ZeroTrack.class);
791      private static NISuppressor arg1_track0_arg2
792        = new NISuppressor (0, 2, NumericInt.ZeroTrack.class);
793      private static NISuppressor arg1_track0_result
794        = new NISuppressor (0, 1, NumericInt.ZeroTrack.class);
795      private static NISuppressor arg2_track0_result
796        = new NISuppressor (2, 1, NumericInt.ZeroTrack.class);
797      private static NISuppressor arg2_track0_arg1
798        = new NISuppressor (2, 0, NumericInt.ZeroTrack.class);
799    
800      private static NISuppressor result_eq_1
801        = new NISuppressor(1, RangeInt.EqualOne.class);
802      private static NISuppressor arg1_eq_1
803        = new NISuppressor (0, RangeInt.EqualOne.class);
804      private static NISuppressor arg2_eq_1
805        = new NISuppressor (2, RangeInt.EqualOne.class);
806    
807      private static NISuppressor result_eq_0
808        = new NISuppressor(1,RangeInt.EqualZero.class);
809      private static NISuppressor arg1_eq_0
810        = new NISuppressor (0, RangeInt.EqualZero.class);
811      private static NISuppressor arg2_eq_0
812        = new NISuppressor (2, RangeInt.EqualZero.class);
813    
814      private static NISuppressor result_ne_0
815        = new NISuppressor (1, NonZero.class);
816      private static NISuppressor arg1_ne_0
817        = new NISuppressor (0, NonZero.class);
818      private static NISuppressor arg2_ne_0
819        = new NISuppressor (2, NonZero.class);
820    
821      private static NISuppressor result_ge_0
822        = new NISuppressor (1, RangeInt.GreaterEqualZero.class);
823      private static NISuppressor arg1_ge_0
824        = new NISuppressor (0, RangeInt.GreaterEqualZero.class);
825      private static NISuppressor arg2_ge_0
826        = new NISuppressor (2, RangeInt.GreaterEqualZero.class);
827    
828      private static NISuppressor result_ge_64
829        = new NISuppressor (1, RangeInt.GreaterEqual64.class);
830      private static NISuppressor arg1_ge_64
831        = new NISuppressor (0, RangeInt.GreaterEqual64.class);
832      private static NISuppressor arg2_ge_64
833        = new NISuppressor (2, RangeInt.GreaterEqual64.class);
834    
835      private static NISuppressor result_boolean
836        = new NISuppressor(1,RangeInt.BooleanVal.class);
837      private static NISuppressor arg1_boolean
838        = new NISuppressor (0, RangeInt.BooleanVal.class);
839      private static NISuppressor arg2_boolean
840        = new NISuppressor (2, RangeInt.BooleanVal.class);
841    
842      private static NISuppressor result_even
843        = new NISuppressor (1, RangeInt.Even.class);
844      private static NISuppressor arg1_even
845        = new NISuppressor (0, RangeInt.Even.class);
846      private static NISuppressor arg2_even
847        = new NISuppressor (2, RangeInt.Even.class);
848    
849      private static NISuppressor result_power2
850        = new NISuppressor(1,RangeInt.PowerOfTwo.class);
851      private static NISuppressor arg1_power2
852        = new NISuppressor (0, RangeInt.PowerOfTwo.class);
853      private static NISuppressor arg2_power2
854        = new NISuppressor (2, RangeInt.PowerOfTwo.class);
855    
856      private static NISuppressor result_and0_arg1
857        = new NISuppressor (1, 0, NumericInt.BitwiseAndZero.class);
858      private static NISuppressor result_and0_arg2
859        = new NISuppressor (1, 2, NumericInt.BitwiseAndZero.class);
860      private static NISuppressor arg1_and0_arg2
861        = new NISuppressor (0, 2, NumericInt.BitwiseAndZero.class);
862    
863      // The arguments to bitwise subset are backwards from what one
864      // might expect.  The second argument is a subset of the first
865      // argument
866      private static NISuppressor arg1_bw_subset_arg2
867        = new NISuppressor (2, 0, NumericInt.BitwiseSubset.class);
868      private static NISuppressor arg2_bw_subset_arg1
869        = new NISuppressor (0, 2, NumericInt.BitwiseSubset.class);
870    
871      private static NISuppressor result_shift0_arg1
872        = new NISuppressor (1, 0, NumericInt.ShiftZero.class);
873      private static NISuppressor result_shift0_arg2
874        = new NISuppressor (1, 2, NumericInt.ShiftZero.class);
875      private static NISuppressor arg1_shift0_arg2
876        = new NISuppressor (0, 2, NumericInt.ShiftZero.class);
877    
878      private static NISuppressor arg2_divides_arg1
879        = new NISuppressor (0, 2, NumericInt.Divides.class);
880      private static NISuppressor arg1_divides_arg2
881        = new NISuppressor (2, 0, NumericInt.Divides.class);
882    
883      private static NISuppressor arg2_valid_shift
884        = new NISuppressor (2, RangeInt.Bound0_63.class);
885    
886        private static NISuppressionSet suppressions
887          = new NISuppressionSet (new NISuppression[] {
888    
889            // (r == 0) && (x == 0) ==> r = x * z
890            new NISuppression (result_eq_0, arg1_eq_0, suppressee),
891    
892            // (r == 0) && (z == 0) ==> r = x * z
893            new NISuppression (result_eq_0, arg2_eq_0, suppressee),
894    
895            // (r == x) && (z == 1) ==> r = x * z
896            new NISuppression (result_eq_arg1, arg2_eq_1, suppressee),
897    
898            // (r == z) && (x == 1) ==> r = x * z
899            new NISuppression (result_eq_arg2, arg1_eq_1, suppressee),
900    
901            // (r == x) && (z boolean) && (z==0 ==> x==0)
902            // x = x * 0 is true if x == 0
903            // x = x * 1 is true for all x
904            new NISuppression (arg2_boolean, arg2_track0_arg1, result_eq_arg1,
905                               suppressee),
906    
907            // (r == z) && (x boolean) && (x==0 ==> z=0)
908            new NISuppression (result_eq_arg2, arg1_track0_arg2, arg1_boolean,
909                               suppressee),
910    
911          });
912    
913      // Create a suppression factory for functionBinary
914    
915    }
916    
917    /**
918     * Represents the invariant <samp>z = Multiply (x, y)</samp>
919     * over three long scalars.
920     */
921    public static class MultiplyLong_zxy extends FunctionBinary {
922      // We are Serializable, so we specify a version to allow changes to
923      // method signatures without breaking serialization.  If you add or
924      // remove fields, you should change this number to the current date.
925      static final long serialVersionUID = 20031030L;
926    
927      private static /*@Prototype*/ MultiplyLong_zxy proto;
928    
929      /** Returns the prototype invariant for MultiplyLong_zxy **/
930      public static /*@Prototype*/ MultiplyLong_zxy get_proto() {
931        if (proto == null)
932          proto = new /*@Prototype*/ MultiplyLong_zxy ();
933        return (proto);
934      }
935    
936      /** instantiate an invariant on the specified slice **/
937      protected MultiplyLong_zxy instantiate_dyn (PptSlice slice) /*@Prototype*/ {
938        return new MultiplyLong_zxy (slice);
939      }
940    
941      private MultiplyLong_zxy (PptSlice slice) {
942        super (slice);
943      }
944    
945      public MultiplyLong_zxy () /*@Prototype*/ {
946        super ();
947      }
948    
949      private static String[] method_name = new String[] {"", " * ", ""};
950    
951      public String[] get_method_name () {
952        return (method_name);
953      }
954    
955      private static int function_id = -1;
956    
957      public int get_function_id() {
958        return (function_id);
959      }
960    
961      public void set_function_id (int function_id) {
962        assert MultiplyLong_zxy.function_id == -1;
963        MultiplyLong_zxy.function_id = function_id;
964      }
965    
966      private static int var_order = 3;
967    
968      public int get_var_order() {
969        return var_order;
970      }
971    
972      public boolean is_symmetric() {
973    
974          return (true);
975      }
976    
977      public long func (long x, long y) {
978    
979        return (x * y);
980      }
981    
982      public InvariantStatus check_modified(long x, long y,
983                                          long z, int count) {
984        return (check_ordered (z, x, y, count));
985      }
986    
987      public InvariantStatus add_modified(long x, long y,
988                                          long z, int count) {
989        if (Debug.logDetail())
990          log (Fmt.spf ("result=%s, arg1=%s, arg2=%s", "" + z, "" + x,
991                        "" + y));
992        return (add_ordered (z, x, y, count));
993      }
994    
995      public boolean isMultiply() {
996        return (true);
997      }
998    
999        public boolean isExact() { return true; }
1000    
1001      /**
1002       * Returns a list of non-instantiating suppressions for this invariant.
1003       */
1004      public /*@Nullable*/ NISuppressionSet get_ni_suppressions() {
1005        if (NIS.dkconfig_enabled && dkconfig_enabled)
1006          return (suppressions);
1007        else
1008          return (null);
1009      }
1010    
1011      /** definition of this invariant (the suppressee) **/
1012      private static NISuppressee suppressee
1013                        = new NISuppressee (MultiplyLong_zxy.class, 3);
1014    
1015      // suppressor definitions (used below)
1016      private static NISuppressor result_eq_arg1
1017        = new NISuppressor (2, 0, IntEqual.class);
1018      private static NISuppressor result_eq_arg2
1019        = new NISuppressor (2, 1, IntEqual.class);
1020      private static NISuppressor arg1_eq_arg2
1021        = new NISuppressor (0, 1, IntEqual.class);
1022    
1023      private static NISuppressor result_lt_arg1
1024        = new NISuppressor (2, 0, IntLessThan.class);
1025      private static NISuppressor result_lt_arg2
1026        = new NISuppressor (2, 1, IntLessThan.class);
1027      private static NISuppressor arg1_lt_arg2
1028        = new NISuppressor (0, 1, IntLessThan.class);
1029      private static NISuppressor arg2_lt_arg1
1030        = new NISuppressor (1, 0, IntLessThan.class);
1031    
1032      private static NISuppressor result_le_arg1
1033        = new NISuppressor (2, 0, IntLessEqual.class);
1034      private static NISuppressor result_le_arg2
1035        = new NISuppressor (2, 1, IntLessEqual.class);
1036      private static NISuppressor arg1_le_arg2
1037        = new NISuppressor (0, 1, IntLessEqual.class);
1038      private static NISuppressor arg2_le_arg1
1039        = new NISuppressor (1, 0, IntLessEqual.class);
1040    
1041      private static NISuppressor result_track0_arg1
1042        = new NISuppressor (2, 0, NumericInt.ZeroTrack.class);
1043      private static NISuppressor result_track0_arg2
1044        = new NISuppressor (2, 1, NumericInt.ZeroTrack.class);
1045      private static NISuppressor arg1_track0_arg2
1046        = new NISuppressor (0, 1, NumericInt.ZeroTrack.class);
1047      private static NISuppressor arg1_track0_result
1048        = new NISuppressor (0, 2, NumericInt.ZeroTrack.class);
1049      private static NISuppressor arg2_track0_result
1050        = new NISuppressor (1, 2, NumericInt.ZeroTrack.class);
1051      private static NISuppressor arg2_track0_arg1
1052        = new NISuppressor (1, 0, NumericInt.ZeroTrack.class);
1053    
1054      private static NISuppressor result_eq_1
1055        = new NISuppressor(2, RangeInt.EqualOne.class);
1056      private static NISuppressor arg1_eq_1
1057        = new NISuppressor (0, RangeInt.EqualOne.class);
1058      private static NISuppressor arg2_eq_1
1059        = new NISuppressor (1, RangeInt.EqualOne.class);
1060    
1061      private static NISuppressor result_eq_0
1062        = new NISuppressor(2,RangeInt.EqualZero.class);
1063      private static NISuppressor arg1_eq_0
1064        = new NISuppressor (0, RangeInt.EqualZero.class);
1065      private static NISuppressor arg2_eq_0
1066        = new NISuppressor (1, RangeInt.EqualZero.class);
1067    
1068      private static NISuppressor result_ne_0
1069        = new NISuppressor (2, NonZero.class);
1070      private static NISuppressor arg1_ne_0
1071        = new NISuppressor (0, NonZero.class);
1072      private static NISuppressor arg2_ne_0
1073        = new NISuppressor (1, NonZero.class);
1074    
1075      private static NISuppressor result_ge_0
1076        = new NISuppressor (2, RangeInt.GreaterEqualZero.class);
1077      private static NISuppressor arg1_ge_0
1078        = new NISuppressor (0, RangeInt.GreaterEqualZero.class);
1079      private static NISuppressor arg2_ge_0
1080        = new NISuppressor (1, RangeInt.GreaterEqualZero.class);
1081    
1082      private static NISuppressor result_ge_64
1083        = new NISuppressor (2, RangeInt.GreaterEqual64.class);
1084      private static NISuppressor arg1_ge_64
1085        = new NISuppressor (0, RangeInt.GreaterEqual64.class);
1086      private static NISuppressor arg2_ge_64
1087        = new NISuppressor (1, RangeInt.GreaterEqual64.class);
1088    
1089      private static NISuppressor result_boolean
1090        = new NISuppressor(2,RangeInt.BooleanVal.class);
1091      private static NISuppressor arg1_boolean
1092        = new NISuppressor (0, RangeInt.BooleanVal.class);
1093      private static NISuppressor arg2_boolean
1094        = new NISuppressor (1, RangeInt.BooleanVal.class);
1095    
1096      private static NISuppressor result_even
1097        = new NISuppressor (2, RangeInt.Even.class);
1098      private static NISuppressor arg1_even
1099        = new NISuppressor (0, RangeInt.Even.class);
1100      private static NISuppressor arg2_even
1101        = new NISuppressor (1, RangeInt.Even.class);
1102    
1103      private static NISuppressor result_power2
1104        = new NISuppressor(2,RangeInt.PowerOfTwo.class);
1105      private static NISuppressor arg1_power2
1106        = new NISuppressor (0, RangeInt.PowerOfTwo.class);
1107      private static NISuppressor arg2_power2
1108        = new NISuppressor (1, RangeInt.PowerOfTwo.class);
1109    
1110      private static NISuppressor result_and0_arg1
1111        = new NISuppressor (2, 0, NumericInt.BitwiseAndZero.class);
1112      private static NISuppressor result_and0_arg2
1113        = new NISuppressor (2, 1, NumericInt.BitwiseAndZero.class);
1114      private static NISuppressor arg1_and0_arg2
1115        = new NISuppressor (0, 1, NumericInt.BitwiseAndZero.class);
1116    
1117      // The arguments to bitwise subset are backwards from what one
1118      // might expect.  The second argument is a subset of the first
1119      // argument
1120      private static NISuppressor arg1_bw_subset_arg2
1121        = new NISuppressor (1, 0, NumericInt.BitwiseSubset.class);
1122      private static NISuppressor arg2_bw_subset_arg1
1123        = new NISuppressor (0, 1, NumericInt.BitwiseSubset.class);
1124    
1125      private static NISuppressor result_shift0_arg1
1126        = new NISuppressor (2, 0, NumericInt.ShiftZero.class);
1127      private static NISuppressor result_shift0_arg2
1128        = new NISuppressor (2, 1, NumericInt.ShiftZero.class);
1129      private static NISuppressor arg1_shift0_arg2
1130        = new NISuppressor (0, 1, NumericInt.ShiftZero.class);
1131    
1132      private static NISuppressor arg2_divides_arg1
1133        = new NISuppressor (0, 1, NumericInt.Divides.class);
1134      private static NISuppressor arg1_divides_arg2
1135        = new NISuppressor (1, 0, NumericInt.Divides.class);
1136    
1137      private static NISuppressor arg2_valid_shift
1138        = new NISuppressor (1, RangeInt.Bound0_63.class);
1139    
1140        private static NISuppressionSet suppressions
1141          = new NISuppressionSet (new NISuppression[] {
1142    
1143            // (r == 0) && (x == 0) ==> r = x * y
1144            new NISuppression (result_eq_0, arg1_eq_0, suppressee),
1145    
1146            // (r == 0) && (y == 0) ==> r = x * y
1147            new NISuppression (result_eq_0, arg2_eq_0, suppressee),
1148    
1149            // (r == x) && (y == 1) ==> r = x * y
1150            new NISuppression (result_eq_arg1, arg2_eq_1, suppressee),
1151    
1152            // (r == y) && (x == 1) ==> r = x * y
1153            new NISuppression (result_eq_arg2, arg1_eq_1, suppressee),
1154    
1155            // (r == x) && (y boolean) && (y==0 ==> x==0)
1156            // x = x * 0 is true if x == 0
1157            // x = x * 1 is true for all x
1158            new NISuppression (arg2_boolean, arg2_track0_arg1, result_eq_arg1,
1159                               suppressee),
1160    
1161            // (r == y) && (x boolean) && (x==0 ==> y=0)
1162            new NISuppression (result_eq_arg2, arg1_track0_arg2, arg1_boolean,
1163                               suppressee),
1164    
1165          });
1166    
1167      // Create a suppression factory for functionBinary
1168    
1169    }
1170    
1171      // "define" EQUALITY_MIN_MAX_SUPPRESS
1172    
1173      // default is that it is not this function, overriden in the subclass
1174      public boolean isMinimum () {
1175        return (false);
1176      }
1177    
1178    /**
1179     * Represents the invariant <samp>x = Minimum (y, z)</samp>
1180     * over three long scalars.
1181     */
1182    public static class MinimumLong_xyz extends FunctionBinary {
1183      // We are Serializable, so we specify a version to allow changes to
1184      // method signatures without breaking serialization.  If you add or
1185      // remove fields, you should change this number to the current date.
1186      static final long serialVersionUID = 20031030L;
1187    
1188      private static /*@Prototype*/ MinimumLong_xyz proto;
1189    
1190      /** Returns the prototype invariant for MinimumLong_xyz **/
1191      public static /*@Prototype*/ MinimumLong_xyz get_proto() {
1192        if (proto == null)
1193          proto = new /*@Prototype*/ MinimumLong_xyz ();
1194        return (proto);
1195      }
1196    
1197      /** instantiate an invariant on the specified slice **/
1198      protected MinimumLong_xyz instantiate_dyn (PptSlice slice) /*@Prototype*/ {
1199        return new MinimumLong_xyz (slice);
1200      }
1201    
1202      private MinimumLong_xyz (PptSlice slice) {
1203        super (slice);
1204      }
1205    
1206      public MinimumLong_xyz () /*@Prototype*/ {
1207        super ();
1208      }
1209    
1210      private static String[] method_name = new String[] {"java.lang.Math.min(", ", ", ")"};
1211    
1212      public String[] get_method_name () {
1213        return (method_name);
1214      }
1215    
1216      private static int function_id = -1;
1217    
1218      public int get_function_id() {
1219        return (function_id);
1220      }
1221    
1222      public void set_function_id (int function_id) {
1223        assert MinimumLong_xyz.function_id == -1;
1224        MinimumLong_xyz.function_id = function_id;
1225      }
1226    
1227      private static int var_order = 1;
1228    
1229      public int get_var_order() {
1230        return var_order;
1231      }
1232    
1233      public boolean is_symmetric() {
1234    
1235          return (true);
1236      }
1237    
1238      public long func (long y, long z) {
1239    
1240        return (Math.min (y, z));
1241      }
1242    
1243      public InvariantStatus check_modified(long x, long y,
1244                                          long z, int count) {
1245        return (check_ordered (x, y, z, count));
1246      }
1247    
1248      public InvariantStatus add_modified(long x, long y,
1249                                          long z, int count) {
1250        if (Debug.logDetail())
1251          log (Fmt.spf ("result=%s, arg1=%s, arg2=%s", "" + x, "" + y,
1252                        "" + z));
1253        return (add_ordered (x, y, z, count));
1254      }
1255    
1256      public boolean isMinimum() {
1257        return (true);
1258      }
1259    
1260      /**
1261       * Returns a list of non-instantiating suppressions for this invariant.
1262       */
1263      public /*@Nullable*/ NISuppressionSet get_ni_suppressions() {
1264        if (NIS.dkconfig_enabled && dkconfig_enabled)
1265          return (suppressions);
1266        else
1267          return (null);
1268      }
1269    
1270      /** definition of this invariant (the suppressee) **/
1271      private static NISuppressee suppressee
1272                        = new NISuppressee (MinimumLong_xyz.class, 3);
1273    
1274      // suppressor definitions (used below)
1275      private static NISuppressor result_eq_arg1
1276        = new NISuppressor (0, 1, IntEqual.class);
1277      private static NISuppressor result_eq_arg2
1278        = new NISuppressor (0, 2, IntEqual.class);
1279      private static NISuppressor arg1_eq_arg2
1280        = new NISuppressor (1, 2, IntEqual.class);
1281    
1282      private static NISuppressor result_lt_arg1
1283        = new NISuppressor (0, 1, IntLessThan.class);
1284      private static NISuppressor result_lt_arg2
1285        = new NISuppressor (0, 2, IntLessThan.class);
1286      private static NISuppressor arg1_lt_arg2
1287        = new NISuppressor (1, 2, IntLessThan.class);
1288      private static NISuppressor arg2_lt_arg1
1289        = new NISuppressor (2, 1, IntLessThan.class);
1290    
1291      private static NISuppressor result_le_arg1
1292        = new NISuppressor (0, 1, IntLessEqual.class);
1293      private static NISuppressor result_le_arg2
1294        = new NISuppressor (0, 2, IntLessEqual.class);
1295      private static NISuppressor arg1_le_arg2
1296        = new NISuppressor (1, 2, IntLessEqual.class);
1297      private static NISuppressor arg2_le_arg1
1298        = new NISuppressor (2, 1, IntLessEqual.class);
1299    
1300      private static NISuppressor result_track0_arg1
1301        = new NISuppressor (0, 1, NumericInt.ZeroTrack.class);
1302      private static NISuppressor result_track0_arg2
1303        = new NISuppressor (0, 2, NumericInt.ZeroTrack.class);
1304      private static NISuppressor arg1_track0_arg2
1305        = new NISuppressor (1, 2, NumericInt.ZeroTrack.class);
1306      private static NISuppressor arg1_track0_result
1307        = new NISuppressor (1, 0, NumericInt.ZeroTrack.class);
1308      private static NISuppressor arg2_track0_result
1309        = new NISuppressor (2, 0, NumericInt.ZeroTrack.class);
1310      private static NISuppressor arg2_track0_arg1
1311        = new NISuppressor (2, 1, NumericInt.ZeroTrack.class);
1312    
1313      private static NISuppressor result_eq_1
1314        = new NISuppressor(0, RangeInt.EqualOne.class);
1315      private static NISuppressor arg1_eq_1
1316        = new NISuppressor (1, RangeInt.EqualOne.class);
1317      private static NISuppressor arg2_eq_1
1318        = new NISuppressor (2, RangeInt.EqualOne.class);
1319    
1320      private static NISuppressor result_eq_0
1321        = new NISuppressor(0,RangeInt.EqualZero.class);
1322      private static NISuppressor arg1_eq_0
1323        = new NISuppressor (1, RangeInt.EqualZero.class);
1324      private static NISuppressor arg2_eq_0
1325        = new NISuppressor (2, RangeInt.EqualZero.class);
1326    
1327      private static NISuppressor result_ne_0
1328        = new NISuppressor (0, NonZero.class);
1329      private static NISuppressor arg1_ne_0
1330        = new NISuppressor (1, NonZero.class);
1331      private static NISuppressor arg2_ne_0
1332        = new NISuppressor (2, NonZero.class);
1333    
1334      private static NISuppressor result_ge_0
1335        = new NISuppressor (0, RangeInt.GreaterEqualZero.class);
1336      private static NISuppressor arg1_ge_0
1337        = new NISuppressor (1, RangeInt.GreaterEqualZero.class);
1338      private static NISuppressor arg2_ge_0
1339        = new NISuppressor (2, RangeInt.GreaterEqualZero.class);
1340    
1341      private static NISuppressor result_ge_64
1342        = new NISuppressor (0, RangeInt.GreaterEqual64.class);
1343      private static NISuppressor arg1_ge_64
1344        = new NISuppressor (1, RangeInt.GreaterEqual64.class);
1345      private static NISuppressor arg2_ge_64
1346        = new NISuppressor (2, RangeInt.GreaterEqual64.class);
1347    
1348      private static NISuppressor result_boolean
1349        = new NISuppressor(0,RangeInt.BooleanVal.class);
1350      private static NISuppressor arg1_boolean
1351        = new NISuppressor (1, RangeInt.BooleanVal.class);
1352      private static NISuppressor arg2_boolean
1353        = new NISuppressor (2, RangeInt.BooleanVal.class);
1354    
1355      private static NISuppressor result_even
1356        = new NISuppressor (0, RangeInt.Even.class);
1357      private static NISuppressor arg1_even
1358        = new NISuppressor (1, RangeInt.Even.class);
1359      private static NISuppressor arg2_even
1360        = new NISuppressor (2, RangeInt.Even.class);
1361    
1362      private static NISuppressor result_power2
1363        = new NISuppressor(0,RangeInt.PowerOfTwo.class);
1364      private static NISuppressor arg1_power2
1365        = new NISuppressor (1, RangeInt.PowerOfTwo.class);
1366      private static NISuppressor arg2_power2
1367        = new NISuppressor (2, RangeInt.PowerOfTwo.class);
1368    
1369      private static NISuppressor result_and0_arg1
1370        = new NISuppressor (0, 1, NumericInt.BitwiseAndZero.class);
1371      private static NISuppressor result_and0_arg2
1372        = new NISuppressor (0, 2, NumericInt.BitwiseAndZero.class);
1373      private static NISuppressor arg1_and0_arg2
1374        = new NISuppressor (1, 2, NumericInt.BitwiseAndZero.class);
1375    
1376      // The arguments to bitwise subset are backwards from what one
1377      // might expect.  The second argument is a subset of the first
1378      // argument
1379      private static NISuppressor arg1_bw_subset_arg2
1380        = new NISuppressor (2, 1, NumericInt.BitwiseSubset.class);
1381      private static NISuppressor arg2_bw_subset_arg1
1382        = new NISuppressor (1, 2, NumericInt.BitwiseSubset.class);
1383    
1384      private static NISuppressor result_shift0_arg1
1385        = new NISuppressor (0, 1, NumericInt.ShiftZero.class);
1386      private static NISuppressor result_shift0_arg2
1387        = new NISuppressor (0, 2, NumericInt.ShiftZero.class);
1388      private static NISuppressor arg1_shift0_arg2
1389        = new NISuppressor (1, 2, NumericInt.ShiftZero.class);
1390    
1391      private static NISuppressor arg2_divides_arg1
1392        = new NISuppressor (1, 2, NumericInt.Divides.class);
1393      private static NISuppressor arg1_divides_arg2
1394        = new NISuppressor (2, 1, NumericInt.Divides.class);
1395    
1396      private static NISuppressor arg2_valid_shift
1397        = new NISuppressor (2, RangeInt.Bound0_63.class);
1398    
1399        private static NISuppressionSet suppressions
1400          = new NISuppressionSet (new NISuppression[] {
1401    
1402            // (x == y) && (y <= z) ==> r = min(y, z)
1403            new NISuppression (result_eq_arg1, arg1_le_arg2, suppressee),
1404    
1405            // (x == z) && (z <= y) ==> r = min(y, z)
1406            new NISuppression (result_eq_arg2, arg2_le_arg1, suppressee),
1407    
1408            // (x boolean) && (y=0 <==> r=0) && (z == 1)
1409            // 0 = min (y, 1), true when (y == 0)
1410            // 1 = min (y, 1), true when (y > 0)
1411            new NISuppression (result_track0_arg1, arg1_track0_result,
1412                               result_boolean, arg1_ge_0, arg2_eq_1, suppressee),
1413    
1414            // (x boolean) && (z=0 <==> r=0) && (y == 1)
1415            new NISuppression (result_track0_arg2, arg2_track0_result,
1416                               result_boolean, arg2_ge_0, arg1_eq_1, suppressee),
1417    
1418          });
1419    
1420      // Create a suppression factory for functionBinary
1421    
1422    }
1423    
1424    /**
1425     * Represents the invariant <samp>y = Minimum (x, z)</samp>
1426     * over three long scalars.
1427     */
1428    public static class MinimumLong_yxz extends FunctionBinary {
1429      // We are Serializable, so we specify a version to allow changes to
1430      // method signatures without breaking serialization.  If you add or
1431      // remove fields, you should change this number to the current date.
1432      static final long serialVersionUID = 20031030L;
1433    
1434      private static /*@Prototype*/ MinimumLong_yxz proto;
1435    
1436      /** Returns the prototype invariant for MinimumLong_yxz **/
1437      public static /*@Prototype*/ MinimumLong_yxz get_proto() {
1438        if (proto == null)
1439          proto = new /*@Prototype*/ MinimumLong_yxz ();
1440        return (proto);
1441      }
1442    
1443      /** instantiate an invariant on the specified slice **/
1444      protected MinimumLong_yxz instantiate_dyn (PptSlice slice) /*@Prototype*/ {
1445        return new MinimumLong_yxz (slice);
1446      }
1447    
1448      private MinimumLong_yxz (PptSlice slice) {
1449        super (slice);
1450      }
1451    
1452      public MinimumLong_yxz () /*@Prototype*/ {
1453        super ();
1454      }
1455    
1456      private static String[] method_name = new String[] {"java.lang.Math.min(", ", ", ")"};
1457    
1458      public String[] get_method_name () {
1459        return (method_name);
1460      }
1461    
1462      private static int function_id = -1;
1463    
1464      public int get_function_id() {
1465        return (function_id);
1466      }
1467    
1468      public void set_function_id (int function_id) {
1469        assert MinimumLong_yxz.function_id == -1;
1470        MinimumLong_yxz.function_id = function_id;
1471      }
1472    
1473      private static int var_order = 2;
1474    
1475      public int get_var_order() {
1476        return var_order;
1477      }
1478    
1479      public boolean is_symmetric() {
1480    
1481          return (true);
1482      }
1483    
1484      public long func (long x, long z) {
1485    
1486        return (Math.min (x, z));
1487      }
1488    
1489      public InvariantStatus check_modified(long x, long y,
1490                                          long z, int count) {
1491        return (check_ordered (y, x, z, count));
1492      }
1493    
1494      public InvariantStatus add_modified(long x, long y,
1495                                          long z, int count) {
1496        if (Debug.logDetail())
1497          log (Fmt.spf ("result=%s, arg1=%s, arg2=%s", "" + y, "" + x,
1498                        "" + z));
1499        return (add_ordered (y, x, z, count));
1500      }
1501    
1502      public boolean isMinimum() {
1503        return (true);
1504      }
1505    
1506      /**
1507       * Returns a list of non-instantiating suppressions for this invariant.
1508       */
1509      public /*@Nullable*/ NISuppressionSet get_ni_suppressions() {
1510        if (NIS.dkconfig_enabled && dkconfig_enabled)
1511          return (suppressions);
1512        else
1513          return (null);
1514      }
1515    
1516      /** definition of this invariant (the suppressee) **/
1517      private static NISuppressee suppressee
1518                        = new NISuppressee (MinimumLong_yxz.class, 3);
1519    
1520      // suppressor definitions (used below)
1521      private static NISuppressor result_eq_arg1
1522        = new NISuppressor (1, 0, IntEqual.class);
1523      private static NISuppressor result_eq_arg2
1524        = new NISuppressor (1, 2, IntEqual.class);
1525      private static NISuppressor arg1_eq_arg2
1526        = new NISuppressor (0, 2, IntEqual.class);
1527    
1528      private static NISuppressor result_lt_arg1
1529        = new NISuppressor (1, 0, IntLessThan.class);
1530      private static NISuppressor result_lt_arg2
1531        = new NISuppressor (1, 2, IntLessThan.class);
1532      private static NISuppressor arg1_lt_arg2
1533        = new NISuppressor (0, 2, IntLessThan.class);
1534      private static NISuppressor arg2_lt_arg1
1535        = new NISuppressor (2, 0, IntLessThan.class);
1536    
1537      private static NISuppressor result_le_arg1
1538        = new NISuppressor (1, 0, IntLessEqual.class);
1539      private static NISuppressor result_le_arg2
1540        = new NISuppressor (1, 2, IntLessEqual.class);
1541      private static NISuppressor arg1_le_arg2
1542        = new NISuppressor (0, 2, IntLessEqual.class);
1543      private static NISuppressor arg2_le_arg1
1544        = new NISuppressor (2, 0, IntLessEqual.class);
1545    
1546      private static NISuppressor result_track0_arg1
1547        = new NISuppressor (1, 0, NumericInt.ZeroTrack.class);
1548      private static NISuppressor result_track0_arg2
1549        = new NISuppressor (1, 2, NumericInt.ZeroTrack.class);
1550      private static NISuppressor arg1_track0_arg2
1551        = new NISuppressor (0, 2, NumericInt.ZeroTrack.class);
1552      private static NISuppressor arg1_track0_result
1553        = new NISuppressor (0, 1, NumericInt.ZeroTrack.class);
1554      private static NISuppressor arg2_track0_result
1555        = new NISuppressor (2, 1, NumericInt.ZeroTrack.class);
1556      private static NISuppressor arg2_track0_arg1
1557        = new NISuppressor (2, 0, NumericInt.ZeroTrack.class);
1558    
1559      private static NISuppressor result_eq_1
1560        = new NISuppressor(1, RangeInt.EqualOne.class);
1561      private static NISuppressor arg1_eq_1
1562        = new NISuppressor (0, RangeInt.EqualOne.class);
1563      private static NISuppressor arg2_eq_1
1564        = new NISuppressor (2, RangeInt.EqualOne.class);
1565    
1566      private static NISuppressor result_eq_0
1567        = new NISuppressor(1,RangeInt.EqualZero.class);
1568      private static NISuppressor arg1_eq_0
1569        = new NISuppressor (0, RangeInt.EqualZero.class);
1570      private static NISuppressor arg2_eq_0
1571        = new NISuppressor (2, RangeInt.EqualZero.class);
1572    
1573      private static NISuppressor result_ne_0
1574        = new NISuppressor (1, NonZero.class);
1575      private static NISuppressor arg1_ne_0
1576        = new NISuppressor (0, NonZero.class);
1577      private static NISuppressor arg2_ne_0
1578        = new NISuppressor (2, NonZero.class);
1579    
1580      private static NISuppressor result_ge_0
1581        = new NISuppressor (1, RangeInt.GreaterEqualZero.class);
1582      private static NISuppressor arg1_ge_0
1583        = new NISuppressor (0, RangeInt.GreaterEqualZero.class);
1584      private static NISuppressor arg2_ge_0
1585        = new NISuppressor (2, RangeInt.GreaterEqualZero.class);
1586    
1587      private static NISuppressor result_ge_64
1588        = new NISuppressor (1, RangeInt.GreaterEqual64.class);
1589      private static NISuppressor arg1_ge_64
1590        = new NISuppressor (0, RangeInt.GreaterEqual64.class);
1591      private static NISuppressor arg2_ge_64
1592        = new NISuppressor (2, RangeInt.GreaterEqual64.class);
1593    
1594      private static NISuppressor result_boolean
1595        = new NISuppressor(1,RangeInt.BooleanVal.class);
1596      private static NISuppressor arg1_boolean
1597        = new NISuppressor (0, RangeInt.BooleanVal.class);
1598      private static NISuppressor arg2_boolean
1599        = new NISuppressor (2, RangeInt.BooleanVal.class);
1600    
1601      private static NISuppressor result_even
1602        = new NISuppressor (1, RangeInt.Even.class);
1603      private static NISuppressor arg1_even
1604        = new NISuppressor (0, RangeInt.Even.class);
1605      private static NISuppressor arg2_even
1606        = new NISuppressor (2, RangeInt.Even.class);
1607    
1608      private static NISuppressor result_power2
1609        = new NISuppressor(1,RangeInt.PowerOfTwo.class);
1610      private static NISuppressor arg1_power2
1611        = new NISuppressor (0, RangeInt.PowerOfTwo.class);
1612      private static NISuppressor arg2_power2
1613        = new NISuppressor (2, RangeInt.PowerOfTwo.class);
1614    
1615      private static NISuppressor result_and0_arg1
1616        = new NISuppressor (1, 0, NumericInt.BitwiseAndZero.class);
1617      private static NISuppressor result_and0_arg2
1618        = new NISuppressor (1, 2, NumericInt.BitwiseAndZero.class);
1619      private static NISuppressor arg1_and0_arg2
1620        = new NISuppressor (0, 2, NumericInt.BitwiseAndZero.class);
1621    
1622      // The arguments to bitwise subset are backwards from what one
1623      // might expect.  The second argument is a subset of the first
1624      // argument
1625      private static NISuppressor arg1_bw_subset_arg2
1626        = new NISuppressor (2, 0, NumericInt.BitwiseSubset.class);
1627      private static NISuppressor arg2_bw_subset_arg1
1628        = new NISuppressor (0, 2, NumericInt.BitwiseSubset.class);
1629    
1630      private static NISuppressor result_shift0_arg1
1631        = new NISuppressor (1, 0, NumericInt.ShiftZero.class);
1632      private static NISuppressor result_shift0_arg2
1633        = new NISuppressor (1, 2, NumericInt.ShiftZero.class);
1634      private static NISuppressor arg1_shift0_arg2
1635        = new NISuppressor (0, 2, NumericInt.ShiftZero.class);
1636    
1637      private static NISuppressor arg2_divides_arg1
1638        = new NISuppressor (0, 2, NumericInt.Divides.class);
1639      private static NISuppressor arg1_divides_arg2
1640        = new NISuppressor (2, 0, NumericInt.Divides.class);
1641    
1642      private static NISuppressor arg2_valid_shift
1643        = new NISuppressor (2, RangeInt.Bound0_63.class);
1644    
1645        private static NISuppressionSet suppressions
1646          = new NISuppressionSet (new NISuppression[] {
1647    
1648            // (y == x) && (x <= z) ==> r = min(x, z)
1649            new NISuppression (result_eq_arg1, arg1_le_arg2, suppressee),
1650    
1651            // (y == z) && (z <= x) ==> r = min(x, z)
1652            new NISuppression (result_eq_arg2, arg2_le_arg1, suppressee),
1653    
1654            // (y boolean) && (x=0 <==> r=0) && (z == 1)
1655            // 0 = min (x, 1), true when (x == 0)
1656            // 1 = min (x, 1), true when (x > 0)
1657            new NISuppression (result_track0_arg1, arg1_track0_result,
1658                               result_boolean, arg1_ge_0, arg2_eq_1, suppressee),
1659    
1660            // (y boolean) && (z=0 <==> r=0) && (x == 1)
1661            new NISuppression (result_track0_arg2, arg2_track0_result,
1662                               result_boolean, arg2_ge_0, arg1_eq_1, suppressee),
1663    
1664          });
1665    
1666      // Create a suppression factory for functionBinary
1667    
1668    }
1669    
1670    /**
1671     * Represents the invariant <samp>z = Minimum (x, y)</samp>
1672     * over three long scalars.
1673     */
1674    public static class MinimumLong_zxy extends FunctionBinary {
1675      // We are Serializable, so we specify a version to allow changes to
1676      // method signatures without breaking serialization.  If you add or
1677      // remove fields, you should change this number to the current date.
1678      static final long serialVersionUID = 20031030L;
1679    
1680      private static /*@Prototype*/ MinimumLong_zxy proto;
1681    
1682      /** Returns the prototype invariant for MinimumLong_zxy **/
1683      public static /*@Prototype*/ MinimumLong_zxy get_proto() {
1684        if (proto == null)
1685          proto = new /*@Prototype*/ MinimumLong_zxy ();
1686        return (proto);
1687      }
1688    
1689      /** instantiate an invariant on the specified slice **/
1690      protected MinimumLong_zxy instantiate_dyn (PptSlice slice) /*@Prototype*/ {
1691        return new MinimumLong_zxy (slice);
1692      }
1693    
1694      private MinimumLong_zxy (PptSlice slice) {
1695        super (slice);
1696      }
1697    
1698      public MinimumLong_zxy () /*@Prototype*/ {
1699        super ();
1700      }
1701    
1702      private static String[] method_name = new String[] {"java.lang.Math.min(", ", ", ")"};
1703    
1704      public String[] get_method_name () {
1705        return (method_name);
1706      }
1707    
1708      private static int function_id = -1;
1709    
1710      public int get_function_id() {
1711        return (function_id);
1712      }
1713    
1714      public void set_function_id (int function_id) {
1715        assert MinimumLong_zxy.function_id == -1;
1716        MinimumLong_zxy.function_id = function_id;
1717      }
1718    
1719      private static int var_order = 3;
1720    
1721      public int get_var_order() {
1722        return var_order;
1723      }
1724    
1725      public boolean is_symmetric() {
1726    
1727          return (true);
1728      }
1729    
1730      public long func (long x, long y) {
1731    
1732        return (Math.min (x, y));
1733      }
1734    
1735      public InvariantStatus check_modified(long x, long y,
1736                                          long z, int count) {
1737        return (check_ordered (z, x, y, count));
1738      }
1739    
1740      public InvariantStatus add_modified(long x, long y,
1741                                          long z, int count) {
1742        if (Debug.logDetail())
1743          log (Fmt.spf ("result=%s, arg1=%s, arg2=%s", "" + z, "" + x,
1744                        "" + y));
1745        return (add_ordered (z, x, y, count));
1746      }
1747    
1748      public boolean isMinimum() {
1749        return (true);
1750      }
1751    
1752      /**
1753       * Returns a list of non-instantiating suppressions for this invariant.
1754       */
1755      public /*@Nullable*/ NISuppressionSet get_ni_suppressions() {
1756        if (NIS.dkconfig_enabled && dkconfig_enabled)
1757          return (suppressions);
1758        else
1759          return (null);
1760      }
1761    
1762      /** definition of this invariant (the suppressee) **/
1763      private static NISuppressee suppressee
1764                        = new NISuppressee (MinimumLong_zxy.class, 3);
1765    
1766      // suppressor definitions (used below)
1767      private static NISuppressor result_eq_arg1
1768        = new NISuppressor (2, 0, IntEqual.class);
1769      private static NISuppressor result_eq_arg2
1770        = new NISuppressor (2, 1, IntEqual.class);
1771      private static NISuppressor arg1_eq_arg2
1772        = new NISuppressor (0, 1, IntEqual.class);
1773    
1774      private static NISuppressor result_lt_arg1
1775        = new NISuppressor (2, 0, IntLessThan.class);
1776      private static NISuppressor result_lt_arg2
1777        = new NISuppressor (2, 1, IntLessThan.class);
1778      private static NISuppressor arg1_lt_arg2
1779        = new NISuppressor (0, 1, IntLessThan.class);
1780      private static NISuppressor arg2_lt_arg1
1781        = new NISuppressor (1, 0, IntLessThan.class);
1782    
1783      private static NISuppressor result_le_arg1
1784        = new NISuppressor (2, 0, IntLessEqual.class);
1785      private static NISuppressor result_le_arg2
1786        = new NISuppressor (2, 1, IntLessEqual.class);
1787      private static NISuppressor arg1_le_arg2
1788        = new NISuppressor (0, 1, IntLessEqual.class);
1789      private static NISuppressor arg2_le_arg1
1790        = new NISuppressor (1, 0, IntLessEqual.class);
1791    
1792      private static NISuppressor result_track0_arg1
1793        = new NISuppressor (2, 0, NumericInt.ZeroTrack.class);
1794      private static NISuppressor result_track0_arg2
1795        = new NISuppressor (2, 1, NumericInt.ZeroTrack.class);
1796      private static NISuppressor arg1_track0_arg2
1797        = new NISuppressor (0, 1, NumericInt.ZeroTrack.class);
1798      private static NISuppressor arg1_track0_result
1799        = new NISuppressor (0, 2, NumericInt.ZeroTrack.class);
1800      private static NISuppressor arg2_track0_result
1801        = new NISuppressor (1, 2, NumericInt.ZeroTrack.class);
1802      private static NISuppressor arg2_track0_arg1
1803        = new NISuppressor (1, 0, NumericInt.ZeroTrack.class);
1804    
1805      private static NISuppressor result_eq_1
1806        = new NISuppressor(2, RangeInt.EqualOne.class);
1807      private static NISuppressor arg1_eq_1
1808        = new NISuppressor (0, RangeInt.EqualOne.class);
1809      private static NISuppressor arg2_eq_1
1810        = new NISuppressor (1, RangeInt.EqualOne.class);
1811    
1812      private static NISuppressor result_eq_0
1813        = new NISuppressor(2,RangeInt.EqualZero.class);
1814      private static NISuppressor arg1_eq_0
1815        = new NISuppressor (0, RangeInt.EqualZero.class);
1816      private static NISuppressor arg2_eq_0
1817        = new NISuppressor (1, RangeInt.EqualZero.class);
1818    
1819      private static NISuppressor result_ne_0
1820        = new NISuppressor (2, NonZero.class);
1821      private static NISuppressor arg1_ne_0
1822        = new NISuppressor (0, NonZero.class);
1823      private static NISuppressor arg2_ne_0
1824        = new NISuppressor (1, NonZero.class);
1825    
1826      private static NISuppressor result_ge_0
1827        = new NISuppressor (2, RangeInt.GreaterEqualZero.class);
1828      private static NISuppressor arg1_ge_0
1829        = new NISuppressor (0, RangeInt.GreaterEqualZero.class);
1830      private static NISuppressor arg2_ge_0
1831        = new NISuppressor (1, RangeInt.GreaterEqualZero.class);
1832    
1833      private static NISuppressor result_ge_64
1834        = new NISuppressor (2, RangeInt.GreaterEqual64.class);
1835      private static NISuppressor arg1_ge_64
1836        = new NISuppressor (0, RangeInt.GreaterEqual64.class);
1837      private static NISuppressor arg2_ge_64
1838        = new NISuppressor (1, RangeInt.GreaterEqual64.class);
1839    
1840      private static NISuppressor result_boolean
1841        = new NISuppressor(2,RangeInt.BooleanVal.class);
1842      private static NISuppressor arg1_boolean
1843        = new NISuppressor (0, RangeInt.BooleanVal.class);
1844      private static NISuppressor arg2_boolean
1845        = new NISuppressor (1, RangeInt.BooleanVal.class);
1846    
1847      private static NISuppressor result_even
1848        = new NISuppressor (2, RangeInt.Even.class);
1849      private static NISuppressor arg1_even
1850        = new NISuppressor (0, RangeInt.Even.class);
1851      private static NISuppressor arg2_even
1852        = new NISuppressor (1, RangeInt.Even.class);
1853    
1854      private static NISuppressor result_power2
1855        = new NISuppressor(2,RangeInt.PowerOfTwo.class);
1856      private static NISuppressor arg1_power2
1857        = new NISuppressor (0, RangeInt.PowerOfTwo.class);
1858      private static NISuppressor arg2_power2
1859        = new NISuppressor (1, RangeInt.PowerOfTwo.class);
1860    
1861      private static NISuppressor result_and0_arg1
1862        = new NISuppressor (2, 0, NumericInt.BitwiseAndZero.class);
1863      private static NISuppressor result_and0_arg2
1864        = new NISuppressor (2, 1, NumericInt.BitwiseAndZero.class);
1865      private static NISuppressor arg1_and0_arg2
1866        = new NISuppressor (0, 1, NumericInt.BitwiseAndZero.class);
1867    
1868      // The arguments to bitwise subset are backwards from what one
1869      // might expect.  The second argument is a subset of the first
1870      // argument
1871      private static NISuppressor arg1_bw_subset_arg2
1872        = new NISuppressor (1, 0, NumericInt.BitwiseSubset.class);
1873      private static NISuppressor arg2_bw_subset_arg1
1874        = new NISuppressor (0, 1, NumericInt.BitwiseSubset.class);
1875    
1876      private static NISuppressor result_shift0_arg1
1877        = new NISuppressor (2, 0, NumericInt.ShiftZero.class);
1878      private static NISuppressor result_shift0_arg2
1879        = new NISuppressor (2, 1, NumericInt.ShiftZero.class);
1880      private static NISuppressor arg1_shift0_arg2
1881        = new NISuppressor (0, 1, NumericInt.ShiftZero.class);
1882    
1883      private static NISuppressor arg2_divides_arg1
1884        = new NISuppressor (0, 1, NumericInt.Divides.class);
1885      private static NISuppressor arg1_divides_arg2
1886        = new NISuppressor (1, 0, NumericInt.Divides.class);
1887    
1888      private static NISuppressor arg2_valid_shift
1889        = new NISuppressor (1, RangeInt.Bound0_63.class);
1890    
1891        private static NISuppressionSet suppressions
1892          = new NISuppressionSet (new NISuppression[] {
1893    
1894            // (z == x) && (x <= y) ==> r = min(x, y)
1895            new NISuppression (result_eq_arg1, arg1_le_arg2, suppressee),
1896    
1897            // (z == y) && (y <= x) ==> r = min(x, y)
1898            new NISuppression (result_eq_arg2, arg2_le_arg1, suppressee),
1899    
1900            // (z boolean) && (x=0 <==> r=0) && (y == 1)
1901            // 0 = min (x, 1), true when (x == 0)
1902            // 1 = min (x, 1), true when (x > 0)
1903            new NISuppression (result_track0_arg1, arg1_track0_result,
1904                               result_boolean, arg1_ge_0, arg2_eq_1, suppressee),
1905    
1906            // (z boolean) && (y=0 <==> r=0) && (x == 1)
1907            new NISuppression (result_track0_arg2, arg2_track0_result,
1908                               result_boolean, arg2_ge_0, arg1_eq_1, suppressee),
1909    
1910          });
1911    
1912      // Create a suppression factory for functionBinary
1913    
1914    }
1915    
1916      // "define" EQUALITY_MIN_MAX_SUPPRESS
1917    
1918      // default is that it is not this function, overriden in the subclass
1919      public boolean isMaximum () {
1920        return (false);
1921      }
1922    
1923    /**
1924     * Represents the invariant <samp>x = Maximum (y, z)</samp>
1925     * over three long scalars.
1926     */
1927    public static class MaximumLong_xyz extends FunctionBinary {
1928      // We are Serializable, so we specify a version to allow changes to
1929      // method signatures without breaking serialization.  If you add or
1930      // remove fields, you should change this number to the current date.
1931      static final long serialVersionUID = 20031030L;
1932    
1933      private static /*@Prototype*/ MaximumLong_xyz proto;
1934    
1935      /** Returns the prototype invariant for MaximumLong_xyz **/
1936      public static /*@Prototype*/ MaximumLong_xyz get_proto() {
1937        if (proto == null)
1938          proto = new /*@Prototype*/ MaximumLong_xyz ();
1939        return (proto);
1940      }
1941    
1942      /** instantiate an invariant on the specified slice **/
1943      protected MaximumLong_xyz instantiate_dyn (PptSlice slice) /*@Prototype*/ {
1944        return new MaximumLong_xyz (slice);
1945      }
1946    
1947      private MaximumLong_xyz (PptSlice slice) {
1948        super (slice);
1949      }
1950    
1951      public MaximumLong_xyz () /*@Prototype*/ {
1952        super ();
1953      }
1954    
1955      private static String[] method_name = new String[] {"java.lang.Math.max(", ", ", ")"};
1956    
1957      public String[] get_method_name () {
1958        return (method_name);
1959      }
1960    
1961      private static int function_id = -1;
1962    
1963      public int get_function_id() {
1964        return (function_id);
1965      }
1966    
1967      public void set_function_id (int function_id) {
1968        assert MaximumLong_xyz.function_id == -1;
1969        MaximumLong_xyz.function_id = function_id;
1970      }
1971    
1972      private static int var_order = 1;
1973    
1974      public int get_var_order() {
1975        return var_order;
1976      }
1977    
1978      public boolean is_symmetric() {
1979    
1980          return (true);
1981      }
1982    
1983      public long func (long y, long z) {
1984    
1985        return (Math.max (y, z));
1986      }
1987    
1988      public InvariantStatus check_modified(long x, long y,
1989                                          long z, int count) {
1990        return (check_ordered (x, y, z, count));
1991      }
1992    
1993      public InvariantStatus add_modified(long x, long y,
1994                                          long z, int count) {
1995        if (Debug.logDetail())
1996          log (Fmt.spf ("result=%s, arg1=%s, arg2=%s", "" + x, "" + y,
1997                        "" + z));
1998        return (add_ordered (x, y, z, count));
1999      }
2000    
2001      public boolean isMaximum() {
2002        return (true);
2003      }
2004    
2005      /**
2006       * Returns a list of non-instantiating suppressions for this invariant.
2007       */
2008      public /*@Nullable*/ NISuppressionSet get_ni_suppressions() {
2009        if (NIS.dkconfig_enabled && dkconfig_enabled)
2010          return (suppressions);
2011        else
2012          return (null);
2013      }
2014    
2015      /** definition of this invariant (the suppressee) **/
2016      private static NISuppressee suppressee
2017                        = new NISuppressee (MaximumLong_xyz.class, 3);
2018    
2019      // suppressor definitions (used below)
2020      private static NISuppressor result_eq_arg1
2021        = new NISuppressor (0, 1, IntEqual.class);
2022      private static NISuppressor result_eq_arg2
2023        = new NISuppressor (0, 2, IntEqual.class);
2024      private static NISuppressor arg1_eq_arg2
2025        = new NISuppressor (1, 2, IntEqual.class);
2026    
2027      private static NISuppressor result_lt_arg1
2028        = new NISuppressor (0, 1, IntLessThan.class);
2029      private static NISuppressor result_lt_arg2
2030        = new NISuppressor (0, 2, IntLessThan.class);
2031      private static NISuppressor arg1_lt_arg2
2032        = new NISuppressor (1, 2, IntLessThan.class);
2033      private static NISuppressor arg2_lt_arg1
2034        = new NISuppressor (2, 1, IntLessThan.class);
2035    
2036      private static NISuppressor result_le_arg1
2037        = new NISuppressor (0, 1, IntLessEqual.class);
2038      private static NISuppressor result_le_arg2
2039        = new NISuppressor (0, 2, IntLessEqual.class);
2040      private static NISuppressor arg1_le_arg2
2041        = new NISuppressor (1, 2, IntLessEqual.class);
2042      private static NISuppressor arg2_le_arg1
2043        = new NISuppressor (2, 1, IntLessEqual.class);
2044    
2045      private static NISuppressor result_track0_arg1
2046        = new NISuppressor (0, 1, NumericInt.ZeroTrack.class);
2047      private static NISuppressor result_track0_arg2
2048        = new NISuppressor (0, 2, NumericInt.ZeroTrack.class);
2049      private static NISuppressor arg1_track0_arg2
2050        = new NISuppressor (1, 2, NumericInt.ZeroTrack.class);
2051      private static NISuppressor arg1_track0_result
2052        = new NISuppressor (1, 0, NumericInt.ZeroTrack.class);
2053      private static NISuppressor arg2_track0_result
2054        = new NISuppressor (2, 0, NumericInt.ZeroTrack.class);
2055      private static NISuppressor arg2_track0_arg1
2056        = new NISuppressor (2, 1, NumericInt.ZeroTrack.class);
2057    
2058      private static NISuppressor result_eq_1
2059        = new NISuppressor(0, RangeInt.EqualOne.class);
2060      private static NISuppressor arg1_eq_1
2061        = new NISuppressor (1, RangeInt.EqualOne.class);
2062      private static NISuppressor arg2_eq_1
2063        = new NISuppressor (2, RangeInt.EqualOne.class);
2064    
2065      private static NISuppressor result_eq_0
2066        = new NISuppressor(0,RangeInt.EqualZero.class);
2067      private static NISuppressor arg1_eq_0
2068        = new NISuppressor (1, RangeInt.EqualZero.class);
2069      private static NISuppressor arg2_eq_0
2070        = new NISuppressor (2, RangeInt.EqualZero.class);
2071    
2072      private static NISuppressor result_ne_0
2073        = new NISuppressor (0, NonZero.class);
2074      private static NISuppressor arg1_ne_0
2075        = new NISuppressor (1, NonZero.class);
2076      private static NISuppressor arg2_ne_0
2077        = new NISuppressor (2, NonZero.class);
2078    
2079      private static NISuppressor result_ge_0
2080        = new NISuppressor (0, RangeInt.GreaterEqualZero.class);
2081      private static NISuppressor arg1_ge_0
2082        = new NISuppressor (1, RangeInt.GreaterEqualZero.class);
2083      private static NISuppressor arg2_ge_0
2084        = new NISuppressor (2, RangeInt.GreaterEqualZero.class);
2085    
2086      private static NISuppressor result_ge_64
2087        = new NISuppressor (0, RangeInt.GreaterEqual64.class);
2088      private static NISuppressor arg1_ge_64
2089        = new NISuppressor (1, RangeInt.GreaterEqual64.class);
2090      private static NISuppressor arg2_ge_64
2091        = new NISuppressor (2, RangeInt.GreaterEqual64.class);
2092    
2093      private static NISuppressor result_boolean
2094        = new NISuppressor(0,RangeInt.BooleanVal.class);
2095      private static NISuppressor arg1_boolean
2096        = new NISuppressor (1, RangeInt.BooleanVal.class);
2097      private static NISuppressor arg2_boolean
2098        = new NISuppressor (2, RangeInt.BooleanVal.class);
2099    
2100      private static NISuppressor result_even
2101        = new NISuppressor (0, RangeInt.Even.class);
2102      private static NISuppressor arg1_even
2103        = new NISuppressor (1, RangeInt.Even.class);
2104      private static NISuppressor arg2_even
2105        = new NISuppressor (2, RangeInt.Even.class);
2106    
2107      private static NISuppressor result_power2
2108        = new NISuppressor(0,RangeInt.PowerOfTwo.class);
2109      private static NISuppressor arg1_power2
2110        = new NISuppressor (1, RangeInt.PowerOfTwo.class);
2111      private static NISuppressor arg2_power2
2112        = new NISuppressor (2, RangeInt.PowerOfTwo.class);
2113    
2114      private static NISuppressor result_and0_arg1
2115        = new NISuppressor (0, 1, NumericInt.BitwiseAndZero.class);
2116      private static NISuppressor result_and0_arg2
2117        = new NISuppressor (0, 2, NumericInt.BitwiseAndZero.class);
2118      private static NISuppressor arg1_and0_arg2
2119        = new NISuppressor (1, 2, NumericInt.BitwiseAndZero.class);
2120    
2121      // The arguments to bitwise subset are backwards from what one
2122      // might expect.  The second argument is a subset of the first
2123      // argument
2124      private static NISuppressor arg1_bw_subset_arg2
2125        = new NISuppressor (2, 1, NumericInt.BitwiseSubset.class);
2126      private static NISuppressor arg2_bw_subset_arg1
2127        = new NISuppressor (1, 2, NumericInt.BitwiseSubset.class);
2128    
2129      private static NISuppressor result_shift0_arg1
2130        = new NISuppressor (0, 1, NumericInt.ShiftZero.class);
2131      private static NISuppressor result_shift0_arg2
2132        = new NISuppressor (0, 2, NumericInt.ShiftZero.class);
2133      private static NISuppressor arg1_shift0_arg2
2134        = new NISuppressor (1, 2, NumericInt.ShiftZero.class);
2135    
2136      private static NISuppressor arg2_divides_arg1
2137        = new NISuppressor (1, 2, NumericInt.Divides.class);
2138      private static NISuppressor arg1_divides_arg2
2139        = new NISuppressor (2, 1, NumericInt.Divides.class);
2140    
2141      private static NISuppressor arg2_valid_shift
2142        = new NISuppressor (2, RangeInt.Bound0_63.class);
2143    
2144        private static NISuppressionSet suppressions
2145          = new NISuppressionSet (new NISuppression[] {
2146    
2147            // (r == y) && (z <= y) ==> r = max(y, z)
2148            new NISuppression (result_eq_arg1, arg2_le_arg1, suppressee),
2149    
2150            // (r == z) && (y <= z) ==> r = max(y, z)
2151            new NISuppression (result_eq_arg2, arg1_le_arg2, suppressee),
2152    
2153          });
2154    
2155      // Create a suppression factory for functionBinary
2156    
2157    }
2158    
2159    /**
2160     * Represents the invariant <samp>y = Maximum (x, z)</samp>
2161     * over three long scalars.
2162     */
2163    public static class MaximumLong_yxz extends FunctionBinary {
2164      // We are Serializable, so we specify a version to allow changes to
2165      // method signatures without breaking serialization.  If you add or
2166      // remove fields, you should change this number to the current date.
2167      static final long serialVersionUID = 20031030L;
2168    
2169      private static /*@Prototype*/ MaximumLong_yxz proto;
2170    
2171      /** Returns the prototype invariant for MaximumLong_yxz **/
2172      public static /*@Prototype*/ MaximumLong_yxz get_proto() {
2173        if (proto == null)
2174          proto = new /*@Prototype*/ MaximumLong_yxz ();
2175        return (proto);
2176      }
2177    
2178      /** instantiate an invariant on the specified slice **/
2179      protected MaximumLong_yxz instantiate_dyn (PptSlice slice) /*@Prototype*/ {
2180        return new MaximumLong_yxz (slice);
2181      }
2182    
2183      private MaximumLong_yxz (PptSlice slice) {
2184        super (slice);
2185      }
2186    
2187      public MaximumLong_yxz () /*@Prototype*/ {
2188        super ();
2189      }
2190    
2191      private static String[] method_name = new String[] {"java.lang.Math.max(", ", ", ")"};
2192    
2193      public String[] get_method_name () {
2194        return (method_name);
2195      }
2196    
2197      private static int function_id = -1;
2198    
2199      public int get_function_id() {
2200        return (function_id);
2201      }
2202    
2203      public void set_function_id (int function_id) {
2204        assert MaximumLong_yxz.function_id == -1;
2205        MaximumLong_yxz.function_id = function_id;
2206      }
2207    
2208      private static int var_order = 2;
2209    
2210      public int get_var_order() {
2211        return var_order;
2212      }
2213    
2214      public boolean is_symmetric() {
2215    
2216          return (true);
2217      }
2218    
2219      public long func (long x, long z) {
2220    
2221        return (Math.max (x, z));
2222      }
2223    
2224      public InvariantStatus check_modified(long x, long y,
2225                                          long z, int count) {
2226        return (check_ordered (y, x, z, count));
2227      }
2228    
2229      public InvariantStatus add_modified(long x, long y,
2230                                          long z, int count) {
2231        if (Debug.logDetail())
2232          log (Fmt.spf ("result=%s, arg1=%s, arg2=%s", "" + y, "" + x,
2233                        "" + z));
2234        return (add_ordered (y, x, z, count));
2235      }
2236    
2237      public boolean isMaximum() {
2238        return (true);
2239      }
2240    
2241      /**
2242       * Returns a list of non-instantiating suppressions for this invariant.
2243       */
2244      public /*@Nullable*/ NISuppressionSet get_ni_suppressions() {
2245        if (NIS.dkconfig_enabled && dkconfig_enabled)
2246          return (suppressions);
2247        else
2248          return (null);
2249      }
2250    
2251      /** definition of this invariant (the suppressee) **/
2252      private static NISuppressee suppressee
2253                        = new NISuppressee (MaximumLong_yxz.class, 3);
2254    
2255      // suppressor definitions (used below)
2256      private static NISuppressor result_eq_arg1
2257        = new NISuppressor (1, 0, IntEqual.class);
2258      private static NISuppressor result_eq_arg2
2259        = new NISuppressor (1, 2, IntEqual.class);
2260      private static NISuppressor arg1_eq_arg2
2261        = new NISuppressor (0, 2, IntEqual.class);
2262    
2263      private static NISuppressor result_lt_arg1
2264        = new NISuppressor (1, 0, IntLessThan.class);
2265      private static NISuppressor result_lt_arg2
2266        = new NISuppressor (1, 2, IntLessThan.class);
2267      private static NISuppressor arg1_lt_arg2
2268        = new NISuppressor (0, 2, IntLessThan.class);
2269      private static NISuppressor arg2_lt_arg1
2270        = new NISuppressor (2, 0, IntLessThan.class);
2271    
2272      private static NISuppressor result_le_arg1
2273        = new NISuppressor (1, 0, IntLessEqual.class);
2274      private static NISuppressor result_le_arg2
2275        = new NISuppressor (1, 2, IntLessEqual.class);
2276      private static NISuppressor arg1_le_arg2
2277        = new NISuppressor (0, 2, IntLessEqual.class);
2278      private static NISuppressor arg2_le_arg1
2279        = new NISuppressor (2, 0, IntLessEqual.class);
2280    
2281      private static NISuppressor result_track0_arg1
2282        = new NISuppressor (1, 0, NumericInt.ZeroTrack.class);
2283      private static NISuppressor result_track0_arg2
2284        = new NISuppressor (1, 2, NumericInt.ZeroTrack.class);
2285      private static NISuppressor arg1_track0_arg2
2286        = new NISuppressor (0, 2, NumericInt.ZeroTrack.class);
2287      private static NISuppressor arg1_track0_result
2288        = new NISuppressor (0, 1, NumericInt.ZeroTrack.class);
2289      private static NISuppressor arg2_track0_result
2290        = new NISuppressor (2, 1, NumericInt.ZeroTrack.class);
2291      private static NISuppressor arg2_track0_arg1
2292        = new NISuppressor (2, 0, NumericInt.ZeroTrack.class);
2293    
2294      private static NISuppressor result_eq_1
2295        = new NISuppressor(1, RangeInt.EqualOne.class);
2296      private static NISuppressor arg1_eq_1
2297        = new NISuppressor (0, RangeInt.EqualOne.class);
2298      private static NISuppressor arg2_eq_1
2299        = new NISuppressor (2, RangeInt.EqualOne.class);
2300    
2301      private static NISuppressor result_eq_0
2302        = new NISuppressor(1,RangeInt.EqualZero.class);
2303      private static NISuppressor arg1_eq_0
2304        = new NISuppressor (0, RangeInt.EqualZero.class);
2305      private static NISuppressor arg2_eq_0
2306        = new NISuppressor (2, RangeInt.EqualZero.class);
2307    
2308      private static NISuppressor result_ne_0
2309        = new NISuppressor (1, NonZero.class);
2310      private static NISuppressor arg1_ne_0
2311        = new NISuppressor (0, NonZero.class);
2312      private static NISuppressor arg2_ne_0
2313        = new NISuppressor (2, NonZero.class);
2314    
2315      private static NISuppressor result_ge_0
2316        = new NISuppressor (1, RangeInt.GreaterEqualZero.class);
2317      private static NISuppressor arg1_ge_0
2318        = new NISuppressor (0, RangeInt.GreaterEqualZero.class);
2319      private static NISuppressor arg2_ge_0
2320        = new NISuppressor (2, RangeInt.GreaterEqualZero.class);
2321    
2322      private static NISuppressor result_ge_64
2323        = new NISuppressor (1, RangeInt.GreaterEqual64.class);
2324      private static NISuppressor arg1_ge_64
2325        = new NISuppressor (0, RangeInt.GreaterEqual64.class);
2326      private static NISuppressor arg2_ge_64
2327        = new NISuppressor (2, RangeInt.GreaterEqual64.class);
2328    
2329      private static NISuppressor result_boolean
2330        = new NISuppressor(1,RangeInt.BooleanVal.class);
2331      private static NISuppressor arg1_boolean
2332        = new NISuppressor (0, RangeInt.BooleanVal.class);
2333      private static NISuppressor arg2_boolean
2334        = new NISuppressor (2, RangeInt.BooleanVal.class);
2335    
2336      private static NISuppressor result_even
2337        = new NISuppressor (1, RangeInt.Even.class);
2338      private static NISuppressor arg1_even
2339        = new NISuppressor (0, RangeInt.Even.class);
2340      private static NISuppressor arg2_even
2341        = new NISuppressor (2, RangeInt.Even.class);
2342    
2343      private static NISuppressor result_power2
2344        = new NISuppressor(1,RangeInt.PowerOfTwo.class);
2345      private static NISuppressor arg1_power2
2346        = new NISuppressor (0, RangeInt.PowerOfTwo.class);
2347      private static NISuppressor arg2_power2
2348        = new NISuppressor (2, RangeInt.PowerOfTwo.class);
2349    
2350      private static NISuppressor result_and0_arg1
2351        = new NISuppressor (1, 0, NumericInt.BitwiseAndZero.class);
2352      private static NISuppressor result_and0_arg2
2353        = new NISuppressor (1, 2, NumericInt.BitwiseAndZero.class);
2354      private static NISuppressor arg1_and0_arg2
2355        = new NISuppressor (0, 2, NumericInt.BitwiseAndZero.class);
2356    
2357      // The arguments to bitwise subset are backwards from what one
2358      // might expect.  The second argument is a subset of the first
2359      // argument
2360      private static NISuppressor arg1_bw_subset_arg2
2361        = new NISuppressor (2, 0, NumericInt.BitwiseSubset.class);
2362      private static NISuppressor arg2_bw_subset_arg1
2363        = new NISuppressor (0, 2, NumericInt.BitwiseSubset.class);
2364    
2365      private static NISuppressor result_shift0_arg1
2366        = new NISuppressor (1, 0, NumericInt.ShiftZero.class);
2367      private static NISuppressor result_shift0_arg2
2368        = new NISuppressor (1, 2, NumericInt.ShiftZero.class);
2369      private static NISuppressor arg1_shift0_arg2
2370        = new NISuppressor (0, 2, NumericInt.ShiftZero.class);
2371    
2372      private static NISuppressor arg2_divides_arg1
2373        = new NISuppressor (0, 2, NumericInt.Divides.class);
2374      private static NISuppressor arg1_divides_arg2
2375        = new NISuppressor (2, 0, NumericInt.Divides.class);
2376    
2377      private static NISuppressor arg2_valid_shift
2378        = new NISuppressor (2, RangeInt.Bound0_63.class);
2379    
2380        private static NISuppressionSet suppressions
2381          = new NISuppressionSet (new NISuppression[] {
2382    
2383            // (r == x) && (z <= x) ==> r = max(x, z)
2384            new NISuppression (result_eq_arg1, arg2_le_arg1, suppressee),
2385    
2386            // (r == z) && (x <= z) ==> r = max(x, z)
2387            new NISuppression (result_eq_arg2, arg1_le_arg2, suppressee),
2388    
2389          });
2390    
2391      // Create a suppression factory for functionBinary
2392    
2393    }
2394    
2395    /**
2396     * Represents the invariant <samp>z = Maximum (x, y)</samp>
2397     * over three long scalars.
2398     */
2399    public static class MaximumLong_zxy extends FunctionBinary {
2400      // We are Serializable, so we specify a version to allow changes to
2401      // method signatures without breaking serialization.  If you add or
2402      // remove fields, you should change this number to the current date.
2403      static final long serialVersionUID = 20031030L;
2404    
2405      private static /*@Prototype*/ MaximumLong_zxy proto;
2406    
2407      /** Returns the prototype invariant for MaximumLong_zxy **/
2408      public static /*@Prototype*/ MaximumLong_zxy get_proto() {
2409        if (proto == null)
2410          proto = new /*@Prototype*/ MaximumLong_zxy ();
2411        return (proto);
2412      }
2413    
2414      /** instantiate an invariant on the specified slice **/
2415      protected MaximumLong_zxy instantiate_dyn (PptSlice slice) /*@Prototype*/ {
2416        return new MaximumLong_zxy (slice);
2417      }
2418    
2419      private MaximumLong_zxy (PptSlice slice) {
2420        super (slice);
2421      }
2422    
2423      public MaximumLong_zxy () /*@Prototype*/ {
2424        super ();
2425      }
2426    
2427      private static String[] method_name = new String[] {"java.lang.Math.max(", ", ", ")"};
2428    
2429      public String[] get_method_name () {
2430        return (method_name);
2431      }
2432    
2433      private static int function_id = -1;
2434    
2435      public int get_function_id() {
2436        return (function_id);
2437      }
2438    
2439      public void set_function_id (int function_id) {
2440        assert MaximumLong_zxy.function_id == -1;
2441        MaximumLong_zxy.function_id = function_id;
2442      }
2443    
2444      private static int var_order = 3;
2445    
2446      public int get_var_order() {
2447        return var_order;
2448      }
2449    
2450      public boolean is_symmetric() {
2451    
2452          return (true);
2453      }
2454    
2455      public long func (long x, long y) {
2456    
2457        return (Math.max (x, y));
2458      }
2459    
2460      public InvariantStatus check_modified(long x, long y,
2461                                          long z, int count) {
2462        return (check_ordered (z, x, y, count));
2463      }
2464    
2465      public InvariantStatus add_modified(long x, long y,
2466                                          long z, int count) {
2467        if (Debug.logDetail())
2468          log (Fmt.spf ("result=%s, arg1=%s, arg2=%s", "" + z, "" + x,
2469                        "" + y));
2470        return (add_ordered (z, x, y, count));
2471      }
2472    
2473      public boolean isMaximum() {
2474        return (true);
2475      }
2476    
2477      /**
2478       * Returns a list of non-instantiating suppressions for this invariant.
2479       */
2480      public /*@Nullable*/ NISuppressionSet get_ni_suppressions() {
2481        if (NIS.dkconfig_enabled && dkconfig_enabled)
2482          return (suppressions);
2483        else
2484          return (null);
2485      }
2486    
2487      /** definition of this invariant (the suppressee) **/
2488      private static NISuppressee suppressee
2489                        = new NISuppressee (MaximumLong_zxy.class, 3);
2490    
2491      // suppressor definitions (used below)
2492      private static NISuppressor result_eq_arg1
2493        = new NISuppressor (2, 0, IntEqual.class);
2494      private static NISuppressor result_eq_arg2
2495        = new NISuppressor (2, 1, IntEqual.class);
2496      private static NISuppressor arg1_eq_arg2
2497        = new NISuppressor (0, 1, IntEqual.class);
2498    
2499      private static NISuppressor result_lt_arg1
2500        = new NISuppressor (2, 0, IntLessThan.class);
2501      private static NISuppressor result_lt_arg2
2502        = new NISuppressor (2, 1, IntLessThan.class);
2503      private static NISuppressor arg1_lt_arg2
2504        = new NISuppressor (0, 1, IntLessThan.class);
2505      private static NISuppressor arg2_lt_arg1
2506        = new NISuppressor (1, 0, IntLessThan.class);
2507    
2508      private static NISuppressor result_le_arg1
2509        = new NISuppressor (2, 0, IntLessEqual.class);
2510      private static NISuppressor result_le_arg2
2511        = new NISuppressor (2, 1, IntLessEqual.class);
2512      private static NISuppressor arg1_le_arg2
2513        = new NISuppressor (0, 1, IntLessEqual.class);
2514      private static NISuppressor arg2_le_arg1
2515        = new NISuppressor (1, 0, IntLessEqual.class);
2516    
2517      private static NISuppressor result_track0_arg1
2518        = new NISuppressor (2, 0, NumericInt.ZeroTrack.class);
2519      private static NISuppressor result_track0_arg2
2520        = new NISuppressor (2, 1, NumericInt.ZeroTrack.class);
2521      private static NISuppressor arg1_track0_arg2
2522        = new NISuppressor (0, 1, NumericInt.ZeroTrack.class);
2523      private static NISuppressor arg1_track0_result
2524        = new NISuppressor (0, 2, NumericInt.ZeroTrack.class);
2525      private static NISuppressor arg2_track0_result
2526        = new NISuppressor (1, 2, NumericInt.ZeroTrack.class);
2527      private static NISuppressor arg2_track0_arg1
2528        = new NISuppressor (1, 0, NumericInt.ZeroTrack.class);
2529    
2530      private static NISuppressor result_eq_1
2531        = new NISuppressor(2, RangeInt.EqualOne.class);
2532      private static NISuppressor arg1_eq_1
2533        = new NISuppressor (0, RangeInt.EqualOne.class);
2534      private static NISuppressor arg2_eq_1
2535        = new NISuppressor (1, RangeInt.EqualOne.class);
2536    
2537      private static NISuppressor result_eq_0
2538        = new NISuppressor(2,RangeInt.EqualZero.class);
2539      private static NISuppressor arg1_eq_0
2540        = new NISuppressor (0, RangeInt.EqualZero.class);
2541      private static NISuppressor arg2_eq_0
2542        = new NISuppressor (1, RangeInt.EqualZero.class);
2543    
2544      private static NISuppressor result_ne_0
2545        = new NISuppressor (2, NonZero.class);
2546      private static NISuppressor arg1_ne_0
2547        = new NISuppressor (0, NonZero.class);
2548      private static NISuppressor arg2_ne_0
2549        = new NISuppressor (1, NonZero.class);
2550    
2551      private static NISuppressor result_ge_0
2552        = new NISuppressor (2, RangeInt.GreaterEqualZero.class);
2553      private static NISuppressor arg1_ge_0
2554        = new NISuppressor (0, RangeInt.GreaterEqualZero.class);
2555      private static NISuppressor arg2_ge_0
2556        = new NISuppressor (1, RangeInt.GreaterEqualZero.class);
2557    
2558      private static NISuppressor result_ge_64
2559        = new NISuppressor (2, RangeInt.GreaterEqual64.class);
2560      private static NISuppressor arg1_ge_64
2561        = new NISuppressor (0, RangeInt.GreaterEqual64.class);
2562      private static NISuppressor arg2_ge_64
2563        = new NISuppressor (1, RangeInt.GreaterEqual64.class);
2564    
2565      private static NISuppressor result_boolean
2566        = new NISuppressor(2,RangeInt.BooleanVal.class);
2567      private static NISuppressor arg1_boolean
2568        = new NISuppressor (0, RangeInt.BooleanVal.class);
2569      private static NISuppressor arg2_boolean
2570        = new NISuppressor (1, RangeInt.BooleanVal.class);
2571    
2572      private static NISuppressor result_even
2573        = new NISuppressor (2, RangeInt.Even.class);
2574      private static NISuppressor arg1_even
2575        = new NISuppressor (0, RangeInt.Even.class);
2576      private static NISuppressor arg2_even
2577        = new NISuppressor (1, RangeInt.Even.class);
2578    
2579      private static NISuppressor result_power2
2580        = new NISuppressor(2,RangeInt.PowerOfTwo.class);
2581      private static NISuppressor arg1_power2
2582        = new NISuppressor (0, RangeInt.PowerOfTwo.class);
2583      private static NISuppressor arg2_power2
2584        = new NISuppressor (1, RangeInt.PowerOfTwo.class);
2585    
2586      private static NISuppressor result_and0_arg1
2587        = new NISuppressor (2, 0, NumericInt.BitwiseAndZero.class);
2588      private static NISuppressor result_and0_arg2
2589        = new NISuppressor (2, 1, NumericInt.BitwiseAndZero.class);
2590      private static NISuppressor arg1_and0_arg2
2591        = new NISuppressor (0, 1, NumericInt.BitwiseAndZero.class);
2592    
2593      // The arguments to bitwise subset are backwards from what one
2594      // might expect.  The second argument is a subset of the first
2595      // argument
2596      private static NISuppressor arg1_bw_subset_arg2
2597        = new NISuppressor (1, 0, NumericInt.BitwiseSubset.class);
2598      private static NISuppressor arg2_bw_subset_arg1
2599        = new NISuppressor (0, 1, NumericInt.BitwiseSubset.class);
2600    
2601      private static NISuppressor result_shift0_arg1
2602        = new NISuppressor (2, 0, NumericInt.ShiftZero.class);
2603      private static NISuppressor result_shift0_arg2
2604        = new NISuppressor (2, 1, NumericInt.ShiftZero.class);
2605      private static NISuppressor arg1_shift0_arg2
2606        = new NISuppressor (0, 1, NumericInt.ShiftZero.class);
2607    
2608      private static NISuppressor arg2_divides_arg1
2609        = new NISuppressor (0, 1, NumericInt.Divides.class);
2610      private static NISuppressor arg1_divides_arg2
2611        = new NISuppressor (1, 0, NumericInt.Divides.class);
2612    
2613      private static NISuppressor arg2_valid_shift
2614        = new NISuppressor (1, RangeInt.Bound0_63.class);
2615    
2616        private static NISuppressionSet suppressions
2617          = new NISuppressionSet (new NISuppression[] {
2618    
2619            // (r == x) && (y <= x) ==> r = max(x, y)
2620            new NISuppression (result_eq_arg1, arg2_le_arg1, suppressee),
2621    
2622            // (r == y) && (x <= y) ==> r = max(x, y)
2623            new NISuppression (result_eq_arg2, arg1_le_arg2, suppressee),
2624    
2625          });
2626    
2627      // Create a suppression factory for functionBinary
2628    
2629    }
2630    
2631      // default is that it is not this function, overriden in the subclass
2632      public boolean isDivision () {
2633        return (false);
2634      }
2635    
2636    /**
2637     * Represents the invariant <samp>x = Division (y, z)</samp>
2638     * over three long scalars.
2639     */
2640    public static class DivisionLong_xyz extends FunctionBinary {
2641      // We are Serializable, so we specify a version to allow changes to
2642      // method signatures without breaking serialization.  If you add or
2643      // remove fields, you should change this number to the current date.
2644      static final long serialVersionUID = 20031030L;
2645    
2646      private static /*@Prototype*/ DivisionLong_xyz proto;
2647    
2648      /** Returns the prototype invariant for DivisionLong_xyz **/
2649      public static /*@Prototype*/ DivisionLong_xyz get_proto() {
2650        if (proto == null)
2651          proto = new /*@Prototype*/ DivisionLong_xyz ();
2652        return (proto);
2653      }
2654    
2655      /** instantiate an invariant on the specified slice **/
2656      protected DivisionLong_xyz instantiate_dyn (PptSlice slice) /*@Prototype*/ {
2657        return new DivisionLong_xyz (slice);
2658      }
2659    
2660      private DivisionLong_xyz (PptSlice slice) {
2661        super (slice);
2662      }
2663    
2664      public DivisionLong_xyz () /*@Prototype*/ {
2665        super ();
2666      }
2667    
2668      private static String[] method_name = new String[] {"", " / ", ""};
2669    
2670      public String[] get_method_name () {
2671        return (method_name);
2672      }
2673    
2674      private static int function_id = -1;
2675    
2676      public int get_function_id() {
2677        return (function_id);
2678      }
2679    
2680      public void set_function_id (int function_id) {
2681        assert DivisionLong_xyz.function_id == -1;
2682        DivisionLong_xyz.function_id = function_id;
2683      }
2684    
2685      private static int var_order = 1;
2686    
2687      public int get_var_order() {
2688        return var_order;
2689      }
2690    
2691      public boolean is_symmetric() {
2692    
2693          return (false);
2694      }
2695    
2696      public long func (long y, long z) {
2697    
2698        return ((y / z));
2699      }
2700    
2701      public InvariantStatus check_modified(long x, long y,
2702                                          long z, int count) {
2703        return (check_ordered (x, y, z, count));
2704      }
2705    
2706      public InvariantStatus add_modified(long x, long y,
2707                                          long z, int count) {
2708        if (Debug.logDetail())
2709          log (Fmt.spf ("result=%s, arg1=%s, arg2=%s", "" + x, "" + y,
2710                        "" + z));
2711        return (add_ordered (x, y, z, count));
2712      }
2713    
2714      public boolean isDivision() {
2715        return (true);
2716      }
2717    
2718        public boolean isExact() { return true; }
2719    
2720      /**
2721       * Returns a list of non-instantiating suppressions for this invariant.
2722       */
2723      public /*@Nullable*/ NISuppressionSet get_ni_suppressions() {
2724        if (NIS.dkconfig_enabled && dkconfig_enabled)
2725          return (suppressions);
2726        else
2727          return (null);
2728      }
2729    
2730      /** definition of this invariant (the suppressee) **/
2731      private static NISuppressee suppressee
2732                        = new NISuppressee (DivisionLong_xyz.class, 3);
2733    
2734      // suppressor definitions (used below)
2735      private static NISuppressor result_eq_arg1
2736        = new NISuppressor (0, 1, IntEqual.class);
2737      private static NISuppressor result_eq_arg2
2738        = new NISuppressor (0, 2, IntEqual.class);
2739      private static NISuppressor arg1_eq_arg2
2740        = new NISuppressor (1, 2, IntEqual.class);
2741    
2742      private static NISuppressor result_lt_arg1
2743        = new NISuppressor (0, 1, IntLessThan.class);
2744      private static NISuppressor result_lt_arg2
2745        = new NISuppressor (0, 2, IntLessThan.class);
2746      private static NISuppressor arg1_lt_arg2
2747        = new NISuppressor (1, 2, IntLessThan.class);
2748      private static NISuppressor arg2_lt_arg1
2749        = new NISuppressor (2, 1, IntLessThan.class);
2750    
2751      private static NISuppressor result_le_arg1
2752        = new NISuppressor (0, 1, IntLessEqual.class);
2753      private static NISuppressor result_le_arg2
2754        = new NISuppressor (0, 2, IntLessEqual.class);
2755      private static NISuppressor arg1_le_arg2
2756        = new NISuppressor (1, 2, IntLessEqual.class);
2757      private static NISuppressor arg2_le_arg1
2758        = new NISuppressor (2, 1, IntLessEqual.class);
2759    
2760      private static NISuppressor result_track0_arg1
2761        = new NISuppressor (0, 1, NumericInt.ZeroTrack.class);
2762      private static NISuppressor result_track0_arg2
2763        = new NISuppressor (0, 2, NumericInt.ZeroTrack.class);
2764      private static NISuppressor arg1_track0_arg2
2765        = new NISuppressor (1, 2, NumericInt.ZeroTrack.class);
2766      private static NISuppressor arg1_track0_result
2767        = new NISuppressor (1, 0, NumericInt.ZeroTrack.class);
2768      private static NISuppressor arg2_track0_result
2769        = new NISuppressor (2, 0, NumericInt.ZeroTrack.class);
2770      private static NISuppressor arg2_track0_arg1
2771        = new NISuppressor (2, 1, NumericInt.ZeroTrack.class);
2772    
2773      private static NISuppressor result_eq_1
2774        = new NISuppressor(0, RangeInt.EqualOne.class);
2775      private static NISuppressor arg1_eq_1
2776        = new NISuppressor (1, RangeInt.EqualOne.class);
2777      private static NISuppressor arg2_eq_1
2778        = new NISuppressor (2, RangeInt.EqualOne.class);
2779    
2780      private static NISuppressor result_eq_0
2781        = new NISuppressor(0,RangeInt.EqualZero.class);
2782      private static NISuppressor arg1_eq_0
2783        = new NISuppressor (1, RangeInt.EqualZero.class);
2784      private static NISuppressor arg2_eq_0
2785        = new NISuppressor (2, RangeInt.EqualZero.class);
2786    
2787      private static NISuppressor result_ne_0
2788        = new NISuppressor (0, NonZero.class);
2789      private static NISuppressor arg1_ne_0
2790        = new NISuppressor (1, NonZero.class);
2791      private static NISuppressor arg2_ne_0
2792        = new NISuppressor (2, NonZero.class);
2793    
2794      private static NISuppressor result_ge_0
2795        = new NISuppressor (0, RangeInt.GreaterEqualZero.class);
2796      private static NISuppressor arg1_ge_0
2797        = new NISuppressor (1, RangeInt.GreaterEqualZero.class);
2798      private static NISuppressor arg2_ge_0
2799        = new NISuppressor (2, RangeInt.GreaterEqualZero.class);
2800    
2801      private static NISuppressor result_ge_64
2802        = new NISuppressor (0, RangeInt.GreaterEqual64.class);
2803      private static NISuppressor arg1_ge_64
2804        = new NISuppressor (1, RangeInt.GreaterEqual64.class);
2805      private static NISuppressor arg2_ge_64
2806        = new NISuppressor (2, RangeInt.GreaterEqual64.class);
2807    
2808      private static NISuppressor result_boolean
2809        = new NISuppressor(0,RangeInt.BooleanVal.class);
2810      private static NISuppressor arg1_boolean
2811        = new NISuppressor (1, RangeInt.BooleanVal.class);
2812      private static NISuppressor arg2_boolean
2813        = new NISuppressor (2, RangeInt.BooleanVal.class);
2814    
2815      private static NISuppressor result_even
2816        = new NISuppressor (0, RangeInt.Even.class);
2817      private static NISuppressor arg1_even
2818        = new NISuppressor (1, RangeInt.Even.class);
2819      private static NISuppressor arg2_even
2820        = new NISuppressor (2, RangeInt.Even.class);
2821    
2822      private static NISuppressor result_power2
2823        = new NISuppressor(0,RangeInt.PowerOfTwo.class);
2824      private static NISuppressor arg1_power2
2825        = new NISuppressor (1, RangeInt.PowerOfTwo.class);
2826      private static NISuppressor arg2_power2
2827        = new NISuppressor (2, RangeInt.PowerOfTwo.class);
2828    
2829      private static NISuppressor result_and0_arg1
2830        = new NISuppressor (0, 1, NumericInt.BitwiseAndZero.class);
2831      private static NISuppressor result_and0_arg2
2832        = new NISuppressor (0, 2, NumericInt.BitwiseAndZero.class);
2833      private static NISuppressor arg1_and0_arg2
2834        = new NISuppressor (1, 2, NumericInt.BitwiseAndZero.class);
2835    
2836      // The arguments to bitwise subset are backwards from what one
2837      // might expect.  The second argument is a subset of the first
2838      // argument
2839      private static NISuppressor arg1_bw_subset_arg2
2840        = new NISuppressor (2, 1, NumericInt.BitwiseSubset.class);
2841      private static NISuppressor arg2_bw_subset_arg1
2842        = new NISuppressor (1, 2, NumericInt.BitwiseSubset.class);
2843    
2844      private static NISuppressor result_shift0_arg1
2845        = new NISuppressor (0, 1, NumericInt.ShiftZero.class);
2846      private static NISuppressor result_shift0_arg2
2847        = new NISuppressor (0, 2, NumericInt.ShiftZero.class);
2848      private static NISuppressor arg1_shift0_arg2
2849        = new NISuppressor (1, 2, NumericInt.ShiftZero.class);
2850    
2851      private static NISuppressor arg2_divides_arg1
2852        = new NISuppressor (1, 2, NumericInt.Divides.class);
2853      private static NISuppressor arg1_divides_arg2
2854        = new NISuppressor (2, 1, NumericInt.Divides.class);
2855    
2856      private static NISuppressor arg2_valid_shift
2857        = new NISuppressor (2, RangeInt.Bound0_63.class);
2858    
2859        private static NISuppressionSet suppressions
2860          = new NISuppressionSet (new NISuppression[] {
2861    
2862            // (r == 0) && (y < z) && (y >= 0) && (z != 0) ==> r = y / z
2863            new NISuppression (result_eq_0, arg1_lt_arg2, arg1_ge_0, arg2_ne_0, suppressee),
2864    
2865            // (y == z) && (z != 0) && (r == 1)
2866            new NISuppression (arg1_eq_arg2, arg2_ne_0, result_eq_1, suppressee),
2867    
2868            // (r == y) && (z == 1) ==> r = y / z
2869            new NISuppression (result_eq_arg1, arg2_eq_1, suppressee),
2870          });
2871    
2872      // Create a suppression factory for functionBinary
2873    
2874    }
2875    
2876    /**
2877     * Represents the invariant <samp>y = Division (x, z)</samp>
2878     * over three long scalars.
2879     */
2880    public static class DivisionLong_yxz extends FunctionBinary {
2881      // We are Serializable, so we specify a version to allow changes to
2882      // method signatures without breaking serialization.  If you add or
2883      // remove fields, you should change this number to the current date.
2884      static final long serialVersionUID = 20031030L;
2885    
2886      private static /*@Prototype*/ DivisionLong_yxz proto;
2887    
2888      /** Returns the prototype invariant for DivisionLong_yxz **/
2889      public static /*@Prototype*/ DivisionLong_yxz get_proto() {
2890        if (proto == null)
2891          proto = new /*@Prototype*/ DivisionLong_yxz ();
2892        return (proto);
2893      }
2894    
2895      /** instantiate an invariant on the specified slice **/
2896      protected DivisionLong_yxz instantiate_dyn (PptSlice slice) /*@Prototype*/ {
2897        return new DivisionLong_yxz (slice);
2898      }
2899    
2900      private DivisionLong_yxz (PptSlice slice) {
2901        super (slice);
2902      }
2903    
2904      public DivisionLong_yxz () /*@Prototype*/ {
2905        super ();
2906      }
2907    
2908      private static String[] method_name = new String[] {"", " / ", ""};
2909    
2910      public String[] get_method_name () {
2911        return (method_name);
2912      }
2913    
2914      private static int function_id = -1;
2915    
2916      public int get_function_id() {
2917        return (function_id);
2918      }
2919    
2920      public void set_function_id (int function_id) {
2921        assert DivisionLong_yxz.function_id == -1;
2922        DivisionLong_yxz.function_id = function_id;
2923      }
2924    
2925      private static int var_order = 2;
2926    
2927      public int get_var_order() {
2928        return var_order;
2929      }
2930    
2931      public boolean is_symmetric() {
2932    
2933          return (false);
2934      }
2935    
2936      public long func (long x, long z) {
2937    
2938        return ((x / z));
2939      }
2940    
2941      public InvariantStatus check_modified(long x, long y,
2942                                          long z, int count) {
2943        return (check_ordered (y, x, z, count));
2944      }
2945    
2946      public InvariantStatus add_modified(long x, long y,
2947                                          long z, int count) {
2948        if (Debug.logDetail())
2949          log (Fmt.spf ("result=%s, arg1=%s, arg2=%s", "" + y, "" + x,
2950                        "" + z));
2951        return (add_ordered (y, x, z, count));
2952      }
2953    
2954      public boolean isDivision() {
2955        return (true);
2956      }
2957    
2958        public boolean isExact() { return true; }
2959    
2960      /**
2961       * Returns a list of non-instantiating suppressions for this invariant.
2962       */
2963      public /*@Nullable*/ NISuppressionSet get_ni_suppressions() {
2964        if (NIS.dkconfig_enabled && dkconfig_enabled)
2965          return (suppressions);
2966        else
2967          return (null);
2968      }
2969    
2970      /** definition of this invariant (the suppressee) **/
2971      private static NISuppressee suppressee
2972                        = new NISuppressee (DivisionLong_yxz.class, 3);
2973    
2974      // suppressor definitions (used below)
2975      private static NISuppressor result_eq_arg1
2976        = new NISuppressor (1, 0, IntEqual.class);
2977      private static NISuppressor result_eq_arg2
2978        = new NISuppressor (1, 2, IntEqual.class);
2979      private static NISuppressor arg1_eq_arg2
2980        = new NISuppressor (0, 2, IntEqual.class);
2981    
2982      private static NISuppressor result_lt_arg1
2983        = new NISuppressor (1, 0, IntLessThan.class);
2984      private static NISuppressor result_lt_arg2
2985        = new NISuppressor (1, 2, IntLessThan.class);
2986      private static NISuppressor arg1_lt_arg2
2987        = new NISuppressor (0, 2, IntLessThan.class);
2988      private static NISuppressor arg2_lt_arg1
2989        = new NISuppressor (2, 0, IntLessThan.class);
2990    
2991      private static NISuppressor result_le_arg1
2992        = new NISuppressor (1, 0, IntLessEqual.class);
2993      private static NISuppressor result_le_arg2
2994        = new NISuppressor (1, 2, IntLessEqual.class);
2995      private static NISuppressor arg1_le_arg2
2996        = new NISuppressor (0, 2, IntLessEqual.class);
2997      private static NISuppressor arg2_le_arg1
2998        = new NISuppressor (2, 0, IntLessEqual.class);
2999    
3000      private static NISuppressor result_track0_arg1
3001        = new NISuppressor (1, 0, NumericInt.ZeroTrack.class);
3002      private static NISuppressor result_track0_arg2
3003        = new NISuppressor (1, 2, NumericInt.ZeroTrack.class);
3004      private static NISuppressor arg1_track0_arg2
3005        = new NISuppressor (0, 2, NumericInt.ZeroTrack.class);
3006      private static NISuppressor arg1_track0_result
3007        = new NISuppressor (0, 1, NumericInt.ZeroTrack.class);
3008      private static NISuppressor arg2_track0_result
3009        = new NISuppressor (2, 1, NumericInt.ZeroTrack.class);
3010      private static NISuppressor arg2_track0_arg1
3011        = new NISuppressor (2, 0, NumericInt.ZeroTrack.class);
3012    
3013      private static NISuppressor result_eq_1
3014        = new NISuppressor(1, RangeInt.EqualOne.class);
3015      private static NISuppressor arg1_eq_1
3016        = new NISuppressor (0, RangeInt.EqualOne.class);
3017      private static NISuppressor arg2_eq_1
3018        = new NISuppressor (2, RangeInt.EqualOne.class);
3019    
3020      private static NISuppressor result_eq_0
3021        = new NISuppressor(1,RangeInt.EqualZero.class);
3022      private static NISuppressor arg1_eq_0
3023        = new NISuppressor (0, RangeInt.EqualZero.class);
3024      private static NISuppressor arg2_eq_0
3025        = new NISuppressor (2, RangeInt.EqualZero.class);
3026    
3027      private static NISuppressor result_ne_0
3028        = new NISuppressor (1, NonZero.class);
3029      private static NISuppressor arg1_ne_0
3030        = new NISuppressor (0, NonZero.class);
3031      private static NISuppressor arg2_ne_0
3032        = new NISuppressor (2, NonZero.class);
3033    
3034      private static NISuppressor result_ge_0
3035        = new NISuppressor (1, RangeInt.GreaterEqualZero.class);
3036      private static NISuppressor arg1_ge_0
3037        = new NISuppressor (0, RangeInt.GreaterEqualZero.class);
3038      private static NISuppressor arg2_ge_0
3039        = new NISuppressor (2, RangeInt.GreaterEqualZero.class);
3040    
3041      private static NISuppressor result_ge_64
3042        = new NISuppressor (1, RangeInt.GreaterEqual64.class);
3043      private static NISuppressor arg1_ge_64
3044        = new NISuppressor (0, RangeInt.GreaterEqual64.class);
3045      private static NISuppressor arg2_ge_64
3046        = new NISuppressor (2, RangeInt.GreaterEqual64.class);
3047    
3048      private static NISuppressor result_boolean
3049        = new NISuppressor(1,RangeInt.BooleanVal.class);
3050      private static NISuppressor arg1_boolean
3051        = new NISuppressor (0, RangeInt.BooleanVal.class);
3052      private static NISuppressor arg2_boolean
3053        = new NISuppressor (2, RangeInt.BooleanVal.class);
3054    
3055      private static NISuppressor result_even
3056        = new NISuppressor (1, RangeInt.Even.class);
3057      private static NISuppressor arg1_even
3058        = new NISuppressor (0, RangeInt.Even.class);
3059      private static NISuppressor arg2_even
3060        = new NISuppressor (2, RangeInt.Even.class);
3061    
3062      private static NISuppressor result_power2
3063        = new NISuppressor(1,RangeInt.PowerOfTwo.class);
3064      private static NISuppressor arg1_power2
3065        = new NISuppressor (0, RangeInt.PowerOfTwo.class);
3066      private static NISuppressor arg2_power2
3067        = new NISuppressor (2, RangeInt.PowerOfTwo.class);
3068    
3069      private static NISuppressor result_and0_arg1
3070        = new NISuppressor (1, 0, NumericInt.BitwiseAndZero.class);
3071      private static NISuppressor result_and0_arg2
3072        = new NISuppressor (1, 2, NumericInt.BitwiseAndZero.class);
3073      private static NISuppressor arg1_and0_arg2
3074        = new NISuppressor (0, 2, NumericInt.BitwiseAndZero.class);
3075    
3076      // The arguments to bitwise subset are backwards from what one
3077      // might expect.  The second argument is a subset of the first
3078      // argument
3079      private static NISuppressor arg1_bw_subset_arg2
3080        = new NISuppressor (2, 0, NumericInt.BitwiseSubset.class);
3081      private static NISuppressor arg2_bw_subset_arg1
3082        = new NISuppressor (0, 2, NumericInt.BitwiseSubset.class);
3083    
3084      private static NISuppressor result_shift0_arg1
3085        = new NISuppressor (1, 0, NumericInt.ShiftZero.class);
3086      private static NISuppressor result_shift0_arg2
3087        = new NISuppressor (1, 2, NumericInt.ShiftZero.class);
3088      private static NISuppressor arg1_shift0_arg2
3089        = new NISuppressor (0, 2, NumericInt.ShiftZero.class);
3090    
3091      private static NISuppressor arg2_divides_arg1
3092        = new NISuppressor (0, 2, NumericInt.Divides.class);
3093      private static NISuppressor arg1_divides_arg2
3094        = new NISuppressor (2, 0, NumericInt.Divides.class);
3095    
3096      private static NISuppressor arg2_valid_shift
3097        = new NISuppressor (2, RangeInt.Bound0_63.class);
3098    
3099        private static NISuppressionSet suppressions
3100          = new NISuppressionSet (new NISuppression[] {
3101    
3102            // (r == 0) && (x < z) && (x >= 0) && (z != 0) ==> r = x / z
3103            new NISuppression (result_eq_0, arg1_lt_arg2, arg1_ge_0, arg2_ne_0, suppressee),
3104    
3105            // (x == z) && (z != 0) && (r == 1)
3106            new NISuppression (arg1_eq_arg2, arg2_ne_0, result_eq_1, suppressee),
3107    
3108            // (r == x) && (z == 1) ==> r = x / z
3109            new NISuppression (result_eq_arg1, arg2_eq_1, suppressee),
3110          });
3111    
3112      // Create a suppression factory for functionBinary
3113    
3114    }
3115    
3116    /**
3117     * Represents the invariant <samp>z = Division (x, y)</samp>
3118     * over three long scalars.
3119     */
3120    public static class DivisionLong_zxy extends FunctionBinary {
3121      // We are Serializable, so we specify a version to allow changes to
3122      // method signatures without breaking serialization.  If you add or
3123      // remove fields, you should change this number to the current date.
3124      static final long serialVersionUID = 20031030L;
3125    
3126      private static /*@Prototype*/ DivisionLong_zxy proto;
3127    
3128      /** Returns the prototype invariant for DivisionLong_zxy **/
3129      public static /*@Prototype*/ DivisionLong_zxy get_proto() {
3130        if (proto == null)
3131          proto = new /*@Prototype*/ DivisionLong_zxy ();
3132        return (proto);
3133      }
3134    
3135      /** instantiate an invariant on the specified slice **/
3136      protected DivisionLong_zxy instantiate_dyn (PptSlice slice) /*@Prototype*/ {
3137        return new DivisionLong_zxy (slice);
3138      }
3139    
3140      private DivisionLong_zxy (PptSlice slice) {
3141        super (slice);
3142      }
3143    
3144      public DivisionLong_zxy () /*@Prototype*/ {
3145        super ();
3146      }
3147    
3148      private static String[] method_name = new String[] {"", " / ", ""};
3149    
3150      public String[] get_method_name () {
3151        return (method_name);
3152      }
3153    
3154      private static int function_id = -1;
3155    
3156      public int get_function_id() {
3157        return (function_id);
3158      }
3159    
3160      public void set_function_id (int function_id) {
3161        assert DivisionLong_zxy.function_id == -1;
3162        DivisionLong_zxy.function_id = function_id;
3163      }
3164    
3165      private static int var_order = 3;
3166    
3167      public int get_var_order() {
3168        return var_order;
3169      }
3170    
3171      public boolean is_symmetric() {
3172    
3173          return (false);
3174      }
3175    
3176      public long func (long x, long y) {
3177    
3178        return ((x / y));
3179      }
3180    
3181      public InvariantStatus check_modified(long x, long y,
3182                                          long z, int count) {
3183        return (check_ordered (z, x, y, count));
3184      }
3185    
3186      public InvariantStatus add_modified(long x, long y,
3187                                          long z, int count) {
3188        if (Debug.logDetail())
3189          log (Fmt.spf ("result=%s, arg1=%s, arg2=%s", "" + z, "" + x,
3190                        "" + y));
3191        return (add_ordered (z, x, y, count));
3192      }
3193    
3194      public boolean isDivision() {
3195        return (true);
3196      }
3197    
3198        public boolean isExact() { return true; }
3199    
3200      /**
3201       * Returns a list of non-instantiating suppressions for this invariant.
3202       */
3203      public /*@Nullable*/ NISuppressionSet get_ni_suppressions() {
3204        if (NIS.dkconfig_enabled && dkconfig_enabled)
3205          return (suppressions);
3206        else
3207          return (null);
3208      }
3209    
3210      /** definition of this invariant (the suppressee) **/
3211      private static NISuppressee suppressee
3212                        = new NISuppressee (DivisionLong_zxy.class, 3);
3213    
3214      // suppressor definitions (used below)
3215      private static NISuppressor result_eq_arg1
3216        = new NISuppressor (2, 0, IntEqual.class);
3217      private static NISuppressor result_eq_arg2
3218        = new NISuppressor (2, 1, IntEqual.class);
3219      private static NISuppressor arg1_eq_arg2
3220        = new NISuppressor (0, 1, IntEqual.class);
3221    
3222      private static NISuppressor result_lt_arg1
3223        = new NISuppressor (2, 0, IntLessThan.class);
3224      private static NISuppressor result_lt_arg2
3225        = new NISuppressor (2, 1, IntLessThan.class);
3226      private static NISuppressor arg1_lt_arg2
3227        = new NISuppressor (0, 1, IntLessThan.class);
3228      private static NISuppressor arg2_lt_arg1
3229        = new NISuppressor (1, 0, IntLessThan.class);
3230    
3231      private static NISuppressor result_le_arg1
3232        = new NISuppressor (2, 0, IntLessEqual.class);
3233      private static NISuppressor result_le_arg2
3234        = new NISuppressor (2, 1, IntLessEqual.class);
3235      private static NISuppressor arg1_le_arg2
3236        = new NISuppressor (0, 1, IntLessEqual.class);
3237      private static NISuppressor arg2_le_arg1
3238        = new NISuppressor (1, 0, IntLessEqual.class);
3239    
3240      private static NISuppressor result_track0_arg1
3241        = new NISuppressor (2, 0, NumericInt.ZeroTrack.class);
3242      private static NISuppressor result_track0_arg2
3243        = new NISuppressor (2, 1, NumericInt.ZeroTrack.class);
3244      private static NISuppressor arg1_track0_arg2
3245        = new NISuppressor (0, 1, NumericInt.ZeroTrack.class);
3246      private static NISuppressor arg1_track0_result
3247        = new NISuppressor (0, 2, NumericInt.ZeroTrack.class);
3248      private static NISuppressor arg2_track0_result
3249        = new NISuppressor (1, 2, NumericInt.ZeroTrack.class);
3250      private static NISuppressor arg2_track0_arg1
3251        = new NISuppressor (1, 0, NumericInt.ZeroTrack.class);
3252    
3253      private static NISuppressor result_eq_1
3254        = new NISuppressor(2, RangeInt.EqualOne.class);
3255      private static NISuppressor arg1_eq_1
3256        = new NISuppressor (0, RangeInt.EqualOne.class);
3257      private static NISuppressor arg2_eq_1
3258        = new NISuppressor (1, RangeInt.EqualOne.class);
3259    
3260      private static NISuppressor result_eq_0
3261        = new NISuppressor(2,RangeInt.EqualZero.class);
3262      private static NISuppressor arg1_eq_0
3263        = new NISuppressor (0, RangeInt.EqualZero.class);
3264      private static NISuppressor arg2_eq_0
3265        = new NISuppressor (1, RangeInt.EqualZero.class);
3266    
3267      private static NISuppressor result_ne_0
3268        = new NISuppressor (2, NonZero.class);
3269      private static NISuppressor arg1_ne_0
3270        = new NISuppressor (0, NonZero.class);
3271      private static NISuppressor arg2_ne_0
3272        = new NISuppressor (1, NonZero.class);
3273    
3274      private static NISuppressor result_ge_0
3275        = new NISuppressor (2, RangeInt.GreaterEqualZero.class);
3276      private static NISuppressor arg1_ge_0
3277        = new NISuppressor (0, RangeInt.GreaterEqualZero.class);
3278      private static NISuppressor arg2_ge_0
3279        = new NISuppressor (1, RangeInt.GreaterEqualZero.class);
3280    
3281      private static NISuppressor result_ge_64
3282        = new NISuppressor (2, RangeInt.GreaterEqual64.class);
3283      private static NISuppressor arg1_ge_64
3284        = new NISuppressor (0, RangeInt.GreaterEqual64.class);
3285      private static NISuppressor arg2_ge_64
3286        = new NISuppressor (1, RangeInt.GreaterEqual64.class);
3287    
3288      private static NISuppressor result_boolean
3289        = new NISuppressor(2,RangeInt.BooleanVal.class);
3290      private static NISuppressor arg1_boolean
3291        = new NISuppressor (0, RangeInt.BooleanVal.class);
3292      private static NISuppressor arg2_boolean
3293        = new NISuppressor (1, RangeInt.BooleanVal.class);
3294    
3295      private static NISuppressor result_even
3296        = new NISuppressor (2, RangeInt.Even.class);
3297      private static NISuppressor arg1_even
3298        = new NISuppressor (0, RangeInt.Even.class);
3299      private static NISuppressor arg2_even
3300        = new NISuppressor (1, RangeInt.Even.class);
3301    
3302      private static NISuppressor result_power2
3303        = new NISuppressor(2,RangeInt.PowerOfTwo.class);
3304      private static NISuppressor arg1_power2
3305        = new NISuppressor (0, RangeInt.PowerOfTwo.class);
3306      private static NISuppressor arg2_power2
3307        = new NISuppressor (1, RangeInt.PowerOfTwo.class);
3308    
3309      private static NISuppressor result_and0_arg1
3310        = new NISuppressor (2, 0, NumericInt.BitwiseAndZero.class);
3311      private static NISuppressor result_and0_arg2
3312        = new NISuppressor (2, 1, NumericInt.BitwiseAndZero.class);
3313      private static NISuppressor arg1_and0_arg2
3314        = new NISuppressor (0, 1, NumericInt.BitwiseAndZero.class);
3315    
3316      // The arguments to bitwise subset are backwards from what one
3317      // might expect.  The second argument is a subset of the first
3318      // argument
3319      private static NISuppressor arg1_bw_subset_arg2
3320        = new NISuppressor (1, 0, NumericInt.BitwiseSubset.class);
3321      private static NISuppressor arg2_bw_subset_arg1
3322        = new NISuppressor (0, 1, NumericInt.BitwiseSubset.class);
3323    
3324      private static NISuppressor result_shift0_arg1
3325        = new NISuppressor (2, 0, NumericInt.ShiftZero.class);
3326      private static NISuppressor result_shift0_arg2
3327        = new NISuppressor (2, 1, NumericInt.ShiftZero.class);
3328      private static NISuppressor arg1_shift0_arg2
3329        = new NISuppressor (0, 1, NumericInt.ShiftZero.class);
3330    
3331      private static NISuppressor arg2_divides_arg1
3332        = new NISuppressor (0, 1, NumericInt.Divides.class);
3333      private static NISuppressor arg1_divides_arg2
3334        = new NISuppressor (1, 0, NumericInt.Divides.class);
3335    
3336      private static NISuppressor arg2_valid_shift
3337        = new NISuppressor (1, RangeInt.Bound0_63.class);
3338    
3339        private static NISuppressionSet suppressions
3340          = new NISuppressionSet (new NISuppression[] {
3341    
3342            // (r == 0) && (x < y) && (x >= 0) && (y != 0) ==> r = x / y
3343            new NISuppression (result_eq_0, arg1_lt_arg2, arg1_ge_0, arg2_ne_0, suppressee),
3344    
3345            // (x == y) && (y != 0) && (r == 1)
3346            new NISuppression (arg1_eq_arg2, arg2_ne_0, result_eq_1, suppressee),
3347    
3348            // (r == x) && (y == 1) ==> r = x / y
3349            new NISuppression (result_eq_arg1, arg2_eq_1, suppressee),
3350          });
3351    
3352      // Create a suppression factory for functionBinary
3353    
3354    }
3355    
3356    /**
3357     * Represents the invariant <samp>x = Division (z, y)</samp>
3358     * over three long scalars.
3359     */
3360    public static class DivisionLong_xzy extends FunctionBinary {
3361      // We are Serializable, so we specify a version to allow changes to
3362      // method signatures without breaking serialization.  If you add or
3363      // remove fields, you should change this number to the current date.
3364      static final long serialVersionUID = 20031030L;
3365    
3366      private static /*@Prototype*/ DivisionLong_xzy proto;
3367    
3368      /** Returns the prototype invariant for DivisionLong_xzy **/
3369      public static /*@Prototype*/ DivisionLong_xzy get_proto() {
3370        if (proto == null)
3371          proto = new /*@Prototype*/ DivisionLong_xzy ();
3372        return (proto);
3373      }
3374    
3375      /** instantiate an invariant on the specified slice **/
3376      protected DivisionLong_xzy instantiate_dyn (PptSlice slice) /*@Prototype*/ {
3377        return new DivisionLong_xzy (slice);
3378      }
3379    
3380      private DivisionLong_xzy (PptSlice slice) {
3381        super (slice);
3382      }
3383    
3384      public DivisionLong_xzy () /*@Prototype*/ {
3385        super ();
3386      }
3387    
3388      private static String[] method_name = new String[] {"", " / ", ""};
3389    
3390      public String[] get_method_name () {
3391        return (method_name);
3392      }
3393    
3394      private static int function_id = -1;
3395    
3396      public int get_function_id() {
3397        return (function_id);
3398      }
3399    
3400      public void set_function_id (int function_id) {
3401        assert DivisionLong_xzy.function_id == -1;
3402        DivisionLong_xzy.function_id = function_id;
3403      }
3404    
3405      private static int var_order = 4;
3406    
3407      public int get_var_order() {
3408        return var_order;
3409      }
3410    
3411      public boolean is_symmetric() {
3412    
3413          return (false);
3414      }
3415    
3416      public long func (long z, long y) {
3417    
3418        return ((z / y));
3419      }
3420    
3421      public InvariantStatus check_modified(long x, long y,
3422                                          long z, int count) {
3423        return (check_ordered (x, z, y, count));
3424      }
3425    
3426      public InvariantStatus add_modified(long x, long y,
3427                                          long z, int count) {
3428        if (Debug.logDetail())
3429          log (Fmt.spf ("result=%s, arg1=%s, arg2=%s", "" + x, "" + z,
3430                        "" + y));
3431        return (add_ordered (x, z, y, count));
3432      }
3433    
3434      public boolean isDivision() {
3435        return (true);
3436      }
3437    
3438        public boolean isExact() { return true; }
3439    
3440      /**
3441       * Returns a list of non-instantiating suppressions for this invariant.
3442       */
3443      public /*@Nullable*/ NISuppressionSet get_ni_suppressions() {
3444        if (NIS.dkconfig_enabled && dkconfig_enabled)
3445          return (suppressions);
3446        else
3447          return (null);
3448      }
3449    
3450      /** definition of this invariant (the suppressee) **/
3451      private static NISuppressee suppressee
3452                        = new NISuppressee (DivisionLong_xzy.class, 3);
3453    
3454      // suppressor definitions (used below)
3455      private static NISuppressor result_eq_arg1
3456        = new NISuppressor (0, 2, IntEqual.class);
3457      private static NISuppressor result_eq_arg2
3458        = new NISuppressor (0, 1, IntEqual.class);
3459      private static NISuppressor arg1_eq_arg2
3460        = new NISuppressor (2, 1, IntEqual.class);
3461    
3462      private static NISuppressor result_lt_arg1
3463        = new NISuppressor (0, 2, IntLessThan.class);
3464      private static NISuppressor result_lt_arg2
3465        = new NISuppressor (0, 1, IntLessThan.class);
3466      private static NISuppressor arg1_lt_arg2
3467        = new NISuppressor (2, 1, IntLessThan.class);
3468      private static NISuppressor arg2_lt_arg1
3469        = new NISuppressor (1, 2, IntLessThan.class);
3470    
3471      private static NISuppressor result_le_arg1
3472        = new NISuppressor (0, 2, IntLessEqual.class);
3473      private static NISuppressor result_le_arg2
3474        = new NISuppressor (0, 1, IntLessEqual.class);
3475      private static NISuppressor arg1_le_arg2
3476        = new NISuppressor (2, 1, IntLessEqual.class);
3477      private static NISuppressor arg2_le_arg1
3478        = new NISuppressor (1, 2, IntLessEqual.class);
3479    
3480      private static NISuppressor result_track0_arg1
3481        = new NISuppressor (0, 2, NumericInt.ZeroTrack.class);
3482      private static NISuppressor result_track0_arg2
3483        = new NISuppressor (0, 1, NumericInt.ZeroTrack.class);
3484      private static NISuppressor arg1_track0_arg2
3485        = new NISuppressor (2, 1, NumericInt.ZeroTrack.class);
3486      private static NISuppressor arg1_track0_result
3487        = new NISuppressor (2, 0, NumericInt.ZeroTrack.class);
3488      private static NISuppressor arg2_track0_result
3489        = new NISuppressor (1, 0, NumericInt.ZeroTrack.class);
3490      private static NISuppressor arg2_track0_arg1
3491        = new NISuppressor (1, 2, NumericInt.ZeroTrack.class);
3492    
3493      private static NISuppressor result_eq_1
3494        = new NISuppressor(0, RangeInt.EqualOne.class);
3495      private static NISuppressor arg1_eq_1
3496        = new NISuppressor (2, RangeInt.EqualOne.class);
3497      private static NISuppressor arg2_eq_1
3498        = new NISuppressor (1, RangeInt.EqualOne.class);
3499    
3500      private static NISuppressor result_eq_0
3501        = new NISuppressor(0,RangeInt.EqualZero.class);
3502      private static NISuppressor arg1_eq_0
3503        = new NISuppressor (2, RangeInt.EqualZero.class);
3504      private static NISuppressor arg2_eq_0
3505        = new NISuppressor (1, RangeInt.EqualZero.class);
3506    
3507      private static NISuppressor result_ne_0
3508        = new NISuppressor (0, NonZero.class);
3509      private static NISuppressor arg1_ne_0
3510        = new NISuppressor (2, NonZero.class);
3511      private static NISuppressor arg2_ne_0
3512        = new NISuppressor (1, NonZero.class);
3513    
3514      private static NISuppressor result_ge_0
3515        = new NISuppressor (0, RangeInt.GreaterEqualZero.class);
3516      private static NISuppressor arg1_ge_0
3517        = new NISuppressor (2, RangeInt.GreaterEqualZero.class);
3518      private static NISuppressor arg2_ge_0
3519        = new NISuppressor (1, RangeInt.GreaterEqualZero.class);
3520    
3521      private static NISuppressor result_ge_64
3522        = new NISuppressor (0, RangeInt.GreaterEqual64.class);
3523      private static NISuppressor arg1_ge_64
3524        = new NISuppressor (2, RangeInt.GreaterEqual64.class);
3525      private static NISuppressor arg2_ge_64
3526        = new NISuppressor (1, RangeInt.GreaterEqual64.class);
3527    
3528      private static NISuppressor result_boolean
3529        = new NISuppressor(0,RangeInt.BooleanVal.class);
3530      private static NISuppressor arg1_boolean
3531        = new NISuppressor (2, RangeInt.BooleanVal.class);
3532      private static NISuppressor arg2_boolean
3533        = new NISuppressor (1, RangeInt.BooleanVal.class);
3534    
3535      private static NISuppressor result_even
3536        = new NISuppressor (0, RangeInt.Even.class);
3537      private static NISuppressor arg1_even
3538        = new NISuppressor (2, RangeInt.Even.class);
3539      private static NISuppressor arg2_even
3540        = new NISuppressor (1, RangeInt.Even.class);
3541    
3542      private static NISuppressor result_power2
3543        = new NISuppressor(0,RangeInt.PowerOfTwo.class);
3544      private static NISuppressor arg1_power2
3545        = new NISuppressor (2, RangeInt.PowerOfTwo.class);
3546      private static NISuppressor arg2_power2
3547        = new NISuppressor (1, RangeInt.PowerOfTwo.class);
3548    
3549      private static NISuppressor result_and0_arg1
3550        = new NISuppressor (0, 2, NumericInt.BitwiseAndZero.class);
3551      private static NISuppressor result_and0_arg2
3552        = new NISuppressor (0, 1, NumericInt.BitwiseAndZero.class);
3553      private static NISuppressor arg1_and0_arg2
3554        = new NISuppressor (2, 1, NumericInt.BitwiseAndZero.class);
3555    
3556      // The arguments to bitwise subset are backwards from what one
3557      // might expect.  The second argument is a subset of the first
3558      // argument
3559      private static NISuppressor arg1_bw_subset_arg2
3560        = new NISuppressor (1, 2, NumericInt.BitwiseSubset.class);
3561      private static NISuppressor arg2_bw_subset_arg1
3562        = new NISuppressor (2, 1, NumericInt.BitwiseSubset.class);
3563    
3564      private static NISuppressor result_shift0_arg1
3565        = new NISuppressor (0, 2, NumericInt.ShiftZero.class);
3566      private static NISuppressor result_shift0_arg2
3567        = new NISuppressor (0, 1, NumericInt.ShiftZero.class);
3568      private static NISuppressor arg1_shift0_arg2
3569        = new NISuppressor (2, 1, NumericInt.ShiftZero.class);
3570    
3571      private static NISuppressor arg2_divides_arg1
3572        = new NISuppressor (2, 1, NumericInt.Divides.class);
3573      private static NISuppressor arg1_divides_arg2
3574        = new NISuppressor (1, 2, NumericInt.Divides.class);
3575    
3576      private static NISuppressor arg2_valid_shift
3577        = new NISuppressor (1, RangeInt.Bound0_63.class);
3578    
3579        private static NISuppressionSet suppressions
3580          = new NISuppressionSet (new NISuppression[] {
3581    
3582            // (r == 0) && (z < y) && (z >= 0) && (y != 0) ==> r = z / y
3583            new NISuppression (result_eq_0, arg1_lt_arg2, arg1_ge_0, arg2_ne_0, suppressee),
3584    
3585            // (z == y) && (y != 0) && (r == 1)
3586            new NISuppression (arg1_eq_arg2, arg2_ne_0, result_eq_1, suppressee),
3587    
3588            // (r == z) && (y == 1) ==> r = z / y
3589            new NISuppression (result_eq_arg1, arg2_eq_1, suppressee),
3590          });
3591    
3592      // Create a suppression factory for functionBinary
3593    
3594    }
3595    
3596    /**
3597     * Represents the invariant <samp>y = Division (z, x)</samp>
3598     * over three long scalars.
3599     */
3600    public static class DivisionLong_yzx extends FunctionBinary {
3601      // We are Serializable, so we specify a version to allow changes to
3602      // method signatures without breaking serialization.  If you add or
3603      // remove fields, you should change this number to the current date.
3604      static final long serialVersionUID = 20031030L;
3605    
3606      private static /*@Prototype*/ DivisionLong_yzx proto;
3607    
3608      /** Returns the prototype invariant for DivisionLong_yzx **/
3609      public static /*@Prototype*/ DivisionLong_yzx get_proto() {
3610        if (proto == null)
3611          proto = new /*@Prototype*/ DivisionLong_yzx ();
3612        return (proto);
3613      }
3614    
3615      /** instantiate an invariant on the specified slice **/
3616      protected DivisionLong_yzx instantiate_dyn (PptSlice slice) /*@Prototype*/ {
3617        return new DivisionLong_yzx (slice);
3618      }
3619    
3620      private DivisionLong_yzx (PptSlice slice) {
3621        super (slice);
3622      }
3623    
3624      public DivisionLong_yzx () /*@Prototype*/ {
3625        super ();
3626      }
3627    
3628      private static String[] method_name = new String[] {"", " / ", ""};
3629    
3630      public String[] get_method_name () {
3631        return (method_name);
3632      }
3633    
3634      private static int function_id = -1;
3635    
3636      public int get_function_id() {
3637        return (function_id);
3638      }
3639    
3640      public void set_function_id (int function_id) {
3641        assert DivisionLong_yzx.function_id == -1;
3642        DivisionLong_yzx.function_id = function_id;
3643      }
3644    
3645      private static int var_order = 5;
3646    
3647      public int get_var_order() {
3648        return var_order;
3649      }
3650    
3651      public boolean is_symmetric() {
3652    
3653          return (false);
3654      }
3655    
3656      public long func (long z, long x) {
3657    
3658        return ((z / x));
3659      }
3660    
3661      public InvariantStatus check_modified(long x, long y,
3662                                          long z, int count) {
3663        return (check_ordered (y, z, x, count));
3664      }
3665    
3666      public InvariantStatus add_modified(long x, long y,
3667                                          long z, int count) {
3668        if (Debug.logDetail())
3669          log (Fmt.spf ("result=%s, arg1=%s, arg2=%s", "" + y, "" + z,
3670                        "" + x));
3671        return (add_ordered (y, z, x, count));
3672      }
3673    
3674      public boolean isDivision() {
3675        return (true);
3676      }
3677    
3678        public boolean isExact() { return true; }
3679    
3680      /**
3681       * Returns a list of non-instantiating suppressions for this invariant.
3682       */
3683      public /*@Nullable*/ NISuppressionSet get_ni_suppressions() {
3684        if (NIS.dkconfig_enabled && dkconfig_enabled)
3685          return (suppressions);
3686        else
3687          return (null);
3688      }
3689    
3690      /** definition of this invariant (the suppressee) **/
3691      private static NISuppressee suppressee
3692                        = new NISuppressee (DivisionLong_yzx.class, 3);
3693    
3694      // suppressor definitions (used below)
3695      private static NISuppressor result_eq_arg1
3696        = new NISuppressor (1, 2, IntEqual.class);
3697      private static NISuppressor result_eq_arg2
3698        = new NISuppressor (1, 0, IntEqual.class);
3699      private static NISuppressor arg1_eq_arg2
3700        = new NISuppressor (2, 0, IntEqual.class);
3701    
3702      private static NISuppressor result_lt_arg1
3703        = new NISuppressor (1, 2, IntLessThan.class);
3704      private static NISuppressor result_lt_arg2
3705        = new NISuppressor (1, 0, IntLessThan.class);
3706      private static NISuppressor arg1_lt_arg2
3707        = new NISuppressor (2, 0, IntLessThan.class);
3708      private static NISuppressor arg2_lt_arg1
3709        = new NISuppressor (0, 2, IntLessThan.class);
3710    
3711      private static NISuppressor result_le_arg1
3712        = new NISuppressor (1, 2, IntLessEqual.class);
3713      private static NISuppressor result_le_arg2
3714        = new NISuppressor (1, 0, IntLessEqual.class);
3715      private static NISuppressor arg1_le_arg2
3716        = new NISuppressor (2, 0, IntLessEqual.class);
3717      private static NISuppressor arg2_le_arg1
3718        = new NISuppressor (0, 2, IntLessEqual.class);
3719    
3720      private static NISuppressor result_track0_arg1
3721        = new NISuppressor (1, 2, NumericInt.ZeroTrack.class);
3722      private static NISuppressor result_track0_arg2
3723        = new NISuppressor (1, 0, NumericInt.ZeroTrack.class);
3724      private static NISuppressor arg1_track0_arg2
3725        = new NISuppressor (2, 0, NumericInt.ZeroTrack.class);
3726      private static NISuppressor arg1_track0_result
3727        = new NISuppressor (2, 1, NumericInt.ZeroTrack.class);
3728      private static NISuppressor arg2_track0_result
3729        = new NISuppressor (0, 1, NumericInt.ZeroTrack.class);
3730      private static NISuppressor arg2_track0_arg1
3731        = new NISuppressor (0, 2, NumericInt.ZeroTrack.class);
3732    
3733      private static NISuppressor result_eq_1
3734        = new NISuppressor(1, RangeInt.EqualOne.class);
3735      private static NISuppressor arg1_eq_1
3736        = new NISuppressor (2, RangeInt.EqualOne.class);
3737      private static NISuppressor arg2_eq_1
3738        = new NISuppressor (0, RangeInt.EqualOne.class);
3739    
3740      private static NISuppressor result_eq_0
3741        = new NISuppressor(1,RangeInt.EqualZero.class);
3742      private static NISuppressor arg1_eq_0
3743        = new NISuppressor (2, RangeInt.EqualZero.class);
3744      private static NISuppressor arg2_eq_0
3745        = new NISuppressor (0, RangeInt.EqualZero.class);
3746    
3747      private static NISuppressor result_ne_0
3748        = new NISuppressor (1, NonZero.class);
3749      private static NISuppressor arg1_ne_0
3750        = new NISuppressor (2, NonZero.class);
3751      private static NISuppressor arg2_ne_0
3752        = new NISuppressor (0, NonZero.class);
3753    
3754      private static NISuppressor result_ge_0
3755        = new NISuppressor (1, RangeInt.GreaterEqualZero.class);
3756      private static NISuppressor arg1_ge_0
3757        = new NISuppressor (2, RangeInt.GreaterEqualZero.class);
3758      private static NISuppressor arg2_ge_0
3759        = new NISuppressor (0, RangeInt.GreaterEqualZero.class);
3760    
3761      private static NISuppressor result_ge_64
3762        = new NISuppressor (1, RangeInt.GreaterEqual64.class);
3763      private static NISuppressor arg1_ge_64
3764        = new NISuppressor (2, RangeInt.GreaterEqual64.class);
3765      private static NISuppressor arg2_ge_64
3766        = new NISuppressor (0, RangeInt.GreaterEqual64.class);
3767    
3768      private static NISuppressor result_boolean
3769        = new NISuppressor(1,RangeInt.BooleanVal.class);
3770      private static NISuppressor arg1_boolean
3771        = new NISuppressor (2, RangeInt.BooleanVal.class);
3772      private static NISuppressor arg2_boolean
3773        = new NISuppressor (0, RangeInt.BooleanVal.class);
3774    
3775      private static NISuppressor result_even
3776        = new NISuppressor (1, RangeInt.Even.class);
3777      private static NISuppressor arg1_even
3778        = new NISuppressor (2, RangeInt.Even.class);
3779      private static NISuppressor arg2_even
3780        = new NISuppressor (0, RangeInt.Even.class);
3781    
3782      private static NISuppressor result_power2
3783        = new NISuppressor(1,RangeInt.PowerOfTwo.class);
3784      private static NISuppressor arg1_power2
3785        = new NISuppressor (2, RangeInt.PowerOfTwo.class);
3786      private static NISuppressor arg2_power2
3787        = new NISuppressor (0, RangeInt.PowerOfTwo.class);
3788    
3789      private static NISuppressor result_and0_arg1
3790        = new NISuppressor (1, 2, NumericInt.BitwiseAndZero.class);
3791      private static NISuppressor result_and0_arg2
3792        = new NISuppressor (1, 0, NumericInt.BitwiseAndZero.class);
3793      private static NISuppressor arg1_and0_arg2
3794        = new NISuppressor (2, 0, NumericInt.BitwiseAndZero.class);
3795    
3796      // The arguments to bitwise subset are backwards from what one
3797      // might expect.  The second argument is a subset of the first
3798      // argument
3799      private static NISuppressor arg1_bw_subset_arg2
3800        = new NISuppressor (0, 2, NumericInt.BitwiseSubset.class);
3801      private static NISuppressor arg2_bw_subset_arg1
3802        = new NISuppressor (2, 0, NumericInt.BitwiseSubset.class);
3803    
3804      private static NISuppressor result_shift0_arg1
3805        = new NISuppressor (1, 2, NumericInt.ShiftZero.class);
3806      private static NISuppressor result_shift0_arg2
3807        = new NISuppressor (1, 0, NumericInt.ShiftZero.class);
3808      private static NISuppressor arg1_shift0_arg2
3809        = new NISuppressor (2, 0, NumericInt.ShiftZero.class);
3810    
3811      private static NISuppressor arg2_divides_arg1
3812        = new NISuppressor (2, 0, NumericInt.Divides.class);
3813      private static NISuppressor arg1_divides_arg2
3814        = new NISuppressor (0, 2, NumericInt.Divides.class);
3815    
3816      private static NISuppressor arg2_valid_shift
3817        = new NISuppressor (0, RangeInt.Bound0_63.class);
3818    
3819        private static NISuppressionSet suppressions
3820          = new NISuppressionSet (new NISuppression[] {
3821    
3822            // (r == 0) && (z < x) && (z >= 0) && (x != 0) ==> r = z / x
3823            new NISuppression (result_eq_0, arg1_lt_arg2, arg1_ge_0, arg2_ne_0, suppressee),
3824    
3825            // (z == x) && (x != 0) && (r == 1)
3826            new NISuppression (arg1_eq_arg2, arg2_ne_0, result_eq_1, suppressee),
3827    
3828            // (r == z) && (x == 1) ==> r = z / x
3829            new NISuppression (result_eq_arg1, arg2_eq_1, suppressee),
3830          });
3831    
3832      // Create a suppression factory for functionBinary
3833    
3834    }
3835    
3836    /**
3837     * Represents the invariant <samp>z = Division (y, x)</samp>
3838     * over three long scalars.
3839     */
3840    public static class DivisionLong_zyx extends FunctionBinary {
3841      // We are Serializable, so we specify a version to allow changes to
3842      // method signatures without breaking serialization.  If you add or
3843      // remove fields, you should change this number to the current date.
3844      static final long serialVersionUID = 20031030L;
3845    
3846      private static /*@Prototype*/ DivisionLong_zyx proto;
3847    
3848      /** Returns the prototype invariant for DivisionLong_zyx **/
3849      public static /*@Prototype*/ DivisionLong_zyx get_proto() {
3850        if (proto == null)
3851          proto = new /*@Prototype*/ DivisionLong_zyx ();
3852        return (proto);
3853      }
3854    
3855      /** instantiate an invariant on the specified slice **/
3856      protected DivisionLong_zyx instantiate_dyn (PptSlice slice) /*@Prototype*/ {
3857        return new DivisionLong_zyx (slice);
3858      }
3859    
3860      private DivisionLong_zyx (PptSlice slice) {
3861        super (slice);
3862      }
3863    
3864      public DivisionLong_zyx () /*@Prototype*/ {
3865        super ();
3866      }
3867    
3868      private static String[] method_name = new String[] {"", " / ", ""};
3869    
3870      public String[] get_method_name () {
3871        return (method_name);
3872      }
3873    
3874      private static int function_id = -1;
3875    
3876      public int get_function_id() {
3877        return (function_id);
3878      }
3879    
3880      public void set_function_id (int function_id) {
3881        assert DivisionLong_zyx.function_id == -1;
3882        DivisionLong_zyx.function_id = function_id;
3883      }
3884    
3885      private static int var_order = 6;
3886    
3887      public int get_var_order() {
3888        return var_order;
3889      }
3890    
3891      public boolean is_symmetric() {
3892    
3893          return (false);
3894      }
3895    
3896      public long func (long y, long x) {
3897    
3898        return ((y / x));
3899      }
3900    
3901      public InvariantStatus check_modified(long x, long y,
3902                                          long z, int count) {
3903        return (check_ordered (z, y, x, count));
3904      }
3905    
3906      public InvariantStatus add_modified(long x, long y,
3907                                          long z, int count) {
3908        if (Debug.logDetail())
3909          log (Fmt.spf ("result=%s, arg1=%s, arg2=%s", "" + z, "" + y,
3910                        "" + x));
3911        return (add_ordered (z, y, x, count));
3912      }
3913    
3914      public boolean isDivision() {
3915        return (true);
3916      }
3917    
3918        public boolean isExact() { return true; }
3919    
3920      /**
3921       * Returns a list of non-instantiating suppressions for this invariant.
3922       */
3923      public /*@Nullable*/ NISuppressionSet get_ni_suppressions() {
3924        if (NIS.dkconfig_enabled && dkconfig_enabled)
3925          return (suppressions);
3926        else
3927          return (null);
3928      }
3929    
3930      /** definition of this invariant (the suppressee) **/
3931      private static NISuppressee suppressee
3932                        = new NISuppressee (DivisionLong_zyx.class, 3);
3933    
3934      // suppressor definitions (used below)
3935      private static NISuppressor result_eq_arg1
3936        = new NISuppressor (2, 1, IntEqual.class);
3937      private static NISuppressor result_eq_arg2
3938        = new NISuppressor (2, 0, IntEqual.class);
3939      private static NISuppressor arg1_eq_arg2
3940        = new NISuppressor (1, 0, IntEqual.class);
3941    
3942      private static NISuppressor result_lt_arg1
3943        = new NISuppressor (2, 1, IntLessThan.class);
3944      private static NISuppressor result_lt_arg2
3945        = new NISuppressor (2, 0, IntLessThan.class);
3946      private static NISuppressor arg1_lt_arg2
3947        = new NISuppressor (1, 0, IntLessThan.class);
3948      private static NISuppressor arg2_lt_arg1
3949        = new NISuppressor (0, 1, IntLessThan.class);
3950    
3951      private static NISuppressor result_le_arg1
3952        = new NISuppressor (2, 1, IntLessEqual.class);
3953      private static NISuppressor result_le_arg2
3954        = new NISuppressor (2, 0, IntLessEqual.class);
3955      private static NISuppressor arg1_le_arg2
3956        = new NISuppressor (1, 0, IntLessEqual.class);
3957      private static NISuppressor arg2_le_arg1
3958        = new NISuppressor (0, 1, IntLessEqual.class);
3959    
3960      private static NISuppressor result_track0_arg1
3961        = new NISuppressor (2, 1, NumericInt.ZeroTrack.class);
3962      private static NISuppressor result_track0_arg2
3963        = new NISuppressor (2, 0, NumericInt.ZeroTrack.class);
3964      private static NISuppressor arg1_track0_arg2
3965        = new NISuppressor (1, 0, NumericInt.ZeroTrack.class);
3966      private static NISuppressor arg1_track0_result
3967        = new NISuppressor (1, 2, NumericInt.ZeroTrack.class);
3968      private static NISuppressor arg2_track0_result
3969        = new NISuppressor (0, 2, NumericInt.ZeroTrack.class);
3970      private static NISuppressor arg2_track0_arg1
3971        = new NISuppressor (0, 1, NumericInt.ZeroTrack.class);
3972    
3973      private static NISuppressor result_eq_1
3974        = new NISuppressor(2, RangeInt.EqualOne.class);
3975      private static NISuppressor arg1_eq_1
3976        = new NISuppressor (1, RangeInt.EqualOne.class);
3977      private static NISuppressor arg2_eq_1
3978        = new NISuppressor (0, RangeInt.EqualOne.class);
3979    
3980      private static NISuppressor result_eq_0
3981        = new NISuppressor(2,RangeInt.EqualZero.class);
3982      private static NISuppressor arg1_eq_0
3983        = new NISuppressor (1, RangeInt.EqualZero.class);
3984      private static NISuppressor arg2_eq_0
3985        = new NISuppressor (0, RangeInt.EqualZero.class);
3986    
3987      private static NISuppressor result_ne_0
3988        = new NISuppressor (2, NonZero.class);
3989      private static NISuppressor arg1_ne_0
3990        = new NISuppressor (1, NonZero.class);
3991      private static NISuppressor arg2_ne_0
3992        = new NISuppressor (0, NonZero.class);
3993    
3994      private static NISuppressor result_ge_0
3995        = new NISuppressor (2, RangeInt.GreaterEqualZero.class);
3996      private static NISuppressor arg1_ge_0
3997        = new NISuppressor (1, RangeInt.GreaterEqualZero.class);
3998      private static NISuppressor arg2_ge_0
3999        = new NISuppressor (0, RangeInt.GreaterEqualZero.class);
4000    
4001      private static NISuppressor result_ge_64
4002        = new NISuppressor (2, RangeInt.GreaterEqual64.class);
4003      private static NISuppressor arg1_ge_64
4004        = new NISuppressor (1, RangeInt.GreaterEqual64.class);
4005      private static NISuppressor arg2_ge_64
4006        = new NISuppressor (0, RangeInt.GreaterEqual64.class);
4007    
4008      private static NISuppressor result_boolean
4009        = new NISuppressor(2,RangeInt.BooleanVal.class);
4010      private static NISuppressor arg1_boolean
4011        = new NISuppressor (1, RangeInt.BooleanVal.class);
4012      private static NISuppressor arg2_boolean
4013        = new NISuppressor (0, RangeInt.BooleanVal.class);
4014    
4015      private static NISuppressor result_even
4016        = new NISuppressor (2, RangeInt.Even.class);
4017      private static NISuppressor arg1_even
4018        = new NISuppressor (1, RangeInt.Even.class);
4019      private static NISuppressor arg2_even
4020        = new NISuppressor (0, RangeInt.Even.class);
4021    
4022      private static NISuppressor result_power2
4023        = new NISuppressor(2,RangeInt.PowerOfTwo.class);
4024      private static NISuppressor arg1_power2
4025        = new NISuppressor (1, RangeInt.PowerOfTwo.class);
4026      private static NISuppressor arg2_power2
4027        = new NISuppressor (0, RangeInt.PowerOfTwo.class);
4028    
4029      private static NISuppressor result_and0_arg1
4030        = new NISuppressor (2, 1, NumericInt.BitwiseAndZero.class);
4031      private static NISuppressor result_and0_arg2
4032        = new NISuppressor (2, 0, NumericInt.BitwiseAndZero.class);
4033      private static NISuppressor arg1_and0_arg2
4034        = new NISuppressor (1, 0, NumericInt.BitwiseAndZero.class);
4035    
4036      // The arguments to bitwise subset are backwards from what one
4037      // might expect.  The second argument is a subset of the first
4038      // argument
4039      private static NISuppressor arg1_bw_subset_arg2
4040        = new NISuppressor (0, 1, NumericInt.BitwiseSubset.class);
4041      private static NISuppressor arg2_bw_subset_arg1
4042        = new NISuppressor (1, 0, NumericInt.BitwiseSubset.class);
4043    
4044      private static NISuppressor result_shift0_arg1
4045        = new NISuppressor (2, 1, NumericInt.ShiftZero.class);
4046      private static NISuppressor result_shift0_arg2
4047        = new NISuppressor (2, 0, NumericInt.ShiftZero.class);
4048      private static NISuppressor arg1_shift0_arg2
4049        = new NISuppressor (1, 0, NumericInt.ShiftZero.class);
4050    
4051      private static NISuppressor arg2_divides_arg1
4052        = new NISuppressor (1, 0, NumericInt.Divides.class);
4053      private static NISuppressor arg1_divides_arg2
4054        = new NISuppressor (0, 1, NumericInt.Divides.class);
4055    
4056      private static NISuppressor arg2_valid_shift
4057        = new NISuppressor (0, RangeInt.Bound0_63.class);
4058    
4059        private static NISuppressionSet suppressions
4060          = new NISuppressionSet (new NISuppression[] {
4061    
4062            // (r == 0) && (y < x) && (y >= 0) && (x != 0) ==> r = y / x
4063            new NISuppression (result_eq_0, arg1_lt_arg2, arg1_ge_0, arg2_ne_0, suppressee),
4064    
4065            // (y == x) && (x != 0) && (r == 1)
4066            new NISuppression (arg1_eq_arg2, arg2_ne_0, result_eq_1, suppressee),
4067    
4068            // (r == y) && (x == 1) ==> r = y / x
4069            new NISuppression (result_eq_arg1, arg2_eq_1, suppressee),
4070          });
4071    
4072      // Create a suppression factory for functionBinary
4073    
4074    }
4075    
4076      // default is that it is not this function, overriden in the subclass
4077      public boolean isPower () {
4078        return (false);
4079      }
4080    
4081    /**
4082     * Represents the invariant <samp>x = Power (y, z)</samp>
4083     * over three long scalars.
4084     */
4085    public static class PowerLong_xyz extends FunctionBinary {
4086      // We are Serializable, so we specify a version to allow changes to
4087      // method signatures without breaking serialization.  If you add or
4088      // remove fields, you should change this number to the current date.
4089      static final long serialVersionUID = 20031030L;
4090    
4091      private static /*@Prototype*/ PowerLong_xyz proto;
4092    
4093      /** Returns the prototype invariant for PowerLong_xyz **/
4094      public static /*@Prototype*/ PowerLong_xyz get_proto() {
4095        if (proto == null)
4096          proto = new /*@Prototype*/ PowerLong_xyz ();
4097        return (proto);
4098      }
4099    
4100      /** instantiate an invariant on the specified slice **/
4101      protected PowerLong_xyz instantiate_dyn (PptSlice slice) /*@Prototype*/ {
4102        return new PowerLong_xyz (slice);
4103      }
4104    
4105      private PowerLong_xyz (PptSlice slice) {
4106        super (slice);
4107      }
4108    
4109      public PowerLong_xyz () /*@Prototype*/ {
4110        super ();
4111      }
4112    
4113      private static String[] method_name = new String[] {"java.lang.Math.pow(", ", ", ")"};
4114    
4115      public String[] get_method_name () {
4116        return (method_name);
4117      }
4118    
4119      private static int function_id = -1;
4120    
4121      public int get_function_id() {
4122        return (function_id);
4123      }
4124    
4125      public void set_function_id (int function_id) {
4126        assert PowerLong_xyz.function_id == -1;
4127        PowerLong_xyz.function_id = function_id;
4128      }
4129    
4130      private static int var_order = 1;
4131    
4132      public int get_var_order() {
4133        return var_order;
4134      }
4135    
4136      public boolean is_symmetric() {
4137    
4138          return (false);
4139      }
4140    
4141      public long func (long y, long z) {
4142    
4143        return (MathMDE.pow (y, z));
4144      }
4145    
4146      public InvariantStatus check_modified(long x, long y,
4147                                          long z, int count) {
4148        return (check_ordered (x, y, z, count));
4149      }
4150    
4151      public InvariantStatus add_modified(long x, long y,
4152                                          long z, int count) {
4153        if (Debug.logDetail())
4154          log (Fmt.spf ("result=%s, arg1=%s, arg2=%s", "" + x, "" + y,
4155                        "" + z));
4156        return (add_ordered (x, y, z, count));
4157      }
4158    
4159      public boolean isPower() {
4160        return (true);
4161      }
4162    
4163        public boolean isExact() { return true; }
4164    
4165      /**
4166       * Returns a list of non-instantiating suppressions for this invariant.
4167       */
4168      public /*@Nullable*/ NISuppressionSet get_ni_suppressions() {
4169        if (NIS.dkconfig_enabled && dkconfig_enabled)
4170          return (suppressions);
4171        else
4172          return (null);
4173      }
4174    
4175      /** definition of this invariant (the suppressee) **/
4176      private static NISuppressee suppressee
4177                        = new NISuppressee (PowerLong_xyz.class, 3);
4178    
4179      // suppressor definitions (used below)
4180      private static NISuppressor result_eq_arg1
4181        = new NISuppressor (0, 1, IntEqual.class);
4182      private static NISuppressor result_eq_arg2
4183        = new NISuppressor (0, 2, IntEqual.class);
4184      private static NISuppressor arg1_eq_arg2
4185        = new NISuppressor (1, 2, IntEqual.class);
4186    
4187      private static NISuppressor result_lt_arg1
4188        = new NISuppressor (0, 1, IntLessThan.class);
4189      private static NISuppressor result_lt_arg2
4190        = new NISuppressor (0, 2, IntLessThan.class);
4191      private static NISuppressor arg1_lt_arg2
4192        = new NISuppressor (1, 2, IntLessThan.class);
4193      private static NISuppressor arg2_lt_arg1
4194        = new NISuppressor (2, 1, IntLessThan.class);
4195    
4196      private static NISuppressor result_le_arg1
4197        = new NISuppressor (0, 1, IntLessEqual.class);
4198      private static NISuppressor result_le_arg2
4199        = new NISuppressor (0, 2, IntLessEqual.class);
4200      private static NISuppressor arg1_le_arg2
4201        = new NISuppressor (1, 2, IntLessEqual.class);
4202      private static NISuppressor arg2_le_arg1
4203        = new NISuppressor (2, 1, IntLessEqual.class);
4204    
4205      private static NISuppressor result_track0_arg1
4206        = new NISuppressor (0, 1, NumericInt.ZeroTrack.class);
4207      private static NISuppressor result_track0_arg2
4208        = new NISuppressor (0, 2, NumericInt.ZeroTrack.class);
4209      private static NISuppressor arg1_track0_arg2
4210        = new NISuppressor (1, 2, NumericInt.ZeroTrack.class);
4211      private static NISuppressor arg1_track0_result
4212        = new NISuppressor (1, 0, NumericInt.ZeroTrack.class);
4213      private static NISuppressor arg2_track0_result
4214        = new NISuppressor (2, 0, NumericInt.ZeroTrack.class);
4215      private static NISuppressor arg2_track0_arg1
4216        = new NISuppressor (2, 1, NumericInt.ZeroTrack.class);
4217    
4218      private static NISuppressor result_eq_1
4219        = new NISuppressor(0, RangeInt.EqualOne.class);
4220      private static NISuppressor arg1_eq_1
4221        = new NISuppressor (1, RangeInt.EqualOne.class);
4222      private static NISuppressor arg2_eq_1
4223        = new NISuppressor (2, RangeInt.EqualOne.class);
4224    
4225      private static NISuppressor result_eq_0
4226        = new NISuppressor(0,RangeInt.EqualZero.class);
4227      private static NISuppressor arg1_eq_0
4228        = new NISuppressor (1, RangeInt.EqualZero.class);
4229      private static NISuppressor arg2_eq_0
4230        = new NISuppressor (2, RangeInt.EqualZero.class);
4231    
4232      private static NISuppressor result_ne_0
4233        = new NISuppressor (0, NonZero.class);
4234      private static NISuppressor arg1_ne_0
4235        = new NISuppressor (1, NonZero.class);
4236      private static NISuppressor arg2_ne_0
4237        = new NISuppressor (2, NonZero.class);
4238    
4239      private static NISuppressor result_ge_0
4240        = new NISuppressor (0, RangeInt.GreaterEqualZero.class);
4241      private static NISuppressor arg1_ge_0
4242        = new NISuppressor (1, RangeInt.GreaterEqualZero.class);
4243      private static NISuppressor arg2_ge_0
4244        = new NISuppressor (2, RangeInt.GreaterEqualZero.class);
4245    
4246      private static NISuppressor result_ge_64
4247        = new NISuppressor (0, RangeInt.GreaterEqual64.class);
4248      private static NISuppressor arg1_ge_64
4249        = new NISuppressor (1, RangeInt.GreaterEqual64.class);
4250      private static NISuppressor arg2_ge_64
4251        = new NISuppressor (2, RangeInt.GreaterEqual64.class);
4252    
4253      private static NISuppressor result_boolean
4254        = new NISuppressor(0,RangeInt.BooleanVal.class);
4255      private static NISuppressor arg1_boolean
4256        = new NISuppressor (1, RangeInt.BooleanVal.class);
4257      private static NISuppressor arg2_boolean
4258        = new NISuppressor (2, RangeInt.BooleanVal.class);
4259    
4260      private static NISuppressor result_even
4261        = new NISuppressor (0, RangeInt.Even.class);
4262      private static NISuppressor arg1_even
4263        = new NISuppressor (1, RangeInt.Even.class);
4264      private static NISuppressor arg2_even
4265        = new NISuppressor (2, RangeInt.Even.class);
4266    
4267      private static NISuppressor result_power2
4268        = new NISuppressor(0,RangeInt.PowerOfTwo.class);
4269      private static NISuppressor arg1_power2
4270        = new NISuppressor (1, RangeInt.PowerOfTwo.class);
4271      private static NISuppressor arg2_power2
4272        = new NISuppressor (2, RangeInt.PowerOfTwo.class);
4273    
4274      private static NISuppressor result_and0_arg1
4275        = new NISuppressor (0, 1, NumericInt.BitwiseAndZero.class);
4276      private static NISuppressor result_and0_arg2
4277        = new NISuppressor (0, 2, NumericInt.BitwiseAndZero.class);
4278      private static NISuppressor arg1_and0_arg2
4279        = new NISuppressor (1, 2, NumericInt.BitwiseAndZero.class);
4280    
4281      // The arguments to bitwise subset are backwards from what one
4282      // might expect.  The second argument is a subset of the first
4283      // argument
4284      private static NISuppressor arg1_bw_subset_arg2
4285        = new NISuppressor (2, 1, NumericInt.BitwiseSubset.class);
4286      private static NISuppressor arg2_bw_subset_arg1
4287        = new NISuppressor (1, 2, NumericInt.BitwiseSubset.class);
4288    
4289      private static NISuppressor result_shift0_arg1
4290        = new NISuppressor (0, 1, NumericInt.ShiftZero.class);
4291      private static NISuppressor result_shift0_arg2
4292        = new NISuppressor (0, 2, NumericInt.ShiftZero.class);
4293      private static NISuppressor arg1_shift0_arg2
4294        = new NISuppressor (1, 2, NumericInt.ShiftZero.class);
4295    
4296      private static NISuppressor arg2_divides_arg1
4297        = new NISuppressor (1, 2, NumericInt.Divides.class);
4298      private static NISuppressor arg1_divides_arg2
4299        = new NISuppressor (2, 1, NumericInt.Divides.class);
4300    
4301      private static NISuppressor arg2_valid_shift
4302        = new NISuppressor (2, RangeInt.Bound0_63.class);
4303    
4304        // Note that any suppression that doesn't limit z to valid exponents
4305        // (>= 0), must check for valid exponents as well (so that the invariant
4306        // is correctly destroyed on invalid exponents)
4307        //
4308        // Note also that pow(0,0) == 1 and pow(0,x), where (x > 0), == 0
4309        // Another interesting artificat of pow is that for any even base, any
4310        // exponent >= 64 will yield a result of 0.  For example, pow(10,256) == 0
4311        // (at least for integers)
4312    
4313        private static NISuppressionSet suppressions
4314          = new NISuppressionSet (new NISuppression[] {
4315    
4316            // (r == 1) && (z == 0) ==> r = pow (y, z)
4317            new NISuppression (result_eq_1, arg2_eq_0, suppressee),
4318    
4319            // (r == 1) && (y == 1) && (z >= 0)   ==> r = pow (y, z)
4320            new NISuppression (result_eq_1, arg1_eq_1, arg2_ge_0, suppressee),
4321    
4322            // (r == 0) && (y == 0) && (z > 0)
4323            new NISuppression (result_eq_0, arg1_eq_0, arg2_ne_0, arg2_ge_0,
4324                              suppressee),
4325    
4326            // (r == y) && (z == 1)    ==> r = pow (y, z)
4327            new NISuppression (result_eq_arg1, arg2_eq_1, suppressee),
4328    
4329            // (r == 0) && (y even) && (z >= 64)
4330            // with each multiply there is one more zero in the result and since
4331            // a long has 64 bits in it, it becomes zero at that point
4332            new NISuppression (result_eq_0, arg1_even, arg2_ge_64, suppressee),
4333    
4334            // (r == 1) && (y boolean) && (y==0 <==> z==0) && (z >= 0)
4335            // 1 = pow (0, z) true iff (z == 0)
4336            // 1 = pow (1, z) true when z valid exponent
4337            new NISuppression (arg1_track0_arg2, arg2_ge_0, arg1_boolean,
4338                               result_eq_1, suppressee),
4339    
4340            // (r == y) && (r boolean) && (z > 0)
4341            // 0 = pow (0, z) true when z != 0
4342            // 1 = pow (1, z) true when z valid exponent
4343            new NISuppression (result_eq_arg1, result_boolean, arg2_ne_0,
4344                               arg2_ge_0, suppressee),
4345    
4346          });
4347    
4348      // Create a suppression factory for functionBinary
4349    
4350    }
4351    
4352    /**
4353     * Represents the invariant <samp>y = Power (x, z)</samp>
4354     * over three long scalars.
4355     */
4356    public static class PowerLong_yxz extends FunctionBinary {
4357      // We are Serializable, so we specify a version to allow changes to
4358      // method signatures without breaking serialization.  If you add or
4359      // remove fields, you should change this number to the current date.
4360      static final long serialVersionUID = 20031030L;
4361    
4362      private static /*@Prototype*/ PowerLong_yxz proto;
4363    
4364      /** Returns the prototype invariant for PowerLong_yxz **/
4365      public static /*@Prototype*/ PowerLong_yxz get_proto() {
4366        if (proto == null)
4367          proto = new /*@Prototype*/ PowerLong_yxz ();
4368        return (proto);
4369      }
4370    
4371      /** instantiate an invariant on the specified slice **/
4372      protected PowerLong_yxz instantiate_dyn (PptSlice slice) /*@Prototype*/ {
4373        return new PowerLong_yxz (slice);
4374      }
4375    
4376      private PowerLong_yxz (PptSlice slice) {
4377        super (slice);
4378      }
4379    
4380      public PowerLong_yxz () /*@Prototype*/ {
4381        super ();
4382      }
4383    
4384      private static String[] method_name = new String[] {"java.lang.Math.pow(", ", ", ")"};
4385    
4386      public String[] get_method_name () {
4387        return (method_name);
4388      }
4389    
4390      private static int function_id = -1;
4391    
4392      public int get_function_id() {
4393        return (function_id);
4394      }
4395    
4396      public void set_function_id (int function_id) {
4397        assert PowerLong_yxz.function_id == -1;
4398        PowerLong_yxz.function_id = function_id;
4399      }
4400    
4401      private static int var_order = 2;
4402    
4403      public int get_var_order() {
4404        return var_order;
4405      }
4406    
4407      public boolean is_symmetric() {
4408    
4409          return (false);
4410      }
4411    
4412      public long func (long x, long z) {
4413    
4414        return (MathMDE.pow (x, z));
4415      }
4416    
4417      public InvariantStatus check_modified(long x, long y,
4418                                          long z, int count) {
4419        return (check_ordered (y, x, z, count));
4420      }
4421    
4422      public InvariantStatus add_modified(long x, long y,
4423                                          long z, int count) {
4424        if (Debug.logDetail())
4425          log (Fmt.spf ("result=%s, arg1=%s, arg2=%s", "" + y, "" + x,
4426                        "" + z));
4427        return (add_ordered (y, x, z, count));
4428      }
4429    
4430      public boolean isPower() {
4431        return (true);
4432      }
4433    
4434        public boolean isExact() { return true; }
4435    
4436      /**
4437       * Returns a list of non-instantiating suppressions for this invariant.
4438       */
4439      public /*@Nullable*/ NISuppressionSet get_ni_suppressions() {
4440        if (NIS.dkconfig_enabled && dkconfig_enabled)
4441          return (suppressions);
4442        else
4443          return (null);
4444      }
4445    
4446      /** definition of this invariant (the suppressee) **/
4447      private static NISuppressee suppressee
4448                        = new NISuppressee (PowerLong_yxz.class, 3);
4449    
4450      // suppressor definitions (used below)
4451      private static NISuppressor result_eq_arg1
4452        = new NISuppressor (1, 0, IntEqual.class);
4453      private static NISuppressor result_eq_arg2
4454        = new NISuppressor (1, 2, IntEqual.class);
4455      private static NISuppressor arg1_eq_arg2
4456        = new NISuppressor (0, 2, IntEqual.class);
4457    
4458      private static NISuppressor result_lt_arg1
4459        = new NISuppressor (1, 0, IntLessThan.class);
4460      private static NISuppressor result_lt_arg2
4461        = new NISuppressor (1, 2, IntLessThan.class);
4462      private static NISuppressor arg1_lt_arg2
4463        = new NISuppressor (0, 2, IntLessThan.class);
4464      private static NISuppressor arg2_lt_arg1
4465        = new NISuppressor (2, 0, IntLessThan.class);
4466    
4467      private static NISuppressor result_le_arg1
4468        = new NISuppressor (1, 0, IntLessEqual.class);
4469      private static NISuppressor result_le_arg2
4470        = new NISuppressor (1, 2, IntLessEqual.class);
4471      private static NISuppressor arg1_le_arg2
4472        = new NISuppressor (0, 2, IntLessEqual.class);
4473      private static NISuppressor arg2_le_arg1
4474        = new NISuppressor (2, 0, IntLessEqual.class);
4475    
4476      private static NISuppressor result_track0_arg1
4477        = new NISuppressor (1, 0, NumericInt.ZeroTrack.class);
4478      private static NISuppressor result_track0_arg2
4479        = new NISuppressor (1, 2, NumericInt.ZeroTrack.class);
4480      private static NISuppressor arg1_track0_arg2
4481        = new NISuppressor (0, 2, NumericInt.ZeroTrack.class);
4482      private static NISuppressor arg1_track0_result
4483        = new NISuppressor (0, 1, NumericInt.ZeroTrack.class);
4484      private static NISuppressor arg2_track0_result
4485        = new NISuppressor (2, 1, NumericInt.ZeroTrack.class);
4486      private static NISuppressor arg2_track0_arg1
4487        = new NISuppressor (2, 0, NumericInt.ZeroTrack.class);
4488    
4489      private static NISuppressor result_eq_1
4490        = new NISuppressor(1, RangeInt.EqualOne.class);
4491      private static NISuppressor arg1_eq_1
4492        = new NISuppressor (0, RangeInt.EqualOne.class);
4493      private static NISuppressor arg2_eq_1
4494        = new NISuppressor (2, RangeInt.EqualOne.class);
4495    
4496      private static NISuppressor result_eq_0
4497        = new NISuppressor(1,RangeInt.EqualZero.class);
4498      private static NISuppressor arg1_eq_0
4499        = new NISuppressor (0, RangeInt.EqualZero.class);
4500      private static NISuppressor arg2_eq_0
4501        = new NISuppressor (2, RangeInt.EqualZero.class);
4502    
4503      private static NISuppressor result_ne_0
4504        = new NISuppressor (1, NonZero.class);
4505      private static NISuppressor arg1_ne_0
4506        = new NISuppressor (0, NonZero.class);
4507      private static NISuppressor arg2_ne_0
4508        = new NISuppressor (2, NonZero.class);
4509    
4510      private static NISuppressor result_ge_0
4511        = new NISuppressor (1, RangeInt.GreaterEqualZero.class);
4512      private static NISuppressor arg1_ge_0
4513        = new NISuppressor (0, RangeInt.GreaterEqualZero.class);
4514      private static NISuppressor arg2_ge_0
4515        = new NISuppressor (2, RangeInt.GreaterEqualZero.class);
4516    
4517      private static NISuppressor result_ge_64
4518        = new NISuppressor (1, RangeInt.GreaterEqual64.class);
4519      private static NISuppressor arg1_ge_64
4520        = new NISuppressor (0, RangeInt.GreaterEqual64.class);
4521      private static NISuppressor arg2_ge_64
4522        = new NISuppressor (2, RangeInt.GreaterEqual64.class);
4523    
4524      private static NISuppressor result_boolean
4525        = new NISuppressor(1,RangeInt.BooleanVal.class);
4526      private static NISuppressor arg1_boolean
4527        = new NISuppressor (0, RangeInt.BooleanVal.class);
4528      private static NISuppressor arg2_boolean
4529        = new NISuppressor (2, RangeInt.BooleanVal.class);
4530    
4531      private static NISuppressor result_even
4532        = new NISuppressor (1, RangeInt.Even.class);
4533      private static NISuppressor arg1_even
4534        = new NISuppressor (0, RangeInt.Even.class);
4535      private static NISuppressor arg2_even
4536        = new NISuppressor (2, RangeInt.Even.class);
4537    
4538      private static NISuppressor result_power2
4539        = new NISuppressor(1,RangeInt.PowerOfTwo.class);
4540      private static NISuppressor arg1_power2
4541        = new NISuppressor (0, RangeInt.PowerOfTwo.class);
4542      private static NISuppressor arg2_power2
4543        = new NISuppressor (2, RangeInt.PowerOfTwo.class);
4544    
4545      private static NISuppressor result_and0_arg1
4546        = new NISuppressor (1, 0, NumericInt.BitwiseAndZero.class);
4547      private static NISuppressor result_and0_arg2
4548        = new NISuppressor (1, 2, NumericInt.BitwiseAndZero.class);
4549      private static NISuppressor arg1_and0_arg2
4550        = new NISuppressor (0, 2, NumericInt.BitwiseAndZero.class);
4551    
4552      // The arguments to bitwise subset are backwards from what one
4553      // might expect.  The second argument is a subset of the first
4554      // argument
4555      private static NISuppressor arg1_bw_subset_arg2
4556        = new NISuppressor (2, 0, NumericInt.BitwiseSubset.class);
4557      private static NISuppressor arg2_bw_subset_arg1
4558        = new NISuppressor (0, 2, NumericInt.BitwiseSubset.class);
4559    
4560      private static NISuppressor result_shift0_arg1
4561        = new NISuppressor (1, 0, NumericInt.ShiftZero.class);
4562      private static NISuppressor result_shift0_arg2
4563        = new NISuppressor (1, 2, NumericInt.ShiftZero.class);
4564      private static NISuppressor arg1_shift0_arg2
4565        = new NISuppressor (0, 2, NumericInt.ShiftZero.class);
4566    
4567      private static NISuppressor arg2_divides_arg1
4568        = new NISuppressor (0, 2, NumericInt.Divides.class);
4569      private static NISuppressor arg1_divides_arg2
4570        = new NISuppressor (2, 0, NumericInt.Divides.class);
4571    
4572      private static NISuppressor arg2_valid_shift
4573        = new NISuppressor (2, RangeInt.Bound0_63.class);
4574    
4575        // Note that any suppression that doesn't limit z to valid exponents
4576        // (>= 0), must check for valid exponents as well (so that the invariant
4577        // is correctly destroyed on invalid exponents)
4578        //
4579        // Note also that pow(0,0) == 1 and pow(0,x), where (x > 0), == 0
4580        // Another interesting artificat of pow is that for any even base, any
4581        // exponent >= 64 will yield a result of 0.  For example, pow(10,256) == 0
4582        // (at least for integers)
4583    
4584        private static NISuppressionSet suppressions
4585          = new NISuppressionSet (new NISuppression[] {
4586    
4587            // (r == 1) && (z == 0) ==> r = pow (x, z)
4588            new NISuppression (result_eq_1, arg2_eq_0, suppressee),
4589    
4590            // (r == 1) && (x == 1) && (z >= 0)   ==> r = pow (x, z)
4591            new NISuppression (result_eq_1, arg1_eq_1, arg2_ge_0, suppressee),
4592    
4593            // (r == 0) && (x == 0) && (z > 0)
4594            new NISuppression (result_eq_0, arg1_eq_0, arg2_ne_0, arg2_ge_0,
4595                              suppressee),
4596    
4597            // (r == x) && (z == 1)    ==> r = pow (x, z)
4598            new NISuppression (result_eq_arg1, arg2_eq_1, suppressee),
4599    
4600            // (r == 0) && (x even) && (z >= 64)
4601            // with each multiply there is one more zero in the result and since
4602            // a long has 64 bits in it, it becomes zero at that point
4603            new NISuppression (result_eq_0, arg1_even, arg2_ge_64, suppressee),
4604    
4605            // (r == 1) && (x boolean) && (x==0 <==> z==0) && (z >= 0)
4606            // 1 = pow (0, z) true iff (z == 0)
4607            // 1 = pow (1, z) true when z valid exponent
4608            new NISuppression (arg1_track0_arg2, arg2_ge_0, arg1_boolean,
4609                               result_eq_1, suppressee),
4610    
4611            // (r == x) && (r boolean) && (z > 0)
4612            // 0 = pow (0, z) true when z != 0
4613            // 1 = pow (1, z) true when z valid exponent
4614            new NISuppression (result_eq_arg1, result_boolean, arg2_ne_0,
4615                               arg2_ge_0, suppressee),
4616    
4617          });
4618    
4619      // Create a suppression factory for functionBinary
4620    
4621    }
4622    
4623    /**
4624     * Represents the invariant <samp>z = Power (x, y)</samp>
4625     * over three long scalars.
4626     */
4627    public static class PowerLong_zxy extends FunctionBinary {
4628      // We are Serializable, so we specify a version to allow changes to
4629      // method signatures without breaking serialization.  If you add or
4630      // remove fields, you should change this number to the current date.
4631      static final long serialVersionUID = 20031030L;
4632    
4633      private static /*@Prototype*/ PowerLong_zxy proto;
4634    
4635      /** Returns the prototype invariant for PowerLong_zxy **/
4636      public static /*@Prototype*/ PowerLong_zxy get_proto() {
4637        if (proto == null)
4638          proto = new /*@Prototype*/ PowerLong_zxy ();
4639        return (proto);
4640      }
4641    
4642      /** instantiate an invariant on the specified slice **/
4643      protected PowerLong_zxy instantiate_dyn (PptSlice slice) /*@Prototype*/ {
4644        return new PowerLong_zxy (slice);
4645      }
4646    
4647      private PowerLong_zxy (PptSlice slice) {
4648        super (slice);
4649      }
4650    
4651      public PowerLong_zxy () /*@Prototype*/ {
4652        super ();
4653      }
4654    
4655      private static String[] method_name = new String[] {"java.lang.Math.pow(", ", ", ")"};
4656    
4657      public String[] get_method_name () {
4658        return (method_name);
4659      }
4660    
4661      private static int function_id = -1;
4662    
4663      public int get_function_id() {
4664        return (function_id);
4665      }
4666    
4667      public void set_function_id (int function_id) {
4668        assert PowerLong_zxy.function_id == -1;
4669        PowerLong_zxy.function_id = function_id;
4670      }
4671    
4672      private static int var_order = 3;
4673    
4674      public int get_var_order() {
4675        return var_order;
4676      }
4677    
4678      public boolean is_symmetric() {
4679    
4680          return (false);
4681      }
4682    
4683      public long func (long x, long y) {
4684    
4685        return (MathMDE.pow (x, y));
4686      }
4687    
4688      public InvariantStatus check_modified(long x, long y,
4689                                          long z, int count) {
4690        return (check_ordered (z, x, y, count));
4691      }
4692    
4693      public InvariantStatus add_modified(long x, long y,
4694                                          long z, int count) {
4695        if (Debug.logDetail())
4696          log (Fmt.spf ("result=%s, arg1=%s, arg2=%s", "" + z, "" + x,
4697                        "" + y));
4698        return (add_ordered (z, x, y, count));
4699      }
4700    
4701      public boolean isPower() {
4702        return (true);
4703      }
4704    
4705        public boolean isExact() { return true; }
4706    
4707      /**
4708       * Returns a list of non-instantiating suppressions for this invariant.
4709       */
4710      public /*@Nullable*/ NISuppressionSet get_ni_suppressions() {
4711        if (NIS.dkconfig_enabled && dkconfig_enabled)
4712          return (suppressions);
4713        else
4714          return (null);
4715      }
4716    
4717      /** definition of this invariant (the suppressee) **/
4718      private static NISuppressee suppressee
4719                        = new NISuppressee (PowerLong_zxy.class, 3);
4720    
4721      // suppressor definitions (used below)
4722      private static NISuppressor result_eq_arg1
4723        = new NISuppressor (2, 0, IntEqual.class);
4724      private static NISuppressor result_eq_arg2
4725        = new NISuppressor (2, 1, IntEqual.class);
4726      private static NISuppressor arg1_eq_arg2
4727        = new NISuppressor (0, 1, IntEqual.class);
4728    
4729      private static NISuppressor result_lt_arg1
4730        = new NISuppressor (2, 0, IntLessThan.class);
4731      private static NISuppressor result_lt_arg2
4732        = new NISuppressor (2, 1, IntLessThan.class);
4733      private static NISuppressor arg1_lt_arg2
4734        = new NISuppressor (0, 1, IntLessThan.class);
4735      private static NISuppressor arg2_lt_arg1
4736        = new NISuppressor (1, 0, IntLessThan.class);
4737    
4738      private static NISuppressor result_le_arg1
4739        = new NISuppressor (2, 0, IntLessEqual.class);
4740      private static NISuppressor result_le_arg2
4741        = new NISuppressor (2, 1, IntLessEqual.class);
4742      private static NISuppressor arg1_le_arg2
4743        = new NISuppressor (0, 1, IntLessEqual.class);
4744      private static NISuppressor arg2_le_arg1
4745        = new NISuppressor (1, 0, IntLessEqual.class);
4746    
4747      private static NISuppressor result_track0_arg1
4748        = new NISuppressor (2, 0, NumericInt.ZeroTrack.class);
4749      private static NISuppressor result_track0_arg2
4750        = new NISuppressor (2, 1, NumericInt.ZeroTrack.class);
4751      private static NISuppressor arg1_track0_arg2
4752        = new NISuppressor (0, 1, NumericInt.ZeroTrack.class);
4753      private static NISuppressor arg1_track0_result
4754        = new NISuppressor (0, 2, NumericInt.ZeroTrack.class);
4755      private static NISuppressor arg2_track0_result
4756        = new NISuppressor (1, 2, NumericInt.ZeroTrack.class);
4757      private static NISuppressor arg2_track0_arg1
4758        = new NISuppressor (1, 0, NumericInt.ZeroTrack.class);
4759    
4760      private static NISuppressor result_eq_1
4761        = new NISuppressor(2, RangeInt.EqualOne.class);
4762      private static NISuppressor arg1_eq_1
4763        = new NISuppressor (0, RangeInt.EqualOne.class);
4764      private static NISuppressor arg2_eq_1
4765        = new NISuppressor (1, RangeInt.EqualOne.class);
4766    
4767      private static NISuppressor result_eq_0
4768        = new NISuppressor(2,RangeInt.EqualZero.class);
4769      private static NISuppressor arg1_eq_0
4770        = new NISuppressor (0, RangeInt.EqualZero.class);
4771      private static NISuppressor arg2_eq_0
4772        = new NISuppressor (1, RangeInt.EqualZero.class);
4773    
4774      private static NISuppressor result_ne_0
4775        = new NISuppressor (2, NonZero.class);
4776      private static NISuppressor arg1_ne_0
4777        = new NISuppressor (0, NonZero.class);
4778      private static NISuppressor arg2_ne_0
4779        = new NISuppressor (1, NonZero.class);
4780    
4781      private static NISuppressor result_ge_0
4782        = new NISuppressor (2, RangeInt.GreaterEqualZero.class);
4783      private static NISuppressor arg1_ge_0
4784        = new NISuppressor (0, RangeInt.GreaterEqualZero.class);
4785      private static NISuppressor arg2_ge_0
4786        = new NISuppressor (1, RangeInt.GreaterEqualZero.class);
4787    
4788      private static NISuppressor result_ge_64
4789        = new NISuppressor (2, RangeInt.GreaterEqual64.class);
4790      private static NISuppressor arg1_ge_64
4791        = new NISuppressor (0, RangeInt.GreaterEqual64.class);
4792      private static NISuppressor arg2_ge_64
4793        = new NISuppressor (1, RangeInt.GreaterEqual64.class);
4794    
4795      private static NISuppressor result_boolean
4796        = new NISuppressor(2,RangeInt.BooleanVal.class);
4797      private static NISuppressor arg1_boolean
4798        = new NISuppressor (0, RangeInt.BooleanVal.class);
4799      private static NISuppressor arg2_boolean
4800        = new NISuppressor (1, RangeInt.BooleanVal.class);
4801    
4802      private static NISuppressor result_even
4803        = new NISuppressor (2, RangeInt.Even.class);
4804      private static NISuppressor arg1_even
4805        = new NISuppressor (0, RangeInt.Even.class);
4806      private static NISuppressor arg2_even
4807        = new NISuppressor (1, RangeInt.Even.class);
4808    
4809      private static NISuppressor result_power2
4810        = new NISuppressor(2,RangeInt.PowerOfTwo.class);
4811      private static NISuppressor arg1_power2
4812        = new NISuppressor (0, RangeInt.PowerOfTwo.class);
4813      private static NISuppressor arg2_power2
4814        = new NISuppressor (1, RangeInt.PowerOfTwo.class);
4815    
4816      private static NISuppressor result_and0_arg1
4817        = new NISuppressor (2, 0, NumericInt.BitwiseAndZero.class);
4818      private static NISuppressor result_and0_arg2
4819        = new NISuppressor (2, 1, NumericInt.BitwiseAndZero.class);
4820      private static NISuppressor arg1_and0_arg2
4821        = new NISuppressor (0, 1, NumericInt.BitwiseAndZero.class);
4822    
4823      // The arguments to bitwise subset are backwards from what one
4824      // might expect.  The second argument is a subset of the first
4825      // argument
4826      private static NISuppressor arg1_bw_subset_arg2
4827        = new NISuppressor (1, 0, NumericInt.BitwiseSubset.class);
4828      private static NISuppressor arg2_bw_subset_arg1
4829        = new NISuppressor (0, 1, NumericInt.BitwiseSubset.class);
4830    
4831      private static NISuppressor result_shift0_arg1
4832        = new NISuppressor (2, 0, NumericInt.ShiftZero.class);
4833      private static NISuppressor result_shift0_arg2
4834        = new NISuppressor (2, 1, NumericInt.ShiftZero.class);
4835      private static NISuppressor arg1_shift0_arg2
4836        = new NISuppressor (0, 1, NumericInt.ShiftZero.class);
4837    
4838      private static NISuppressor arg2_divides_arg1
4839        = new NISuppressor (0, 1, NumericInt.Divides.class);
4840      private static NISuppressor arg1_divides_arg2
4841        = new NISuppressor (1, 0, NumericInt.Divides.class);
4842    
4843      private static NISuppressor arg2_valid_shift
4844        = new NISuppressor (1, RangeInt.Bound0_63.class);
4845    
4846        // Note that any suppression that doesn't limit y to valid exponents
4847        // (>= 0), must check for valid exponents as well (so that the invariant
4848        // is correctly destroyed on invalid exponents)
4849        //
4850        // Note also that pow(0,0) == 1 and pow(0,x), where (x > 0), == 0
4851        // Another interesting artificat of pow is that for any even base, any
4852        // exponent >= 64 will yield a result of 0.  For example, pow(10,256) == 0
4853        // (at least for integers)
4854    
4855        private static NISuppressionSet suppressions
4856          = new NISuppressionSet (new NISuppression[] {
4857    
4858            // (r == 1) && (y == 0) ==> r = pow (x, y)
4859            new NISuppression (result_eq_1, arg2_eq_0, suppressee),
4860    
4861            // (r == 1) && (x == 1) && (y >= 0)   ==> r = pow (x, y)
4862            new NISuppression (result_eq_1, arg1_eq_1, arg2_ge_0, suppressee),
4863    
4864            // (r == 0) && (x == 0) && (y > 0)
4865            new NISuppression (result_eq_0, arg1_eq_0, arg2_ne_0, arg2_ge_0,
4866                              suppressee),
4867    
4868            // (r == x) && (y == 1)    ==> r = pow (x, y)
4869            new NISuppression (result_eq_arg1, arg2_eq_1, suppressee),
4870    
4871            // (r == 0) && (x even) && (y >= 64)
4872            // with each multiply there is one more zero in the result and since
4873            // a long has 64 bits in it, it becomes zero at that point
4874            new NISuppression (result_eq_0, arg1_even, arg2_ge_64, suppressee),
4875    
4876            // (r == 1) && (x boolean) && (x==0 <==> y==0) && (y >= 0)
4877            // 1 = pow (0, y) true iff (y == 0)
4878            // 1 = pow (1, y) true when y valid exponent
4879            new NISuppression (arg1_track0_arg2, arg2_ge_0, arg1_boolean,
4880                               result_eq_1, suppressee),
4881    
4882            // (r == x) && (r boolean) && (y > 0)
4883            // 0 = pow (0, y) true when y != 0
4884            // 1 = pow (1, y) true when y valid exponent
4885            new NISuppression (result_eq_arg1, result_boolean, arg2_ne_0,
4886                               arg2_ge_0, suppressee),
4887    
4888          });
4889    
4890      // Create a suppression factory for functionBinary
4891    
4892    }
4893    
4894    /**
4895     * Represents the invariant <samp>x = Power (z, y)</samp>
4896     * over three long scalars.
4897     */
4898    public static class PowerLong_xzy extends FunctionBinary {
4899      // We are Serializable, so we specify a version to allow changes to
4900      // method signatures without breaking serialization.  If you add or
4901      // remove fields, you should change this number to the current date.
4902      static final long serialVersionUID = 20031030L;
4903    
4904      private static /*@Prototype*/ PowerLong_xzy proto;
4905    
4906      /** Returns the prototype invariant for PowerLong_xzy **/
4907      public static /*@Prototype*/ PowerLong_xzy get_proto() {
4908        if (proto == null)
4909          proto = new /*@Prototype*/ PowerLong_xzy ();
4910        return (proto);
4911      }
4912    
4913      /** instantiate an invariant on the specified slice **/
4914      protected PowerLong_xzy instantiate_dyn (PptSlice slice) /*@Prototype*/ {
4915        return new PowerLong_xzy (slice);
4916      }
4917    
4918      private PowerLong_xzy (PptSlice slice) {
4919        super (slice);
4920      }
4921    
4922      public PowerLong_xzy () /*@Prototype*/ {
4923        super ();
4924      }
4925    
4926      private static String[] method_name = new String[] {"java.lang.Math.pow(", ", ", ")"};
4927    
4928      public String[] get_method_name () {
4929        return (method_name);
4930      }
4931    
4932      private static int function_id = -1;
4933    
4934      public int get_function_id() {
4935        return (function_id);
4936      }
4937    
4938      public void set_function_id (int function_id) {
4939        assert PowerLong_xzy.function_id == -1;
4940        PowerLong_xzy.function_id = function_id;
4941      }
4942    
4943      private static int var_order = 4;
4944    
4945      public int get_var_order() {
4946        return var_order;
4947      }
4948    
4949      public boolean is_symmetric() {
4950    
4951          return (false);
4952      }
4953    
4954      public long func (long z, long y) {
4955    
4956        return (MathMDE.pow (z, y));
4957      }
4958    
4959      public InvariantStatus check_modified(long x, long y,
4960                                          long z, int count) {
4961        return (check_ordered (x, z, y, count));
4962      }
4963    
4964      public InvariantStatus add_modified(long x, long y,
4965                                          long z, int count) {
4966        if (Debug.logDetail())
4967          log (Fmt.spf ("result=%s, arg1=%s, arg2=%s", "" + x, "" + z,
4968                        "" + y));
4969        return (add_ordered (x, z, y, count));
4970      }
4971    
4972      public boolean isPower() {
4973        return (true);
4974      }
4975    
4976        public boolean isExact() { return true; }
4977    
4978      /**
4979       * Returns a list of non-instantiating suppressions for this invariant.
4980       */
4981      public /*@Nullable*/ NISuppressionSet get_ni_suppressions() {
4982        if (NIS.dkconfig_enabled && dkconfig_enabled)
4983          return (suppressions);
4984        else
4985          return (null);
4986      }
4987    
4988      /** definition of this invariant (the suppressee) **/
4989      private static NISuppressee suppressee
4990                        = new NISuppressee (PowerLong_xzy.class, 3);
4991    
4992      // suppressor definitions (used below)
4993      private static NISuppressor result_eq_arg1
4994        = new NISuppressor (0, 2, IntEqual.class);
4995      private static NISuppressor result_eq_arg2
4996        = new NISuppressor (0, 1, IntEqual.class);
4997      private static NISuppressor arg1_eq_arg2
4998        = new NISuppressor (2, 1, IntEqual.class);
4999    
5000      private static NISuppressor result_lt_arg1
5001        = new NISuppressor (0, 2, IntLessThan.class);
5002      private static NISuppressor result_lt_arg2
5003        = new NISuppressor (0, 1, IntLessThan.class);
5004      private static NISuppressor arg1_lt_arg2
5005        = new NISuppressor (2, 1, IntLessThan.class);
5006      private static NISuppressor arg2_lt_arg1
5007        = new NISuppressor (1, 2, IntLessThan.class);
5008    
5009      private static NISuppressor result_le_arg1
5010        = new NISuppressor (0, 2, IntLessEqual.class);
5011      private static NISuppressor result_le_arg2
5012        = new NISuppressor (0, 1, IntLessEqual.class);
5013      private static NISuppressor arg1_le_arg2
5014        = new NISuppressor (2, 1, IntLessEqual.class);
5015      private static NISuppressor arg2_le_arg1
5016        = new NISuppressor (1, 2, IntLessEqual.class);
5017    
5018      private static NISuppressor result_track0_arg1
5019        = new NISuppressor (0, 2, NumericInt.ZeroTrack.class);
5020      private static NISuppressor result_track0_arg2
5021        = new NISuppressor (0, 1, NumericInt.ZeroTrack.class);
5022      private static NISuppressor arg1_track0_arg2
5023        = new NISuppressor (2, 1, NumericInt.ZeroTrack.class);
5024      private static NISuppressor arg1_track0_result
5025        = new NISuppressor (2, 0, NumericInt.ZeroTrack.class);
5026      private static NISuppressor arg2_track0_result
5027        = new NISuppressor (1, 0, NumericInt.ZeroTrack.class);
5028      private static NISuppressor arg2_track0_arg1
5029        = new NISuppressor (1, 2, NumericInt.ZeroTrack.class);
5030    
5031      private static NISuppressor result_eq_1
5032        = new NISuppressor(0, RangeInt.EqualOne.class);
5033      private static NISuppressor arg1_eq_1
5034        = new NISuppressor (2, RangeInt.EqualOne.class);
5035      private static NISuppressor arg2_eq_1
5036        = new NISuppressor (1, RangeInt.EqualOne.class);
5037    
5038      private static NISuppressor result_eq_0
5039        = new NISuppressor(0,RangeInt.EqualZero.class);
5040      private static NISuppressor arg1_eq_0
5041        = new NISuppressor (2, RangeInt.EqualZero.class);
5042      private static NISuppressor arg2_eq_0
5043        = new NISuppressor (1, RangeInt.EqualZero.class);
5044    
5045      private static NISuppressor result_ne_0
5046        = new NISuppressor (0, NonZero.class);
5047      private static NISuppressor arg1_ne_0
5048        = new NISuppressor (2, NonZero.class);
5049      private static NISuppressor arg2_ne_0
5050        = new NISuppressor (1, NonZero.class);
5051    
5052      private static NISuppressor result_ge_0
5053        = new NISuppressor (0, RangeInt.GreaterEqualZero.class);
5054      private static NISuppressor arg1_ge_0
5055        = new NISuppressor (2, RangeInt.GreaterEqualZero.class);
5056      private static NISuppressor arg2_ge_0
5057        = new NISuppressor (1, RangeInt.GreaterEqualZero.class);
5058    
5059      private static NISuppressor result_ge_64
5060        = new NISuppressor (0, RangeInt.GreaterEqual64.class);
5061      private static NISuppressor arg1_ge_64
5062        = new NISuppressor (2, RangeInt.GreaterEqual64.class);
5063      private static NISuppressor arg2_ge_64
5064        = new NISuppressor (1, RangeInt.GreaterEqual64.class);
5065    
5066      private static NISuppressor result_boolean
5067        = new NISuppressor(0,RangeInt.BooleanVal.class);
5068      private static NISuppressor arg1_boolean
5069        = new NISuppressor (2, RangeInt.BooleanVal.class);
5070      private static NISuppressor arg2_boolean
5071        = new NISuppressor (1, RangeInt.BooleanVal.class);
5072    
5073      private static NISuppressor result_even
5074        = new NISuppressor (0, RangeInt.Even.class);
5075      private static NISuppressor arg1_even
5076        = new NISuppressor (2, RangeInt.Even.class);
5077      private static NISuppressor arg2_even
5078        = new NISuppressor (1, RangeInt.Even.class);
5079    
5080      private static NISuppressor result_power2
5081        = new NISuppressor(0,RangeInt.PowerOfTwo.class);
5082      private static NISuppressor arg1_power2
5083        = new NISuppressor (2, RangeInt.PowerOfTwo.class);
5084      private static NISuppressor arg2_power2
5085        = new NISuppressor (1, RangeInt.PowerOfTwo.class);
5086    
5087      private static NISuppressor result_and0_arg1
5088        = new NISuppressor (0, 2, NumericInt.BitwiseAndZero.class);
5089      private static NISuppressor result_and0_arg2
5090        = new NISuppressor (0, 1, NumericInt.BitwiseAndZero.class);
5091      private static NISuppressor arg1_and0_arg2
5092        = new NISuppressor (2, 1, NumericInt.BitwiseAndZero.class);
5093    
5094      // The arguments to bitwise subset are backwards from what one
5095      // might expect.  The second argument is a subset of the first
5096      // argument
5097      private static NISuppressor arg1_bw_subset_arg2
5098        = new NISuppressor (1, 2, NumericInt.BitwiseSubset.class);
5099      private static NISuppressor arg2_bw_subset_arg1
5100        = new NISuppressor (2, 1, NumericInt.BitwiseSubset.class);
5101    
5102      private static NISuppressor result_shift0_arg1
5103        = new NISuppressor (0, 2, NumericInt.ShiftZero.class);
5104      private static NISuppressor result_shift0_arg2
5105        = new NISuppressor (0, 1, NumericInt.ShiftZero.class);
5106      private static NISuppressor arg1_shift0_arg2
5107        = new NISuppressor (2, 1, NumericInt.ShiftZero.class);
5108    
5109      private static NISuppressor arg2_divides_arg1
5110        = new NISuppressor (2, 1, NumericInt.Divides.class);
5111      private static NISuppressor arg1_divides_arg2
5112        = new NISuppressor (1, 2, NumericInt.Divides.class);
5113    
5114      private static NISuppressor arg2_valid_shift
5115        = new NISuppressor (1, RangeInt.Bound0_63.class);
5116    
5117        // Note that any suppression that doesn't limit y to valid exponents
5118        // (>= 0), must check for valid exponents as well (so that the invariant
5119        // is correctly destroyed on invalid exponents)
5120        //
5121        // Note also that pow(0,0) == 1 and pow(0,x), where (x > 0), == 0
5122        // Another interesting artificat of pow is that for any even base, any
5123        // exponent >= 64 will yield a result of 0.  For example, pow(10,256) == 0
5124        // (at least for integers)
5125    
5126        private static NISuppressionSet suppressions
5127          = new NISuppressionSet (new NISuppression[] {
5128    
5129            // (r == 1) && (y == 0) ==> r = pow (z, y)
5130            new NISuppression (result_eq_1, arg2_eq_0, suppressee),
5131    
5132            // (r == 1) && (z == 1) && (y >= 0)   ==> r = pow (z, y)
5133            new NISuppression (result_eq_1, arg1_eq_1, arg2_ge_0, suppressee),
5134    
5135            // (r == 0) && (z == 0) && (y > 0)
5136            new NISuppression (result_eq_0, arg1_eq_0, arg2_ne_0, arg2_ge_0,
5137                              suppressee),
5138    
5139            // (r == z) && (y == 1)    ==> r = pow (z, y)
5140            new NISuppression (result_eq_arg1, arg2_eq_1, suppressee),
5141    
5142            // (r == 0) && (z even) && (y >= 64)
5143            // with each multiply there is one more zero in the result and since
5144            // a long has 64 bits in it, it becomes zero at that point
5145            new NISuppression (result_eq_0, arg1_even, arg2_ge_64, suppressee),
5146    
5147            // (r == 1) && (z boolean) && (z==0 <==> y==0) && (y >= 0)
5148            // 1 = pow (0, y) true iff (y == 0)
5149            // 1 = pow (1, y) true when y valid exponent
5150            new NISuppression (arg1_track0_arg2, arg2_ge_0, arg1_boolean,
5151                               result_eq_1, suppressee),
5152    
5153            // (r == z) && (r boolean) && (y > 0)
5154            // 0 = pow (0, y) true when y != 0
5155            // 1 = pow (1, y) true when y valid exponent
5156            new NISuppression (result_eq_arg1, result_boolean, arg2_ne_0,
5157                               arg2_ge_0, suppressee),
5158    
5159          });
5160    
5161      // Create a suppression factory for functionBinary
5162    
5163    }
5164    
5165    /**
5166     * Represents the invariant <samp>y = Power (z, x)</samp>
5167     * over three long scalars.
5168     */
5169    public static class PowerLong_yzx extends FunctionBinary {
5170      // We are Serializable, so we specify a version to allow changes to
5171      // method signatures without breaking serialization.  If you add or
5172      // remove fields, you should change this number to the current date.
5173      static final long serialVersionUID = 20031030L;
5174    
5175      private static /*@Prototype*/ PowerLong_yzx proto;
5176    
5177      /** Returns the prototype invariant for PowerLong_yzx **/
5178      public static /*@Prototype*/ PowerLong_yzx get_proto() {
5179        if (proto == null)
5180          proto = new /*@Prototype*/ PowerLong_yzx ();
5181        return (proto);
5182      }
5183    
5184      /** instantiate an invariant on the specified slice **/
5185      protected PowerLong_yzx instantiate_dyn (PptSlice slice) /*@Prototype*/ {
5186        return new PowerLong_yzx (slice);
5187      }
5188    
5189      private PowerLong_yzx (PptSlice slice) {
5190        super (slice);
5191      }
5192    
5193      public PowerLong_yzx () /*@Prototype*/ {
5194        super ();
5195      }
5196    
5197      private static String[] method_name = new String[] {"java.lang.Math.pow(", ", ", ")"};
5198    
5199      public String[] get_method_name () {
5200        return (method_name);
5201      }
5202    
5203      private static int function_id = -1;
5204    
5205      public int get_function_id() {
5206        return (function_id);
5207      }
5208    
5209      public void set_function_id (int function_id) {
5210        assert PowerLong_yzx.function_id == -1;
5211        PowerLong_yzx.function_id = function_id;
5212      }
5213    
5214      private static int var_order = 5;
5215    
5216      public int get_var_order() {
5217        return var_order;
5218      }
5219    
5220      public boolean is_symmetric() {
5221    
5222          return (false);
5223      }
5224    
5225      public long func (long z, long x) {
5226    
5227        return (MathMDE.pow (z, x));
5228      }
5229    
5230      public InvariantStatus check_modified(long x, long y,
5231                                          long z, int count) {
5232        return (check_ordered (y, z, x, count));
5233      }
5234    
5235      public InvariantStatus add_modified(long x, long y,
5236                                          long z, int count) {
5237        if (Debug.logDetail())
5238          log (Fmt.spf ("result=%s, arg1=%s, arg2=%s", "" + y, "" + z,
5239                        "" + x));
5240        return (add_ordered (y, z, x, count));
5241      }
5242    
5243      public boolean isPower() {
5244        return (true);
5245      }
5246    
5247        public boolean isExact() { return true; }
5248    
5249      /**
5250       * Returns a list of non-instantiating suppressions for this invariant.
5251       */
5252      public /*@Nullable*/ NISuppressionSet get_ni_suppressions() {
5253        if (NIS.dkconfig_enabled && dkconfig_enabled)
5254          return (suppressions);
5255        else
5256          return (null);
5257      }
5258    
5259      /** definition of this invariant (the suppressee) **/
5260      private static NISuppressee suppressee
5261                        = new NISuppressee (PowerLong_yzx.class, 3);
5262    
5263      // suppressor definitions (used below)
5264      private static NISuppressor result_eq_arg1
5265        = new NISuppressor (1, 2, IntEqual.class);
5266      private static NISuppressor result_eq_arg2
5267        = new NISuppressor (1, 0, IntEqual.class);
5268      private static NISuppressor arg1_eq_arg2
5269        = new NISuppressor (2, 0, IntEqual.class);
5270    
5271      private static NISuppressor result_lt_arg1
5272        = new NISuppressor (1, 2, IntLessThan.class);
5273      private static NISuppressor result_lt_arg2
5274        = new NISuppressor (1, 0, IntLessThan.class);
5275      private static NISuppressor arg1_lt_arg2
5276        = new NISuppressor (2, 0, IntLessThan.class);
5277      private static NISuppressor arg2_lt_arg1
5278        = new NISuppressor (0, 2, IntLessThan.class);
5279    
5280      private static NISuppressor result_le_arg1
5281        = new NISuppressor (1, 2, IntLessEqual.class);
5282      private static NISuppressor result_le_arg2
5283        = new NISuppressor (1, 0, IntLessEqual.class);
5284      private static NISuppressor arg1_le_arg2
5285        = new NISuppressor (2, 0, IntLessEqual.class);
5286      private static NISuppressor arg2_le_arg1
5287        = new NISuppressor (0, 2, IntLessEqual.class);
5288    
5289      private static NISuppressor result_track0_arg1
5290        = new NISuppressor (1, 2, NumericInt.ZeroTrack.class);
5291      private static NISuppressor result_track0_arg2
5292        = new NISuppressor (1, 0, NumericInt.ZeroTrack.class);
5293      private static NISuppressor arg1_track0_arg2
5294        = new NISuppressor (2, 0, NumericInt.ZeroTrack.class);
5295      private static NISuppressor arg1_track0_result
5296        = new NISuppressor (2, 1, NumericInt.ZeroTrack.class);
5297      private static NISuppressor arg2_track0_result
5298        = new NISuppressor (0, 1, NumericInt.ZeroTrack.class);
5299      private static NISuppressor arg2_track0_arg1
5300        = new NISuppressor (0, 2, NumericInt.ZeroTrack.class);
5301    
5302      private static NISuppressor result_eq_1
5303        = new NISuppressor(1, RangeInt.EqualOne.class);
5304      private static NISuppressor arg1_eq_1
5305        = new NISuppressor (2, RangeInt.EqualOne.class);
5306      private static NISuppressor arg2_eq_1
5307        = new NISuppressor (0, RangeInt.EqualOne.class);
5308    
5309      private static NISuppressor result_eq_0
5310        = new NISuppressor(1,RangeInt.EqualZero.class);
5311      private static NISuppressor arg1_eq_0
5312        = new NISuppressor (2, RangeInt.EqualZero.class);
5313      private static NISuppressor arg2_eq_0
5314        = new NISuppressor (0, RangeInt.EqualZero.class);
5315    
5316      private static NISuppressor result_ne_0
5317        = new NISuppressor (1, NonZero.class);
5318      private static NISuppressor arg1_ne_0
5319        = new NISuppressor (2, NonZero.class);
5320      private static NISuppressor arg2_ne_0
5321        = new NISuppressor (0, NonZero.class);
5322    
5323      private static NISuppressor result_ge_0
5324        = new NISuppressor (1, RangeInt.GreaterEqualZero.class);
5325      private static NISuppressor arg1_ge_0
5326        = new NISuppressor (2, RangeInt.GreaterEqualZero.class);
5327      private static NISuppressor arg2_ge_0
5328        = new NISuppressor (0, RangeInt.GreaterEqualZero.class);
5329    
5330      private static NISuppressor result_ge_64
5331        = new NISuppressor (1, RangeInt.GreaterEqual64.class);
5332      private static NISuppressor arg1_ge_64
5333        = new NISuppressor (2, RangeInt.GreaterEqual64.class);
5334      private static NISuppressor arg2_ge_64
5335        = new NISuppressor (0, RangeInt.GreaterEqual64.class);
5336    
5337      private static NISuppressor result_boolean
5338        = new NISuppressor(1,RangeInt.BooleanVal.class);
5339      private static NISuppressor arg1_boolean
5340        = new NISuppressor (2, RangeInt.BooleanVal.class);
5341      private static NISuppressor arg2_boolean
5342        = new NISuppressor (0, RangeInt.BooleanVal.class);
5343    
5344      private static NISuppressor result_even
5345        = new NISuppressor (1, RangeInt.Even.class);
5346      private static NISuppressor arg1_even
5347        = new NISuppressor (2, RangeInt.Even.class);
5348      private static NISuppressor arg2_even
5349        = new NISuppressor (0, RangeInt.Even.class);
5350    
5351      private static NISuppressor result_power2
5352        = new NISuppressor(1,RangeInt.PowerOfTwo.class);
5353      private static NISuppressor arg1_power2
5354        = new NISuppressor (2, RangeInt.PowerOfTwo.class);
5355      private static NISuppressor arg2_power2
5356        = new NISuppressor (0, RangeInt.PowerOfTwo.class);
5357    
5358      private static NISuppressor result_and0_arg1
5359        = new NISuppressor (1, 2, NumericInt.BitwiseAndZero.class);
5360      private static NISuppressor result_and0_arg2
5361        = new NISuppressor (1, 0, NumericInt.BitwiseAndZero.class);
5362      private static NISuppressor arg1_and0_arg2
5363        = new NISuppressor (2, 0, NumericInt.BitwiseAndZero.class);
5364    
5365      // The arguments to bitwise subset are backwards from what one
5366      // might expect.  The second argument is a subset of the first
5367      // argument
5368      private static NISuppressor arg1_bw_subset_arg2
5369        = new NISuppressor (0, 2, NumericInt.BitwiseSubset.class);
5370      private static NISuppressor arg2_bw_subset_arg1
5371        = new NISuppressor (2, 0, NumericInt.BitwiseSubset.class);
5372    
5373      private static NISuppressor result_shift0_arg1
5374        = new NISuppressor (1, 2, NumericInt.ShiftZero.class);
5375      private static NISuppressor result_shift0_arg2
5376        = new NISuppressor (1, 0, NumericInt.ShiftZero.class);
5377      private static NISuppressor arg1_shift0_arg2
5378        = new NISuppressor (2, 0, NumericInt.ShiftZero.class);
5379    
5380      private static NISuppressor arg2_divides_arg1
5381        = new NISuppressor (2, 0, NumericInt.Divides.class);
5382      private static NISuppressor arg1_divides_arg2
5383        = new NISuppressor (0, 2, NumericInt.Divides.class);
5384    
5385      private static NISuppressor arg2_valid_shift
5386        = new NISuppressor (0, RangeInt.Bound0_63.class);
5387    
5388        // Note that any suppression that doesn't limit x to valid exponents
5389        // (>= 0), must check for valid exponents as well (so that the invariant
5390        // is correctly destroyed on invalid exponents)
5391        //
5392        // Note also that pow(0,0) == 1 and pow(0,x), where (x > 0), == 0
5393        // Another interesting artificat of pow is that for any even base, any
5394        // exponent >= 64 will yield a result of 0.  For example, pow(10,256) == 0
5395        // (at least for integers)
5396    
5397        private static NISuppressionSet suppressions
5398          = new NISuppressionSet (new NISuppression[] {
5399    
5400            // (r == 1) && (x == 0) ==> r = pow (z, x)
5401            new NISuppression (result_eq_1, arg2_eq_0, suppressee),
5402    
5403            // (r == 1) && (z == 1) && (x >= 0)   ==> r = pow (z, x)
5404            new NISuppression (result_eq_1, arg1_eq_1, arg2_ge_0, suppressee),
5405    
5406            // (r == 0) && (z == 0) && (x > 0)
5407            new NISuppression (result_eq_0, arg1_eq_0, arg2_ne_0, arg2_ge_0,
5408                              suppressee),
5409    
5410            // (r == z) && (x == 1)    ==> r = pow (z, x)
5411            new NISuppression (result_eq_arg1, arg2_eq_1, suppressee),
5412    
5413            // (r == 0) && (z even) && (x >= 64)
5414            // with each multiply there is one more zero in the result and since
5415            // a long has 64 bits in it, it becomes zero at that point
5416            new NISuppression (result_eq_0, arg1_even, arg2_ge_64, suppressee),
5417    
5418            // (r == 1) && (z boolean) && (z==0 <==> x==0) && (x >= 0)
5419            // 1 = pow (0, x) true iff (x == 0)
5420            // 1 = pow (1, x) true when x valid exponent
5421            new NISuppression (arg1_track0_arg2, arg2_ge_0, arg1_boolean,
5422                               result_eq_1, suppressee),
5423    
5424            // (r == z) && (r boolean) && (x > 0)
5425            // 0 = pow (0, x) true when x != 0
5426            // 1 = pow (1, x) true when x valid exponent
5427            new NISuppression (result_eq_arg1, result_boolean, arg2_ne_0,
5428                               arg2_ge_0, suppressee),
5429    
5430          });
5431    
5432      // Create a suppression factory for functionBinary
5433    
5434    }
5435    
5436    /**
5437     * Represents the invariant <samp>z = Power (y, x)</samp>
5438     * over three long scalars.
5439     */
5440    public static class PowerLong_zyx extends FunctionBinary {
5441      // We are Serializable, so we specify a version to allow changes to
5442      // method signatures without breaking serialization.  If you add or
5443      // remove fields, you should change this number to the current date.
5444      static final long serialVersionUID = 20031030L;
5445    
5446      private static /*@Prototype*/ PowerLong_zyx proto;
5447    
5448      /** Returns the prototype invariant for PowerLong_zyx **/
5449      public static /*@Prototype*/ PowerLong_zyx get_proto() {
5450        if (proto == null)
5451          proto = new /*@Prototype*/ PowerLong_zyx ();
5452        return (proto);
5453      }
5454    
5455      /** instantiate an invariant on the specified slice **/
5456      protected PowerLong_zyx instantiate_dyn (PptSlice slice) /*@Prototype*/ {
5457        return new PowerLong_zyx (slice);
5458      }
5459    
5460      private PowerLong_zyx (PptSlice slice) {
5461        super (slice);
5462      }
5463    
5464      public PowerLong_zyx () /*@Prototype*/ {
5465        super ();
5466      }
5467    
5468      private static String[] method_name = new String[] {"java.lang.Math.pow(", ", ", ")"};
5469    
5470      public String[] get_method_name () {
5471        return (method_name);
5472      }
5473    
5474      private static int function_id = -1;
5475    
5476      public int get_function_id() {
5477        return (function_id);
5478      }
5479    
5480      public void set_function_id (int function_id) {
5481        assert PowerLong_zyx.function_id == -1;
5482        PowerLong_zyx.function_id = function_id;
5483      }
5484    
5485      private static int var_order = 6;
5486    
5487      public int get_var_order() {
5488        return var_order;
5489      }
5490    
5491      public boolean is_symmetric() {
5492    
5493          return (false);
5494      }
5495    
5496      public long func (long y, long x) {
5497    
5498        return (MathMDE.pow (y, x));
5499      }
5500    
5501      public InvariantStatus check_modified(long x, long y,
5502                                          long z, int count) {
5503        return (check_ordered (z, y, x, count));
5504      }
5505    
5506      public InvariantStatus add_modified(long x, long y,
5507                                          long z, int count) {
5508        if (Debug.logDetail())
5509          log (Fmt.spf ("result=%s, arg1=%s, arg2=%s", "" + z, "" + y,
5510                        "" + x));
5511        return (add_ordered (z, y, x, count));
5512      }
5513    
5514      public boolean isPower() {
5515        return (true);
5516      }
5517    
5518        public boolean isExact() { return true; }
5519    
5520      /**
5521       * Returns a list of non-instantiating suppressions for this invariant.
5522       */
5523      public /*@Nullable*/ NISuppressionSet get_ni_suppressions() {
5524        if (NIS.dkconfig_enabled && dkconfig_enabled)
5525          return (suppressions);
5526        else
5527          return (null);
5528      }
5529    
5530      /** definition of this invariant (the suppressee) **/
5531      private static NISuppressee suppressee
5532                        = new NISuppressee (PowerLong_zyx.class, 3);
5533    
5534      // suppressor definitions (used below)
5535      private static NISuppressor result_eq_arg1
5536        = new NISuppressor (2, 1, IntEqual.class);
5537      private static NISuppressor result_eq_arg2
5538        = new NISuppressor (2, 0, IntEqual.class);
5539      private static NISuppressor arg1_eq_arg2
5540        = new NISuppressor (1, 0, IntEqual.class);
5541    
5542      private static NISuppressor result_lt_arg1
5543        = new NISuppressor (2, 1, IntLessThan.class);
5544      private static NISuppressor result_lt_arg2
5545        = new NISuppressor (2, 0, IntLessThan.class);
5546      private static NISuppressor arg1_lt_arg2
5547        = new NISuppressor (1, 0, IntLessThan.class);
5548      private static NISuppressor arg2_lt_arg1
5549        = new NISuppressor (0, 1, IntLessThan.class);
5550    
5551      private static NISuppressor result_le_arg1
5552        = new NISuppressor (2, 1, IntLessEqual.class);
5553      private static NISuppressor result_le_arg2
5554        = new NISuppressor (2, 0, IntLessEqual.class);
5555      private static NISuppressor arg1_le_arg2
5556        = new NISuppressor (1, 0, IntLessEqual.class);
5557      private static NISuppressor arg2_le_arg1
5558        = new NISuppressor (0, 1, IntLessEqual.class);
5559    
5560      private static NISuppressor result_track0_arg1
5561        = new NISuppressor (2, 1, NumericInt.ZeroTrack.class);
5562      private static NISuppressor result_track0_arg2
5563        = new NISuppressor (2, 0, NumericInt.ZeroTrack.class);
5564      private static NISuppressor arg1_track0_arg2
5565        = new NISuppressor (1, 0, NumericInt.ZeroTrack.class);
5566      private static NISuppressor arg1_track0_result
5567        = new NISuppressor (1, 2, NumericInt.ZeroTrack.class);
5568      private static NISuppressor arg2_track0_result
5569        = new NISuppressor (0, 2, NumericInt.ZeroTrack.class);
5570      private static NISuppressor arg2_track0_arg1
5571        = new NISuppressor (0, 1, NumericInt.ZeroTrack.class);
5572    
5573      private static NISuppressor result_eq_1
5574        = new NISuppressor(2, RangeInt.EqualOne.class);
5575      private static NISuppressor arg1_eq_1
5576        = new NISuppressor (1, RangeInt.EqualOne.class);
5577      private static NISuppressor arg2_eq_1
5578        = new NISuppressor (0, RangeInt.EqualOne.class);
5579    
5580      private static NISuppressor result_eq_0
5581        = new NISuppressor(2,RangeInt.EqualZero.class);
5582      private static NISuppressor arg1_eq_0
5583        = new NISuppressor (1, RangeInt.EqualZero.class);
5584      private static NISuppressor arg2_eq_0
5585        = new NISuppressor (0, RangeInt.EqualZero.class);
5586    
5587      private static NISuppressor result_ne_0
5588        = new NISuppressor (2, NonZero.class);
5589      private static NISuppressor arg1_ne_0
5590        = new NISuppressor (1, NonZero.class);
5591      private static NISuppressor arg2_ne_0
5592        = new NISuppressor (0, NonZero.class);
5593    
5594      private static NISuppressor result_ge_0
5595        = new NISuppressor (2, RangeInt.GreaterEqualZero.class);
5596      private static NISuppressor arg1_ge_0
5597        = new NISuppressor (1, RangeInt.GreaterEqualZero.class);
5598      private static NISuppressor arg2_ge_0
5599        = new NISuppressor (0, RangeInt.GreaterEqualZero.class);
5600    
5601      private static NISuppressor result_ge_64
5602        = new NISuppressor (2, RangeInt.GreaterEqual64.class);
5603      private static NISuppressor arg1_ge_64
5604        = new NISuppressor (1, RangeInt.GreaterEqual64.class);
5605      private static NISuppressor arg2_ge_64
5606        = new NISuppressor (0, RangeInt.GreaterEqual64.class);
5607    
5608      private static NISuppressor result_boolean
5609        = new NISuppressor(2,RangeInt.BooleanVal.class);
5610      private static NISuppressor arg1_boolean
5611        = new NISuppressor (1, RangeInt.BooleanVal.class);
5612      private static NISuppressor arg2_boolean
5613        = new NISuppressor (0, RangeInt.BooleanVal.class);
5614    
5615      private static NISuppressor result_even
5616        = new NISuppressor (2, RangeInt.Even.class);
5617      private static NISuppressor arg1_even
5618        = new NISuppressor (1, RangeInt.Even.class);
5619      private static NISuppressor arg2_even
5620        = new NISuppressor (0, RangeInt.Even.class);
5621    
5622      private static NISuppressor result_power2
5623        = new NISuppressor(2,RangeInt.PowerOfTwo.class);
5624      private static NISuppressor arg1_power2
5625        = new NISuppressor (1, RangeInt.PowerOfTwo.class);
5626      private static NISuppressor arg2_power2
5627        = new NISuppressor (0, RangeInt.PowerOfTwo.class);
5628    
5629      private static NISuppressor result_and0_arg1
5630        = new NISuppressor (2, 1, NumericInt.BitwiseAndZero.class);
5631      private static NISuppressor result_and0_arg2
5632        = new NISuppressor (2, 0, NumericInt.BitwiseAndZero.class);
5633      private static NISuppressor arg1_and0_arg2
5634        = new NISuppressor (1, 0, NumericInt.BitwiseAndZero.class);
5635    
5636      // The arguments to bitwise subset are backwards from what one
5637      // might expect.  The second argument is a subset of the first
5638      // argument
5639      private static NISuppressor arg1_bw_subset_arg2
5640        = new NISuppressor (0, 1, NumericInt.BitwiseSubset.class);
5641      private static NISuppressor arg2_bw_subset_arg1
5642        = new NISuppressor (1, 0, NumericInt.BitwiseSubset.class);
5643    
5644      private static NISuppressor result_shift0_arg1
5645        = new NISuppressor (2, 1, NumericInt.ShiftZero.class);
5646      private static NISuppressor result_shift0_arg2
5647        = new NISuppressor (2, 0, NumericInt.ShiftZero.class);
5648      private static NISuppressor arg1_shift0_arg2
5649        = new NISuppressor (1, 0, NumericInt.ShiftZero.class);
5650    
5651      private static NISuppressor arg2_divides_arg1
5652        = new NISuppressor (1, 0, NumericInt.Divides.class);
5653      private static NISuppressor arg1_divides_arg2
5654        = new NISuppressor (0, 1, NumericInt.Divides.class);
5655    
5656      private static NISuppressor arg2_valid_shift
5657        = new NISuppressor (0, RangeInt.Bound0_63.class);
5658    
5659        // Note that any suppression that doesn't limit x to valid exponents
5660        // (>= 0), must check for valid exponents as well (so that the invariant
5661        // is correctly destroyed on invalid exponents)
5662        //
5663        // Note also that pow(0,0) == 1 and pow(0,x), where (x > 0), == 0
5664        // Another interesting artificat of pow is that for any even base, any
5665        // exponent >= 64 will yield a result of 0.  For example, pow(10,256) == 0
5666        // (at least for integers)
5667    
5668        private static NISuppressionSet suppressions
5669          = new NISuppressionSet (new NISuppression[] {
5670    
5671            // (r == 1) && (x == 0) ==> r = pow (y, x)
5672            new NISuppression (result_eq_1, arg2_eq_0, suppressee),
5673    
5674            // (r == 1) && (y == 1) && (x >= 0)   ==> r = pow (y, x)
5675            new NISuppression (result_eq_1, arg1_eq_1, arg2_ge_0, suppressee),
5676    
5677            // (r == 0) && (y == 0) && (x > 0)
5678            new NISuppression (result_eq_0, arg1_eq_0, arg2_ne_0, arg2_ge_0,
5679                              suppressee),
5680    
5681            // (r == y) && (x == 1)    ==> r = pow (y, x)
5682            new NISuppression (result_eq_arg1, arg2_eq_1, suppressee),
5683    
5684            // (r == 0) && (y even) && (x >= 64)
5685            // with each multiply there is one more zero in the result and since
5686            // a long has 64 bits in it, it becomes zero at that point
5687            new NISuppression (result_eq_0, arg1_even, arg2_ge_64, suppressee),
5688    
5689            // (r == 1) && (y boolean) && (y==0 <==> x==0) && (x >= 0)
5690            // 1 = pow (0, x) true iff (x == 0)
5691            // 1 = pow (1, x) true when x valid exponent
5692            new NISuppression (arg1_track0_arg2, arg2_ge_0, arg1_boolean,
5693                               result_eq_1, suppressee),
5694    
5695            // (r == y) && (r boolean) && (x > 0)
5696            // 0 = pow (0, x) true when x != 0
5697            // 1 = pow (1, x) true when x valid exponent
5698            new NISuppression (result_eq_arg1, result_boolean, arg2_ne_0,
5699                               arg2_ge_0, suppressee),
5700    
5701          });
5702    
5703      // Create a suppression factory for functionBinary
5704    
5705    }
5706    
5707      // "define" EQUALITY_SUPPRESS 1
5708    
5709      // default is that it is not this function, overriden in the subclass
5710      public boolean isBitwiseAnd () {
5711        return (false);
5712      }
5713    
5714    /**
5715     * Represents the invariant <samp>x = BitwiseAnd (y, z)</samp>
5716     * over three long scalars.
5717     */
5718    public static class BitwiseAndLong_xyz extends FunctionBinary {
5719      // We are Serializable, so we specify a version to allow changes to
5720      // method signatures without breaking serialization.  If you add or
5721      // remove fields, you should change this number to the current date.
5722      static final long serialVersionUID = 20031030L;
5723    
5724      private static /*@Prototype*/ BitwiseAndLong_xyz proto;
5725    
5726      /** Returns the prototype invariant for BitwiseAndLong_xyz **/
5727      public static /*@Prototype*/ BitwiseAndLong_xyz get_proto() {
5728        if (proto == null)
5729          proto = new /*@Prototype*/ BitwiseAndLong_xyz ();
5730        return (proto);
5731      }
5732    
5733      /** instantiate an invariant on the specified slice **/
5734      protected BitwiseAndLong_xyz instantiate_dyn (PptSlice slice) /*@Prototype*/ {
5735        return new BitwiseAndLong_xyz (slice);
5736      }
5737    
5738      private BitwiseAndLong_xyz (PptSlice slice) {
5739        super (slice);
5740      }
5741    
5742      public BitwiseAndLong_xyz () /*@Prototype*/ {
5743        super ();
5744      }
5745    
5746      private static String[] method_name = new String[] {"", " & ", ""};
5747    
5748      public String[] get_method_name () {
5749        return (method_name);
5750      }
5751    
5752      private static int function_id = -1;
5753    
5754      public int get_function_id() {
5755        return (function_id);
5756      }
5757    
5758      public void set_function_id (int function_id) {
5759        assert BitwiseAndLong_xyz.function_id == -1;
5760        BitwiseAndLong_xyz.function_id = function_id;
5761      }
5762    
5763      private static int var_order = 1;
5764    
5765      public int get_var_order() {
5766        return var_order;
5767      }
5768    
5769      public boolean is_symmetric() {
5770    
5771          return (true);
5772      }
5773    
5774      public long func (long y, long z) {
5775    
5776        return ((y & z));
5777      }
5778    
5779      public InvariantStatus check_modified(long x, long y,
5780                                          long z, int count) {
5781        return (check_ordered (x, y, z, count));
5782      }
5783    
5784      public InvariantStatus add_modified(long x, long y,
5785                                          long z, int count) {
5786        if (Debug.logDetail())
5787          log (Fmt.spf ("result=%s, arg1=%s, arg2=%s", "" + x, "" + y,
5788                        "" + z));
5789        return (add_ordered (x, y, z, count));
5790      }
5791    
5792      public boolean isBitwiseAnd() {
5793        return (true);
5794      }
5795    
5796        public boolean isExact() { return true; }
5797    
5798      /**
5799       * Returns a list of non-instantiating suppressions for this invariant.
5800       */
5801      public /*@Nullable*/ NISuppressionSet get_ni_suppressions() {
5802        if (NIS.dkconfig_enabled && dkconfig_enabled)
5803          return (suppressions);
5804        else
5805          return (null);
5806      }
5807    
5808      /** definition of this invariant (the suppressee) **/
5809      private static NISuppressee suppressee
5810                        = new NISuppressee (BitwiseAndLong_xyz.class, 3);
5811    
5812      // suppressor definitions (used below)
5813      private static NISuppressor result_eq_arg1
5814        = new NISuppressor (0, 1, IntEqual.class);
5815      private static NISuppressor result_eq_arg2
5816        = new NISuppressor (0, 2, IntEqual.class);
5817      private static NISuppressor arg1_eq_arg2
5818        = new NISuppressor (1, 2, IntEqual.class);
5819    
5820      private static NISuppressor result_lt_arg1
5821        = new NISuppressor (0, 1, IntLessThan.class);
5822      private static NISuppressor result_lt_arg2
5823        = new NISuppressor (0, 2, IntLessThan.class);
5824      private static NISuppressor arg1_lt_arg2
5825        = new NISuppressor (1, 2, IntLessThan.class);
5826      private static NISuppressor arg2_lt_arg1
5827        = new NISuppressor (2, 1, IntLessThan.class);
5828    
5829      private static NISuppressor result_le_arg1
5830        = new NISuppressor (0, 1, IntLessEqual.class);
5831      private static NISuppressor result_le_arg2
5832        = new NISuppressor (0, 2, IntLessEqual.class);
5833      private static NISuppressor arg1_le_arg2
5834        = new NISuppressor (1, 2, IntLessEqual.class);
5835      private static NISuppressor arg2_le_arg1
5836        = new NISuppressor (2, 1, IntLessEqual.class);
5837    
5838      private static NISuppressor result_track0_arg1
5839        = new NISuppressor (0, 1, NumericInt.ZeroTrack.class);
5840      private static NISuppressor result_track0_arg2
5841        = new NISuppressor (0, 2, NumericInt.ZeroTrack.class);
5842      private static NISuppressor arg1_track0_arg2
5843        = new NISuppressor (1, 2, NumericInt.ZeroTrack.class);
5844      private static NISuppressor arg1_track0_result
5845        = new NISuppressor (1, 0, NumericInt.ZeroTrack.class);
5846      private static NISuppressor arg2_track0_result
5847        = new NISuppressor (2, 0, NumericInt.ZeroTrack.class);
5848      private static NISuppressor arg2_track0_arg1
5849        = new NISuppressor (2, 1, NumericInt.ZeroTrack.class);
5850    
5851      private static NISuppressor result_eq_1
5852        = new NISuppressor(0, RangeInt.EqualOne.class);
5853      private static NISuppressor arg1_eq_1
5854        = new NISuppressor (1, RangeInt.EqualOne.class);
5855      private static NISuppressor arg2_eq_1
5856        = new NISuppressor (2, RangeInt.EqualOne.class);
5857    
5858      private static NISuppressor result_eq_0
5859        = new NISuppressor(0,RangeInt.EqualZero.class);
5860      private static NISuppressor arg1_eq_0
5861        = new NISuppressor (1, RangeInt.EqualZero.class);
5862      private static NISuppressor arg2_eq_0
5863        = new NISuppressor (2, RangeInt.EqualZero.class);
5864    
5865      private static NISuppressor result_ne_0
5866        = new NISuppressor (0, NonZero.class);
5867      private static NISuppressor arg1_ne_0
5868        = new NISuppressor (1, NonZero.class);
5869      private static NISuppressor arg2_ne_0
5870        = new NISuppressor (2, NonZero.class);
5871    
5872      private static NISuppressor result_ge_0
5873        = new NISuppressor (0, RangeInt.GreaterEqualZero.class);
5874      private static NISuppressor arg1_ge_0
5875        = new NISuppressor (1, RangeInt.GreaterEqualZero.class);
5876      private static NISuppressor arg2_ge_0
5877        = new NISuppressor (2, RangeInt.GreaterEqualZero.class);
5878    
5879      private static NISuppressor result_ge_64
5880        = new NISuppressor (0, RangeInt.GreaterEqual64.class);
5881      private static NISuppressor arg1_ge_64
5882        = new NISuppressor (1, RangeInt.GreaterEqual64.class);
5883      private static NISuppressor arg2_ge_64
5884        = new NISuppressor (2, RangeInt.GreaterEqual64.class);
5885    
5886      private static NISuppressor result_boolean
5887        = new NISuppressor(0,RangeInt.BooleanVal.class);
5888      private static NISuppressor arg1_boolean
5889        = new NISuppressor (1, RangeInt.BooleanVal.class);
5890      private static NISuppressor arg2_boolean
5891        = new NISuppressor (2, RangeInt.BooleanVal.class);
5892    
5893      private static NISuppressor result_even
5894        = new NISuppressor (0, RangeInt.Even.class);
5895      private static NISuppressor arg1_even
5896        = new NISuppressor (1, RangeInt.Even.class);
5897      private static NISuppressor arg2_even
5898        = new NISuppressor (2, RangeInt.Even.class);
5899    
5900      private static NISuppressor result_power2
5901        = new NISuppressor(0,RangeInt.PowerOfTwo.class);
5902      private static NISuppressor arg1_power2
5903        = new NISuppressor (1, RangeInt.PowerOfTwo.class);
5904      private static NISuppressor arg2_power2
5905        = new NISuppressor (2, RangeInt.PowerOfTwo.class);
5906    
5907      private static NISuppressor result_and0_arg1
5908        = new NISuppressor (0, 1, NumericInt.BitwiseAndZero.class);
5909      private static NISuppressor result_and0_arg2
5910        = new NISuppressor (0, 2, NumericInt.BitwiseAndZero.class);
5911      private static NISuppressor arg1_and0_arg2
5912        = new NISuppressor (1, 2, NumericInt.BitwiseAndZero.class);
5913    
5914      // The arguments to bitwise subset are backwards from what one
5915      // might expect.  The second argument is a subset of the first
5916      // argument
5917      private static NISuppressor arg1_bw_subset_arg2
5918        = new NISuppressor (2, 1, NumericInt.BitwiseSubset.class);
5919      private static NISuppressor arg2_bw_subset_arg1
5920        = new NISuppressor (1, 2, NumericInt.BitwiseSubset.class);
5921    
5922      private static NISuppressor result_shift0_arg1
5923        = new NISuppressor (0, 1, NumericInt.ShiftZero.class);
5924      private static NISuppressor result_shift0_arg2
5925        = new NISuppressor (0, 2, NumericInt.ShiftZero.class);
5926      private static NISuppressor arg1_shift0_arg2
5927        = new NISuppressor (1, 2, NumericInt.ShiftZero.class);
5928    
5929      private static NISuppressor arg2_divides_arg1
5930        = new NISuppressor (1, 2, NumericInt.Divides.class);
5931      private static NISuppressor arg1_divides_arg2
5932        = new NISuppressor (2, 1, NumericInt.Divides.class);
5933    
5934      private static NISuppressor arg2_valid_shift
5935        = new NISuppressor (2, RangeInt.Bound0_63.class);
5936    
5937        private static NISuppressionSet suppressions
5938          = new NISuppressionSet (new NISuppression[] {
5939    
5940            // (r == y) && (y == z) && (r == z) ==> r = y &  z
5941            new NISuppression (result_eq_arg1, arg1_eq_arg2, result_eq_arg2,
5942                               suppressee),
5943    
5944            // (r == y) && (y bitwise subset z)
5945            new NISuppression (result_eq_arg1, arg1_bw_subset_arg2, suppressee),
5946    
5947            // (r == z) && (z bitwise subset y)
5948            new NISuppression (result_eq_arg2, arg2_bw_subset_arg1, suppressee),
5949    
5950            // (r == 0) && (y & z == 0) ==> r = y & z
5951            new NISuppression (result_eq_0, arg1_and0_arg2, suppressee),
5952    
5953            // All of these are subsummed by the prior one
5954            // (r == 0) && (y == 0) ==> r = y & z
5955            // new NISuppression (result_eq_0, arg1_eq_0, suppressee),
5956    
5957            // (r == 0) && (z == 0) ==> r = y & z
5958            // new NISuppression (result_eq_0, arg2_eq_0, suppressee),
5959    
5960            // (r == 0) && (y boolean) && (z is even)
5961            // new NISuppression (result_eq_0, arg1_boolean, arg2_even,suppressee),
5962    
5963            // (r == 0) && (z boolean) && (y is even)
5964            // new NISuppression (result_eq_0, arg2_boolean, arg1_even,suppressee),
5965    
5966            // (r == 0) && (z > y) && (z power2) && (y >= 0)
5967            // new NISuppression (result_eq_0, arg1_lt_arg2, arg2_power2,arg1_ge_0,
5968            //                   suppressee),
5969    
5970            // (r == 0) && (y > z) && (y power2) && (z >= 0)
5971            // new NISuppression (result_eq_0, arg2_lt_arg1, arg1_power2,arg2_ge_0,
5972            //                   suppressee),
5973    
5974            // (r == y) && (r boolean) && (z == 1)
5975            new NISuppression (result_eq_arg1, result_boolean, arg2_eq_1,
5976                               suppressee),
5977    
5978            // (r == z) && (r boolean) && (y == 1)
5979            new NISuppression (result_eq_arg2, result_boolean, arg1_eq_1,
5980                               suppressee),
5981    
5982          });
5983    
5984      // Create a suppression factory for functionBinary
5985    
5986    }
5987    
5988    /**
5989     * Represents the invariant <samp>y = BitwiseAnd (x, z)</samp>
5990     * over three long scalars.
5991     */
5992    public static class BitwiseAndLong_yxz extends FunctionBinary {
5993      // We are Serializable, so we specify a version to allow changes to
5994      // method signatures without breaking serialization.  If you add or
5995      // remove fields, you should change this number to the current date.
5996      static final long serialVersionUID = 20031030L;
5997    
5998      private static /*@Prototype*/ BitwiseAndLong_yxz proto;
5999    
6000      /** Returns the prototype invariant for BitwiseAndLong_yxz **/
6001      public static /*@Prototype*/ BitwiseAndLong_yxz get_proto() {
6002        if (proto == null)
6003          proto = new /*@Prototype*/ BitwiseAndLong_yxz ();
6004        return (proto);
6005      }
6006    
6007      /** instantiate an invariant on the specified slice **/
6008      protected BitwiseAndLong_yxz instantiate_dyn (PptSlice slice) /*@Prototype*/ {
6009        return new BitwiseAndLong_yxz (slice);
6010      }
6011    
6012      private BitwiseAndLong_yxz (PptSlice slice) {
6013        super (slice);
6014      }
6015    
6016      public BitwiseAndLong_yxz () /*@Prototype*/ {
6017        super ();
6018      }
6019    
6020      private static String[] method_name = new String[] {"", " & ", ""};
6021    
6022      public String[] get_method_name () {
6023        return (method_name);
6024      }
6025    
6026      private static int function_id = -1;
6027    
6028      public int get_function_id() {
6029        return (function_id);
6030      }
6031    
6032      public void set_function_id (int function_id) {
6033        assert BitwiseAndLong_yxz.function_id == -1;
6034        BitwiseAndLong_yxz.function_id = function_id;
6035      }
6036    
6037      private static int var_order = 2;
6038    
6039      public int get_var_order() {
6040        return var_order;
6041      }
6042    
6043      public boolean is_symmetric() {
6044    
6045          return (true);
6046      }
6047    
6048      public long func (long x, long z) {
6049    
6050        return ((x & z));
6051      }
6052    
6053      public InvariantStatus check_modified(long x, long y,
6054                                          long z, int count) {
6055        return (check_ordered (y, x, z, count));
6056      }
6057    
6058      public InvariantStatus add_modified(long x, long y,
6059                                          long z, int count) {
6060        if (Debug.logDetail())
6061          log (Fmt.spf ("result=%s, arg1=%s, arg2=%s", "" + y, "" + x,
6062                        "" + z));
6063        return (add_ordered (y, x, z, count));
6064      }
6065    
6066      public boolean isBitwiseAnd() {
6067        return (true);
6068      }
6069    
6070        public boolean isExact() { return true; }
6071    
6072      /**
6073       * Returns a list of non-instantiating suppressions for this invariant.
6074       */
6075      public /*@Nullable*/ NISuppressionSet get_ni_suppressions() {
6076        if (NIS.dkconfig_enabled && dkconfig_enabled)
6077          return (suppressions);
6078        else
6079          return (null);
6080      }
6081    
6082      /** definition of this invariant (the suppressee) **/
6083      private static NISuppressee suppressee
6084                        = new NISuppressee (BitwiseAndLong_yxz.class, 3);
6085    
6086      // suppressor definitions (used below)
6087      private static NISuppressor result_eq_arg1
6088        = new NISuppressor (1, 0, IntEqual.class);
6089      private static NISuppressor result_eq_arg2
6090        = new NISuppressor (1, 2, IntEqual.class);
6091      private static NISuppressor arg1_eq_arg2
6092        = new NISuppressor (0, 2, IntEqual.class);
6093    
6094      private static NISuppressor result_lt_arg1
6095        = new NISuppressor (1, 0, IntLessThan.class);
6096      private static NISuppressor result_lt_arg2
6097        = new NISuppressor (1, 2, IntLessThan.class);
6098      private static NISuppressor arg1_lt_arg2
6099        = new NISuppressor (0, 2, IntLessThan.class);
6100      private static NISuppressor arg2_lt_arg1
6101        = new NISuppressor (2, 0, IntLessThan.class);
6102    
6103      private static NISuppressor result_le_arg1
6104        = new NISuppressor (1, 0, IntLessEqual.class);
6105      private static NISuppressor result_le_arg2
6106        = new NISuppressor (1, 2, IntLessEqual.class);
6107      private static NISuppressor arg1_le_arg2
6108        = new NISuppressor (0, 2, IntLessEqual.class);
6109      private static NISuppressor arg2_le_arg1
6110        = new NISuppressor (2, 0, IntLessEqual.class);
6111    
6112      private static NISuppressor result_track0_arg1
6113        = new NISuppressor (1, 0, NumericInt.ZeroTrack.class);
6114      private static NISuppressor result_track0_arg2
6115        = new NISuppressor (1, 2, NumericInt.ZeroTrack.class);
6116      private static NISuppressor arg1_track0_arg2
6117        = new NISuppressor (0, 2, NumericInt.ZeroTrack.class);
6118      private static NISuppressor arg1_track0_result
6119        = new NISuppressor (0, 1, NumericInt.ZeroTrack.class);
6120      private static NISuppressor arg2_track0_result
6121        = new NISuppressor (2, 1, NumericInt.ZeroTrack.class);
6122      private static NISuppressor arg2_track0_arg1
6123        = new NISuppressor (2, 0, NumericInt.ZeroTrack.class);
6124    
6125      private static NISuppressor result_eq_1
6126        = new NISuppressor(1, RangeInt.EqualOne.class);
6127      private static NISuppressor arg1_eq_1
6128        = new NISuppressor (0, RangeInt.EqualOne.class);
6129      private static NISuppressor arg2_eq_1
6130        = new NISuppressor (2, RangeInt.EqualOne.class);
6131    
6132      private static NISuppressor result_eq_0
6133        = new NISuppressor(1,RangeInt.EqualZero.class);
6134      private static NISuppressor arg1_eq_0
6135        = new NISuppressor (0, RangeInt.EqualZero.class);
6136      private static NISuppressor arg2_eq_0
6137        = new NISuppressor (2, RangeInt.EqualZero.class);
6138    
6139      private static NISuppressor result_ne_0
6140        = new NISuppressor (1, NonZero.class);
6141      private static NISuppressor arg1_ne_0
6142        = new NISuppressor (0, NonZero.class);
6143      private static NISuppressor arg2_ne_0
6144        = new NISuppressor (2, NonZero.class);
6145    
6146      private static NISuppressor result_ge_0
6147        = new NISuppressor (1, RangeInt.GreaterEqualZero.class);
6148      private static NISuppressor arg1_ge_0
6149        = new NISuppressor (0, RangeInt.GreaterEqualZero.class);
6150      private static NISuppressor arg2_ge_0
6151        = new NISuppressor (2, RangeInt.GreaterEqualZero.class);
6152    
6153      private static NISuppressor result_ge_64
6154        = new NISuppressor (1, RangeInt.GreaterEqual64.class);
6155      private static NISuppressor arg1_ge_64
6156        = new NISuppressor (0, RangeInt.GreaterEqual64.class);
6157      private static NISuppressor arg2_ge_64
6158        = new NISuppressor (2, RangeInt.GreaterEqual64.class);
6159    
6160      private static NISuppressor result_boolean
6161        = new NISuppressor(1,RangeInt.BooleanVal.class);
6162      private static NISuppressor arg1_boolean
6163        = new NISuppressor (0, RangeInt.BooleanVal.class);
6164      private static NISuppressor arg2_boolean
6165        = new NISuppressor (2, RangeInt.BooleanVal.class);
6166    
6167      private static NISuppressor result_even
6168        = new NISuppressor (1, RangeInt.Even.class);
6169      private static NISuppressor arg1_even
6170        = new NISuppressor (0, RangeInt.Even.class);
6171      private static NISuppressor arg2_even
6172        = new NISuppressor (2, RangeInt.Even.class);
6173    
6174      private static NISuppressor result_power2
6175        = new NISuppressor(1,RangeInt.PowerOfTwo.class);
6176      private static NISuppressor arg1_power2
6177        = new NISuppressor (0, RangeInt.PowerOfTwo.class);
6178      private static NISuppressor arg2_power2
6179        = new NISuppressor (2, RangeInt.PowerOfTwo.class);
6180    
6181      private static NISuppressor result_and0_arg1
6182        = new NISuppressor (1, 0, NumericInt.BitwiseAndZero.class);
6183      private static NISuppressor result_and0_arg2
6184        = new NISuppressor (1, 2, NumericInt.BitwiseAndZero.class);
6185      private static NISuppressor arg1_and0_arg2
6186        = new NISuppressor (0, 2, NumericInt.BitwiseAndZero.class);
6187    
6188      // The arguments to bitwise subset are backwards from what one
6189      // might expect.  The second argument is a subset of the first
6190      // argument
6191      private static NISuppressor arg1_bw_subset_arg2
6192        = new NISuppressor (2, 0, NumericInt.BitwiseSubset.class);
6193      private static NISuppressor arg2_bw_subset_arg1
6194        = new NISuppressor (0, 2, NumericInt.BitwiseSubset.class);
6195    
6196      private static NISuppressor result_shift0_arg1
6197        = new NISuppressor (1, 0, NumericInt.ShiftZero.class);
6198      private static NISuppressor result_shift0_arg2
6199        = new NISuppressor (1, 2, NumericInt.ShiftZero.class);
6200      private static NISuppressor arg1_shift0_arg2
6201        = new NISuppressor (0, 2, NumericInt.ShiftZero.class);
6202    
6203      private static NISuppressor arg2_divides_arg1
6204        = new NISuppressor (0, 2, NumericInt.Divides.class);
6205      private static NISuppressor arg1_divides_arg2
6206        = new NISuppressor (2, 0, NumericInt.Divides.class);
6207    
6208      private static NISuppressor arg2_valid_shift
6209        = new NISuppressor (2, RangeInt.Bound0_63.class);
6210    
6211        private static NISuppressionSet suppressions
6212          = new NISuppressionSet (new NISuppression[] {
6213    
6214            // (r == x) && (x == z) && (r == z) ==> r = x &  z
6215            new NISuppression (result_eq_arg1, arg1_eq_arg2, result_eq_arg2,
6216                               suppressee),
6217    
6218            // (r == x) && (x bitwise subset z)
6219            new NISuppression (result_eq_arg1, arg1_bw_subset_arg2, suppressee),
6220    
6221            // (r == z) && (z bitwise subset x)
6222            new NISuppression (result_eq_arg2, arg2_bw_subset_arg1, suppressee),
6223    
6224            // (r == 0) && (x & z == 0) ==> r = x & z
6225            new NISuppression (result_eq_0, arg1_and0_arg2, suppressee),
6226    
6227            // All of these are subsummed by the prior one
6228            // (r == 0) && (x == 0) ==> r = x & z
6229            // new NISuppression (result_eq_0, arg1_eq_0, suppressee),
6230    
6231            // (r == 0) && (z == 0) ==> r = x & z
6232            // new NISuppression (result_eq_0, arg2_eq_0, suppressee),
6233    
6234            // (r == 0) && (x boolean) && (z is even)
6235            // new NISuppression (result_eq_0, arg1_boolean, arg2_even,suppressee),
6236    
6237            // (r == 0) && (z boolean) && (x is even)
6238            // new NISuppression (result_eq_0, arg2_boolean, arg1_even,suppressee),
6239    
6240            // (r == 0) && (z > x) && (z power2) && (x >= 0)
6241            // new NISuppression (result_eq_0, arg1_lt_arg2, arg2_power2,arg1_ge_0,
6242            //                   suppressee),
6243    
6244            // (r == 0) && (x > z) && (x power2) && (z >= 0)
6245            // new NISuppression (result_eq_0, arg2_lt_arg1, arg1_power2,arg2_ge_0,
6246            //                   suppressee),
6247    
6248            // (r == x) && (r boolean) && (z == 1)
6249            new NISuppression (result_eq_arg1, result_boolean, arg2_eq_1,
6250                               suppressee),
6251    
6252            // (r == z) && (r boolean) && (x == 1)
6253            new NISuppression (result_eq_arg2, result_boolean, arg1_eq_1,
6254                               suppressee),
6255    
6256          });
6257    
6258      // Create a suppression factory for functionBinary
6259    
6260    }
6261    
6262    /**
6263     * Represents the invariant <samp>z = BitwiseAnd (x, y)</samp>
6264     * over three long scalars.
6265     */
6266    public static class BitwiseAndLong_zxy extends FunctionBinary {
6267      // We are Serializable, so we specify a version to allow changes to
6268      // method signatures without breaking serialization.  If you add or
6269      // remove fields, you should change this number to the current date.
6270      static final long serialVersionUID = 20031030L;
6271    
6272      private static /*@Prototype*/ BitwiseAndLong_zxy proto;
6273    
6274      /** Returns the prototype invariant for BitwiseAndLong_zxy **/
6275      public static /*@Prototype*/ BitwiseAndLong_zxy get_proto() {
6276        if (proto == null)
6277          proto = new /*@Prototype*/ BitwiseAndLong_zxy ();
6278        return (proto);
6279      }
6280    
6281      /** instantiate an invariant on the specified slice **/
6282      protected BitwiseAndLong_zxy instantiate_dyn (PptSlice slice) /*@Prototype*/ {
6283        return new BitwiseAndLong_zxy (slice);
6284      }
6285    
6286      private BitwiseAndLong_zxy (PptSlice slice) {
6287        super (slice);
6288      }
6289    
6290      public BitwiseAndLong_zxy () /*@Prototype*/ {
6291        super ();
6292      }
6293    
6294      private static String[] method_name = new String[] {"", " & ", ""};
6295    
6296      public String[] get_method_name () {
6297        return (method_name);
6298      }
6299    
6300      private static int function_id = -1;
6301    
6302      public int get_function_id() {
6303        return (function_id);
6304      }
6305    
6306      public void set_function_id (int function_id) {
6307        assert BitwiseAndLong_zxy.function_id == -1;
6308        BitwiseAndLong_zxy.function_id = function_id;
6309      }
6310    
6311      private static int var_order = 3;
6312    
6313      public int get_var_order() {
6314        return var_order;
6315      }
6316    
6317      public boolean is_symmetric() {
6318    
6319          return (true);
6320      }
6321    
6322      public long func (long x, long y) {
6323    
6324        return ((x & y));
6325      }
6326    
6327      public InvariantStatus check_modified(long x, long y,
6328                                          long z, int count) {
6329        return (check_ordered (z, x, y, count));
6330      }
6331    
6332      public InvariantStatus add_modified(long x, long y,
6333                                          long z, int count) {
6334        if (Debug.logDetail())
6335          log (Fmt.spf ("result=%s, arg1=%s, arg2=%s", "" + z, "" + x,
6336                        "" + y));
6337        return (add_ordered (z, x, y, count));
6338      }
6339    
6340      public boolean isBitwiseAnd() {
6341        return (true);
6342      }
6343    
6344        public boolean isExact() { return true; }
6345    
6346      /**
6347       * Returns a list of non-instantiating suppressions for this invariant.
6348       */
6349      public /*@Nullable*/ NISuppressionSet get_ni_suppressions() {
6350        if (NIS.dkconfig_enabled && dkconfig_enabled)
6351          return (suppressions);
6352        else
6353          return (null);
6354      }
6355    
6356      /** definition of this invariant (the suppressee) **/
6357      private static NISuppressee suppressee
6358                        = new NISuppressee (BitwiseAndLong_zxy.class, 3);
6359    
6360      // suppressor definitions (used below)
6361      private static NISuppressor result_eq_arg1
6362        = new NISuppressor (2, 0, IntEqual.class);
6363      private static NISuppressor result_eq_arg2
6364        = new NISuppressor (2, 1, IntEqual.class);
6365      private static NISuppressor arg1_eq_arg2
6366        = new NISuppressor (0, 1, IntEqual.class);
6367    
6368      private static NISuppressor result_lt_arg1
6369        = new NISuppressor (2, 0, IntLessThan.class);
6370      private static NISuppressor result_lt_arg2
6371        = new NISuppressor (2, 1, IntLessThan.class);
6372      private static NISuppressor arg1_lt_arg2
6373        = new NISuppressor (0, 1, IntLessThan.class);
6374      private static NISuppressor arg2_lt_arg1
6375        = new NISuppressor (1, 0, IntLessThan.class);
6376    
6377      private static NISuppressor result_le_arg1
6378        = new NISuppressor (2, 0, IntLessEqual.class);
6379      private static NISuppressor result_le_arg2
6380        = new NISuppressor (2, 1, IntLessEqual.class);
6381      private static NISuppressor arg1_le_arg2
6382        = new NISuppressor (0, 1, IntLessEqual.class);
6383      private static NISuppressor arg2_le_arg1
6384        = new NISuppressor (1, 0, IntLessEqual.class);
6385    
6386      private static NISuppressor result_track0_arg1
6387        = new NISuppressor (2, 0, NumericInt.ZeroTrack.class);
6388      private static NISuppressor result_track0_arg2
6389        = new NISuppressor (2, 1, NumericInt.ZeroTrack.class);
6390      private static NISuppressor arg1_track0_arg2
6391        = new NISuppressor (0, 1, NumericInt.ZeroTrack.class);
6392      private static NISuppressor arg1_track0_result
6393        = new NISuppressor (0, 2, NumericInt.ZeroTrack.class);
6394      private static NISuppressor arg2_track0_result
6395        = new NISuppressor (1, 2, NumericInt.ZeroTrack.class);
6396      private static NISuppressor arg2_track0_arg1
6397        = new NISuppressor (1, 0, NumericInt.ZeroTrack.class);
6398    
6399      private static NISuppressor result_eq_1
6400        = new NISuppressor(2, RangeInt.EqualOne.class);
6401      private static NISuppressor arg1_eq_1
6402        = new NISuppressor (0, RangeInt.EqualOne.class);
6403      private static NISuppressor arg2_eq_1
6404        = new NISuppressor (1, RangeInt.EqualOne.class);
6405    
6406      private static NISuppressor result_eq_0
6407        = new NISuppressor(2,RangeInt.EqualZero.class);
6408      private static NISuppressor arg1_eq_0
6409        = new NISuppressor (0, RangeInt.EqualZero.class);
6410      private static NISuppressor arg2_eq_0
6411        = new NISuppressor (1, RangeInt.EqualZero.class);
6412    
6413      private static NISuppressor result_ne_0
6414        = new NISuppressor (2, NonZero.class);
6415      private static NISuppressor arg1_ne_0
6416        = new NISuppressor (0, NonZero.class);
6417      private static NISuppressor arg2_ne_0
6418        = new NISuppressor (1, NonZero.class);
6419    
6420      private static NISuppressor result_ge_0
6421        = new NISuppressor (2, RangeInt.GreaterEqualZero.class);
6422      private static NISuppressor arg1_ge_0
6423        = new NISuppressor (0, RangeInt.GreaterEqualZero.class);
6424      private static NISuppressor arg2_ge_0
6425        = new NISuppressor (1, RangeInt.GreaterEqualZero.class);
6426    
6427      private static NISuppressor result_ge_64
6428        = new NISuppressor (2, RangeInt.GreaterEqual64.class);
6429      private static NISuppressor arg1_ge_64
6430        = new NISuppressor (0, RangeInt.GreaterEqual64.class);
6431      private static NISuppressor arg2_ge_64
6432        = new NISuppressor (1, RangeInt.GreaterEqual64.class);
6433    
6434      private static NISuppressor result_boolean
6435        = new NISuppressor(2,RangeInt.BooleanVal.class);
6436      private static NISuppressor arg1_boolean
6437        = new NISuppressor (0, RangeInt.BooleanVal.class);
6438      private static NISuppressor arg2_boolean
6439        = new NISuppressor (1, RangeInt.BooleanVal.class);
6440    
6441      private static NISuppressor result_even
6442        = new NISuppressor (2, RangeInt.Even.class);
6443      private static NISuppressor arg1_even
6444        = new NISuppressor (0, RangeInt.Even.class);
6445      private static NISuppressor arg2_even
6446        = new NISuppressor (1, RangeInt.Even.class);
6447    
6448      private static NISuppressor result_power2
6449        = new NISuppressor(2,RangeInt.PowerOfTwo.class);
6450      private static NISuppressor arg1_power2
6451        = new NISuppressor (0, RangeInt.PowerOfTwo.class);
6452      private static NISuppressor arg2_power2
6453        = new NISuppressor (1, RangeInt.PowerOfTwo.class);
6454    
6455      private static NISuppressor result_and0_arg1
6456        = new NISuppressor (2, 0, NumericInt.BitwiseAndZero.class);
6457      private static NISuppressor result_and0_arg2
6458        = new NISuppressor (2, 1, NumericInt.BitwiseAndZero.class);
6459      private static NISuppressor arg1_and0_arg2
6460        = new NISuppressor (0, 1, NumericInt.BitwiseAndZero.class);
6461    
6462      // The arguments to bitwise subset are backwards from what one
6463      // might expect.  The second argument is a subset of the first
6464      // argument
6465      private static NISuppressor arg1_bw_subset_arg2
6466        = new NISuppressor (1, 0, NumericInt.BitwiseSubset.class);
6467      private static NISuppressor arg2_bw_subset_arg1
6468        = new NISuppressor (0, 1, NumericInt.BitwiseSubset.class);
6469    
6470      private static NISuppressor result_shift0_arg1
6471        = new NISuppressor (2, 0, NumericInt.ShiftZero.class);
6472      private static NISuppressor result_shift0_arg2
6473        = new NISuppressor (2, 1, NumericInt.ShiftZero.class);
6474      private static NISuppressor arg1_shift0_arg2
6475        = new NISuppressor (0, 1, NumericInt.ShiftZero.class);
6476    
6477      private static NISuppressor arg2_divides_arg1
6478        = new NISuppressor (0, 1, NumericInt.Divides.class);
6479      private static NISuppressor arg1_divides_arg2
6480        = new NISuppressor (1, 0, NumericInt.Divides.class);
6481    
6482      private static NISuppressor arg2_valid_shift
6483        = new NISuppressor (1, RangeInt.Bound0_63.class);
6484    
6485        private static NISuppressionSet suppressions
6486          = new NISuppressionSet (new NISuppression[] {
6487    
6488            // (r == x) && (x == y) && (r == y) ==> r = x &  y
6489            new NISuppression (result_eq_arg1, arg1_eq_arg2, result_eq_arg2,
6490                               suppressee),
6491    
6492            // (r == x) && (x bitwise subset y)
6493            new NISuppression (result_eq_arg1, arg1_bw_subset_arg2, suppressee),
6494    
6495            // (r == y) && (y bitwise subset x)
6496            new NISuppression (result_eq_arg2, arg2_bw_subset_arg1, suppressee),
6497    
6498            // (r == 0) && (x & y == 0) ==> r = x & y
6499            new NISuppression (result_eq_0, arg1_and0_arg2, suppressee),
6500    
6501            // All of these are subsummed by the prior one
6502            // (r == 0) && (x == 0) ==> r = x & y
6503            // new NISuppression (result_eq_0, arg1_eq_0, suppressee),
6504    
6505            // (r == 0) && (y == 0) ==> r = x & y
6506            // new NISuppression (result_eq_0, arg2_eq_0, suppressee),
6507    
6508            // (r == 0) && (x boolean) && (y is even)
6509            // new NISuppression (result_eq_0, arg1_boolean, arg2_even,suppressee),
6510    
6511            // (r == 0) && (y boolean) && (x is even)
6512            // new NISuppression (result_eq_0, arg2_boolean, arg1_even,suppressee),
6513    
6514            // (r == 0) && (y > x) && (y power2) && (x >= 0)
6515            // new NISuppression (result_eq_0, arg1_lt_arg2, arg2_power2,arg1_ge_0,
6516            //                   suppressee),
6517    
6518            // (r == 0) && (x > y) && (x power2) && (y >= 0)
6519            // new NISuppression (result_eq_0, arg2_lt_arg1, arg1_power2,arg2_ge_0,
6520            //                   suppressee),
6521    
6522            // (r == x) && (r boolean) && (y == 1)
6523            new NISuppression (result_eq_arg1, result_boolean, arg2_eq_1,
6524                               suppressee),
6525    
6526            // (r == y) && (r boolean) && (x == 1)
6527            new NISuppression (result_eq_arg2, result_boolean, arg1_eq_1,
6528                               suppressee),
6529    
6530          });
6531    
6532      // Create a suppression factory for functionBinary
6533    
6534    }
6535    
6536      // default is that it is not this function, overriden in the subclass
6537      public boolean isLogicalAnd () {
6538        return (false);
6539      }
6540    
6541    /**
6542     * Represents the invariant <samp>x = LogicalAnd (y, z)</samp>
6543     * over three long scalars.
6544     */
6545    public static class LogicalAndLong_xyz extends FunctionBinary {
6546      // We are Serializable, so we specify a version to allow changes to
6547      // method signatures without breaking serialization.  If you add or
6548      // remove fields, you should change this number to the current date.
6549      static final long serialVersionUID = 20031030L;
6550    
6551      private static /*@Prototype*/ LogicalAndLong_xyz proto;
6552    
6553      /** Returns the prototype invariant for LogicalAndLong_xyz **/
6554      public static /*@Prototype*/ LogicalAndLong_xyz get_proto() {
6555        if (proto == null)
6556          proto = new /*@Prototype*/ LogicalAndLong_xyz ();
6557        return (proto);
6558      }
6559    
6560      /** instantiate an invariant on the specified slice **/
6561      protected LogicalAndLong_xyz instantiate_dyn (PptSlice slice) /*@Prototype*/ {
6562        return new LogicalAndLong_xyz (slice);
6563      }
6564    
6565      private LogicalAndLong_xyz (PptSlice slice) {
6566        super (slice);
6567      }
6568    
6569      public LogicalAndLong_xyz () /*@Prototype*/ {
6570        super ();
6571      }
6572    
6573      private static String[] method_name = new String[] {"", " && ", ""};
6574    
6575      public String[] get_method_name () {
6576        return (method_name);
6577      }
6578    
6579      private static int function_id = -1;
6580    
6581      public int get_function_id() {
6582        return (function_id);
6583      }
6584    
6585      public void set_function_id (int function_id) {
6586        assert LogicalAndLong_xyz.function_id == -1;
6587        LogicalAndLong_xyz.function_id = function_id;
6588      }
6589    
6590      private static int var_order = 1;
6591    
6592      public int get_var_order() {
6593        return var_order;
6594      }
6595    
6596      public boolean is_symmetric() {
6597    
6598          return (true);
6599      }
6600    
6601      public long func (long y, long z) {
6602    
6603          if ((y < 0) || (y > 1))
6604            throw new ArithmeticException ("arg1 (" + y + ") is not boolean ");
6605          if ((z < 0) || (z > 1))
6606            throw new ArithmeticException ("arg2 (" + z + ") is not boolean ");
6607    
6608        return ((((y != 0) && ( z != 0)) ? 1 : 0));
6609      }
6610    
6611      public InvariantStatus check_modified(long x, long y,
6612                                          long z, int count) {
6613        return (check_ordered (x, y, z, count));
6614      }
6615    
6616      public InvariantStatus add_modified(long x, long y,
6617                                          long z, int count) {
6618        if (Debug.logDetail())
6619          log (Fmt.spf ("result=%s, arg1=%s, arg2=%s", "" + x, "" + y,
6620                        "" + z));
6621        return (add_ordered (x, y, z, count));
6622      }
6623    
6624      public boolean isLogicalAnd() {
6625        return (true);
6626      }
6627    
6628      /**
6629       * Returns a list of non-instantiating suppressions for this invariant.
6630       */
6631      public /*@Nullable*/ NISuppressionSet get_ni_suppressions() {
6632        if (NIS.dkconfig_enabled && dkconfig_enabled)
6633          return (suppressions);
6634        else
6635          return (null);
6636      }
6637    
6638      /** definition of this invariant (the suppressee) **/
6639      private static NISuppressee suppressee
6640                        = new NISuppressee (LogicalAndLong_xyz.class, 3);
6641    
6642      // suppressor definitions (used below)
6643      private static NISuppressor result_eq_arg1
6644        = new NISuppressor (0, 1, IntEqual.class);
6645      private static NISuppressor result_eq_arg2
6646        = new NISuppressor (0, 2, IntEqual.class);
6647      private static NISuppressor arg1_eq_arg2
6648        = new NISuppressor (1, 2, IntEqual.class);
6649    
6650      private static NISuppressor result_lt_arg1
6651        = new NISuppressor (0, 1, IntLessThan.class);
6652      private static NISuppressor result_lt_arg2
6653        = new NISuppressor (0, 2, IntLessThan.class);
6654      private static NISuppressor arg1_lt_arg2
6655        = new NISuppressor (1, 2, IntLessThan.class);
6656      private static NISuppressor arg2_lt_arg1
6657        = new NISuppressor (2, 1, IntLessThan.class);
6658    
6659      private static NISuppressor result_le_arg1
6660        = new NISuppressor (0, 1, IntLessEqual.class);
6661      private static NISuppressor result_le_arg2
6662        = new NISuppressor (0, 2, IntLessEqual.class);
6663      private static NISuppressor arg1_le_arg2
6664        = new NISuppressor (1, 2, IntLessEqual.class);
6665      private static NISuppressor arg2_le_arg1
6666        = new NISuppressor (2, 1, IntLessEqual.class);
6667    
6668      private static NISuppressor result_track0_arg1
6669        = new NISuppressor (0, 1, NumericInt.ZeroTrack.class);
6670      private static NISuppressor result_track0_arg2
6671        = new NISuppressor (0, 2, NumericInt.ZeroTrack.class);
6672      private static NISuppressor arg1_track0_arg2
6673        = new NISuppressor (1, 2, NumericInt.ZeroTrack.class);
6674      private static NISuppressor arg1_track0_result
6675        = new NISuppressor (1, 0, NumericInt.ZeroTrack.class);
6676      private static NISuppressor arg2_track0_result
6677        = new NISuppressor (2, 0, NumericInt.ZeroTrack.class);
6678      private static NISuppressor arg2_track0_arg1
6679        = new NISuppressor (2, 1, NumericInt.ZeroTrack.class);
6680    
6681      private static NISuppressor result_eq_1
6682        = new NISuppressor(0, RangeInt.EqualOne.class);
6683      private static NISuppressor arg1_eq_1
6684        = new NISuppressor (1, RangeInt.EqualOne.class);
6685      private static NISuppressor arg2_eq_1
6686        = new NISuppressor (2, RangeInt.EqualOne.class);
6687    
6688      private static NISuppressor result_eq_0
6689        = new NISuppressor(0,RangeInt.EqualZero.class);
6690      private static NISuppressor arg1_eq_0
6691        = new NISuppressor (1, RangeInt.EqualZero.class);
6692      private static NISuppressor arg2_eq_0
6693        = new NISuppressor (2, RangeInt.EqualZero.class);
6694    
6695      private static NISuppressor result_ne_0
6696        = new NISuppressor (0, NonZero.class);
6697      private static NISuppressor arg1_ne_0
6698        = new NISuppressor (1, NonZero.class);
6699      private static NISuppressor arg2_ne_0
6700        = new NISuppressor (2, NonZero.class);
6701    
6702      private static NISuppressor result_ge_0
6703        = new NISuppressor (0, RangeInt.GreaterEqualZero.class);
6704      private static NISuppressor arg1_ge_0
6705        = new NISuppressor (1, RangeInt.GreaterEqualZero.class);
6706      private static NISuppressor arg2_ge_0
6707        = new NISuppressor (2, RangeInt.GreaterEqualZero.class);
6708    
6709      private static NISuppressor result_ge_64
6710        = new NISuppressor (0, RangeInt.GreaterEqual64.class);
6711      private static NISuppressor arg1_ge_64
6712        = new NISuppressor (1, RangeInt.GreaterEqual64.class);
6713      private static NISuppressor arg2_ge_64
6714        = new NISuppressor (2, RangeInt.GreaterEqual64.class);
6715    
6716      private static NISuppressor result_boolean
6717        = new NISuppressor(0,RangeInt.BooleanVal.class);
6718      private static NISuppressor arg1_boolean
6719        = new NISuppressor (1, RangeInt.BooleanVal.class);
6720      private static NISuppressor arg2_boolean
6721        = new NISuppressor (2, RangeInt.BooleanVal.class);
6722    
6723      private static NISuppressor result_even
6724        = new NISuppressor (0, RangeInt.Even.class);
6725      private static NISuppressor arg1_even
6726        = new NISuppressor (1, RangeInt.Even.class);
6727      private static NISuppressor arg2_even
6728        = new NISuppressor (2, RangeInt.Even.class);
6729    
6730      private static NISuppressor result_power2
6731        = new NISuppressor(0,RangeInt.PowerOfTwo.class);
6732      private static NISuppressor arg1_power2
6733        = new NISuppressor (1, RangeInt.PowerOfTwo.class);
6734      private static NISuppressor arg2_power2
6735        = new NISuppressor (2, RangeInt.PowerOfTwo.class);
6736    
6737      private static NISuppressor result_and0_arg1
6738        = new NISuppressor (0, 1, NumericInt.BitwiseAndZero.class);
6739      private static NISuppressor result_and0_arg2
6740        = new NISuppressor (0, 2, NumericInt.BitwiseAndZero.class);
6741      private static NISuppressor arg1_and0_arg2
6742        = new NISuppressor (1, 2, NumericInt.BitwiseAndZero.class);
6743    
6744      // The arguments to bitwise subset are backwards from what one
6745      // might expect.  The second argument is a subset of the first
6746      // argument
6747      private static NISuppressor arg1_bw_subset_arg2
6748        = new NISuppressor (2, 1, NumericInt.BitwiseSubset.class);
6749      private static NISuppressor arg2_bw_subset_arg1
6750        = new NISuppressor (1, 2, NumericInt.BitwiseSubset.class);
6751    
6752      private static NISuppressor result_shift0_arg1
6753        = new NISuppressor (0, 1, NumericInt.ShiftZero.class);
6754      private static NISuppressor result_shift0_arg2
6755        = new NISuppressor (0, 2, NumericInt.ShiftZero.class);
6756      private static NISuppressor arg1_shift0_arg2
6757        = new NISuppressor (1, 2, NumericInt.ShiftZero.class);
6758    
6759      private static NISuppressor arg2_divides_arg1
6760        = new NISuppressor (1, 2, NumericInt.Divides.class);
6761      private static NISuppressor arg1_divides_arg2
6762        = new NISuppressor (2, 1, NumericInt.Divides.class);
6763    
6764      private static NISuppressor arg2_valid_shift
6765        = new NISuppressor (2, RangeInt.Bound0_63.class);
6766    
6767        private static NISuppressionSet suppressions
6768          = new NISuppressionSet (new NISuppression[] {
6769    
6770            // (r == y) && (y == z) && (r == z) && (r is boolean)
6771            //    ==> r = y && z
6772            new NISuppression (result_eq_arg1, arg1_eq_arg2, result_eq_arg2,
6773                               result_boolean, suppressee),
6774    
6775            // (r == 0) && (y == 0) && (z is boolean) ==> r = y && z
6776            new NISuppression (result_eq_0, arg1_eq_0, arg2_boolean, suppressee),
6777    
6778            // (r == 0) && (z == 0) && (y is boolean) ==> r = y && z
6779            new NISuppression (result_eq_0, arg2_eq_0, arg1_boolean, suppressee),
6780    
6781            // (r == 0) && (y == 0) && (z boolean) ==> r = y && z
6782            new NISuppression (result_eq_0, arg1_eq_0, arg2_boolean, suppressee),
6783    
6784            // (r == 0) && (z == 0) && (y boolean) ==> r = y && z
6785            new NISuppression (result_eq_0, arg2_eq_0, arg1_boolean, suppressee),
6786    
6787            // (r == y) && (r boolean) && (z == 1)
6788            new NISuppression (result_eq_arg1, result_boolean, arg2_eq_1,
6789                               suppressee),
6790    
6791            // (r == z) && (r boolean) && (y == 1)
6792            new NISuppression (result_eq_arg2, result_boolean, arg1_eq_1,
6793                               suppressee),
6794    
6795          });
6796    
6797      // Create a suppression factory for functionBinary
6798    
6799    }
6800    
6801    /**
6802     * Represents the invariant <samp>y = LogicalAnd (x, z)</samp>
6803     * over three long scalars.
6804     */
6805    public static class LogicalAndLong_yxz extends FunctionBinary {
6806      // We are Serializable, so we specify a version to allow changes to
6807      // method signatures without breaking serialization.  If you add or
6808      // remove fields, you should change this number to the current date.
6809      static final long serialVersionUID = 20031030L;
6810    
6811      private static /*@Prototype*/ LogicalAndLong_yxz proto;
6812    
6813      /** Returns the prototype invariant for LogicalAndLong_yxz **/
6814      public static /*@Prototype*/ LogicalAndLong_yxz get_proto() {
6815        if (proto == null)
6816          proto = new /*@Prototype*/ LogicalAndLong_yxz ();
6817        return (proto);
6818      }
6819    
6820      /** instantiate an invariant on the specified slice **/
6821      protected LogicalAndLong_yxz instantiate_dyn (PptSlice slice) /*@Prototype*/ {
6822        return new LogicalAndLong_yxz (slice);
6823      }
6824    
6825      private LogicalAndLong_yxz (PptSlice slice) {
6826        super (slice);
6827      }
6828    
6829      public LogicalAndLong_yxz () /*@Prototype*/ {
6830        super ();
6831      }
6832    
6833      private static String[] method_name = new String[] {"", " && ", ""};
6834    
6835      public String[] get_method_name () {
6836        return (method_name);
6837      }
6838    
6839      private static int function_id = -1;
6840    
6841      public int get_function_id() {
6842        return (function_id);
6843      }
6844    
6845      public void set_function_id (int function_id) {
6846        assert LogicalAndLong_yxz.function_id == -1;
6847        LogicalAndLong_yxz.function_id = function_id;
6848      }
6849    
6850      private static int var_order = 2;
6851    
6852      public int get_var_order() {
6853        return var_order;
6854      }
6855    
6856      public boolean is_symmetric() {
6857    
6858          return (true);
6859      }
6860    
6861      public long func (long x, long z) {
6862    
6863          if ((x < 0) || (x > 1))
6864            throw new ArithmeticException ("arg1 (" + x + ") is not boolean ");
6865          if ((z < 0) || (z > 1))
6866            throw new ArithmeticException ("arg2 (" + z + ") is not boolean ");
6867    
6868        return ((((x != 0) && ( z != 0)) ? 1 : 0));
6869      }
6870    
6871      public InvariantStatus check_modified(long x, long y,
6872                                          long z, int count) {
6873        return (check_ordered (y, x, z, count));
6874      }
6875    
6876      public InvariantStatus add_modified(long x, long y,
6877                                          long z, int count) {
6878        if (Debug.logDetail())
6879          log (Fmt.spf ("result=%s, arg1=%s, arg2=%s", "" + y, "" + x,
6880                        "" + z));
6881        return (add_ordered (y, x, z, count));
6882      }
6883    
6884      public boolean isLogicalAnd() {
6885        return (true);
6886      }
6887    
6888      /**
6889       * Returns a list of non-instantiating suppressions for this invariant.
6890       */
6891      public /*@Nullable*/ NISuppressionSet get_ni_suppressions() {
6892        if (NIS.dkconfig_enabled && dkconfig_enabled)
6893          return (suppressions);
6894        else
6895          return (null);
6896      }
6897    
6898      /** definition of this invariant (the suppressee) **/
6899      private static NISuppressee suppressee
6900                        = new NISuppressee (LogicalAndLong_yxz.class, 3);
6901    
6902      // suppressor definitions (used below)
6903      private static NISuppressor result_eq_arg1
6904        = new NISuppressor (1, 0, IntEqual.class);
6905      private static NISuppressor result_eq_arg2
6906        = new NISuppressor (1, 2, IntEqual.class);
6907      private static NISuppressor arg1_eq_arg2
6908        = new NISuppressor (0, 2, IntEqual.class);
6909    
6910      private static NISuppressor result_lt_arg1
6911        = new NISuppressor (1, 0, IntLessThan.class);
6912      private static NISuppressor result_lt_arg2
6913        = new NISuppressor (1, 2, IntLessThan.class);
6914      private static NISuppressor arg1_lt_arg2
6915        = new NISuppressor (0, 2, IntLessThan.class);
6916      private static NISuppressor arg2_lt_arg1
6917        = new NISuppressor (2, 0, IntLessThan.class);
6918    
6919      private static NISuppressor result_le_arg1
6920        = new NISuppressor (1, 0, IntLessEqual.class);
6921      private static NISuppressor result_le_arg2
6922        = new NISuppressor (1, 2, IntLessEqual.class);
6923      private static NISuppressor arg1_le_arg2
6924        = new NISuppressor (0, 2, IntLessEqual.class);
6925      private static NISuppressor arg2_le_arg1
6926        = new NISuppressor (2, 0, IntLessEqual.class);
6927    
6928      private static NISuppressor result_track0_arg1
6929        = new NISuppressor (1, 0, NumericInt.ZeroTrack.class);
6930      private static NISuppressor result_track0_arg2
6931        = new NISuppressor (1, 2, NumericInt.ZeroTrack.class);
6932      private static NISuppressor arg1_track0_arg2
6933        = new NISuppressor (0, 2, NumericInt.ZeroTrack.class);
6934      private static NISuppressor arg1_track0_result
6935        = new NISuppressor (0, 1, NumericInt.ZeroTrack.class);
6936      private static NISuppressor arg2_track0_result
6937        = new NISuppressor (2, 1, NumericInt.ZeroTrack.class);
6938      private static NISuppressor arg2_track0_arg1
6939        = new NISuppressor (2, 0, NumericInt.ZeroTrack.class);
6940    
6941      private static NISuppressor result_eq_1
6942        = new NISuppressor(1, RangeInt.EqualOne.class);
6943      private static NISuppressor arg1_eq_1
6944        = new NISuppressor (0, RangeInt.EqualOne.class);
6945      private static NISuppressor arg2_eq_1
6946        = new NISuppressor (2, RangeInt.EqualOne.class);
6947    
6948      private static NISuppressor result_eq_0
6949        = new NISuppressor(1,RangeInt.EqualZero.class);
6950      private static NISuppressor arg1_eq_0
6951        = new NISuppressor (0, RangeInt.EqualZero.class);
6952      private static NISuppressor arg2_eq_0
6953        = new NISuppressor (2, RangeInt.EqualZero.class);
6954    
6955      private static NISuppressor result_ne_0
6956        = new NISuppressor (1, NonZero.class);
6957      private static NISuppressor arg1_ne_0
6958        = new NISuppressor (0, NonZero.class);
6959      private static NISuppressor arg2_ne_0
6960        = new NISuppressor (2, NonZero.class);
6961    
6962      private static NISuppressor result_ge_0
6963        = new NISuppressor (1, RangeInt.GreaterEqualZero.class);
6964      private static NISuppressor arg1_ge_0
6965        = new NISuppressor (0, RangeInt.GreaterEqualZero.class);
6966      private static NISuppressor arg2_ge_0
6967        = new NISuppressor (2, RangeInt.GreaterEqualZero.class);
6968    
6969      private static NISuppressor result_ge_64
6970        = new NISuppressor (1, RangeInt.GreaterEqual64.class);
6971      private static NISuppressor arg1_ge_64
6972        = new NISuppressor (0, RangeInt.GreaterEqual64.class);
6973      private static NISuppressor arg2_ge_64
6974        = new NISuppressor (2, RangeInt.GreaterEqual64.class);
6975    
6976      private static NISuppressor result_boolean
6977        = new NISuppressor(1,RangeInt.BooleanVal.class);
6978      private static NISuppressor arg1_boolean
6979        = new NISuppressor (0, RangeInt.BooleanVal.class);
6980      private static NISuppressor arg2_boolean
6981        = new NISuppressor (2, RangeInt.BooleanVal.class);
6982    
6983      private static NISuppressor result_even
6984        = new NISuppressor (1, RangeInt.Even.class);
6985      private static NISuppressor arg1_even
6986        = new NISuppressor (0, RangeInt.Even.class);
6987      private static NISuppressor arg2_even
6988        = new NISuppressor (2, RangeInt.Even.class);
6989    
6990      private static NISuppressor result_power2
6991        = new NISuppressor(1,RangeInt.PowerOfTwo.class);
6992      private static NISuppressor arg1_power2
6993        = new NISuppressor (0, RangeInt.PowerOfTwo.class);
6994      private static NISuppressor arg2_power2
6995        = new NISuppressor (2, RangeInt.PowerOfTwo.class);
6996    
6997      private static NISuppressor result_and0_arg1
6998        = new NISuppressor (1, 0, NumericInt.BitwiseAndZero.class);
6999      private static NISuppressor result_and0_arg2
7000        = new NISuppressor (1, 2, NumericInt.BitwiseAndZero.class);
7001      private static NISuppressor arg1_and0_arg2
7002        = new NISuppressor (0, 2, NumericInt.BitwiseAndZero.class);
7003    
7004      // The arguments to bitwise subset are backwards from what one
7005      // might expect.  The second argument is a subset of the first
7006      // argument
7007      private static NISuppressor arg1_bw_subset_arg2
7008        = new NISuppressor (2, 0, NumericInt.BitwiseSubset.class);
7009      private static NISuppressor arg2_bw_subset_arg1
7010        = new NISuppressor (0, 2, NumericInt.BitwiseSubset.class);
7011    
7012      private static NISuppressor result_shift0_arg1
7013        = new NISuppressor (1, 0, NumericInt.ShiftZero.class);
7014      private static NISuppressor result_shift0_arg2
7015        = new NISuppressor (1, 2, NumericInt.ShiftZero.class);
7016      private static NISuppressor arg1_shift0_arg2
7017        = new NISuppressor (0, 2, NumericInt.ShiftZero.class);
7018    
7019      private static NISuppressor arg2_divides_arg1
7020        = new NISuppressor (0, 2, NumericInt.Divides.class);
7021      private static NISuppressor arg1_divides_arg2
7022        = new NISuppressor (2, 0, NumericInt.Divides.class);
7023    
7024      private static NISuppressor arg2_valid_shift
7025        = new NISuppressor (2, RangeInt.Bound0_63.class);
7026    
7027        private static NISuppressionSet suppressions
7028          = new NISuppressionSet (new NISuppression[] {
7029    
7030            // (r == x) && (x == z) && (r == z) && (r is boolean)
7031            //    ==> r = x && z
7032            new NISuppression (result_eq_arg1, arg1_eq_arg2, result_eq_arg2,
7033                               result_boolean, suppressee),
7034    
7035            // (r == 0) && (x == 0) && (z is boolean) ==> r = x && z
7036            new NISuppression (result_eq_0, arg1_eq_0, arg2_boolean, suppressee),
7037    
7038            // (r == 0) && (z == 0) && (x is boolean) ==> r = x && z
7039            new NISuppression (result_eq_0, arg2_eq_0, arg1_boolean, suppressee),
7040    
7041            // (r == 0) && (x == 0) && (z boolean) ==> r = x && z
7042            new NISuppression (result_eq_0, arg1_eq_0, arg2_boolean, suppressee),
7043    
7044            // (r == 0) && (z == 0) && (x boolean) ==> r = x && z
7045            new NISuppression (result_eq_0, arg2_eq_0, arg1_boolean, suppressee),
7046    
7047            // (r == x) && (r boolean) && (z == 1)
7048            new NISuppression (result_eq_arg1, result_boolean, arg2_eq_1,
7049                               suppressee),
7050    
7051            // (r == z) && (r boolean) && (x == 1)
7052            new NISuppression (result_eq_arg2, result_boolean, arg1_eq_1,
7053                               suppressee),
7054    
7055          });
7056    
7057      // Create a suppression factory for functionBinary
7058    
7059    }
7060    
7061    /**
7062     * Represents the invariant <samp>z = LogicalAnd (x, y)</samp>
7063     * over three long scalars.
7064     */
7065    public static class LogicalAndLong_zxy extends FunctionBinary {
7066      // We are Serializable, so we specify a version to allow changes to
7067      // method signatures without breaking serialization.  If you add or
7068      // remove fields, you should change this number to the current date.
7069      static final long serialVersionUID = 20031030L;
7070    
7071      private static /*@Prototype*/ LogicalAndLong_zxy proto;
7072    
7073      /** Returns the prototype invariant for LogicalAndLong_zxy **/
7074      public static /*@Prototype*/ LogicalAndLong_zxy get_proto() {
7075        if (proto == null)
7076          proto = new /*@Prototype*/ LogicalAndLong_zxy ();
7077        return (proto);
7078      }
7079    
7080      /** instantiate an invariant on the specified slice **/
7081      protected LogicalAndLong_zxy instantiate_dyn (PptSlice slice) /*@Prototype*/ {
7082        return new LogicalAndLong_zxy (slice);
7083      }
7084    
7085      private LogicalAndLong_zxy (PptSlice slice) {
7086        super (slice);
7087      }
7088    
7089      public LogicalAndLong_zxy () /*@Prototype*/ {
7090        super ();
7091      }
7092    
7093      private static String[] method_name = new String[] {"", " && ", ""};
7094    
7095      public String[] get_method_name () {
7096        return (method_name);
7097      }
7098    
7099      private static int function_id = -1;
7100    
7101      public int get_function_id() {
7102        return (function_id);
7103      }
7104    
7105      public void set_function_id (int function_id) {
7106        assert LogicalAndLong_zxy.function_id == -1;
7107        LogicalAndLong_zxy.function_id = function_id;
7108      }
7109    
7110      private static int var_order = 3;
7111    
7112      public int get_var_order() {
7113        return var_order;
7114      }
7115    
7116      public boolean is_symmetric() {
7117    
7118          return (true);
7119      }
7120    
7121      public long func (long x, long y) {
7122    
7123          if ((x < 0) || (x > 1))
7124            throw new ArithmeticException ("arg1 (" + x + ") is not boolean ");
7125          if ((y < 0) || (y > 1))
7126            throw new ArithmeticException ("arg2 (" + y + ") is not boolean ");
7127    
7128        return ((((x != 0) && ( y != 0)) ? 1 : 0));
7129      }
7130    
7131      public InvariantStatus check_modified(long x, long y,
7132                                          long z, int count) {
7133        return (check_ordered (z, x, y, count));
7134      }
7135    
7136      public InvariantStatus add_modified(long x, long y,
7137                                          long z, int count) {
7138        if (Debug.logDetail())
7139          log (Fmt.spf ("result=%s, arg1=%s, arg2=%s", "" + z, "" + x,
7140                        "" + y));
7141        return (add_ordered (z, x, y, count));
7142      }
7143    
7144      public boolean isLogicalAnd() {
7145        return (true);
7146      }
7147    
7148      /**
7149       * Returns a list of non-instantiating suppressions for this invariant.
7150       */
7151      public /*@Nullable*/ NISuppressionSet get_ni_suppressions() {
7152        if (NIS.dkconfig_enabled && dkconfig_enabled)
7153          return (suppressions);
7154        else
7155          return (null);
7156      }
7157    
7158      /** definition of this invariant (the suppressee) **/
7159      private static NISuppressee suppressee
7160                        = new NISuppressee (LogicalAndLong_zxy.class, 3);
7161    
7162      // suppressor definitions (used below)
7163      private static NISuppressor result_eq_arg1
7164        = new NISuppressor (2, 0, IntEqual.class);
7165      private static NISuppressor result_eq_arg2
7166        = new NISuppressor (2, 1, IntEqual.class);
7167      private static NISuppressor arg1_eq_arg2
7168        = new NISuppressor (0, 1, IntEqual.class);
7169    
7170      private static NISuppressor result_lt_arg1
7171        = new NISuppressor (2, 0, IntLessThan.class);
7172      private static NISuppressor result_lt_arg2
7173        = new NISuppressor (2, 1, IntLessThan.class);
7174      private static NISuppressor arg1_lt_arg2
7175        = new NISuppressor (0, 1, IntLessThan.class);
7176      private static NISuppressor arg2_lt_arg1
7177        = new NISuppressor (1, 0, IntLessThan.class);
7178    
7179      private static NISuppressor result_le_arg1
7180        = new NISuppressor (2, 0, IntLessEqual.class);
7181      private static NISuppressor result_le_arg2
7182        = new NISuppressor (2, 1, IntLessEqual.class);
7183      private static NISuppressor arg1_le_arg2
7184        = new NISuppressor (0, 1, IntLessEqual.class);
7185      private static NISuppressor arg2_le_arg1
7186        = new NISuppressor (1, 0, IntLessEqual.class);
7187    
7188      private static NISuppressor result_track0_arg1
7189        = new NISuppressor (2, 0, NumericInt.ZeroTrack.class);
7190      private static NISuppressor result_track0_arg2
7191        = new NISuppressor (2, 1, NumericInt.ZeroTrack.class);
7192      private static NISuppressor arg1_track0_arg2
7193        = new NISuppressor (0, 1, NumericInt.ZeroTrack.class);
7194      private static NISuppressor arg1_track0_result
7195        = new NISuppressor (0, 2, NumericInt.ZeroTrack.class);
7196      private static NISuppressor arg2_track0_result
7197        = new NISuppressor (1, 2, NumericInt.ZeroTrack.class);
7198      private static NISuppressor arg2_track0_arg1
7199        = new NISuppressor (1, 0, NumericInt.ZeroTrack.class);
7200    
7201      private static NISuppressor result_eq_1
7202        = new NISuppressor(2, RangeInt.EqualOne.class);
7203      private static NISuppressor arg1_eq_1
7204        = new NISuppressor (0, RangeInt.EqualOne.class);
7205      private static NISuppressor arg2_eq_1
7206        = new NISuppressor (1, RangeInt.EqualOne.class);
7207    
7208      private static NISuppressor result_eq_0
7209        = new NISuppressor(2,RangeInt.EqualZero.class);
7210      private static NISuppressor arg1_eq_0
7211        = new NISuppressor (0, RangeInt.EqualZero.class);
7212      private static NISuppressor arg2_eq_0
7213        = new NISuppressor (1, RangeInt.EqualZero.class);
7214    
7215      private static NISuppressor result_ne_0
7216        = new NISuppressor (2, NonZero.class);
7217      private static NISuppressor arg1_ne_0
7218        = new NISuppressor (0, NonZero.class);
7219      private static NISuppressor arg2_ne_0
7220        = new NISuppressor (1, NonZero.class);
7221    
7222      private static NISuppressor result_ge_0
7223        = new NISuppressor (2, RangeInt.GreaterEqualZero.class);
7224      private static NISuppressor arg1_ge_0
7225        = new NISuppressor (0, RangeInt.GreaterEqualZero.class);
7226      private static NISuppressor arg2_ge_0
7227        = new NISuppressor (1, RangeInt.GreaterEqualZero.class);
7228    
7229      private static NISuppressor result_ge_64
7230        = new NISuppressor (2, RangeInt.GreaterEqual64.class);
7231      private static NISuppressor arg1_ge_64
7232        = new NISuppressor (0, RangeInt.GreaterEqual64.class);
7233      private static NISuppressor arg2_ge_64
7234        = new NISuppressor (1, RangeInt.GreaterEqual64.class);
7235    
7236      private static NISuppressor result_boolean
7237        = new NISuppressor(2,RangeInt.BooleanVal.class);
7238      private static NISuppressor arg1_boolean
7239        = new NISuppressor (0, RangeInt.BooleanVal.class);
7240      private static NISuppressor arg2_boolean
7241        = new NISuppressor (1, RangeInt.BooleanVal.class);
7242    
7243      private static NISuppressor result_even
7244        = new NISuppressor (2, RangeInt.Even.class);
7245      private static NISuppressor arg1_even
7246        = new NISuppressor (0, RangeInt.Even.class);
7247      private static NISuppressor arg2_even
7248        = new NISuppressor (1, RangeInt.Even.class);
7249    
7250      private static NISuppressor result_power2
7251        = new NISuppressor(2,RangeInt.PowerOfTwo.class);
7252      private static NISuppressor arg1_power2
7253        = new NISuppressor (0, RangeInt.PowerOfTwo.class);
7254      private static NISuppressor arg2_power2
7255        = new NISuppressor (1, RangeInt.PowerOfTwo.class);
7256    
7257      private static NISuppressor result_and0_arg1
7258        = new NISuppressor (2, 0, NumericInt.BitwiseAndZero.class);
7259      private static NISuppressor result_and0_arg2
7260        = new NISuppressor (2, 1, NumericInt.BitwiseAndZero.class);
7261      private static NISuppressor arg1_and0_arg2
7262        = new NISuppressor (0, 1, NumericInt.BitwiseAndZero.class);
7263    
7264      // The arguments to bitwise subset are backwards from what one
7265      // might expect.  The second argument is a subset of the first
7266      // argument
7267      private static NISuppressor arg1_bw_subset_arg2
7268        = new NISuppressor (1, 0, NumericInt.BitwiseSubset.class);
7269      private static NISuppressor arg2_bw_subset_arg1
7270        = new NISuppressor (0, 1, NumericInt.BitwiseSubset.class);
7271    
7272      private static NISuppressor result_shift0_arg1
7273        = new NISuppressor (2, 0, NumericInt.ShiftZero.class);
7274      private static NISuppressor result_shift0_arg2
7275        = new NISuppressor (2, 1, NumericInt.ShiftZero.class);
7276      private static NISuppressor arg1_shift0_arg2
7277        = new NISuppressor (0, 1, NumericInt.ShiftZero.class);
7278    
7279      private static NISuppressor arg2_divides_arg1
7280        = new NISuppressor (0, 1, NumericInt.Divides.class);
7281      private static NISuppressor arg1_divides_arg2
7282        = new NISuppressor (1, 0, NumericInt.Divides.class);
7283    
7284      private static NISuppressor arg2_valid_shift
7285        = new NISuppressor (1, RangeInt.Bound0_63.class);
7286    
7287        private static NISuppressionSet suppressions
7288          = new NISuppressionSet (new NISuppression[] {
7289    
7290            // (r == x) && (x == y) && (r == y) && (r is boolean)
7291            //    ==> r = x && y
7292            new NISuppression (result_eq_arg1, arg1_eq_arg2, result_eq_arg2,
7293                               result_boolean, suppressee),
7294    
7295            // (r == 0) && (x == 0) && (y is boolean) ==> r = x && y
7296            new NISuppression (result_eq_0, arg1_eq_0, arg2_boolean, suppressee),
7297    
7298            // (r == 0) && (y == 0) && (x is boolean) ==> r = x && y
7299            new NISuppression (result_eq_0, arg2_eq_0, arg1_boolean, suppressee),
7300    
7301            // (r == 0) && (x == 0) && (y boolean) ==> r = x && y
7302            new NISuppression (result_eq_0, arg1_eq_0, arg2_boolean, suppressee),
7303    
7304            // (r == 0) && (y == 0) && (x boolean) ==> r = x && y
7305            new NISuppression (result_eq_0, arg2_eq_0, arg1_boolean, suppressee),
7306    
7307            // (r == x) && (r boolean) && (y == 1)
7308            new NISuppression (result_eq_arg1, result_boolean, arg2_eq_1,
7309                               suppressee),
7310    
7311            // (r == y) && (r boolean) && (x == 1)
7312            new NISuppression (result_eq_arg2, result_boolean, arg1_eq_1,
7313                               suppressee),
7314    
7315          });
7316    
7317      // Create a suppression factory for functionBinary
7318    
7319    }
7320    
7321      // default is that it is not this function, overriden in the subclass
7322      public boolean isBitwiseXor () {
7323        return (false);
7324      }
7325    
7326    /**
7327     * Represents the invariant <samp>x = BitwiseXor (y, z)</samp>
7328     * over three long scalars.
7329     */
7330    public static class BitwiseXorLong_xyz extends FunctionBinary {
7331      // We are Serializable, so we specify a version to allow changes to
7332      // method signatures without breaking serialization.  If you add or
7333      // remove fields, you should change this number to the current date.
7334      static final long serialVersionUID = 20031030L;
7335    
7336      private static /*@Prototype*/ BitwiseXorLong_xyz proto;
7337    
7338      /** Returns the prototype invariant for BitwiseXorLong_xyz **/
7339      public static /*@Prototype*/ BitwiseXorLong_xyz get_proto() {
7340        if (proto == null)
7341          proto = new /*@Prototype*/ BitwiseXorLong_xyz ();
7342        return (proto);
7343      }
7344    
7345      /** instantiate an invariant on the specified slice **/
7346      protected BitwiseXorLong_xyz instantiate_dyn (PptSlice slice) /*@Prototype*/ {
7347        return new BitwiseXorLong_xyz (slice);
7348      }
7349    
7350      private BitwiseXorLong_xyz (PptSlice slice) {
7351        super (slice);
7352      }
7353    
7354      public BitwiseXorLong_xyz () /*@Prototype*/ {
7355        super ();
7356      }
7357    
7358      private static String[] method_name = new String[] {"", " ^ ", ""};
7359    
7360      public String[] get_method_name () {
7361        return (method_name);
7362      }
7363    
7364      private static int function_id = -1;
7365    
7366      public int get_function_id() {
7367        return (function_id);
7368      }
7369    
7370      public void set_function_id (int function_id) {
7371        assert BitwiseXorLong_xyz.function_id == -1;
7372        BitwiseXorLong_xyz.function_id = function_id;
7373      }
7374    
7375      private static int var_order = 1;
7376    
7377      public int get_var_order() {
7378        return var_order;
7379      }
7380    
7381      public boolean is_symmetric() {
7382    
7383          return (true);
7384      }
7385    
7386      public long func (long y, long z) {
7387    
7388        return ((y ^ z));
7389      }
7390    
7391      public InvariantStatus check_modified(long x, long y,
7392                                          long z, int count) {
7393        return (check_ordered (x, y, z, count));
7394      }
7395    
7396      public InvariantStatus add_modified(long x, long y,
7397                                          long z, int count) {
7398        if (Debug.logDetail())
7399          log (Fmt.spf ("result=%s, arg1=%s, arg2=%s", "" + x, "" + y,
7400                        "" + z));
7401        return (add_ordered (x, y, z, count));
7402      }
7403    
7404      public boolean isBitwiseXor() {
7405        return (true);
7406      }
7407    
7408      /**
7409       * Returns a list of non-instantiating suppressions for this invariant.
7410       */
7411      public /*@Nullable*/ NISuppressionSet get_ni_suppressions() {
7412        if (NIS.dkconfig_enabled && dkconfig_enabled)
7413          return (suppressions);
7414        else
7415          return (null);
7416      }
7417    
7418      /** definition of this invariant (the suppressee) **/
7419      private static NISuppressee suppressee
7420                        = new NISuppressee (BitwiseXorLong_xyz.class, 3);
7421    
7422      // suppressor definitions (used below)
7423      private static NISuppressor result_eq_arg1
7424        = new NISuppressor (0, 1, IntEqual.class);
7425      private static NISuppressor result_eq_arg2
7426        = new NISuppressor (0, 2, IntEqual.class);
7427      private static NISuppressor arg1_eq_arg2
7428        = new NISuppressor (1, 2, IntEqual.class);
7429    
7430      private static NISuppressor result_lt_arg1
7431        = new NISuppressor (0, 1, IntLessThan.class);
7432      private static NISuppressor result_lt_arg2
7433        = new NISuppressor (0, 2, IntLessThan.class);
7434      private static NISuppressor arg1_lt_arg2
7435        = new NISuppressor (1, 2, IntLessThan.class);
7436      private static NISuppressor arg2_lt_arg1
7437        = new NISuppressor (2, 1, IntLessThan.class);
7438    
7439      private static NISuppressor result_le_arg1
7440        = new NISuppressor (0, 1, IntLessEqual.class);
7441      private static NISuppressor result_le_arg2
7442        = new NISuppressor (0, 2, IntLessEqual.class);
7443      private static NISuppressor arg1_le_arg2
7444        = new NISuppressor (1, 2, IntLessEqual.class);
7445      private static NISuppressor arg2_le_arg1
7446        = new NISuppressor (2, 1, IntLessEqual.class);
7447    
7448      private static NISuppressor result_track0_arg1
7449        = new NISuppressor (0, 1, NumericInt.ZeroTrack.class);
7450      private static NISuppressor result_track0_arg2
7451        = new NISuppressor (0, 2, NumericInt.ZeroTrack.class);
7452      private static NISuppressor arg1_track0_arg2
7453        = new NISuppressor (1, 2, NumericInt.ZeroTrack.class);
7454      private static NISuppressor arg1_track0_result
7455        = new NISuppressor (1, 0, NumericInt.ZeroTrack.class);
7456      private static NISuppressor arg2_track0_result
7457        = new NISuppressor (2, 0, NumericInt.ZeroTrack.class);
7458      private static NISuppressor arg2_track0_arg1
7459        = new NISuppressor (2, 1, NumericInt.ZeroTrack.class);
7460    
7461      private static NISuppressor result_eq_1
7462        = new NISuppressor(0, RangeInt.EqualOne.class);
7463      private static NISuppressor arg1_eq_1
7464        = new NISuppressor (1, RangeInt.EqualOne.class);
7465      private static NISuppressor arg2_eq_1
7466        = new NISuppressor (2, RangeInt.EqualOne.class);
7467    
7468      private static NISuppressor result_eq_0
7469        = new NISuppressor(0,RangeInt.EqualZero.class);
7470      private static NISuppressor arg1_eq_0
7471        = new NISuppressor (1, RangeInt.EqualZero.class);
7472      private static NISuppressor arg2_eq_0
7473        = new NISuppressor (2, RangeInt.EqualZero.class);
7474    
7475      private static NISuppressor result_ne_0
7476        = new NISuppressor (0, NonZero.class);
7477      private static NISuppressor arg1_ne_0
7478        = new NISuppressor (1, NonZero.class);
7479      private static NISuppressor arg2_ne_0
7480        = new NISuppressor (2, NonZero.class);
7481    
7482      private static NISuppressor result_ge_0
7483        = new NISuppressor (0, RangeInt.GreaterEqualZero.class);
7484      private static NISuppressor arg1_ge_0
7485        = new NISuppressor (1, RangeInt.GreaterEqualZero.class);
7486      private static NISuppressor arg2_ge_0
7487        = new NISuppressor (2, RangeInt.GreaterEqualZero.class);
7488    
7489      private static NISuppressor result_ge_64
7490        = new NISuppressor (0, RangeInt.GreaterEqual64.class);
7491      private static NISuppressor arg1_ge_64
7492        = new NISuppressor (1, RangeInt.GreaterEqual64.class);
7493      private static NISuppressor arg2_ge_64
7494        = new NISuppressor (2, RangeInt.GreaterEqual64.class);
7495    
7496      private static NISuppressor result_boolean
7497        = new NISuppressor(0,RangeInt.BooleanVal.class);
7498      private static NISuppressor arg1_boolean
7499        = new NISuppressor (1, RangeInt.BooleanVal.class);
7500      private static NISuppressor arg2_boolean
7501        = new NISuppressor (2, RangeInt.BooleanVal.class);
7502    
7503      private static NISuppressor result_even
7504        = new NISuppressor (0, RangeInt.Even.class);
7505      private static NISuppressor arg1_even
7506        = new NISuppressor (1, RangeInt.Even.class);
7507      private static NISuppressor arg2_even
7508        = new NISuppressor (2, RangeInt.Even.class);
7509    
7510      private static NISuppressor result_power2
7511        = new NISuppressor(0,RangeInt.PowerOfTwo.class);
7512      private static NISuppressor arg1_power2
7513        = new NISuppressor (1, RangeInt.PowerOfTwo.class);
7514      private static NISuppressor arg2_power2
7515        = new NISuppressor (2, RangeInt.PowerOfTwo.class);
7516    
7517      private static NISuppressor result_and0_arg1
7518        = new NISuppressor (0, 1, NumericInt.BitwiseAndZero.class);
7519      private static NISuppressor result_and0_arg2
7520        = new NISuppressor (0, 2, NumericInt.BitwiseAndZero.class);
7521      private static NISuppressor arg1_and0_arg2
7522        = new NISuppressor (1, 2, NumericInt.BitwiseAndZero.class);
7523    
7524      // The arguments to bitwise subset are backwards from what one
7525      // might expect.  The second argument is a subset of the first
7526      // argument
7527      private static NISuppressor arg1_bw_subset_arg2
7528        = new NISuppressor (2, 1, NumericInt.BitwiseSubset.class);
7529      private static NISuppressor arg2_bw_subset_arg1
7530        = new NISuppressor (1, 2, NumericInt.BitwiseSubset.class);
7531    
7532      private static NISuppressor result_shift0_arg1
7533        = new NISuppressor (0, 1, NumericInt.ShiftZero.class);
7534      private static NISuppressor result_shift0_arg2
7535        = new NISuppressor (0, 2, NumericInt.ShiftZero.class);
7536      private static NISuppressor arg1_shift0_arg2
7537        = new NISuppressor (1, 2, NumericInt.ShiftZero.class);
7538    
7539      private static NISuppressor arg2_divides_arg1
7540        = new NISuppressor (1, 2, NumericInt.Divides.class);
7541      private static NISuppressor arg1_divides_arg2
7542        = new NISuppressor (2, 1, NumericInt.Divides.class);
7543    
7544      private static NISuppressor arg2_valid_shift
7545        = new NISuppressor (2, RangeInt.Bound0_63.class);
7546    
7547        private static NISuppressionSet suppressions
7548          = new NISuppressionSet (new NISuppression[] {
7549    
7550            // (r == 0) && (y == z) ==> r = y ^ z
7551            new NISuppression (result_eq_0, arg1_eq_arg2, suppressee),
7552    
7553            // (r == y) && (z == 0) ==> r = y ^ z
7554            new NISuppression (result_eq_arg1, arg2_eq_0, suppressee),
7555    
7556            // (r == z) && (y == 0) ==> r = y ^ z
7557            new NISuppression (result_eq_arg2, arg1_eq_0, suppressee),
7558    
7559          });
7560    
7561      // Create a suppression factory for functionBinary
7562    
7563    }
7564    
7565    /**
7566     * Represents the invariant <samp>y = BitwiseXor (x, z)</samp>
7567     * over three long scalars.
7568     */
7569    public static class BitwiseXorLong_yxz extends FunctionBinary {
7570      // We are Serializable, so we specify a version to allow changes to
7571      // method signatures without breaking serialization.  If you add or
7572      // remove fields, you should change this number to the current date.
7573      static final long serialVersionUID = 20031030L;
7574    
7575      private static /*@Prototype*/ BitwiseXorLong_yxz proto;
7576    
7577      /** Returns the prototype invariant for BitwiseXorLong_yxz **/
7578      public static /*@Prototype*/ BitwiseXorLong_yxz get_proto() {
7579        if (proto == null)
7580          proto = new /*@Prototype*/ BitwiseXorLong_yxz ();
7581        return (proto);
7582      }
7583    
7584      /** instantiate an invariant on the specified slice **/
7585      protected BitwiseXorLong_yxz instantiate_dyn (PptSlice slice) /*@Prototype*/ {
7586        return new BitwiseXorLong_yxz (slice);
7587      }
7588    
7589      private BitwiseXorLong_yxz (PptSlice slice) {
7590        super (slice);
7591      }
7592    
7593      public BitwiseXorLong_yxz () /*@Prototype*/ {
7594        super ();
7595      }
7596    
7597      private static String[] method_name = new String[] {"", " ^ ", ""};
7598    
7599      public String[] get_method_name () {
7600        return (method_name);
7601      }
7602    
7603      private static int function_id = -1;
7604    
7605      public int get_function_id() {
7606        return (function_id);
7607      }
7608    
7609      public void set_function_id (int function_id) {
7610        assert BitwiseXorLong_yxz.function_id == -1;
7611        BitwiseXorLong_yxz.function_id = function_id;
7612      }
7613    
7614      private static int var_order = 2;
7615    
7616      public int get_var_order() {
7617        return var_order;
7618      }
7619    
7620      public boolean is_symmetric() {
7621    
7622          return (true);
7623      }
7624    
7625      public long func (long x, long z) {
7626    
7627        return ((x ^ z));
7628      }
7629    
7630      public InvariantStatus check_modified(long x, long y,
7631                                          long z, int count) {
7632        return (check_ordered (y, x, z, count));
7633      }
7634    
7635      public InvariantStatus add_modified(long x, long y,
7636                                          long z, int count) {
7637        if (Debug.logDetail())
7638          log (Fmt.spf ("result=%s, arg1=%s, arg2=%s", "" + y, "" + x,
7639                        "" + z));
7640        return (add_ordered (y, x, z, count));
7641      }
7642    
7643      public boolean isBitwiseXor() {
7644        return (true);
7645      }
7646    
7647      /**
7648       * Returns a list of non-instantiating suppressions for this invariant.
7649       */
7650      public /*@Nullable*/ NISuppressionSet get_ni_suppressions() {
7651        if (NIS.dkconfig_enabled && dkconfig_enabled)
7652          return (suppressions);
7653        else
7654          return (null);
7655      }
7656    
7657      /** definition of this invariant (the suppressee) **/
7658      private static NISuppressee suppressee
7659                        = new NISuppressee (BitwiseXorLong_yxz.class, 3);
7660    
7661      // suppressor definitions (used below)
7662      private static NISuppressor result_eq_arg1
7663        = new NISuppressor (1, 0, IntEqual.class);
7664      private static NISuppressor result_eq_arg2
7665        = new NISuppressor (1, 2, IntEqual.class);
7666      private static NISuppressor arg1_eq_arg2
7667        = new NISuppressor (0, 2, IntEqual.class);
7668    
7669      private static NISuppressor result_lt_arg1
7670        = new NISuppressor (1, 0, IntLessThan.class);
7671      private static NISuppressor result_lt_arg2
7672        = new NISuppressor (1, 2, IntLessThan.class);
7673      private static NISuppressor arg1_lt_arg2
7674        = new NISuppressor (0, 2, IntLessThan.class);
7675      private static NISuppressor arg2_lt_arg1
7676        = new NISuppressor (2, 0, IntLessThan.class);
7677    
7678      private static NISuppressor result_le_arg1
7679        = new NISuppressor (1, 0, IntLessEqual.class);
7680      private static NISuppressor result_le_arg2
7681        = new NISuppressor (1, 2, IntLessEqual.class);
7682      private static NISuppressor arg1_le_arg2
7683        = new NISuppressor (0, 2, IntLessEqual.class);
7684      private static NISuppressor arg2_le_arg1
7685        = new NISuppressor (2, 0, IntLessEqual.class);
7686    
7687      private static NISuppressor result_track0_arg1
7688        = new NISuppressor (1, 0, NumericInt.ZeroTrack.class);
7689      private static NISuppressor result_track0_arg2
7690        = new NISuppressor (1, 2, NumericInt.ZeroTrack.class);
7691      private static NISuppressor arg1_track0_arg2
7692        = new NISuppressor (0, 2, NumericInt.ZeroTrack.class);
7693      private static NISuppressor arg1_track0_result
7694        = new NISuppressor (0, 1, NumericInt.ZeroTrack.class);
7695      private static NISuppressor arg2_track0_result
7696        = new NISuppressor (2, 1, NumericInt.ZeroTrack.class);
7697      private static NISuppressor arg2_track0_arg1
7698        = new NISuppressor (2, 0, NumericInt.ZeroTrack.class);
7699    
7700      private static NISuppressor result_eq_1
7701        = new NISuppressor(1, RangeInt.EqualOne.class);
7702      private static NISuppressor arg1_eq_1
7703        = new NISuppressor (0, RangeInt.EqualOne.class);
7704      private static NISuppressor arg2_eq_1
7705        = new NISuppressor (2, RangeInt.EqualOne.class);
7706    
7707      private static NISuppressor result_eq_0
7708        = new NISuppressor(1,RangeInt.EqualZero.class);
7709      private static NISuppressor arg1_eq_0
7710        = new NISuppressor (0, RangeInt.EqualZero.class);
7711      private static NISuppressor arg2_eq_0
7712        = new NISuppressor (2, RangeInt.EqualZero.class);
7713    
7714      private static NISuppressor result_ne_0
7715        = new NISuppressor (1, NonZero.class);
7716      private static NISuppressor arg1_ne_0
7717        = new NISuppressor (0, NonZero.class);
7718      private static NISuppressor arg2_ne_0
7719        = new NISuppressor (2, NonZero.class);
7720    
7721      private static NISuppressor result_ge_0
7722        = new NISuppressor (1, RangeInt.GreaterEqualZero.class);
7723      private static NISuppressor arg1_ge_0
7724        = new NISuppressor (0, RangeInt.GreaterEqualZero.class);
7725      private static NISuppressor arg2_ge_0
7726        = new NISuppressor (2, RangeInt.GreaterEqualZero.class);
7727    
7728      private static NISuppressor result_ge_64
7729        = new NISuppressor (1, RangeInt.GreaterEqual64.class);
7730      private static NISuppressor arg1_ge_64
7731        = new NISuppressor (0, RangeInt.GreaterEqual64.class);
7732      private static NISuppressor arg2_ge_64
7733        = new NISuppressor (2, RangeInt.GreaterEqual64.class);
7734    
7735      private static NISuppressor result_boolean
7736        = new NISuppressor(1,RangeInt.BooleanVal.class);
7737      private static NISuppressor arg1_boolean
7738        = new NISuppressor (0, RangeInt.BooleanVal.class);
7739      private static NISuppressor arg2_boolean
7740        = new NISuppressor (2, RangeInt.BooleanVal.class);
7741    
7742      private static NISuppressor result_even
7743        = new NISuppressor (1, RangeInt.Even.class);
7744      private static NISuppressor arg1_even
7745        = new NISuppressor (0, RangeInt.Even.class);
7746      private static NISuppressor arg2_even
7747        = new NISuppressor (2, RangeInt.Even.class);
7748    
7749      private static NISuppressor result_power2
7750        = new NISuppressor(1,RangeInt.PowerOfTwo.class);
7751      private static NISuppressor arg1_power2
7752        = new NISuppressor (0, RangeInt.PowerOfTwo.class);
7753      private static NISuppressor arg2_power2
7754        = new NISuppressor (2, RangeInt.PowerOfTwo.class);
7755    
7756      private static NISuppressor result_and0_arg1
7757        = new NISuppressor (1, 0, NumericInt.BitwiseAndZero.class);
7758      private static NISuppressor result_and0_arg2
7759        = new NISuppressor (1, 2, NumericInt.BitwiseAndZero.class);
7760      private static NISuppressor arg1_and0_arg2
7761        = new NISuppressor (0, 2, NumericInt.BitwiseAndZero.class);
7762    
7763      // The arguments to bitwise subset are backwards from what one
7764      // might expect.  The second argument is a subset of the first
7765      // argument
7766      private static NISuppressor arg1_bw_subset_arg2
7767        = new NISuppressor (2, 0, NumericInt.BitwiseSubset.class);
7768      private static NISuppressor arg2_bw_subset_arg1
7769        = new NISuppressor (0, 2, NumericInt.BitwiseSubset.class);
7770    
7771      private static NISuppressor result_shift0_arg1
7772        = new NISuppressor (1, 0, NumericInt.ShiftZero.class);
7773      private static NISuppressor result_shift0_arg2
7774        = new NISuppressor (1, 2, NumericInt.ShiftZero.class);
7775      private static NISuppressor arg1_shift0_arg2
7776        = new NISuppressor (0, 2, NumericInt.ShiftZero.class);
7777    
7778      private static NISuppressor arg2_divides_arg1
7779        = new NISuppressor (0, 2, NumericInt.Divides.class);
7780      private static NISuppressor arg1_divides_arg2
7781        = new NISuppressor (2, 0, NumericInt.Divides.class);
7782    
7783      private static NISuppressor arg2_valid_shift
7784        = new NISuppressor (2, RangeInt.Bound0_63.class);
7785    
7786        private static NISuppressionSet suppressions
7787          = new NISuppressionSet (new NISuppression[] {
7788    
7789            // (r == 0) && (x == z) ==> r = x ^ z
7790            new NISuppression (result_eq_0, arg1_eq_arg2, suppressee),
7791    
7792            // (r == x) && (z == 0) ==> r = x ^ z
7793            new NISuppression (result_eq_arg1, arg2_eq_0, suppressee),
7794    
7795            // (r == z) && (x == 0) ==> r = x ^ z
7796            new NISuppression (result_eq_arg2, arg1_eq_0, suppressee),
7797    
7798          });
7799    
7800      // Create a suppression factory for functionBinary
7801    
7802    }
7803    
7804    /**
7805     * Represents the invariant <samp>z = BitwiseXor (x, y)</samp>
7806     * over three long scalars.
7807     */
7808    public static class BitwiseXorLong_zxy extends FunctionBinary {
7809      // We are Serializable, so we specify a version to allow changes to
7810      // method signatures without breaking serialization.  If you add or
7811      // remove fields, you should change this number to the current date.
7812      static final long serialVersionUID = 20031030L;
7813    
7814      private static /*@Prototype*/ BitwiseXorLong_zxy proto;
7815    
7816      /** Returns the prototype invariant for BitwiseXorLong_zxy **/
7817      public static /*@Prototype*/ BitwiseXorLong_zxy get_proto() {
7818        if (proto == null)
7819          proto = new /*@Prototype*/ BitwiseXorLong_zxy ();
7820        return (proto);
7821      }
7822    
7823      /** instantiate an invariant on the specified slice **/
7824      protected BitwiseXorLong_zxy instantiate_dyn (PptSlice slice) /*@Prototype*/ {
7825        return new BitwiseXorLong_zxy (slice);
7826      }
7827    
7828      private BitwiseXorLong_zxy (PptSlice slice) {
7829        super (slice);
7830      }
7831    
7832      public BitwiseXorLong_zxy () /*@Prototype*/ {
7833        super ();
7834      }
7835    
7836      private static String[] method_name = new String[] {"", " ^ ", ""};
7837    
7838      public String[] get_method_name () {
7839        return (method_name);
7840      }
7841    
7842      private static int function_id = -1;
7843    
7844      public int get_function_id() {
7845        return (function_id);
7846      }
7847    
7848      public void set_function_id (int function_id) {
7849        assert BitwiseXorLong_zxy.function_id == -1;
7850        BitwiseXorLong_zxy.function_id = function_id;
7851      }
7852    
7853      private static int var_order = 3;
7854    
7855      public int get_var_order() {
7856        return var_order;
7857      }
7858    
7859      public boolean is_symmetric() {
7860    
7861          return (true);
7862      }
7863    
7864      public long func (long x, long y) {
7865    
7866        return ((x ^ y));
7867      }
7868    
7869      public InvariantStatus check_modified(long x, long y,
7870                                          long z, int count) {
7871        return (check_ordered (z, x, y, count));
7872      }
7873    
7874      public InvariantStatus add_modified(long x, long y,
7875                                          long z, int count) {
7876        if (Debug.logDetail())
7877          log (Fmt.spf ("result=%s, arg1=%s, arg2=%s", "" + z, "" + x,
7878                        "" + y));
7879        return (add_ordered (z, x, y, count));
7880      }
7881    
7882      public boolean isBitwiseXor() {
7883        return (true);
7884      }
7885    
7886      /**
7887       * Returns a list of non-instantiating suppressions for this invariant.
7888       */
7889      public /*@Nullable*/ NISuppressionSet get_ni_suppressions() {
7890        if (NIS.dkconfig_enabled && dkconfig_enabled)
7891          return (suppressions);
7892        else
7893          return (null);
7894      }
7895    
7896      /** definition of this invariant (the suppressee) **/
7897      private static NISuppressee suppressee
7898                        = new NISuppressee (BitwiseXorLong_zxy.class, 3);
7899    
7900      // suppressor definitions (used below)
7901      private static NISuppressor result_eq_arg1
7902        = new NISuppressor (2, 0, IntEqual.class);
7903      private static NISuppressor result_eq_arg2
7904        = new NISuppressor (2, 1, IntEqual.class);
7905      private static NISuppressor arg1_eq_arg2
7906        = new NISuppressor (0, 1, IntEqual.class);
7907    
7908      private static NISuppressor result_lt_arg1
7909        = new NISuppressor (2, 0, IntLessThan.class);
7910      private static NISuppressor result_lt_arg2
7911        = new NISuppressor (2, 1, IntLessThan.class);
7912      private static NISuppressor arg1_lt_arg2
7913        = new NISuppressor (0, 1, IntLessThan.class);
7914      private static NISuppressor arg2_lt_arg1
7915        = new NISuppressor (1, 0, IntLessThan.class);
7916    
7917      private static NISuppressor result_le_arg1
7918        = new NISuppressor (2, 0, IntLessEqual.class);
7919      private static NISuppressor result_le_arg2
7920        = new NISuppressor (2, 1, IntLessEqual.class);
7921      private static NISuppressor arg1_le_arg2
7922        = new NISuppressor (0, 1, IntLessEqual.class);
7923      private static NISuppressor arg2_le_arg1
7924        = new NISuppressor (1, 0, IntLessEqual.class);
7925    
7926      private static NISuppressor result_track0_arg1
7927        = new NISuppressor (2, 0, NumericInt.ZeroTrack.class);
7928      private static NISuppressor result_track0_arg2
7929        = new NISuppressor (2, 1, NumericInt.ZeroTrack.class);
7930      private static NISuppressor arg1_track0_arg2
7931        = new NISuppressor (0, 1, NumericInt.ZeroTrack.class);
7932      private static NISuppressor arg1_track0_result
7933        = new NISuppressor (0, 2, NumericInt.ZeroTrack.class);
7934      private static NISuppressor arg2_track0_result
7935        = new NISuppressor (1, 2, NumericInt.ZeroTrack.class);
7936      private static NISuppressor arg2_track0_arg1
7937        = new NISuppressor (1, 0, NumericInt.ZeroTrack.class);
7938    
7939      private static NISuppressor result_eq_1
7940        = new NISuppressor(2, RangeInt.EqualOne.class);
7941      private static NISuppressor arg1_eq_1
7942        = new NISuppressor (0, RangeInt.EqualOne.class);
7943      private static NISuppressor arg2_eq_1
7944        = new NISuppressor (1, RangeInt.EqualOne.class);
7945    
7946      private static NISuppressor result_eq_0
7947        = new NISuppressor(2,RangeInt.EqualZero.class);
7948      private static NISuppressor arg1_eq_0
7949        = new NISuppressor (0, RangeInt.EqualZero.class);
7950      private static NISuppressor arg2_eq_0
7951        = new NISuppressor (1, RangeInt.EqualZero.class);
7952    
7953      private static NISuppressor result_ne_0
7954        = new NISuppressor (2, NonZero.class);
7955      private static NISuppressor arg1_ne_0
7956        = new NISuppressor (0, NonZero.class);
7957      private static NISuppressor arg2_ne_0
7958        = new NISuppressor (1, NonZero.class);
7959    
7960      private static NISuppressor result_ge_0
7961        = new NISuppressor (2, RangeInt.GreaterEqualZero.class);
7962      private static NISuppressor arg1_ge_0
7963        = new NISuppressor (0, RangeInt.GreaterEqualZero.class);
7964      private static NISuppressor arg2_ge_0
7965        = new NISuppressor (1, RangeInt.GreaterEqualZero.class);
7966    
7967      private static NISuppressor result_ge_64
7968        = new NISuppressor (2, RangeInt.GreaterEqual64.class);
7969      private static NISuppressor arg1_ge_64
7970        = new NISuppressor (0, RangeInt.GreaterEqual64.class);
7971      private static NISuppressor arg2_ge_64
7972        = new NISuppressor (1, RangeInt.GreaterEqual64.class);
7973    
7974      private static NISuppressor result_boolean
7975        = new NISuppressor(2,RangeInt.BooleanVal.class);
7976      private static NISuppressor arg1_boolean
7977        = new NISuppressor (0, RangeInt.BooleanVal.class);
7978      private static NISuppressor arg2_boolean
7979        = new NISuppressor (1, RangeInt.BooleanVal.class);
7980    
7981      private static NISuppressor result_even
7982        = new NISuppressor (2, RangeInt.Even.class);
7983      private static NISuppressor arg1_even
7984        = new NISuppressor (0, RangeInt.Even.class);
7985      private static NISuppressor arg2_even
7986        = new NISuppressor (1, RangeInt.Even.class);
7987    
7988      private static NISuppressor result_power2
7989        = new NISuppressor(2,RangeInt.PowerOfTwo.class);
7990      private static NISuppressor arg1_power2
7991        = new NISuppressor (0, RangeInt.PowerOfTwo.class);
7992      private static NISuppressor arg2_power2
7993        = new NISuppressor (1, RangeInt.PowerOfTwo.class);
7994    
7995      private static NISuppressor result_and0_arg1
7996        = new NISuppressor (2, 0, NumericInt.BitwiseAndZero.class);
7997      private static NISuppressor result_and0_arg2
7998        = new NISuppressor (2, 1, NumericInt.BitwiseAndZero.class);
7999      private static NISuppressor arg1_and0_arg2
8000        = new NISuppressor (0, 1, NumericInt.BitwiseAndZero.class);
8001    
8002      // The arguments to bitwise subset are backwards from what one
8003      // might expect.  The second argument is a subset of the first
8004      // argument
8005      private static NISuppressor arg1_bw_subset_arg2
8006        = new NISuppressor (1, 0, NumericInt.BitwiseSubset.class);
8007      private static NISuppressor arg2_bw_subset_arg1
8008        = new NISuppressor (0, 1, NumericInt.BitwiseSubset.class);
8009    
8010      private static NISuppressor result_shift0_arg1
8011        = new NISuppressor (2, 0, NumericInt.ShiftZero.class);
8012      private static NISuppressor result_shift0_arg2
8013        = new NISuppressor (2, 1, NumericInt.ShiftZero.class);
8014      private static NISuppressor arg1_shift0_arg2
8015        = new NISuppressor (0, 1, NumericInt.ShiftZero.class);
8016    
8017      private static NISuppressor arg2_divides_arg1
8018        = new NISuppressor (0, 1, NumericInt.Divides.class);
8019      private static NISuppressor arg1_divides_arg2
8020        = new NISuppressor (1, 0, NumericInt.Divides.class);
8021    
8022      private static NISuppressor arg2_valid_shift
8023        = new NISuppressor (1, RangeInt.Bound0_63.class);
8024    
8025        private static NISuppressionSet suppressions
8026          = new NISuppressionSet (new NISuppression[] {
8027    
8028            // (r == 0) && (x == y) ==> r = x ^ y
8029            new NISuppression (result_eq_0, arg1_eq_arg2, suppressee),
8030    
8031            // (r == x) && (y == 0) ==> r = x ^ y
8032            new NISuppression (result_eq_arg1, arg2_eq_0, suppressee),
8033    
8034            // (r == y) && (x == 0) ==> r = x ^ y
8035            new NISuppression (result_eq_arg2, arg1_eq_0, suppressee),
8036    
8037          });
8038    
8039      // Create a suppression factory for functionBinary
8040    
8041    }
8042    
8043      // "define" METHOD_NAME {"", " ^ ", ""}
8044    
8045      // default is that it is not this function, overriden in the subclass
8046      public boolean isLogicalXor () {
8047        return (false);
8048      }
8049    
8050    /**
8051     * Represents the invariant <samp>x = LogicalXor (y, z)</samp>
8052     * over three long scalars.
8053     */
8054    public static class LogicalXorLong_xyz extends FunctionBinary {
8055      // We are Serializable, so we specify a version to allow changes to
8056      // method signatures without breaking serialization.  If you add or
8057      // remove fields, you should change this number to the current date.
8058      static final long serialVersionUID = 20031030L;
8059    
8060      private static /*@Prototype*/ LogicalXorLong_xyz proto;
8061    
8062      /** Returns the prototype invariant for LogicalXorLong_xyz **/
8063      public static /*@Prototype*/ LogicalXorLong_xyz get_proto() {
8064        if (proto == null)
8065          proto = new /*@Prototype*/ LogicalXorLong_xyz ();
8066        return (proto);
8067      }
8068    
8069      /** instantiate an invariant on the specified slice **/
8070      protected LogicalXorLong_xyz instantiate_dyn (PptSlice slice) /*@Prototype*/ {
8071        return new LogicalXorLong_xyz (slice);
8072      }
8073    
8074      private LogicalXorLong_xyz (PptSlice slice) {
8075        super (slice);
8076      }
8077    
8078      public LogicalXorLong_xyz () /*@Prototype*/ {
8079        super ();
8080      }
8081    
8082      private static String[] method_name = new String[] {"plume.MathMDE.logicalXor(", ", ", ")"};
8083    
8084      public String[] get_method_name () {
8085        return (method_name);
8086      }
8087    
8088      private static int function_id = -1;
8089    
8090      public int get_function_id() {
8091        return (function_id);
8092      }
8093    
8094      public void set_function_id (int function_id) {
8095        assert LogicalXorLong_xyz.function_id == -1;
8096        LogicalXorLong_xyz.function_id = function_id;
8097      }
8098    
8099      private static int var_order = 1;
8100    
8101      public int get_var_order() {
8102        return var_order;
8103      }
8104    
8105      public boolean is_symmetric() {
8106    
8107          return (true);
8108      }
8109    
8110      public long func (long y, long z) {
8111    
8112          if ((y < 0) || (y > 1))
8113            throw new ArithmeticException ("arg1 (" + y + ") is not boolean ");
8114          if ((z < 0) || (z > 1))
8115            throw new ArithmeticException ("arg2 (" + z + ") is not boolean ");
8116    
8117        return ((((y != 0) ^ ( z != 0)) ? 1 : 0));
8118      }
8119    
8120      public InvariantStatus check_modified(long x, long y,
8121                                          long z, int count) {
8122        return (check_ordered (x, y, z, count));
8123      }
8124    
8125      public InvariantStatus add_modified(long x, long y,
8126                                          long z, int count) {
8127        if (Debug.logDetail())
8128          log (Fmt.spf ("result=%s, arg1=%s, arg2=%s", "" + x, "" + y,
8129                        "" + z));
8130        return (add_ordered (x, y, z, count));
8131      }
8132    
8133      public boolean isLogicalXor() {
8134        return (true);
8135      }
8136    
8137      /**
8138       * Returns a list of non-instantiating suppressions for this invariant.
8139       */
8140      public /*@Nullable*/ NISuppressionSet get_ni_suppressions() {
8141        if (NIS.dkconfig_enabled && dkconfig_enabled)
8142          return (suppressions);
8143        else
8144          return (null);
8145      }
8146    
8147      /** definition of this invariant (the suppressee) **/
8148      private static NISuppressee suppressee
8149                        = new NISuppressee (LogicalXorLong_xyz.class, 3);
8150    
8151      // suppressor definitions (used below)
8152      private static NISuppressor result_eq_arg1
8153        = new NISuppressor (0, 1, IntEqual.class);
8154      private static NISuppressor result_eq_arg2
8155        = new NISuppressor (0, 2, IntEqual.class);
8156      private static NISuppressor arg1_eq_arg2
8157        = new NISuppressor (1, 2, IntEqual.class);
8158    
8159      private static NISuppressor result_lt_arg1
8160        = new NISuppressor (0, 1, IntLessThan.class);
8161      private static NISuppressor result_lt_arg2
8162        = new NISuppressor (0, 2, IntLessThan.class);
8163      private static NISuppressor arg1_lt_arg2
8164        = new NISuppressor (1, 2, IntLessThan.class);
8165      private static NISuppressor arg2_lt_arg1
8166        = new NISuppressor (2, 1, IntLessThan.class);
8167    
8168      private static NISuppressor result_le_arg1
8169        = new NISuppressor (0, 1, IntLessEqual.class);
8170      private static NISuppressor result_le_arg2
8171        = new NISuppressor (0, 2, IntLessEqual.class);
8172      private static NISuppressor arg1_le_arg2
8173        = new NISuppressor (1, 2, IntLessEqual.class);
8174      private static NISuppressor arg2_le_arg1
8175        = new NISuppressor (2, 1, IntLessEqual.class);
8176    
8177      private static NISuppressor result_track0_arg1
8178        = new NISuppressor (0, 1, NumericInt.ZeroTrack.class);
8179      private static NISuppressor result_track0_arg2
8180        = new NISuppressor (0, 2, NumericInt.ZeroTrack.class);
8181      private static NISuppressor arg1_track0_arg2
8182        = new NISuppressor (1, 2, NumericInt.ZeroTrack.class);
8183      private static NISuppressor arg1_track0_result
8184        = new NISuppressor (1, 0, NumericInt.ZeroTrack.class);
8185      private static NISuppressor arg2_track0_result
8186        = new NISuppressor (2, 0, NumericInt.ZeroTrack.class);
8187      private static NISuppressor arg2_track0_arg1
8188        = new NISuppressor (2, 1, NumericInt.ZeroTrack.class);
8189    
8190      private static NISuppressor result_eq_1
8191        = new NISuppressor(0, RangeInt.EqualOne.class);
8192      private static NISuppressor arg1_eq_1
8193        = new NISuppressor (1, RangeInt.EqualOne.class);
8194      private static NISuppressor arg2_eq_1
8195        = new NISuppressor (2, RangeInt.EqualOne.class);
8196    
8197      private static NISuppressor result_eq_0
8198        = new NISuppressor(0,RangeInt.EqualZero.class);
8199      private static NISuppressor arg1_eq_0
8200        = new NISuppressor (1, RangeInt.EqualZero.class);
8201      private static NISuppressor arg2_eq_0
8202        = new NISuppressor (2, RangeInt.EqualZero.class);
8203    
8204      private static NISuppressor result_ne_0
8205        = new NISuppressor (0, NonZero.class);
8206      private static NISuppressor arg1_ne_0
8207        = new NISuppressor (1, NonZero.class);
8208      private static NISuppressor arg2_ne_0
8209        = new NISuppressor (2, NonZero.class);
8210    
8211      private static NISuppressor result_ge_0
8212        = new NISuppressor (0, RangeInt.GreaterEqualZero.class);
8213      private static NISuppressor arg1_ge_0
8214        = new NISuppressor (1, RangeInt.GreaterEqualZero.class);
8215      private static NISuppressor arg2_ge_0
8216        = new NISuppressor (2, RangeInt.GreaterEqualZero.class);
8217    
8218      private static NISuppressor result_ge_64
8219        = new NISuppressor (0, RangeInt.GreaterEqual64.class);
8220      private static NISuppressor arg1_ge_64
8221        = new NISuppressor (1, RangeInt.GreaterEqual64.class);
8222      private static NISuppressor arg2_ge_64
8223        = new NISuppressor (2, RangeInt.GreaterEqual64.class);
8224    
8225      private static NISuppressor result_boolean
8226        = new NISuppressor(0,RangeInt.BooleanVal.class);
8227      private static NISuppressor arg1_boolean
8228        = new NISuppressor (1, RangeInt.BooleanVal.class);
8229      private static NISuppressor arg2_boolean
8230        = new NISuppressor (2, RangeInt.BooleanVal.class);
8231    
8232      private static NISuppressor result_even
8233        = new NISuppressor (0, RangeInt.Even.class);
8234      private static NISuppressor arg1_even
8235        = new NISuppressor (1, RangeInt.Even.class);
8236      private static NISuppressor arg2_even
8237        = new NISuppressor (2, RangeInt.Even.class);
8238    
8239      private static NISuppressor result_power2
8240        = new NISuppressor(0,RangeInt.PowerOfTwo.class);
8241      private static NISuppressor arg1_power2
8242        = new NISuppressor (1, RangeInt.PowerOfTwo.class);
8243      private static NISuppressor arg2_power2
8244        = new NISuppressor (2, RangeInt.PowerOfTwo.class);
8245    
8246      private static NISuppressor result_and0_arg1
8247        = new NISuppressor (0, 1, NumericInt.BitwiseAndZero.class);
8248      private static NISuppressor result_and0_arg2
8249        = new NISuppressor (0, 2, NumericInt.BitwiseAndZero.class);
8250      private static NISuppressor arg1_and0_arg2
8251        = new NISuppressor (1, 2, NumericInt.BitwiseAndZero.class);
8252    
8253      // The arguments to bitwise subset are backwards from what one
8254      // might expect.  The second argument is a subset of the first
8255      // argument
8256      private static NISuppressor arg1_bw_subset_arg2
8257        = new NISuppressor (2, 1, NumericInt.BitwiseSubset.class);
8258      private static NISuppressor arg2_bw_subset_arg1
8259        = new NISuppressor (1, 2, NumericInt.BitwiseSubset.class);
8260    
8261      private static NISuppressor result_shift0_arg1
8262        = new NISuppressor (0, 1, NumericInt.ShiftZero.class);
8263      private static NISuppressor result_shift0_arg2
8264        = new NISuppressor (0, 2, NumericInt.ShiftZero.class);
8265      private static NISuppressor arg1_shift0_arg2
8266        = new NISuppressor (1, 2, NumericInt.ShiftZero.class);
8267    
8268      private static NISuppressor arg2_divides_arg1
8269        = new NISuppressor (1, 2, NumericInt.Divides.class);
8270      private static NISuppressor arg1_divides_arg2
8271        = new NISuppressor (2, 1, NumericInt.Divides.class);
8272    
8273      private static NISuppressor arg2_valid_shift
8274        = new NISuppressor (2, RangeInt.Bound0_63.class);
8275    
8276        private static NISuppressionSet suppressions
8277          = new NISuppressionSet (new NISuppression[] {
8278    
8279            // (r == 0) && (y == z) && (y boolean) ==> r = y ^ z
8280            new NISuppression (arg1_eq_arg2, arg1_boolean, result_eq_0,
8281                               suppressee),
8282    
8283            // (r == y) && (z == 0) && (x boolean) ==> r = y ^ z
8284            new NISuppression (result_eq_arg1, result_boolean, arg2_eq_0,
8285                               suppressee),
8286    
8287            // (r == z) && (y == 0) && (x boolean)==> r = y ^ z
8288            new NISuppression (result_eq_arg2, result_boolean, arg1_eq_0,
8289                               suppressee),
8290    
8291          });
8292    
8293      // Create a suppression factory for functionBinary
8294    
8295    }
8296    
8297    /**
8298     * Represents the invariant <samp>y = LogicalXor (x, z)</samp>
8299     * over three long scalars.
8300     */
8301    public static class LogicalXorLong_yxz extends FunctionBinary {
8302      // We are Serializable, so we specify a version to allow changes to
8303      // method signatures without breaking serialization.  If you add or
8304      // remove fields, you should change this number to the current date.
8305      static final long serialVersionUID = 20031030L;
8306    
8307      private static /*@Prototype*/ LogicalXorLong_yxz proto;
8308    
8309      /** Returns the prototype invariant for LogicalXorLong_yxz **/
8310      public static /*@Prototype*/ LogicalXorLong_yxz get_proto() {
8311        if (proto == null)
8312          proto = new /*@Prototype*/ LogicalXorLong_yxz ();
8313        return (proto);
8314      }
8315    
8316      /** instantiate an invariant on the specified slice **/
8317      protected LogicalXorLong_yxz instantiate_dyn (PptSlice slice) /*@Prototype*/ {
8318        return new LogicalXorLong_yxz (slice);
8319      }
8320    
8321      private LogicalXorLong_yxz (PptSlice slice) {
8322        super (slice);
8323      }
8324    
8325      public LogicalXorLong_yxz () /*@Prototype*/ {
8326        super ();
8327      }
8328    
8329      private static String[] method_name = new String[] {"plume.MathMDE.logicalXor(", ", ", ")"};
8330    
8331      public String[] get_method_name () {
8332        return (method_name);
8333      }
8334    
8335      private static int function_id = -1;
8336    
8337      public int get_function_id() {
8338        return (function_id);
8339      }
8340    
8341      public void set_function_id (int function_id) {
8342        assert LogicalXorLong_yxz.function_id == -1;
8343        LogicalXorLong_yxz.function_id = function_id;
8344      }
8345    
8346      private static int var_order = 2;
8347    
8348      public int get_var_order() {
8349        return var_order;
8350      }
8351    
8352      public boolean is_symmetric() {
8353    
8354          return (true);
8355      }
8356    
8357      public long func (long x, long z) {
8358    
8359          if ((x < 0) || (x > 1))
8360            throw new ArithmeticException ("arg1 (" + x + ") is not boolean ");
8361          if ((z < 0) || (z > 1))
8362            throw new ArithmeticException ("arg2 (" + z + ") is not boolean ");
8363    
8364        return ((((x != 0) ^ ( z != 0)) ? 1 : 0));
8365      }
8366    
8367      public InvariantStatus check_modified(long x, long y,
8368                                          long z, int count) {
8369        return (check_ordered (y, x, z, count));
8370      }
8371    
8372      public InvariantStatus add_modified(long x, long y,
8373                                          long z, int count) {
8374        if (Debug.logDetail())
8375          log (Fmt.spf ("result=%s, arg1=%s, arg2=%s", "" + y, "" + x,
8376                        "" + z));
8377        return (add_ordered (y, x, z, count));
8378      }
8379    
8380      public boolean isLogicalXor() {
8381        return (true);
8382      }
8383    
8384      /**
8385       * Returns a list of non-instantiating suppressions for this invariant.
8386       */
8387      public /*@Nullable*/ NISuppressionSet get_ni_suppressions() {
8388        if (NIS.dkconfig_enabled && dkconfig_enabled)
8389          return (suppressions);
8390        else
8391          return (null);
8392      }
8393    
8394      /** definition of this invariant (the suppressee) **/
8395      private static NISuppressee suppressee
8396                        = new NISuppressee (LogicalXorLong_yxz.class, 3);
8397    
8398      // suppressor definitions (used below)
8399      private static NISuppressor result_eq_arg1
8400        = new NISuppressor (1, 0, IntEqual.class);
8401      private static NISuppressor result_eq_arg2
8402        = new NISuppressor (1, 2, IntEqual.class);
8403      private static NISuppressor arg1_eq_arg2
8404        = new NISuppressor (0, 2, IntEqual.class);
8405    
8406      private static NISuppressor result_lt_arg1
8407        = new NISuppressor (1, 0, IntLessThan.class);
8408      private static NISuppressor result_lt_arg2
8409        = new NISuppressor (1, 2, IntLessThan.class);
8410      private static NISuppressor arg1_lt_arg2
8411        = new NISuppressor (0, 2, IntLessThan.class);
8412      private static NISuppressor arg2_lt_arg1
8413        = new NISuppressor (2, 0, IntLessThan.class);
8414    
8415      private static NISuppressor result_le_arg1
8416        = new NISuppressor (1, 0, IntLessEqual.class);
8417      private static NISuppressor result_le_arg2
8418        = new NISuppressor (1, 2, IntLessEqual.class);
8419      private static NISuppressor arg1_le_arg2
8420        = new NISuppressor (0, 2, IntLessEqual.class);
8421      private static NISuppressor arg2_le_arg1
8422        = new NISuppressor (2, 0, IntLessEqual.class);
8423    
8424      private static NISuppressor result_track0_arg1
8425        = new NISuppressor (1, 0, NumericInt.ZeroTrack.class);
8426      private static NISuppressor result_track0_arg2
8427        = new NISuppressor (1, 2, NumericInt.ZeroTrack.class);
8428      private static NISuppressor arg1_track0_arg2
8429        = new NISuppressor (0, 2, NumericInt.ZeroTrack.class);
8430      private static NISuppressor arg1_track0_result
8431        = new NISuppressor (0, 1, NumericInt.ZeroTrack.class);
8432      private static NISuppressor arg2_track0_result
8433        = new NISuppressor (2, 1, NumericInt.ZeroTrack.class);
8434      private static NISuppressor arg2_track0_arg1
8435        = new NISuppressor (2, 0, NumericInt.ZeroTrack.class);
8436    
8437      private static NISuppressor result_eq_1
8438        = new NISuppressor(1, RangeInt.EqualOne.class);
8439      private static NISuppressor arg1_eq_1
8440        = new NISuppressor (0, RangeInt.EqualOne.class);
8441      private static NISuppressor arg2_eq_1
8442        = new NISuppressor (2, RangeInt.EqualOne.class);
8443    
8444      private static NISuppressor result_eq_0
8445        = new NISuppressor(1,RangeInt.EqualZero.class);
8446      private static NISuppressor arg1_eq_0
8447        = new NISuppressor (0, RangeInt.EqualZero.class);
8448      private static NISuppressor arg2_eq_0
8449        = new NISuppressor (2, RangeInt.EqualZero.class);
8450    
8451      private static NISuppressor result_ne_0
8452        = new NISuppressor (1, NonZero.class);
8453      private static NISuppressor arg1_ne_0
8454        = new NISuppressor (0, NonZero.class);
8455      private static NISuppressor arg2_ne_0
8456        = new NISuppressor (2, NonZero.class);
8457    
8458      private static NISuppressor result_ge_0
8459        = new NISuppressor (1, RangeInt.GreaterEqualZero.class);
8460      private static NISuppressor arg1_ge_0
8461        = new NISuppressor (0, RangeInt.GreaterEqualZero.class);
8462      private static NISuppressor arg2_ge_0
8463        = new NISuppressor (2, RangeInt.GreaterEqualZero.class);
8464    
8465      private static NISuppressor result_ge_64
8466        = new NISuppressor (1, RangeInt.GreaterEqual64.class);
8467      private static NISuppressor arg1_ge_64
8468        = new NISuppressor (0, RangeInt.GreaterEqual64.class);
8469      private static NISuppressor arg2_ge_64
8470        = new NISuppressor (2, RangeInt.GreaterEqual64.class);
8471    
8472      private static NISuppressor result_boolean
8473        = new NISuppressor(1,RangeInt.BooleanVal.class);
8474      private static NISuppressor arg1_boolean
8475        = new NISuppressor (0, RangeInt.BooleanVal.class);
8476      private static NISuppressor arg2_boolean
8477        = new NISuppressor (2, RangeInt.BooleanVal.class);
8478    
8479      private static NISuppressor result_even
8480        = new NISuppressor (1, RangeInt.Even.class);
8481      private static NISuppressor arg1_even
8482        = new NISuppressor (0, RangeInt.Even.class);
8483      private static NISuppressor arg2_even
8484        = new NISuppressor (2, RangeInt.Even.class);
8485    
8486      private static NISuppressor result_power2
8487        = new NISuppressor(1,RangeInt.PowerOfTwo.class);
8488      private static NISuppressor arg1_power2
8489        = new NISuppressor (0, RangeInt.PowerOfTwo.class);
8490      private static NISuppressor arg2_power2
8491        = new NISuppressor (2, RangeInt.PowerOfTwo.class);
8492    
8493      private static NISuppressor result_and0_arg1
8494        = new NISuppressor (1, 0, NumericInt.BitwiseAndZero.class);
8495      private static NISuppressor result_and0_arg2
8496        = new NISuppressor (1, 2, NumericInt.BitwiseAndZero.class);
8497      private static NISuppressor arg1_and0_arg2
8498        = new NISuppressor (0, 2, NumericInt.BitwiseAndZero.class);
8499    
8500      // The arguments to bitwise subset are backwards from what one
8501      // might expect.  The second argument is a subset of the first
8502      // argument
8503      private static NISuppressor arg1_bw_subset_arg2
8504        = new NISuppressor (2, 0, NumericInt.BitwiseSubset.class);
8505      private static NISuppressor arg2_bw_subset_arg1
8506        = new NISuppressor (0, 2, NumericInt.BitwiseSubset.class);
8507    
8508      private static NISuppressor result_shift0_arg1
8509        = new NISuppressor (1, 0, NumericInt.ShiftZero.class);
8510      private static NISuppressor result_shift0_arg2
8511        = new NISuppressor (1, 2, NumericInt.ShiftZero.class);
8512      private static NISuppressor arg1_shift0_arg2
8513        = new NISuppressor (0, 2, NumericInt.ShiftZero.class);
8514    
8515      private static NISuppressor arg2_divides_arg1
8516        = new NISuppressor (0, 2, NumericInt.Divides.class);
8517      private static NISuppressor arg1_divides_arg2
8518        = new NISuppressor (2, 0, NumericInt.Divides.class);
8519    
8520      private static NISuppressor arg2_valid_shift
8521        = new NISuppressor (2, RangeInt.Bound0_63.class);
8522    
8523        private static NISuppressionSet suppressions
8524          = new NISuppressionSet (new NISuppression[] {
8525    
8526            // (r == 0) && (x == z) && (x boolean) ==> r = x ^ z
8527            new NISuppression (arg1_eq_arg2, arg1_boolean, result_eq_0,
8528                               suppressee),
8529    
8530            // (r == x) && (z == 0) && (y boolean) ==> r = x ^ z
8531            new NISuppression (result_eq_arg1, result_boolean, arg2_eq_0,
8532                               suppressee),
8533    
8534            // (r == z) && (x == 0) && (y boolean)==> r = x ^ z
8535            new NISuppression (result_eq_arg2, result_boolean, arg1_eq_0,
8536                               suppressee),
8537    
8538          });
8539    
8540      // Create a suppression factory for functionBinary
8541    
8542    }
8543    
8544    /**
8545     * Represents the invariant <samp>z = LogicalXor (x, y)</samp>
8546     * over three long scalars.
8547     */
8548    public static class LogicalXorLong_zxy extends FunctionBinary {
8549      // We are Serializable, so we specify a version to allow changes to
8550      // method signatures without breaking serialization.  If you add or
8551      // remove fields, you should change this number to the current date.
8552      static final long serialVersionUID = 20031030L;
8553    
8554      private static /*@Prototype*/ LogicalXorLong_zxy proto;
8555    
8556      /** Returns the prototype invariant for LogicalXorLong_zxy **/
8557      public static /*@Prototype*/ LogicalXorLong_zxy get_proto() {
8558        if (proto == null)
8559          proto = new /*@Prototype*/ LogicalXorLong_zxy ();
8560        return (proto);
8561      }
8562    
8563      /** instantiate an invariant on the specified slice **/
8564      protected LogicalXorLong_zxy instantiate_dyn (PptSlice slice) /*@Prototype*/ {
8565        return new LogicalXorLong_zxy (slice);
8566      }
8567    
8568      private LogicalXorLong_zxy (PptSlice slice) {
8569        super (slice);
8570      }
8571    
8572      public LogicalXorLong_zxy () /*@Prototype*/ {
8573        super ();
8574      }
8575    
8576      private static String[] method_name = new String[] {"plume.MathMDE.logicalXor(", ", ", ")"};
8577    
8578      public String[] get_method_name () {
8579        return (method_name);
8580      }
8581    
8582      private static int function_id = -1;
8583    
8584      public int get_function_id() {
8585        return (function_id);
8586      }
8587    
8588      public void set_function_id (int function_id) {
8589        assert LogicalXorLong_zxy.function_id == -1;
8590        LogicalXorLong_zxy.function_id = function_id;
8591      }
8592    
8593      private static int var_order = 3;
8594    
8595      public int get_var_order() {
8596        return var_order;
8597      }
8598    
8599      public boolean is_symmetric() {
8600    
8601          return (true);
8602      }
8603    
8604      public long func (long x, long y) {
8605    
8606          if ((x < 0) || (x > 1))
8607            throw new ArithmeticException ("arg1 (" + x + ") is not boolean ");
8608          if ((y < 0) || (y > 1))
8609            throw new ArithmeticException ("arg2 (" + y + ") is not boolean ");
8610    
8611        return ((((x != 0) ^ ( y != 0)) ? 1 : 0));
8612      }
8613    
8614      public InvariantStatus check_modified(long x, long y,
8615                                          long z, int count) {
8616        return (check_ordered (z, x, y, count));
8617      }
8618    
8619      public InvariantStatus add_modified(long x, long y,
8620                                          long z, int count) {
8621        if (Debug.logDetail())
8622          log (Fmt.spf ("result=%s, arg1=%s, arg2=%s", "" + z, "" + x,
8623                        "" + y));
8624        return (add_ordered (z, x, y, count));
8625      }
8626    
8627      public boolean isLogicalXor() {
8628        return (true);
8629      }
8630    
8631      /**
8632       * Returns a list of non-instantiating suppressions for this invariant.
8633       */
8634      public /*@Nullable*/ NISuppressionSet get_ni_suppressions() {
8635        if (NIS.dkconfig_enabled && dkconfig_enabled)
8636          return (suppressions);
8637        else
8638          return (null);
8639      }
8640    
8641      /** definition of this invariant (the suppressee) **/
8642      private static NISuppressee suppressee
8643                        = new NISuppressee (LogicalXorLong_zxy.class, 3);
8644    
8645      // suppressor definitions (used below)
8646      private static NISuppressor result_eq_arg1
8647        = new NISuppressor (2, 0, IntEqual.class);
8648      private static NISuppressor result_eq_arg2
8649        = new NISuppressor (2, 1, IntEqual.class);
8650      private static NISuppressor arg1_eq_arg2
8651        = new NISuppressor (0, 1, IntEqual.class);
8652    
8653      private static NISuppressor result_lt_arg1
8654        = new NISuppressor (2, 0, IntLessThan.class);
8655      private static NISuppressor result_lt_arg2
8656        = new NISuppressor (2, 1, IntLessThan.class);
8657      private static NISuppressor arg1_lt_arg2
8658        = new NISuppressor (0, 1, IntLessThan.class);
8659      private static NISuppressor arg2_lt_arg1
8660        = new NISuppressor (1, 0, IntLessThan.class);
8661    
8662      private static NISuppressor result_le_arg1
8663        = new NISuppressor (2, 0, IntLessEqual.class);
8664      private static NISuppressor result_le_arg2
8665        = new NISuppressor (2, 1, IntLessEqual.class);
8666      private static NISuppressor arg1_le_arg2
8667        = new NISuppressor (0, 1, IntLessEqual.class);
8668      private static NISuppressor arg2_le_arg1
8669        = new NISuppressor (1, 0, IntLessEqual.class);
8670    
8671      private static NISuppressor result_track0_arg1
8672        = new NISuppressor (2, 0, NumericInt.ZeroTrack.class);
8673      private static NISuppressor result_track0_arg2
8674        = new NISuppressor (2, 1, NumericInt.ZeroTrack.class);
8675      private static NISuppressor arg1_track0_arg2
8676        = new NISuppressor (0, 1, NumericInt.ZeroTrack.class);
8677      private static NISuppressor arg1_track0_result
8678        = new NISuppressor (0, 2, NumericInt.ZeroTrack.class);
8679      private static NISuppressor arg2_track0_result
8680        = new NISuppressor (1, 2, NumericInt.ZeroTrack.class);
8681      private static NISuppressor arg2_track0_arg1
8682        = new NISuppressor (1, 0, NumericInt.ZeroTrack.class);
8683    
8684      private static NISuppressor result_eq_1
8685        = new NISuppressor(2, RangeInt.EqualOne.class);
8686      private static NISuppressor arg1_eq_1
8687        = new NISuppressor (0, RangeInt.EqualOne.class);
8688      private static NISuppressor arg2_eq_1
8689        = new NISuppressor (1, RangeInt.EqualOne.class);
8690    
8691      private static NISuppressor result_eq_0
8692        = new NISuppressor(2,RangeInt.EqualZero.class);
8693      private static NISuppressor arg1_eq_0
8694        = new NISuppressor (0, RangeInt.EqualZero.class);
8695      private static NISuppressor arg2_eq_0
8696        = new NISuppressor (1, RangeInt.EqualZero.class);
8697    
8698      private static NISuppressor result_ne_0
8699        = new NISuppressor (2, NonZero.class);
8700      private static NISuppressor arg1_ne_0
8701        = new NISuppressor (0, NonZero.class);
8702      private static NISuppressor arg2_ne_0
8703        = new NISuppressor (1, NonZero.class);
8704    
8705      private static NISuppressor result_ge_0
8706        = new NISuppressor (2, RangeInt.GreaterEqualZero.class);
8707      private static NISuppressor arg1_ge_0
8708        = new NISuppressor (0, RangeInt.GreaterEqualZero.class);
8709      private static NISuppressor arg2_ge_0
8710        = new NISuppressor (1, RangeInt.GreaterEqualZero.class);
8711    
8712      private static NISuppressor result_ge_64
8713        = new NISuppressor (2, RangeInt.GreaterEqual64.class);
8714      private static NISuppressor arg1_ge_64
8715        = new NISuppressor (0, RangeInt.GreaterEqual64.class);
8716      private static NISuppressor arg2_ge_64
8717        = new NISuppressor (1, RangeInt.GreaterEqual64.class);
8718    
8719      private static NISuppressor result_boolean
8720        = new NISuppressor(2,RangeInt.BooleanVal.class);
8721      private static NISuppressor arg1_boolean
8722        = new NISuppressor (0, RangeInt.BooleanVal.class);
8723      private static NISuppressor arg2_boolean
8724        = new NISuppressor (1, RangeInt.BooleanVal.class);
8725    
8726      private static NISuppressor result_even
8727        = new NISuppressor (2, RangeInt.Even.class);
8728      private static NISuppressor arg1_even
8729        = new NISuppressor (0, RangeInt.Even.class);
8730      private static NISuppressor arg2_even
8731        = new NISuppressor (1, RangeInt.Even.class);
8732    
8733      private static NISuppressor result_power2
8734        = new NISuppressor(2,RangeInt.PowerOfTwo.class);
8735      private static NISuppressor arg1_power2
8736        = new NISuppressor (0, RangeInt.PowerOfTwo.class);
8737      private static NISuppressor arg2_power2
8738        = new NISuppressor (1, RangeInt.PowerOfTwo.class);
8739    
8740      private static NISuppressor result_and0_arg1
8741        = new NISuppressor (2, 0, NumericInt.BitwiseAndZero.class);
8742      private static NISuppressor result_and0_arg2
8743        = new NISuppressor (2, 1, NumericInt.BitwiseAndZero.class);
8744      private static NISuppressor arg1_and0_arg2
8745        = new NISuppressor (0, 1, NumericInt.BitwiseAndZero.class);
8746    
8747      // The arguments to bitwise subset are backwards from what one
8748      // might expect.  The second argument is a subset of the first
8749      // argument
8750      private static NISuppressor arg1_bw_subset_arg2
8751        = new NISuppressor (1, 0, NumericInt.BitwiseSubset.class);
8752      private static NISuppressor arg2_bw_subset_arg1
8753        = new NISuppressor (0, 1, NumericInt.BitwiseSubset.class);
8754    
8755      private static NISuppressor result_shift0_arg1
8756        = new NISuppressor (2, 0, NumericInt.ShiftZero.class);
8757      private static NISuppressor result_shift0_arg2
8758        = new NISuppressor (2, 1, NumericInt.ShiftZero.class);
8759      private static NISuppressor arg1_shift0_arg2
8760        = new NISuppressor (0, 1, NumericInt.ShiftZero.class);
8761    
8762      private static NISuppressor arg2_divides_arg1
8763        = new NISuppressor (0, 1, NumericInt.Divides.class);
8764      private static NISuppressor arg1_divides_arg2
8765        = new NISuppressor (1, 0, NumericInt.Divides.class);
8766    
8767      private static NISuppressor arg2_valid_shift
8768        = new NISuppressor (1, RangeInt.Bound0_63.class);
8769    
8770        private static NISuppressionSet suppressions
8771          = new NISuppressionSet (new NISuppression[] {
8772    
8773            // (r == 0) && (x == y) && (x boolean) ==> r = x ^ y
8774            new NISuppression (arg1_eq_arg2, arg1_boolean, result_eq_0,
8775                               suppressee),
8776    
8777            // (r == x) && (y == 0) && (z boolean) ==> r = x ^ y
8778            new NISuppression (result_eq_arg1, result_boolean, arg2_eq_0,
8779                               suppressee),
8780    
8781            // (r == y) && (x == 0) && (z boolean)==> r = x ^ y
8782            new NISuppression (result_eq_arg2, result_boolean, arg1_eq_0,
8783                               suppressee),
8784    
8785          });
8786    
8787      // Create a suppression factory for functionBinary
8788    
8789    }
8790    
8791      // "define" EQUALITY_SUPPRESS 1
8792    
8793      // default is that it is not this function, overriden in the subclass
8794      public boolean isBitwiseOr () {
8795        return (false);
8796      }
8797    
8798    /**
8799     * Represents the invariant <samp>x = BitwiseOr (y, z)</samp>
8800     * over three long scalars.
8801     */
8802    public static class BitwiseOrLong_xyz extends FunctionBinary {
8803      // We are Serializable, so we specify a version to allow changes to
8804      // method signatures without breaking serialization.  If you add or
8805      // remove fields, you should change this number to the current date.
8806      static final long serialVersionUID = 20031030L;
8807    
8808      private static /*@Prototype*/ BitwiseOrLong_xyz proto;
8809    
8810      /** Returns the prototype invariant for BitwiseOrLong_xyz **/
8811      public static /*@Prototype*/ BitwiseOrLong_xyz get_proto() {
8812        if (proto == null)
8813          proto = new /*@Prototype*/ BitwiseOrLong_xyz ();
8814        return (proto);
8815      }
8816    
8817      /** instantiate an invariant on the specified slice **/
8818      protected BitwiseOrLong_xyz instantiate_dyn (PptSlice slice) /*@Prototype*/ {
8819        return new BitwiseOrLong_xyz (slice);
8820      }
8821    
8822      private BitwiseOrLong_xyz (PptSlice slice) {
8823        super (slice);
8824      }
8825    
8826      public BitwiseOrLong_xyz () /*@Prototype*/ {
8827        super ();
8828      }
8829    
8830      private static String[] method_name = new String[] {"", " | ", ""};
8831    
8832      public String[] get_method_name () {
8833        return (method_name);
8834      }
8835    
8836      private static int function_id = -1;
8837    
8838      public int get_function_id() {
8839        return (function_id);
8840      }
8841    
8842      public void set_function_id (int function_id) {
8843        assert BitwiseOrLong_xyz.function_id == -1;
8844        BitwiseOrLong_xyz.function_id = function_id;
8845      }
8846    
8847      private static int var_order = 1;
8848    
8849      public int get_var_order() {
8850        return var_order;
8851      }
8852    
8853      public boolean is_symmetric() {
8854    
8855          return (true);
8856      }
8857    
8858      public long func (long y, long z) {
8859    
8860        return ((y | z));
8861      }
8862    
8863      public InvariantStatus check_modified(long x, long y,
8864                                          long z, int count) {
8865        return (check_ordered (x, y, z, count));
8866      }
8867    
8868      public InvariantStatus add_modified(long x, long y,
8869                                          long z, int count) {
8870        if (Debug.logDetail())
8871          log (Fmt.spf ("result=%s, arg1=%s, arg2=%s", "" + x, "" + y,
8872                        "" + z));
8873        return (add_ordered (x, y, z, count));
8874      }
8875    
8876      public boolean isBitwiseOr() {
8877        return (true);
8878      }
8879    
8880      /**
8881       * Returns a list of non-instantiating suppressions for this invariant.
8882       */
8883      public /*@Nullable*/ NISuppressionSet get_ni_suppressions() {
8884        if (NIS.dkconfig_enabled && dkconfig_enabled)
8885          return (suppressions);
8886        else
8887          return (null);
8888      }
8889    
8890      /** definition of this invariant (the suppressee) **/
8891      private static NISuppressee suppressee
8892                        = new NISuppressee (BitwiseOrLong_xyz.class, 3);
8893    
8894      // suppressor definitions (used below)
8895      private static NISuppressor result_eq_arg1
8896        = new NISuppressor (0, 1, IntEqual.class);
8897      private static NISuppressor result_eq_arg2
8898        = new NISuppressor (0, 2, IntEqual.class);
8899      private static NISuppressor arg1_eq_arg2
8900        = new NISuppressor (1, 2, IntEqual.class);
8901    
8902      private static NISuppressor result_lt_arg1
8903        = new NISuppressor (0, 1, IntLessThan.class);
8904      private static NISuppressor result_lt_arg2
8905        = new NISuppressor (0, 2, IntLessThan.class);
8906      private static NISuppressor arg1_lt_arg2
8907        = new NISuppressor (1, 2, IntLessThan.class);
8908      private static NISuppressor arg2_lt_arg1
8909        = new NISuppressor (2, 1, IntLessThan.class);
8910    
8911      private static NISuppressor result_le_arg1
8912        = new NISuppressor (0, 1, IntLessEqual.class);
8913      private static NISuppressor result_le_arg2
8914        = new NISuppressor (0, 2, IntLessEqual.class);
8915      private static NISuppressor arg1_le_arg2
8916        = new NISuppressor (1, 2, IntLessEqual.class);
8917      private static NISuppressor arg2_le_arg1
8918        = new NISuppressor (2, 1, IntLessEqual.class);
8919    
8920      private static NISuppressor result_track0_arg1
8921        = new NISuppressor (0, 1, NumericInt.ZeroTrack.class);
8922      private static NISuppressor result_track0_arg2
8923        = new NISuppressor (0, 2, NumericInt.ZeroTrack.class);
8924      private static NISuppressor arg1_track0_arg2
8925        = new NISuppressor (1, 2, NumericInt.ZeroTrack.class);
8926      private static NISuppressor arg1_track0_result
8927        = new NISuppressor (1, 0, NumericInt.ZeroTrack.class);
8928      private static NISuppressor arg2_track0_result
8929        = new NISuppressor (2, 0, NumericInt.ZeroTrack.class);
8930      private static NISuppressor arg2_track0_arg1
8931        = new NISuppressor (2, 1, NumericInt.ZeroTrack.class);
8932    
8933      private static NISuppressor result_eq_1
8934        = new NISuppressor(0, RangeInt.EqualOne.class);
8935      private static NISuppressor arg1_eq_1
8936        = new NISuppressor (1, RangeInt.EqualOne.class);
8937      private static NISuppressor arg2_eq_1
8938        = new NISuppressor (2, RangeInt.EqualOne.class);
8939    
8940      private static NISuppressor result_eq_0
8941        = new NISuppressor(0,RangeInt.EqualZero.class);
8942      private static NISuppressor arg1_eq_0
8943        = new NISuppressor (1, RangeInt.EqualZero.class);
8944      private static NISuppressor arg2_eq_0
8945        = new NISuppressor (2, RangeInt.EqualZero.class);
8946    
8947      private static NISuppressor result_ne_0
8948        = new NISuppressor (0, NonZero.class);
8949      private static NISuppressor arg1_ne_0
8950        = new NISuppressor (1, NonZero.class);
8951      private static NISuppressor arg2_ne_0
8952        = new NISuppressor (2, NonZero.class);
8953    
8954      private static NISuppressor result_ge_0
8955        = new NISuppressor (0, RangeInt.GreaterEqualZero.class);
8956      private static NISuppressor arg1_ge_0
8957        = new NISuppressor (1, RangeInt.GreaterEqualZero.class);
8958      private static NISuppressor arg2_ge_0
8959        = new NISuppressor (2, RangeInt.GreaterEqualZero.class);
8960    
8961      private static NISuppressor result_ge_64
8962        = new NISuppressor (0, RangeInt.GreaterEqual64.class);
8963      private static NISuppressor arg1_ge_64
8964        = new NISuppressor (1, RangeInt.GreaterEqual64.class);
8965      private static NISuppressor arg2_ge_64
8966        = new NISuppressor (2, RangeInt.GreaterEqual64.class);
8967    
8968      private static NISuppressor result_boolean
8969        = new NISuppressor(0,RangeInt.BooleanVal.class);
8970      private static NISuppressor arg1_boolean
8971        = new NISuppressor (1, RangeInt.BooleanVal.class);
8972      private static NISuppressor arg2_boolean
8973        = new NISuppressor (2, RangeInt.BooleanVal.class);
8974    
8975      private static NISuppressor result_even
8976        = new NISuppressor (0, RangeInt.Even.class);
8977      private static NISuppressor arg1_even
8978        = new NISuppressor (1, RangeInt.Even.class);
8979      private static NISuppressor arg2_even
8980        = new NISuppressor (2, RangeInt.Even.class);
8981    
8982      private static NISuppressor result_power2
8983        = new NISuppressor(0,RangeInt.PowerOfTwo.class);
8984      private static NISuppressor arg1_power2
8985        = new NISuppressor (1, RangeInt.PowerOfTwo.class);
8986      private static NISuppressor arg2_power2
8987        = new NISuppressor (2, RangeInt.PowerOfTwo.class);
8988    
8989      private static NISuppressor result_and0_arg1
8990        = new NISuppressor (0, 1, NumericInt.BitwiseAndZero.class);
8991      private static NISuppressor result_and0_arg2
8992        = new NISuppressor (0, 2, NumericInt.BitwiseAndZero.class);
8993      private static NISuppressor arg1_and0_arg2
8994        = new NISuppressor (1, 2, NumericInt.BitwiseAndZero.class);
8995    
8996      // The arguments to bitwise subset are backwards from what one
8997      // might expect.  The second argument is a subset of the first
8998      // argument
8999      private static NISuppressor arg1_bw_subset_arg2
9000        = new NISuppressor (2, 1, NumericInt.BitwiseSubset.class);
9001      private static NISuppressor arg2_bw_subset_arg1
9002        = new NISuppressor (1, 2, NumericInt.BitwiseSubset.class);
9003    
9004      private static NISuppressor result_shift0_arg1
9005        = new NISuppressor (0, 1, NumericInt.ShiftZero.class);
9006      private static NISuppressor result_shift0_arg2
9007        = new NISuppressor (0, 2, NumericInt.ShiftZero.class);
9008      private static NISuppressor arg1_shift0_arg2
9009        = new NISuppressor (1, 2, NumericInt.ShiftZero.class);
9010    
9011      private static NISuppressor arg2_divides_arg1
9012        = new NISuppressor (1, 2, NumericInt.Divides.class);
9013      private static NISuppressor arg1_divides_arg2
9014        = new NISuppressor (2, 1, NumericInt.Divides.class);
9015    
9016      private static NISuppressor arg2_valid_shift
9017        = new NISuppressor (2, RangeInt.Bound0_63.class);
9018    
9019        private static NISuppressionSet suppressions
9020          = new NISuppressionSet (new NISuppression[] {
9021    
9022            // (r == y) && (z bitwise subset y)
9023            new NISuppression (result_eq_arg1, arg2_bw_subset_arg1, suppressee),
9024    
9025            // (r == z) && (y bitwise subset z)
9026            new NISuppression (result_eq_arg2, arg1_bw_subset_arg2, suppressee),
9027    
9028            // All of the below are subsummed by the two above
9029            // (r == y) && (y == z) ==> r = y | z
9030            // new NISuppression (result_eq_arg1, arg1_eq_arg2, suppressee),
9031    
9032            // (r == y) && (z == 0) ==> r = y | z
9033            // new NISuppression (result_eq_arg1, arg2_eq_0, suppressee),
9034    
9035            // (r == z) && (y == 0) ==> r = y | z
9036            // new NISuppression (result_eq_arg2, arg1_eq_0, suppressee),
9037    
9038            // (r == 1) && (y == 1) && (z boolean)
9039            // new NISuppression (result_eq_1, arg1_eq_1, arg2_boolean, suppressee),
9040    
9041            // (r == 1) && (z == 1) && (y boolean)
9042            // new NISuppression (result_eq_1, arg2_eq_1, arg1_boolean, suppressee),
9043    
9044          });
9045    
9046      // Create a suppression factory for functionBinary
9047    
9048    }
9049    
9050    /**
9051     * Represents the invariant <samp>y = BitwiseOr (x, z)</samp>
9052     * over three long scalars.
9053     */
9054    public static class BitwiseOrLong_yxz extends FunctionBinary {
9055      // We are Serializable, so we specify a version to allow changes to
9056      // method signatures without breaking serialization.  If you add or
9057      // remove fields, you should change this number to the current date.
9058      static final long serialVersionUID = 20031030L;
9059    
9060      private static /*@Prototype*/ BitwiseOrLong_yxz proto;
9061    
9062      /** Returns the prototype invariant for BitwiseOrLong_yxz **/
9063      public static /*@Prototype*/ BitwiseOrLong_yxz get_proto() {
9064        if (proto == null)
9065          proto = new /*@Prototype*/ BitwiseOrLong_yxz ();
9066        return (proto);
9067      }
9068    
9069      /** instantiate an invariant on the specified slice **/
9070      protected BitwiseOrLong_yxz instantiate_dyn (PptSlice slice) /*@Prototype*/ {
9071        return new BitwiseOrLong_yxz (slice);
9072      }
9073    
9074      private BitwiseOrLong_yxz (PptSlice slice) {
9075        super (slice);
9076      }
9077    
9078      public BitwiseOrLong_yxz () /*@Prototype*/ {
9079        super ();
9080      }
9081    
9082      private static String[] method_name = new String[] {"", " | ", ""};
9083    
9084      public String[] get_method_name () {
9085        return (method_name);
9086      }
9087    
9088      private static int function_id = -1;
9089    
9090      public int get_function_id() {
9091        return (function_id);
9092      }
9093    
9094      public void set_function_id (int function_id) {
9095        assert BitwiseOrLong_yxz.function_id == -1;
9096        BitwiseOrLong_yxz.function_id = function_id;
9097      }
9098    
9099      private static int var_order = 2;
9100    
9101      public int get_var_order() {
9102        return var_order;
9103      }
9104    
9105      public boolean is_symmetric() {
9106    
9107          return (true);
9108      }
9109    
9110      public long func (long x, long z) {
9111    
9112        return ((x | z));
9113      }
9114    
9115      public InvariantStatus check_modified(long x, long y,
9116                                          long z, int count) {
9117        return (check_ordered (y, x, z, count));
9118      }
9119    
9120      public InvariantStatus add_modified(long x, long y,
9121                                          long z, int count) {
9122        if (Debug.logDetail())
9123          log (Fmt.spf ("result=%s, arg1=%s, arg2=%s", "" + y, "" + x,
9124                        "" + z));
9125        return (add_ordered (y, x, z, count));
9126      }
9127    
9128      public boolean isBitwiseOr() {
9129        return (true);
9130      }
9131    
9132      /**
9133       * Returns a list of non-instantiating suppressions for this invariant.
9134       */
9135      public /*@Nullable*/ NISuppressionSet get_ni_suppressions() {
9136        if (NIS.dkconfig_enabled && dkconfig_enabled)
9137          return (suppressions);
9138        else
9139          return (null);
9140      }
9141    
9142      /** definition of this invariant (the suppressee) **/
9143      private static NISuppressee suppressee
9144                        = new NISuppressee (BitwiseOrLong_yxz.class, 3);
9145    
9146      // suppressor definitions (used below)
9147      private static NISuppressor result_eq_arg1
9148        = new NISuppressor (1, 0, IntEqual.class);
9149      private static NISuppressor result_eq_arg2
9150        = new NISuppressor (1, 2, IntEqual.class);
9151      private static NISuppressor arg1_eq_arg2
9152        = new NISuppressor (0, 2, IntEqual.class);
9153    
9154      private static NISuppressor result_lt_arg1
9155        = new NISuppressor (1, 0, IntLessThan.class);
9156      private static NISuppressor result_lt_arg2
9157        = new NISuppressor (1, 2, IntLessThan.class);
9158      private static NISuppressor arg1_lt_arg2
9159        = new NISuppressor (0, 2, IntLessThan.class);
9160      private static NISuppressor arg2_lt_arg1
9161        = new NISuppressor (2, 0, IntLessThan.class);
9162    
9163      private static NISuppressor result_le_arg1
9164        = new NISuppressor (1, 0, IntLessEqual.class);
9165      private static NISuppressor result_le_arg2
9166        = new NISuppressor (1, 2, IntLessEqual.class);
9167      private static NISuppressor arg1_le_arg2
9168        = new NISuppressor (0, 2, IntLessEqual.class);
9169      private static NISuppressor arg2_le_arg1
9170        = new NISuppressor (2, 0, IntLessEqual.class);
9171    
9172      private static NISuppressor result_track0_arg1
9173        = new NISuppressor (1, 0, NumericInt.ZeroTrack.class);
9174      private static NISuppressor result_track0_arg2
9175        = new NISuppressor (1, 2, NumericInt.ZeroTrack.class);
9176      private static NISuppressor arg1_track0_arg2
9177        = new NISuppressor (0, 2, NumericInt.ZeroTrack.class);
9178      private static NISuppressor arg1_track0_result
9179        = new NISuppressor (0, 1, NumericInt.ZeroTrack.class);
9180      private static NISuppressor arg2_track0_result
9181        = new NISuppressor (2, 1, NumericInt.ZeroTrack.class);
9182      private static NISuppressor arg2_track0_arg1
9183        = new NISuppressor (2, 0, NumericInt.ZeroTrack.class);
9184    
9185      private static NISuppressor result_eq_1
9186        = new NISuppressor(1, RangeInt.EqualOne.class);
9187      private static NISuppressor arg1_eq_1
9188        = new NISuppressor (0, RangeInt.EqualOne.class);
9189      private static NISuppressor arg2_eq_1
9190        = new NISuppressor (2, RangeInt.EqualOne.class);
9191    
9192      private static NISuppressor result_eq_0
9193        = new NISuppressor(1,RangeInt.EqualZero.class);
9194      private static NISuppressor arg1_eq_0
9195        = new NISuppressor (0, RangeInt.EqualZero.class);
9196      private static NISuppressor arg2_eq_0
9197        = new NISuppressor (2, RangeInt.EqualZero.class);
9198    
9199      private static NISuppressor result_ne_0
9200        = new NISuppressor (1, NonZero.class);
9201      private static NISuppressor arg1_ne_0
9202        = new NISuppressor (0, NonZero.class);
9203      private static NISuppressor arg2_ne_0
9204        = new NISuppressor (2, NonZero.class);
9205    
9206      private static NISuppressor result_ge_0
9207        = new NISuppressor (1, RangeInt.GreaterEqualZero.class);
9208      private static NISuppressor arg1_ge_0
9209        = new NISuppressor (0, RangeInt.GreaterEqualZero.class);
9210      private static NISuppressor arg2_ge_0
9211        = new NISuppressor (2, RangeInt.GreaterEqualZero.class);
9212    
9213      private static NISuppressor result_ge_64
9214        = new NISuppressor (1, RangeInt.GreaterEqual64.class);
9215      private static NISuppressor arg1_ge_64
9216        = new NISuppressor (0, RangeInt.GreaterEqual64.class);
9217      private static NISuppressor arg2_ge_64
9218        = new NISuppressor (2, RangeInt.GreaterEqual64.class);
9219    
9220      private static NISuppressor result_boolean
9221        = new NISuppressor(1,RangeInt.BooleanVal.class);
9222      private static NISuppressor arg1_boolean
9223        = new NISuppressor (0, RangeInt.BooleanVal.class);
9224      private static NISuppressor arg2_boolean
9225        = new NISuppressor (2, RangeInt.BooleanVal.class);
9226    
9227      private static NISuppressor result_even
9228        = new NISuppressor (1, RangeInt.Even.class);
9229      private static NISuppressor arg1_even
9230        = new NISuppressor (0, RangeInt.Even.class);
9231      private static NISuppressor arg2_even
9232        = new NISuppressor (2, RangeInt.Even.class);
9233    
9234      private static NISuppressor result_power2
9235        = new NISuppressor(1,RangeInt.PowerOfTwo.class);
9236      private static NISuppressor arg1_power2
9237        = new NISuppressor (0, RangeInt.PowerOfTwo.class);
9238      private static NISuppressor arg2_power2
9239        = new NISuppressor (2, RangeInt.PowerOfTwo.class);
9240    
9241      private static NISuppressor result_and0_arg1
9242        = new NISuppressor (1, 0, NumericInt.BitwiseAndZero.class);
9243      private static NISuppressor result_and0_arg2
9244        = new NISuppressor (1, 2, NumericInt.BitwiseAndZero.class);
9245      private static NISuppressor arg1_and0_arg2
9246        = new NISuppressor (0, 2, NumericInt.BitwiseAndZero.class);
9247    
9248      // The arguments to bitwise subset are backwards from what one
9249      // might expect.  The second argument is a subset of the first
9250      // argument
9251      private static NISuppressor arg1_bw_subset_arg2
9252        = new NISuppressor (2, 0, NumericInt.BitwiseSubset.class);
9253      private static NISuppressor arg2_bw_subset_arg1
9254        = new NISuppressor (0, 2, NumericInt.BitwiseSubset.class);
9255    
9256      private static NISuppressor result_shift0_arg1
9257        = new NISuppressor (1, 0, NumericInt.ShiftZero.class);
9258      private static NISuppressor result_shift0_arg2
9259        = new NISuppressor (1, 2, NumericInt.ShiftZero.class);
9260      private static NISuppressor arg1_shift0_arg2
9261        = new NISuppressor (0, 2, NumericInt.ShiftZero.class);
9262    
9263      private static NISuppressor arg2_divides_arg1
9264        = new NISuppressor (0, 2, NumericInt.Divides.class);
9265      private static NISuppressor arg1_divides_arg2
9266        = new NISuppressor (2, 0, NumericInt.Divides.class);
9267    
9268      private static NISuppressor arg2_valid_shift
9269        = new NISuppressor (2, RangeInt.Bound0_63.class);
9270    
9271        private static NISuppressionSet suppressions
9272          = new NISuppressionSet (new NISuppression[] {
9273    
9274            // (r == x) && (z bitwise subset x)
9275            new NISuppression (result_eq_arg1, arg2_bw_subset_arg1, suppressee),
9276    
9277            // (r == z) && (x bitwise subset z)
9278            new NISuppression (result_eq_arg2, arg1_bw_subset_arg2, suppressee),
9279    
9280            // All of the below are subsummed by the two above
9281            // (r == x) && (x == z) ==> r = x | z
9282            // new NISuppression (result_eq_arg1, arg1_eq_arg2, suppressee),
9283    
9284            // (r == x) && (z == 0) ==> r = x | z
9285            // new NISuppression (result_eq_arg1, arg2_eq_0, suppressee),
9286    
9287            // (r == z) && (x == 0) ==> r = x | z
9288            // new NISuppression (result_eq_arg2, arg1_eq_0, suppressee),
9289    
9290            // (r == 1) && (x == 1) && (z boolean)
9291            // new NISuppression (result_eq_1, arg1_eq_1, arg2_boolean, suppressee),
9292    
9293            // (r == 1) && (z == 1) && (x boolean)
9294            // new NISuppression (result_eq_1, arg2_eq_1, arg1_boolean, suppressee),
9295    
9296          });
9297    
9298      // Create a suppression factory for functionBinary
9299    
9300    }
9301    
9302    /**
9303     * Represents the invariant <samp>z = BitwiseOr (x, y)</samp>
9304     * over three long scalars.
9305     */
9306    public static class BitwiseOrLong_zxy extends FunctionBinary {
9307      // We are Serializable, so we specify a version to allow changes to
9308      // method signatures without breaking serialization.  If you add or
9309      // remove fields, you should change this number to the current date.
9310      static final long serialVersionUID = 20031030L;
9311    
9312      private static /*@Prototype*/ BitwiseOrLong_zxy proto;
9313    
9314      /** Returns the prototype invariant for BitwiseOrLong_zxy **/
9315      public static /*@Prototype*/ BitwiseOrLong_zxy get_proto() {
9316        if (proto == null)
9317          proto = new /*@Prototype*/ BitwiseOrLong_zxy ();
9318        return (proto);
9319      }
9320    
9321      /** instantiate an invariant on the specified slice **/
9322      protected BitwiseOrLong_zxy instantiate_dyn (PptSlice slice) /*@Prototype*/ {
9323        return new BitwiseOrLong_zxy (slice);
9324      }
9325    
9326      private BitwiseOrLong_zxy (PptSlice slice) {
9327        super (slice);
9328      }
9329    
9330      public BitwiseOrLong_zxy () /*@Prototype*/ {
9331        super ();
9332      }
9333    
9334      private static String[] method_name = new String[] {"", " | ", ""};
9335    
9336      public String[] get_method_name () {
9337        return (method_name);
9338      }
9339    
9340      private static int function_id = -1;
9341    
9342      public int get_function_id() {
9343        return (function_id);
9344      }
9345    
9346      public void set_function_id (int function_id) {
9347        assert BitwiseOrLong_zxy.function_id == -1;
9348        BitwiseOrLong_zxy.function_id = function_id;
9349      }
9350    
9351      private static int var_order = 3;
9352    
9353      public int get_var_order() {
9354        return var_order;
9355      }
9356    
9357      public boolean is_symmetric() {
9358    
9359          return (true);
9360      }
9361    
9362      public long func (long x, long y) {
9363    
9364        return ((x | y));
9365      }
9366    
9367      public InvariantStatus check_modified(long x, long y,
9368                                          long z, int count) {
9369        return (check_ordered (z, x, y, count));
9370      }
9371    
9372      public InvariantStatus add_modified(long x, long y,
9373                                          long z, int count) {
9374        if (Debug.logDetail())
9375          log (Fmt.spf ("result=%s, arg1=%s, arg2=%s", "" + z, "" + x,
9376                        "" + y));
9377        return (add_ordered (z, x, y, count));
9378      }
9379    
9380      public boolean isBitwiseOr() {
9381        return (true);
9382      }
9383    
9384      /**
9385       * Returns a list of non-instantiating suppressions for this invariant.
9386       */
9387      public /*@Nullable*/ NISuppressionSet get_ni_suppressions() {
9388        if (NIS.dkconfig_enabled && dkconfig_enabled)
9389          return (suppressions);
9390        else
9391          return (null);
9392      }
9393    
9394      /** definition of this invariant (the suppressee) **/
9395      private static NISuppressee suppressee
9396                        = new NISuppressee (BitwiseOrLong_zxy.class, 3);
9397    
9398      // suppressor definitions (used below)
9399      private static NISuppressor result_eq_arg1
9400        = new NISuppressor (2, 0, IntEqual.class);
9401      private static NISuppressor result_eq_arg2
9402        = new NISuppressor (2, 1, IntEqual.class);
9403      private static NISuppressor arg1_eq_arg2
9404        = new NISuppressor (0, 1, IntEqual.class);
9405    
9406      private static NISuppressor result_lt_arg1
9407        = new NISuppressor (2, 0, IntLessThan.class);
9408      private static NISuppressor result_lt_arg2
9409        = new NISuppressor (2, 1, IntLessThan.class);
9410      private static NISuppressor arg1_lt_arg2
9411        = new NISuppressor (0, 1, IntLessThan.class);
9412      private static NISuppressor arg2_lt_arg1
9413        = new NISuppressor (1, 0, IntLessThan.class);
9414    
9415      private static NISuppressor result_le_arg1
9416        = new NISuppressor (2, 0, IntLessEqual.class);
9417      private static NISuppressor result_le_arg2
9418        = new NISuppressor (2, 1, IntLessEqual.class);
9419      private static NISuppressor arg1_le_arg2
9420        = new NISuppressor (0, 1, IntLessEqual.class);
9421      private static NISuppressor arg2_le_arg1
9422        = new NISuppressor (1, 0, IntLessEqual.class);
9423    
9424      private static NISuppressor result_track0_arg1
9425        = new NISuppressor (2, 0, NumericInt.ZeroTrack.class);
9426      private static NISuppressor result_track0_arg2
9427        = new NISuppressor (2, 1, NumericInt.ZeroTrack.class);
9428      private static NISuppressor arg1_track0_arg2
9429        = new NISuppressor (0, 1, NumericInt.ZeroTrack.class);
9430      private static NISuppressor arg1_track0_result
9431        = new NISuppressor (0, 2, NumericInt.ZeroTrack.class);
9432      private static NISuppressor arg2_track0_result
9433        = new NISuppressor (1, 2, NumericInt.ZeroTrack.class);
9434      private static NISuppressor arg2_track0_arg1
9435        = new NISuppressor (1, 0, NumericInt.ZeroTrack.class);
9436    
9437      private static NISuppressor result_eq_1
9438        = new NISuppressor(2, RangeInt.EqualOne.class);
9439      private static NISuppressor arg1_eq_1
9440        = new NISuppressor (0, RangeInt.EqualOne.class);
9441      private static NISuppressor arg2_eq_1
9442        = new NISuppressor (1, RangeInt.EqualOne.class);
9443    
9444      private static NISuppressor result_eq_0
9445        = new NISuppressor(2,RangeInt.EqualZero.class);
9446      private static NISuppressor arg1_eq_0
9447        = new NISuppressor (0, RangeInt.EqualZero.class);
9448      private static NISuppressor arg2_eq_0
9449        = new NISuppressor (1, RangeInt.EqualZero.class);
9450    
9451      private static NISuppressor result_ne_0
9452        = new NISuppressor (2, NonZero.class);
9453      private static NISuppressor arg1_ne_0
9454        = new NISuppressor (0, NonZero.class);
9455      private static NISuppressor arg2_ne_0
9456        = new NISuppressor (1, NonZero.class);
9457    
9458      private static NISuppressor result_ge_0
9459        = new NISuppressor (2, RangeInt.GreaterEqualZero.class);
9460      private static NISuppressor arg1_ge_0
9461        = new NISuppressor (0, RangeInt.GreaterEqualZero.class);
9462      private static NISuppressor arg2_ge_0
9463        = new NISuppressor (1, RangeInt.GreaterEqualZero.class);
9464    
9465      private static NISuppressor result_ge_64
9466        = new NISuppressor (2, RangeInt.GreaterEqual64.class);
9467      private static NISuppressor arg1_ge_64
9468        = new NISuppressor (0, RangeInt.GreaterEqual64.class);
9469      private static NISuppressor arg2_ge_64
9470        = new NISuppressor (1, RangeInt.GreaterEqual64.class);
9471    
9472      private static NISuppressor result_boolean
9473        = new NISuppressor(2,RangeInt.BooleanVal.class);
9474      private static NISuppressor arg1_boolean
9475        = new NISuppressor (0, RangeInt.BooleanVal.class);
9476      private static NISuppressor arg2_boolean
9477        = new NISuppressor (1, RangeInt.BooleanVal.class);
9478    
9479      private static NISuppressor result_even
9480        = new NISuppressor (2, RangeInt.Even.class);
9481      private static NISuppressor arg1_even
9482        = new NISuppressor (0, RangeInt.Even.class);
9483      private static NISuppressor arg2_even
9484        = new NISuppressor (1, RangeInt.Even.class);
9485    
9486      private static NISuppressor result_power2
9487        = new NISuppressor(2,RangeInt.PowerOfTwo.class);
9488      private static NISuppressor arg1_power2
9489        = new NISuppressor (0, RangeInt.PowerOfTwo.class);
9490      private static NISuppressor arg2_power2
9491        = new NISuppressor (1, RangeInt.PowerOfTwo.class);
9492    
9493      private static NISuppressor result_and0_arg1
9494        = new NISuppressor (2, 0, NumericInt.BitwiseAndZero.class);
9495      private static NISuppressor result_and0_arg2
9496        = new NISuppressor (2, 1, NumericInt.BitwiseAndZero.class);
9497      private static NISuppressor arg1_and0_arg2
9498        = new NISuppressor (0, 1, NumericInt.BitwiseAndZero.class);
9499    
9500      // The arguments to bitwise subset are backwards from what one
9501      // might expect.  The second argument is a subset of the first
9502      // argument
9503      private static NISuppressor arg1_bw_subset_arg2
9504        = new NISuppressor (1, 0, NumericInt.BitwiseSubset.class);
9505      private static NISuppressor arg2_bw_subset_arg1
9506        = new NISuppressor (0, 1, NumericInt.BitwiseSubset.class);
9507    
9508      private static NISuppressor result_shift0_arg1
9509        = new NISuppressor (2, 0, NumericInt.ShiftZero.class);
9510      private static NISuppressor result_shift0_arg2
9511        = new NISuppressor (2, 1, NumericInt.ShiftZero.class);
9512      private static NISuppressor arg1_shift0_arg2
9513        = new NISuppressor (0, 1, NumericInt.ShiftZero.class);
9514    
9515      private static NISuppressor arg2_divides_arg1
9516        = new NISuppressor (0, 1, NumericInt.Divides.class);
9517      private static NISuppressor arg1_divides_arg2
9518        = new NISuppressor (1, 0, NumericInt.Divides.class);
9519    
9520      private static NISuppressor arg2_valid_shift
9521        = new NISuppressor (1, RangeInt.Bound0_63.class);
9522    
9523        private static NISuppressionSet suppressions
9524          = new NISuppressionSet (new NISuppression[] {
9525    
9526            // (r == x) && (y bitwise subset x)
9527            new NISuppression (result_eq_arg1, arg2_bw_subset_arg1, suppressee),
9528    
9529            // (r == y) && (x bitwise subset y)
9530            new NISuppression (result_eq_arg2, arg1_bw_subset_arg2, suppressee),
9531    
9532            // All of the below are subsummed by the two above
9533            // (r == x) && (x == y) ==> r = x | y
9534            // new NISuppression (result_eq_arg1, arg1_eq_arg2, suppressee),
9535    
9536            // (r == x) && (y == 0) ==> r = x | y
9537            // new NISuppression (result_eq_arg1, arg2_eq_0, suppressee),
9538    
9539            // (r == y) && (x == 0) ==> r = x | y
9540            // new NISuppression (result_eq_arg2, arg1_eq_0, suppressee),
9541    
9542            // (r == 1) && (x == 1) && (y boolean)
9543            // new NISuppression (result_eq_1, arg1_eq_1, arg2_boolean, suppressee),
9544    
9545            // (r == 1) && (y == 1) && (x boolean)
9546            // new NISuppression (result_eq_1, arg2_eq_1, arg1_boolean, suppressee),
9547    
9548          });
9549    
9550      // Create a suppression factory for functionBinary
9551    
9552    }
9553    
9554      // default is that it is not this function, overriden in the subclass
9555      public boolean isLogicalOr () {
9556        return (false);
9557      }
9558    
9559    /**
9560     * Represents the invariant <samp>x = LogicalOr (y, z)</samp>
9561     * over three long scalars.
9562     */
9563    public static class LogicalOrLong_xyz extends FunctionBinary {
9564      // We are Serializable, so we specify a version to allow changes to
9565      // method signatures without breaking serialization.  If you add or
9566      // remove fields, you should change this number to the current date.
9567      static final long serialVersionUID = 20031030L;
9568    
9569      private static /*@Prototype*/ LogicalOrLong_xyz proto;
9570    
9571      /** Returns the prototype invariant for LogicalOrLong_xyz **/
9572      public static /*@Prototype*/ LogicalOrLong_xyz get_proto() {
9573        if (proto == null)
9574          proto = new /*@Prototype*/ LogicalOrLong_xyz ();
9575        return (proto);
9576      }
9577    
9578      /** instantiate an invariant on the specified slice **/
9579      protected LogicalOrLong_xyz instantiate_dyn (PptSlice slice) /*@Prototype*/ {
9580        return new LogicalOrLong_xyz (slice);
9581      }
9582    
9583      private LogicalOrLong_xyz (PptSlice slice) {
9584        super (slice);
9585      }
9586    
9587      public LogicalOrLong_xyz () /*@Prototype*/ {
9588        super ();
9589      }
9590    
9591      private static String[] method_name = new String[] {"", " || ", ""};
9592    
9593      public String[] get_method_name () {
9594        return (method_name);
9595      }
9596    
9597      private static int function_id = -1;
9598    
9599      public int get_function_id() {
9600        return (function_id);
9601      }
9602    
9603      public void set_function_id (int function_id) {
9604        assert LogicalOrLong_xyz.function_id == -1;
9605        LogicalOrLong_xyz.function_id = function_id;
9606      }
9607    
9608      private static int var_order = 1;
9609    
9610      public int get_var_order() {
9611        return var_order;
9612      }
9613    
9614      public boolean is_symmetric() {
9615    
9616          return (true);
9617      }
9618    
9619      public long func (long y, long z) {
9620    
9621          if ((y < 0) || (y > 1))
9622            throw new ArithmeticException ("arg1 (" + y + ") is not boolean ");
9623          if ((z < 0) || (z > 1))
9624            throw new ArithmeticException ("arg2 (" + z + ") is not boolean ");
9625    
9626        return ((((y != 0) || ( z != 0)) ? 1 : 0));
9627      }
9628    
9629      public InvariantStatus check_modified(long x, long y,
9630                                          long z, int count) {
9631        return (check_ordered (x, y, z, count));
9632      }
9633    
9634      public InvariantStatus add_modified(long x, long y,
9635                                          long z, int count) {
9636        if (Debug.logDetail())
9637          log (Fmt.spf ("result=%s, arg1=%s, arg2=%s", "" + x, "" + y,
9638                        "" + z));
9639        return (add_ordered (x, y, z, count));
9640      }
9641    
9642      public boolean isLogicalOr() {
9643        return (true);
9644      }
9645    
9646      /**
9647       * Returns a list of non-instantiating suppressions for this invariant.
9648       */
9649      public /*@Nullable*/ NISuppressionSet get_ni_suppressions() {
9650        if (NIS.dkconfig_enabled && dkconfig_enabled)
9651          return (suppressions);
9652        else
9653          return (null);
9654      }
9655    
9656      /** definition of this invariant (the suppressee) **/
9657      private static NISuppressee suppressee
9658                        = new NISuppressee (LogicalOrLong_xyz.class, 3);
9659    
9660      // suppressor definitions (used below)
9661      private static NISuppressor result_eq_arg1
9662        = new NISuppressor (0, 1, IntEqual.class);
9663      private static NISuppressor result_eq_arg2
9664        = new NISuppressor (0, 2, IntEqual.class);
9665      private static NISuppressor arg1_eq_arg2
9666        = new NISuppressor (1, 2, IntEqual.class);
9667    
9668      private static NISuppressor result_lt_arg1
9669        = new NISuppressor (0, 1, IntLessThan.class);
9670      private static NISuppressor result_lt_arg2
9671        = new NISuppressor (0, 2, IntLessThan.class);
9672      private static NISuppressor arg1_lt_arg2
9673        = new NISuppressor (1, 2, IntLessThan.class);
9674      private static NISuppressor arg2_lt_arg1
9675        = new NISuppressor (2, 1, IntLessThan.class);
9676    
9677      private static NISuppressor result_le_arg1
9678        = new NISuppressor (0, 1, IntLessEqual.class);
9679      private static NISuppressor result_le_arg2
9680        = new NISuppressor (0, 2, IntLessEqual.class);
9681      private static NISuppressor arg1_le_arg2
9682        = new NISuppressor (1, 2, IntLessEqual.class);
9683      private static NISuppressor arg2_le_arg1
9684        = new NISuppressor (2, 1, IntLessEqual.class);
9685    
9686      private static NISuppressor result_track0_arg1
9687        = new NISuppressor (0, 1, NumericInt.ZeroTrack.class);
9688      private static NISuppressor result_track0_arg2
9689        = new NISuppressor (0, 2, NumericInt.ZeroTrack.class);
9690      private static NISuppressor arg1_track0_arg2
9691        = new NISuppressor (1, 2, NumericInt.ZeroTrack.class);
9692      private static NISuppressor arg1_track0_result
9693        = new NISuppressor (1, 0, NumericInt.ZeroTrack.class);
9694      private static NISuppressor arg2_track0_result
9695        = new NISuppressor (2, 0, NumericInt.ZeroTrack.class);
9696      private static NISuppressor arg2_track0_arg1
9697        = new NISuppressor (2, 1, NumericInt.ZeroTrack.class);
9698    
9699      private static NISuppressor result_eq_1
9700        = new NISuppressor(0, RangeInt.EqualOne.class);
9701      private static NISuppressor arg1_eq_1
9702        = new NISuppressor (1, RangeInt.EqualOne.class);
9703      private static NISuppressor arg2_eq_1
9704        = new NISuppressor (2, RangeInt.EqualOne.class);
9705    
9706      private static NISuppressor result_eq_0
9707        = new NISuppressor(0,RangeInt.EqualZero.class);
9708      private static NISuppressor arg1_eq_0
9709        = new NISuppressor (1, RangeInt.EqualZero.class);
9710      private static NISuppressor arg2_eq_0
9711        = new NISuppressor (2, RangeInt.EqualZero.class);
9712    
9713      private static NISuppressor result_ne_0
9714        = new NISuppressor (0, NonZero.class);
9715      private static NISuppressor arg1_ne_0
9716        = new NISuppressor (1, NonZero.class);
9717      private static NISuppressor arg2_ne_0
9718        = new NISuppressor (2, NonZero.class);
9719    
9720      private static NISuppressor result_ge_0
9721        = new NISuppressor (0, RangeInt.GreaterEqualZero.class);
9722      private static NISuppressor arg1_ge_0
9723        = new NISuppressor (1, RangeInt.GreaterEqualZero.class);
9724      private static NISuppressor arg2_ge_0
9725        = new NISuppressor (2, RangeInt.GreaterEqualZero.class);
9726    
9727      private static NISuppressor result_ge_64
9728        = new NISuppressor (0, RangeInt.GreaterEqual64.class);
9729      private static NISuppressor arg1_ge_64
9730        = new NISuppressor (1, RangeInt.GreaterEqual64.class);
9731      private static NISuppressor arg2_ge_64
9732        = new NISuppressor (2, RangeInt.GreaterEqual64.class);
9733    
9734      private static NISuppressor result_boolean
9735        = new NISuppressor(0,RangeInt.BooleanVal.class);
9736      private static NISuppressor arg1_boolean
9737        = new NISuppressor (1, RangeInt.BooleanVal.class);
9738      private static NISuppressor arg2_boolean
9739        = new NISuppressor (2, RangeInt.BooleanVal.class);
9740    
9741      private static NISuppressor result_even
9742        = new NISuppressor (0, RangeInt.Even.class);
9743      private static NISuppressor arg1_even
9744        = new NISuppressor (1, RangeInt.Even.class);
9745      private static NISuppressor arg2_even
9746        = new NISuppressor (2, RangeInt.Even.class);
9747    
9748      private static NISuppressor result_power2
9749        = new NISuppressor(0,RangeInt.PowerOfTwo.class);
9750      private static NISuppressor arg1_power2
9751        = new NISuppressor (1, RangeInt.PowerOfTwo.class);
9752      private static NISuppressor arg2_power2
9753        = new NISuppressor (2, RangeInt.PowerOfTwo.class);
9754    
9755      private static NISuppressor result_and0_arg1
9756        = new NISuppressor (0, 1, NumericInt.BitwiseAndZero.class);
9757      private static NISuppressor result_and0_arg2
9758        = new NISuppressor (0, 2, NumericInt.BitwiseAndZero.class);
9759      private static NISuppressor arg1_and0_arg2
9760        = new NISuppressor (1, 2, NumericInt.BitwiseAndZero.class);
9761    
9762      // The arguments to bitwise subset are backwards from what one
9763      // might expect.  The second argument is a subset of the first
9764      // argument
9765      private static NISuppressor arg1_bw_subset_arg2
9766        = new NISuppressor (2, 1, NumericInt.BitwiseSubset.class);
9767      private static NISuppressor arg2_bw_subset_arg1
9768        = new NISuppressor (1, 2, NumericInt.BitwiseSubset.class);
9769    
9770      private static NISuppressor result_shift0_arg1
9771        = new NISuppressor (0, 1, NumericInt.ShiftZero.class);
9772      private static NISuppressor result_shift0_arg2
9773        = new NISuppressor (0, 2, NumericInt.ShiftZero.class);
9774      private static NISuppressor arg1_shift0_arg2
9775        = new NISuppressor (1, 2, NumericInt.ShiftZero.class);
9776    
9777      private static NISuppressor arg2_divides_arg1
9778        = new NISuppressor (1, 2, NumericInt.Divides.class);
9779      private static NISuppressor arg1_divides_arg2
9780        = new NISuppressor (2, 1, NumericInt.Divides.class);
9781    
9782      private static NISuppressor arg2_valid_shift
9783        = new NISuppressor (2, RangeInt.Bound0_63.class);
9784    
9785        private static NISuppressionSet suppressions
9786          = new NISuppressionSet (new NISuppression[] {
9787    
9788            // Note that
9789            // x == y && y == z does NOT imply x == z because of possibly
9790            // missing values.  For example:
9791            //
9792            //  Sample    X         Y           Z
9793            //    1       1         1           missing
9794            //    2       0         missing     1
9795            //    3       missing   0           0
9796            //
9797            //  The best solution seems to be to include all three
9798            //  equalities for the suppression
9799    
9800            // (r == y) && (y == z) && (r == z) && (r is boolean)
9801            //    ==> r = y | z
9802            new NISuppression (result_eq_arg1, arg1_eq_arg2, result_eq_arg2,
9803                               result_boolean, suppressee),
9804    
9805            // (r == y) && (z == 0) && (r is boolean) ==> r = y | z
9806            new NISuppression (result_eq_arg1, result_boolean, arg2_eq_0,
9807                               suppressee),
9808    
9809            // (r == z) && (y == 0) && (r is boolean) ==> r = y | z
9810            new NISuppression (result_eq_arg2, result_boolean, arg1_eq_0,
9811                               suppressee),
9812    
9813            // (r == 1) && (y == 1) && (z boolean)
9814            new NISuppression (result_eq_1, arg1_eq_1, arg2_boolean, suppressee),
9815    
9816            // (r == 1) && (z == 1) && (y boolean)
9817            new NISuppression (result_eq_1, arg2_eq_1, arg1_boolean, suppressee),
9818    
9819          });
9820    
9821      // Create a suppression factory for functionBinary
9822    
9823    }
9824    
9825    /**
9826     * Represents the invariant <samp>y = LogicalOr (x, z)</samp>
9827     * over three long scalars.
9828     */
9829    public static class LogicalOrLong_yxz extends FunctionBinary {
9830      // We are Serializable, so we specify a version to allow changes to
9831      // method signatures without breaking serialization.  If you add or
9832      // remove fields, you should change this number to the current date.
9833      static final long serialVersionUID = 20031030L;
9834    
9835      private static /*@Prototype*/ LogicalOrLong_yxz proto;
9836    
9837      /** Returns the prototype invariant for LogicalOrLong_yxz **/
9838      public static /*@Prototype*/ LogicalOrLong_yxz get_proto() {
9839        if (proto == null)
9840          proto = new /*@Prototype*/ LogicalOrLong_yxz ();
9841        return (proto);
9842      }
9843    
9844      /** instantiate an invariant on the specified slice **/
9845      protected LogicalOrLong_yxz instantiate_dyn (PptSlice slice) /*@Prototype*/ {
9846        return new LogicalOrLong_yxz (slice);
9847      }
9848    
9849      private LogicalOrLong_yxz (PptSlice slice) {
9850        super (slice);
9851      }
9852    
9853      public LogicalOrLong_yxz () /*@Prototype*/ {
9854        super ();
9855      }
9856    
9857      private static String[] method_name = new String[] {"", " || ", ""};
9858    
9859      public String[] get_method_name () {
9860        return (method_name);
9861      }
9862    
9863      private static int function_id = -1;
9864    
9865      public int get_function_id() {
9866        return (function_id);
9867      }
9868    
9869      public void set_function_id (int function_id) {
9870        assert LogicalOrLong_yxz.function_id == -1;
9871        LogicalOrLong_yxz.function_id = function_id;
9872      }
9873    
9874      private static int var_order = 2;
9875    
9876      public int get_var_order() {
9877        return var_order;
9878      }
9879    
9880      public boolean is_symmetric() {
9881    
9882          return (true);
9883      }
9884    
9885      public long func (long x, long z) {
9886    
9887          if ((x < 0) || (x > 1))
9888            throw new ArithmeticException ("arg1 (" + x + ") is not boolean ");
9889          if ((z < 0) || (z > 1))
9890            throw new ArithmeticException ("arg2 (" + z + ") is not boolean ");
9891    
9892        return ((((x != 0) || ( z != 0)) ? 1 : 0));
9893      }
9894    
9895      public InvariantStatus check_modified(long x, long y,
9896                                          long z, int count) {
9897        return (check_ordered (y, x, z, count));
9898      }
9899    
9900      public InvariantStatus add_modified(long x, long y,
9901                                          long z, int count) {
9902        if (Debug.logDetail())
9903          log (Fmt.spf ("result=%s, arg1=%s, arg2=%s", "" + y, "" + x,
9904                        "" + z));
9905        return (add_ordered (y, x, z, count));
9906      }
9907    
9908      public boolean isLogicalOr() {
9909        return (true);
9910      }
9911    
9912      /**
9913       * Returns a list of non-instantiating suppressions for this invariant.
9914       */
9915      public /*@Nullable*/ NISuppressionSet get_ni_suppressions() {
9916        if (NIS.dkconfig_enabled && dkconfig_enabled)
9917          return (suppressions);
9918        else
9919          return (null);
9920      }
9921    
9922      /** definition of this invariant (the suppressee) **/
9923      private static NISuppressee suppressee
9924                        = new NISuppressee (LogicalOrLong_yxz.class, 3);
9925    
9926      // suppressor definitions (used below)
9927      private static NISuppressor result_eq_arg1
9928        = new NISuppressor (1, 0, IntEqual.class);
9929      private static NISuppressor result_eq_arg2
9930        = new NISuppressor (1, 2, IntEqual.class);
9931      private static NISuppressor arg1_eq_arg2
9932        = new NISuppressor (0, 2, IntEqual.class);
9933    
9934      private static NISuppressor result_lt_arg1
9935        = new NISuppressor (1, 0, IntLessThan.class);
9936      private static NISuppressor result_lt_arg2
9937        = new NISuppressor (1, 2, IntLessThan.class);
9938      private static NISuppressor arg1_lt_arg2
9939        = new NISuppressor (0, 2, IntLessThan.class);
9940      private static NISuppressor arg2_lt_arg1
9941        = new NISuppressor (2, 0, IntLessThan.class);
9942    
9943      private static NISuppressor result_le_arg1
9944        = new NISuppressor (1, 0, IntLessEqual.class);
9945      private static NISuppressor result_le_arg2
9946        = new NISuppressor (1, 2, IntLessEqual.class);
9947      private static NISuppressor arg1_le_arg2
9948        = new NISuppressor (0, 2, IntLessEqual.class);
9949      private static NISuppressor arg2_le_arg1
9950        = new NISuppressor (2, 0, IntLessEqual.class);
9951    
9952      private static NISuppressor result_track0_arg1
9953        = new NISuppressor (1, 0, NumericInt.ZeroTrack.class);
9954      private static NISuppressor result_track0_arg2
9955        = new NISuppressor (1, 2, NumericInt.ZeroTrack.class);
9956      private static NISuppressor arg1_track0_arg2
9957        = new NISuppressor (0, 2, NumericInt.ZeroTrack.class);
9958      private static NISuppressor arg1_track0_result
9959        = new NISuppressor (0, 1, NumericInt.ZeroTrack.class);
9960      private static NISuppressor arg2_track0_result
9961        = new NISuppressor (2, 1, NumericInt.ZeroTrack.class);
9962      private static NISuppressor arg2_track0_arg1
9963        = new NISuppressor (2, 0, NumericInt.ZeroTrack.class);
9964    
9965      private static NISuppressor result_eq_1
9966        = new NISuppressor(1, RangeInt.EqualOne.class);
9967      private static NISuppressor arg1_eq_1
9968        = new NISuppressor (0, RangeInt.EqualOne.class);
9969      private static NISuppressor arg2_eq_1
9970        = new NISuppressor (2, RangeInt.EqualOne.class);
9971    
9972      private static NISuppressor result_eq_0
9973        = new NISuppressor(1,RangeInt.EqualZero.class);
9974      private static NISuppressor arg1_eq_0
9975        = new NISuppressor (0, RangeInt.EqualZero.class);
9976      private static NISuppressor arg2_eq_0
9977        = new NISuppressor (2, RangeInt.EqualZero.class);
9978    
9979      private static NISuppressor result_ne_0
9980        = new NISuppressor (1, NonZero.class);
9981      private static NISuppressor arg1_ne_0
9982        = new NISuppressor (0, NonZero.class);
9983      private static NISuppressor arg2_ne_0
9984        = new NISuppressor (2, NonZero.class);
9985    
9986      private static NISuppressor result_ge_0
9987        = new NISuppressor (1, RangeInt.GreaterEqualZero.class);
9988      private static NISuppressor arg1_ge_0
9989        = new NISuppressor (0, RangeInt.GreaterEqualZero.class);
9990      private static NISuppressor arg2_ge_0
9991        = new NISuppressor (2, RangeInt.GreaterEqualZero.class);
9992    
9993      private static NISuppressor result_ge_64
9994        = new NISuppressor (1, RangeInt.GreaterEqual64.class);
9995      private static NISuppressor arg1_ge_64
9996        = new NISuppressor (0, RangeInt.GreaterEqual64.class);
9997      private static NISuppressor arg2_ge_64
9998        = new NISuppressor (2, RangeInt.GreaterEqual64.class);
9999    
10000      private static NISuppressor result_boolean
10001        = new NISuppressor(1,RangeInt.BooleanVal.class);
10002      private static NISuppressor arg1_boolean
10003        = new NISuppressor (0, RangeInt.BooleanVal.class);
10004      private static NISuppressor arg2_boolean
10005        = new NISuppressor (2, RangeInt.BooleanVal.class);
10006    
10007      private static NISuppressor result_even
10008        = new NISuppressor (1, RangeInt.Even.class);
10009      private static NISuppressor arg1_even
10010        = new NISuppressor (0, RangeInt.Even.class);
10011      private static NISuppressor arg2_even
10012        = new NISuppressor (2, RangeInt.Even.class);
10013    
10014      private static NISuppressor result_power2
10015        = new NISuppressor(1,RangeInt.PowerOfTwo.class);
10016      private static NISuppressor arg1_power2
10017        = new NISuppressor (0, RangeInt.PowerOfTwo.class);
10018      private static NISuppressor arg2_power2
10019        = new NISuppressor (2, RangeInt.PowerOfTwo.class);
10020    
10021      private static NISuppressor result_and0_arg1
10022        = new NISuppressor (1, 0, NumericInt.BitwiseAndZero.class);
10023      private static NISuppressor result_and0_arg2
10024        = new NISuppressor (1, 2, NumericInt.BitwiseAndZero.class);
10025      private static NISuppressor arg1_and0_arg2
10026        = new NISuppressor (0, 2, NumericInt.BitwiseAndZero.class);
10027    
10028      // The arguments to bitwise subset are backwards from what one
10029      // might expect.  The second argument is a subset of the first
10030      // argument
10031      private static NISuppressor arg1_bw_subset_arg2
10032        = new NISuppressor (2, 0, NumericInt.BitwiseSubset.class);
10033      private static NISuppressor arg2_bw_subset_arg1
10034        = new NISuppressor (0, 2, NumericInt.BitwiseSubset.class);
10035    
10036      private static NISuppressor result_shift0_arg1
10037        = new NISuppressor (1, 0, NumericInt.ShiftZero.class);
10038      private static NISuppressor result_shift0_arg2
10039        = new NISuppressor (1, 2, NumericInt.ShiftZero.class);
10040      private static NISuppressor arg1_shift0_arg2
10041        = new NISuppressor (0, 2, NumericInt.ShiftZero.class);
10042    
10043      private static NISuppressor arg2_divides_arg1
10044        = new NISuppressor (0, 2, NumericInt.Divides.class);
10045      private static NISuppressor arg1_divides_arg2
10046        = new NISuppressor (2, 0, NumericInt.Divides.class);
10047    
10048      private static NISuppressor arg2_valid_shift
10049        = new NISuppressor (2, RangeInt.Bound0_63.class);
10050    
10051        private static NISuppressionSet suppressions
10052          = new NISuppressionSet (new NISuppression[] {
10053    
10054            // Note that
10055            // x == y && y == z does NOT imply x == z because of possibly
10056            // missing values.  For example:
10057            //
10058            //  Sample    X         Y           Z
10059            //    1       1         1           missing
10060            //    2       0         missing     1
10061            //    3       missing   0           0
10062            //
10063            //  The best solution seems to be to include all three
10064            //  equalities for the suppression
10065    
10066            // (r == x) && (x == z) && (r == z) && (r is boolean)
10067            //    ==> r = x | z
10068            new NISuppression (result_eq_arg1, arg1_eq_arg2, result_eq_arg2,
10069                               result_boolean, suppressee),
10070    
10071            // (r == x) && (z == 0) && (r is boolean) ==> r = x | z
10072            new NISuppression (result_eq_arg1, result_boolean, arg2_eq_0,
10073                               suppressee),
10074    
10075            // (r == z) && (x == 0) && (r is boolean) ==> r = x | z
10076            new NISuppression (result_eq_arg2, result_boolean, arg1_eq_0,
10077                               suppressee),
10078    
10079            // (r == 1) && (x == 1) && (z boolean)
10080            new NISuppression (result_eq_1, arg1_eq_1, arg2_boolean, suppressee),
10081    
10082            // (r == 1) && (z == 1) && (x boolean)
10083            new NISuppression (result_eq_1, arg2_eq_1, arg1_boolean, suppressee),
10084    
10085          });
10086    
10087      // Create a suppression factory for functionBinary
10088    
10089    }
10090    
10091    /**
10092     * Represents the invariant <samp>z = LogicalOr (x, y)</samp>
10093     * over three long scalars.
10094     */
10095    public static class LogicalOrLong_zxy extends FunctionBinary {
10096      // We are Serializable, so we specify a version to allow changes to
10097      // method signatures without breaking serialization.  If you add or
10098      // remove fields, you should change this number to the current date.
10099      static final long serialVersionUID = 20031030L;
10100    
10101      private static /*@Prototype*/ LogicalOrLong_zxy proto;
10102    
10103      /** Returns the prototype invariant for LogicalOrLong_zxy **/
10104      public static /*@Prototype*/ LogicalOrLong_zxy get_proto() {
10105        if (proto == null)
10106          proto = new /*@Prototype*/ LogicalOrLong_zxy ();
10107        return (proto);
10108      }
10109    
10110      /** instantiate an invariant on the specified slice **/
10111      protected LogicalOrLong_zxy instantiate_dyn (PptSlice slice) /*@Prototype*/ {
10112        return new LogicalOrLong_zxy (slice);
10113      }
10114    
10115      private LogicalOrLong_zxy (PptSlice slice) {
10116        super (slice);
10117      }
10118    
10119      public LogicalOrLong_zxy () /*@Prototype*/ {
10120        super ();
10121      }
10122    
10123      private static String[] method_name = new String[] {"", " || ", ""};
10124    
10125      public String[] get_method_name () {
10126        return (method_name);
10127      }
10128    
10129      private static int function_id = -1;
10130    
10131      public int get_function_id() {
10132        return (function_id);
10133      }
10134    
10135      public void set_function_id (int function_id) {
10136        assert LogicalOrLong_zxy.function_id == -1;
10137        LogicalOrLong_zxy.function_id = function_id;
10138      }
10139    
10140      private static int var_order = 3;
10141    
10142      public int get_var_order() {
10143        return var_order;
10144      }
10145    
10146      public boolean is_symmetric() {
10147    
10148          return (true);
10149      }
10150    
10151      public long func (long x, long y) {
10152    
10153          if ((x < 0) || (x > 1))
10154            throw new ArithmeticException ("arg1 (" + x + ") is not boolean ");
10155          if ((y < 0) || (y > 1))
10156            throw new ArithmeticException ("arg2 (" + y + ") is not boolean ");
10157    
10158        return ((((x != 0) || ( y != 0)) ? 1 : 0));
10159      }
10160    
10161      public InvariantStatus check_modified(long x, long y,
10162                                          long z, int count) {
10163        return (check_ordered (z, x, y, count));
10164      }
10165    
10166      public InvariantStatus add_modified(long x, long y,
10167                                          long z, int count) {
10168        if (Debug.logDetail())
10169          log (Fmt.spf ("result=%s, arg1=%s, arg2=%s", "" + z, "" + x,
10170                        "" + y));
10171        return (add_ordered (z, x, y, count));
10172      }
10173    
10174      public boolean isLogicalOr() {
10175        return (true);
10176      }
10177    
10178      /**
10179       * Returns a list of non-instantiating suppressions for this invariant.
10180       */
10181      public /*@Nullable*/ NISuppressionSet get_ni_suppressions() {
10182        if (NIS.dkconfig_enabled && dkconfig_enabled)
10183          return (suppressions);
10184        else
10185          return (null);
10186      }
10187    
10188      /** definition of this invariant (the suppressee) **/
10189      private static NISuppressee suppressee
10190                        = new NISuppressee (LogicalOrLong_zxy.class, 3);
10191    
10192      // suppressor definitions (used below)
10193      private static NISuppressor result_eq_arg1
10194        = new NISuppressor (2, 0, IntEqual.class);
10195      private static NISuppressor result_eq_arg2
10196        = new NISuppressor (2, 1, IntEqual.class);
10197      private static NISuppressor arg1_eq_arg2
10198        = new NISuppressor (0, 1, IntEqual.class);
10199    
10200      private static NISuppressor result_lt_arg1
10201        = new NISuppressor (2, 0, IntLessThan.class);
10202      private static NISuppressor result_lt_arg2
10203        = new NISuppressor (2, 1, IntLessThan.class);
10204      private static NISuppressor arg1_lt_arg2
10205        = new NISuppressor (0, 1, IntLessThan.class);
10206      private static NISuppressor arg2_lt_arg1
10207        = new NISuppressor (1, 0, IntLessThan.class);
10208    
10209      private static NISuppressor result_le_arg1
10210        = new NISuppressor (2, 0, IntLessEqual.class);
10211      private static NISuppressor result_le_arg2
10212        = new NISuppressor (2, 1, IntLessEqual.class);
10213      private static NISuppressor arg1_le_arg2
10214        = new NISuppressor (0, 1, IntLessEqual.class);
10215      private static NISuppressor arg2_le_arg1
10216        = new NISuppressor (1, 0, IntLessEqual.class);
10217    
10218      private static NISuppressor result_track0_arg1
10219        = new NISuppressor (2, 0, NumericInt.ZeroTrack.class);
10220      private static NISuppressor result_track0_arg2
10221        = new NISuppressor (2, 1, NumericInt.ZeroTrack.class);
10222      private static NISuppressor arg1_track0_arg2
10223        = new NISuppressor (0, 1, NumericInt.ZeroTrack.class);
10224      private static NISuppressor arg1_track0_result
10225        = new NISuppressor (0, 2, NumericInt.ZeroTrack.class);
10226      private static NISuppressor arg2_track0_result
10227        = new NISuppressor (1, 2, NumericInt.ZeroTrack.class);
10228      private static NISuppressor arg2_track0_arg1
10229        = new NISuppressor (1, 0, NumericInt.ZeroTrack.class);
10230    
10231      private static NISuppressor result_eq_1
10232        = new NISuppressor(2, RangeInt.EqualOne.class);
10233      private static NISuppressor arg1_eq_1
10234        = new NISuppressor (0, RangeInt.EqualOne.class);
10235      private static NISuppressor arg2_eq_1
10236        = new NISuppressor (1, RangeInt.EqualOne.class);
10237    
10238      private static NISuppressor result_eq_0
10239        = new NISuppressor(2,RangeInt.EqualZero.class);
10240      private static NISuppressor arg1_eq_0
10241        = new NISuppressor (0, RangeInt.EqualZero.class);
10242      private static NISuppressor arg2_eq_0
10243        = new NISuppressor (1, RangeInt.EqualZero.class);
10244    
10245      private static NISuppressor result_ne_0
10246        = new NISuppressor (2, NonZero.class);
10247      private static NISuppressor arg1_ne_0
10248        = new NISuppressor (0, NonZero.class);
10249      private static NISuppressor arg2_ne_0
10250        = new NISuppressor (1, NonZero.class);
10251    
10252      private static NISuppressor result_ge_0
10253        = new NISuppressor (2, RangeInt.GreaterEqualZero.class);
10254      private static NISuppressor arg1_ge_0
10255        = new NISuppressor (0, RangeInt.GreaterEqualZero.class);
10256      private static NISuppressor arg2_ge_0
10257        = new NISuppressor (1, RangeInt.GreaterEqualZero.class);
10258    
10259      private static NISuppressor result_ge_64
10260        = new NISuppressor (2, RangeInt.GreaterEqual64.class);
10261      private static NISuppressor arg1_ge_64
10262        = new NISuppressor (0, RangeInt.GreaterEqual64.class);
10263      private static NISuppressor arg2_ge_64
10264        = new NISuppressor (1, RangeInt.GreaterEqual64.class);
10265    
10266      private static NISuppressor result_boolean
10267        = new NISuppressor(2,RangeInt.BooleanVal.class);
10268      private static NISuppressor arg1_boolean
10269        = new NISuppressor (0, RangeInt.BooleanVal.class);
10270      private static NISuppressor arg2_boolean
10271        = new NISuppressor (1, RangeInt.BooleanVal.class);
10272    
10273      private static NISuppressor result_even
10274        = new NISuppressor (2, RangeInt.Even.class);
10275      private static NISuppressor arg1_even
10276        = new NISuppressor (0, RangeInt.Even.class);
10277      private static NISuppressor arg2_even
10278        = new NISuppressor (1, RangeInt.Even.class);
10279    
10280      private static NISuppressor result_power2
10281        = new NISuppressor(2,RangeInt.PowerOfTwo.class);
10282      private static NISuppressor arg1_power2
10283        = new NISuppressor (0, RangeInt.PowerOfTwo.class);
10284      private static NISuppressor arg2_power2
10285        = new NISuppressor (1, RangeInt.PowerOfTwo.class);
10286    
10287      private static NISuppressor result_and0_arg1
10288        = new NISuppressor (2, 0, NumericInt.BitwiseAndZero.class);
10289      private static NISuppressor result_and0_arg2
10290        = new NISuppressor (2, 1, NumericInt.BitwiseAndZero.class);
10291      private static NISuppressor arg1_and0_arg2
10292        = new NISuppressor (0, 1, NumericInt.BitwiseAndZero.class);
10293    
10294      // The arguments to bitwise subset are backwards from what one
10295      // might expect.  The second argument is a subset of the first
10296      // argument
10297      private static NISuppressor arg1_bw_subset_arg2
10298        = new NISuppressor (1, 0, NumericInt.BitwiseSubset.class);
10299      private static NISuppressor arg2_bw_subset_arg1
10300        = new NISuppressor (0, 1, NumericInt.BitwiseSubset.class);
10301    
10302      private static NISuppressor result_shift0_arg1
10303        = new NISuppressor (2, 0, NumericInt.ShiftZero.class);
10304      private static NISuppressor result_shift0_arg2
10305        = new NISuppressor (2, 1, NumericInt.ShiftZero.class);
10306      private static NISuppressor arg1_shift0_arg2
10307        = new NISuppressor (0, 1, NumericInt.ShiftZero.class);
10308    
10309      private static NISuppressor arg2_divides_arg1
10310        = new NISuppressor (0, 1, NumericInt.Divides.class);
10311      private static NISuppressor arg1_divides_arg2
10312        = new NISuppressor (1, 0, NumericInt.Divides.class);
10313    
10314      private static NISuppressor arg2_valid_shift
10315        = new NISuppressor (1, RangeInt.Bound0_63.class);
10316    
10317        private static NISuppressionSet suppressions
10318          = new NISuppressionSet (new NISuppression[] {
10319    
10320            // Note that
10321            // x == y && y == z does NOT imply x == z because of possibly
10322            // missing values.  For example:
10323            //
10324            //  Sample    X         Y           Z
10325            //    1       1         1           missing
10326            //    2       0         missing     1
10327            //    3       missing   0           0
10328            //
10329            //  The best solution seems to be to include all three
10330            //  equalities for the suppression
10331    
10332            // (r == x) && (x == y) && (r == y) && (r is boolean)
10333            //    ==> r = x | y
10334            new NISuppression (result_eq_arg1, arg1_eq_arg2, result_eq_arg2,
10335                               result_boolean, suppressee),
10336    
10337            // (r == x) && (y == 0) && (r is boolean) ==> r = x | y
10338            new NISuppression (result_eq_arg1, result_boolean, arg2_eq_0,
10339                               suppressee),
10340    
10341            // (r == y) && (x == 0) && (r is boolean) ==> r = x | y
10342            new NISuppression (result_eq_arg2, result_boolean, arg1_eq_0,
10343                               suppressee),
10344    
10345            // (r == 1) && (x == 1) && (y boolean)
10346            new NISuppression (result_eq_1, arg1_eq_1, arg2_boolean, suppressee),
10347    
10348            // (r == 1) && (y == 1) && (x boolean)
10349            new NISuppression (result_eq_1, arg2_eq_1, arg1_boolean, suppressee),
10350    
10351          });
10352    
10353      // Create a suppression factory for functionBinary
10354    
10355    }
10356    
10357      // "define" EQUALITY_SUPPRESS 1
10358    
10359      // default is that it is not this function, overriden in the subclass
10360      public boolean isGcd () {
10361        return (false);
10362      }
10363    
10364    /**
10365     * Represents the invariant <samp>x = Gcd (y, z)</samp>
10366     * over three long scalars.
10367     */
10368    public static class GcdLong_xyz extends FunctionBinary {
10369      // We are Serializable, so we specify a version to allow changes to
10370      // method signatures without breaking serialization.  If you add or
10371      // remove fields, you should change this number to the current date.
10372      static final long serialVersionUID = 20031030L;
10373    
10374      private static /*@Prototype*/ GcdLong_xyz proto;
10375    
10376      /** Returns the prototype invariant for GcdLong_xyz **/
10377      public static /*@Prototype*/ GcdLong_xyz get_proto() {
10378        if (proto == null)
10379          proto = new /*@Prototype*/ GcdLong_xyz ();
10380        return (proto);
10381      }
10382    
10383      /** instantiate an invariant on the specified slice **/
10384      protected GcdLong_xyz instantiate_dyn (PptSlice slice) /*@Prototype*/ {
10385        return new GcdLong_xyz (slice);
10386      }
10387    
10388      private GcdLong_xyz (PptSlice slice) {
10389        super (slice);
10390      }
10391    
10392      public GcdLong_xyz () /*@Prototype*/ {
10393        super ();
10394      }
10395    
10396      private static String[] method_name = new String[] {"plume.MathMDE.gcd(", ", ", ")"};
10397    
10398      public String[] get_method_name () {
10399        return (method_name);
10400      }
10401    
10402      private static int function_id = -1;
10403    
10404      public int get_function_id() {
10405        return (function_id);
10406      }
10407    
10408      public void set_function_id (int function_id) {
10409        assert GcdLong_xyz.function_id == -1;
10410        GcdLong_xyz.function_id = function_id;
10411      }
10412    
10413      private static int var_order = 1;
10414    
10415      public int get_var_order() {
10416        return var_order;
10417      }
10418    
10419      public boolean is_symmetric() {
10420    
10421          return (true);
10422      }
10423    
10424      public long func (long y, long z) {
10425    
10426        return (MathMDE.gcd (y, z));
10427      }
10428    
10429      public InvariantStatus check_modified(long x, long y,
10430                                          long z, int count) {
10431        return (check_ordered (x, y, z, count));
10432      }
10433    
10434      public InvariantStatus add_modified(long x, long y,
10435                                          long z, int count) {
10436        if (Debug.logDetail())
10437          log (Fmt.spf ("result=%s, arg1=%s, arg2=%s", "" + x, "" + y,
10438                        "" + z));
10439        return (add_ordered (x, y, z, count));
10440      }
10441    
10442      public boolean isGcd() {
10443        return (true);
10444      }
10445    
10446      /**
10447       * Returns a list of non-instantiating suppressions for this invariant.
10448       */
10449      public /*@Nullable*/ NISuppressionSet get_ni_suppressions() {
10450        if (NIS.dkconfig_enabled && dkconfig_enabled)
10451          return (suppressions);
10452        else
10453          return (null);
10454      }
10455    
10456      /** definition of this invariant (the suppressee) **/
10457      private static NISuppressee suppressee
10458                        = new NISuppressee (GcdLong_xyz.class, 3);
10459    
10460      // suppressor definitions (used below)
10461      private static NISuppressor result_eq_arg1
10462        = new NISuppressor (0, 1, IntEqual.class);
10463      private static NISuppressor result_eq_arg2
10464        = new NISuppressor (0, 2, IntEqual.class);
10465      private static NISuppressor arg1_eq_arg2
10466        = new NISuppressor (1, 2, IntEqual.class);
10467    
10468      private static NISuppressor result_lt_arg1
10469        = new NISuppressor (0, 1, IntLessThan.class);
10470      private static NISuppressor result_lt_arg2
10471        = new NISuppressor (0, 2, IntLessThan.class);
10472      private static NISuppressor arg1_lt_arg2
10473        = new NISuppressor (1, 2, IntLessThan.class);
10474      private static NISuppressor arg2_lt_arg1
10475        = new NISuppressor (2, 1, IntLessThan.class);
10476    
10477      private static NISuppressor result_le_arg1
10478        = new NISuppressor (0, 1, IntLessEqual.class);
10479      private static NISuppressor result_le_arg2
10480        = new NISuppressor (0, 2, IntLessEqual.class);
10481      private static NISuppressor arg1_le_arg2
10482        = new NISuppressor (1, 2, IntLessEqual.class);
10483      private static NISuppressor arg2_le_arg1
10484        = new NISuppressor (2, 1, IntLessEqual.class);
10485    
10486      private static NISuppressor result_track0_arg1
10487        = new NISuppressor (0, 1, NumericInt.ZeroTrack.class);
10488      private static NISuppressor result_track0_arg2
10489        = new NISuppressor (0, 2, NumericInt.ZeroTrack.class);
10490      private static NISuppressor arg1_track0_arg2
10491        = new NISuppressor (1, 2, NumericInt.ZeroTrack.class);
10492      private static NISuppressor arg1_track0_result
10493        = new NISuppressor (1, 0, NumericInt.ZeroTrack.class);
10494      private static NISuppressor arg2_track0_result
10495        = new NISuppressor (2, 0, NumericInt.ZeroTrack.class);
10496      private static NISuppressor arg2_track0_arg1
10497        = new NISuppressor (2, 1, NumericInt.ZeroTrack.class);
10498    
10499      private static NISuppressor result_eq_1
10500        = new NISuppressor(0, RangeInt.EqualOne.class);
10501      private static NISuppressor arg1_eq_1
10502        = new NISuppressor (1, RangeInt.EqualOne.class);
10503      private static NISuppressor arg2_eq_1
10504        = new NISuppressor (2, RangeInt.EqualOne.class);
10505    
10506      private static NISuppressor result_eq_0
10507        = new NISuppressor(0,RangeInt.EqualZero.class);
10508      private static NISuppressor arg1_eq_0
10509        = new NISuppressor (1, RangeInt.EqualZero.class);
10510      private static NISuppressor arg2_eq_0
10511        = new NISuppressor (2, RangeInt.EqualZero.class);
10512    
10513      private static NISuppressor result_ne_0
10514        = new NISuppressor (0, NonZero.class);
10515      private static NISuppressor arg1_ne_0
10516        = new NISuppressor (1, NonZero.class);
10517      private static NISuppressor arg2_ne_0
10518        = new NISuppressor (2, NonZero.class);
10519    
10520      private static NISuppressor result_ge_0
10521        = new NISuppressor (0, RangeInt.GreaterEqualZero.class);
10522      private static NISuppressor arg1_ge_0
10523        = new NISuppressor (1, RangeInt.GreaterEqualZero.class);
10524      private static NISuppressor arg2_ge_0
10525        = new NISuppressor (2, RangeInt.GreaterEqualZero.class);
10526    
10527      private static NISuppressor result_ge_64
10528        = new NISuppressor (0, RangeInt.GreaterEqual64.class);
10529      private static NISuppressor arg1_ge_64
10530        = new NISuppressor (1, RangeInt.GreaterEqual64.class);
10531      private static NISuppressor arg2_ge_64
10532        = new NISuppressor (2, RangeInt.GreaterEqual64.class);
10533    
10534      private static NISuppressor result_boolean
10535        = new NISuppressor(0,RangeInt.BooleanVal.class);
10536      private static NISuppressor arg1_boolean
10537        = new NISuppressor (1, RangeInt.BooleanVal.class);
10538      private static NISuppressor arg2_boolean
10539        = new NISuppressor (2, RangeInt.BooleanVal.class);
10540    
10541      private static NISuppressor result_even
10542        = new NISuppressor (0, RangeInt.Even.class);
10543      private static NISuppressor arg1_even
10544        = new NISuppressor (1, RangeInt.Even.class);
10545      private static NISuppressor arg2_even
10546        = new NISuppressor (2, RangeInt.Even.class);
10547    
10548      private static NISuppressor result_power2
10549        = new NISuppressor(0,RangeInt.PowerOfTwo.class);
10550      private static NISuppressor arg1_power2
10551        = new NISuppressor (1, RangeInt.PowerOfTwo.class);
10552      private static NISuppressor arg2_power2
10553        = new NISuppressor (2, RangeInt.PowerOfTwo.class);
10554    
10555      private static NISuppressor result_and0_arg1
10556        = new NISuppressor (0, 1, NumericInt.BitwiseAndZero.class);
10557      private static NISuppressor result_and0_arg2
10558        = new NISuppressor (0, 2, NumericInt.BitwiseAndZero.class);
10559      private static NISuppressor arg1_and0_arg2
10560        = new NISuppressor (1, 2, NumericInt.BitwiseAndZero.class);
10561    
10562      // The arguments to bitwise subset are backwards from what one
10563      // might expect.  The second argument is a subset of the first
10564      // argument
10565      private static NISuppressor arg1_bw_subset_arg2
10566        = new NISuppressor (2, 1, NumericInt.BitwiseSubset.class);
10567      private static NISuppressor arg2_bw_subset_arg1
10568        = new NISuppressor (1, 2, NumericInt.BitwiseSubset.class);
10569    
10570      private static NISuppressor result_shift0_arg1
10571        = new NISuppressor (0, 1, NumericInt.ShiftZero.class);
10572      private static NISuppressor result_shift0_arg2
10573        = new NISuppressor (0, 2, NumericInt.ShiftZero.class);
10574      private static NISuppressor arg1_shift0_arg2
10575        = new NISuppressor (1, 2, NumericInt.ShiftZero.class);
10576    
10577      private static NISuppressor arg2_divides_arg1
10578        = new NISuppressor (1, 2, NumericInt.Divides.class);
10579      private static NISuppressor arg1_divides_arg2
10580        = new NISuppressor (2, 1, NumericInt.Divides.class);
10581    
10582      private static NISuppressor arg2_valid_shift
10583        = new NISuppressor (2, RangeInt.Bound0_63.class);
10584    
10585        // gcd (0, y) == y
10586        // gcd (0, 0) == 0
10587        // gcd (1, y) == 1
10588    
10589        private static NISuppressionSet suppressions
10590          = new NISuppressionSet (new NISuppression[] {
10591    
10592            // (r == y) && (y == z) && (r == z) && (r >= 0)
10593            //    ==> r = Gcd (y, z)
10594            new NISuppression (result_eq_arg1, arg1_eq_arg2, result_eq_arg2,
10595                               result_ge_0, suppressee),
10596    
10597            // (r == y) && (z == 0) && (r >= 0) ==> r = gcd (y,z)
10598            new NISuppression (result_eq_arg1, result_ge_0, arg2_eq_0, suppressee),
10599    
10600            // (r == z) && (y == 0) && (r >= 0) ==> r = gcd (y,z)
10601            new NISuppression (result_eq_arg2, result_ge_0, arg1_eq_0, suppressee),
10602    
10603            // (r == 1) && (z == 1)        ==> r = gcd (y, art2)
10604            new NISuppression (result_eq_1, arg2_eq_1, suppressee),
10605    
10606            // (r == 1) && (y == 1)        ==> r = gcd (y, art2)
10607            new NISuppression (result_eq_1, arg1_eq_1, suppressee),
10608    
10609            // (r == y) && (y divides z) && (r >= 0)
10610            new NISuppression (result_eq_arg1, arg1_divides_arg2, result_ge_0, suppressee),
10611    
10612            // (r == z) && (z divides y) && (r >= 0)
10613            new NISuppression (result_eq_arg2, arg2_divides_arg1, result_ge_0, suppressee),
10614    
10615            // (r == z) && (z boolean) && (z==0 ==> y==0)
10616            // 0 = gcd (y, 0) true when (y == 0)
10617            // 1 = gcd (y, 1) always true
10618            new NISuppression (result_eq_arg2, arg2_track0_arg1, arg2_boolean,
10619                               suppressee),
10620    
10621            // (r == y) && (y boolean) && (y==0 ==> z==0)
10622            // 0 = gcd (0, z), true if (z == 0)
10623            // 1 = gcd (1, z), always true
10624            new NISuppression (result_eq_arg1, arg1_boolean, arg1_track0_arg2,
10625                               suppressee),
10626    
10627          });
10628    
10629      // Create a suppression factory for functionBinary
10630    
10631    }
10632    
10633    /**
10634     * Represents the invariant <samp>y = Gcd (x, z)</samp>
10635     * over three long scalars.
10636     */
10637    public static class GcdLong_yxz extends FunctionBinary {
10638      // We are Serializable, so we specify a version to allow changes to
10639      // method signatures without breaking serialization.  If you add or
10640      // remove fields, you should change this number to the current date.
10641      static final long serialVersionUID = 20031030L;
10642    
10643      private static /*@Prototype*/ GcdLong_yxz proto;
10644    
10645      /** Returns the prototype invariant for GcdLong_yxz **/
10646      public static /*@Prototype*/ GcdLong_yxz get_proto() {
10647        if (proto == null)
10648          proto = new /*@Prototype*/ GcdLong_yxz ();
10649        return (proto);
10650      }
10651    
10652      /** instantiate an invariant on the specified slice **/
10653      protected GcdLong_yxz instantiate_dyn (PptSlice slice) /*@Prototype*/ {
10654        return new GcdLong_yxz (slice);
10655      }
10656    
10657      private GcdLong_yxz (PptSlice slice) {
10658        super (slice);
10659      }
10660    
10661      public GcdLong_yxz () /*@Prototype*/ {
10662        super ();
10663      }
10664    
10665      private static String[] method_name = new String[] {"plume.MathMDE.gcd(", ", ", ")"};
10666    
10667      public String[] get_method_name () {
10668        return (method_name);
10669      }
10670    
10671      private static int function_id = -1;
10672    
10673      public int get_function_id() {
10674        return (function_id);
10675      }
10676    
10677      public void set_function_id (int function_id) {
10678        assert GcdLong_yxz.function_id == -1;
10679        GcdLong_yxz.function_id = function_id;
10680      }
10681    
10682      private static int var_order = 2;
10683    
10684      public int get_var_order() {
10685        return var_order;
10686      }
10687    
10688      public boolean is_symmetric() {
10689    
10690          return (true);
10691      }
10692    
10693      public long func (long x, long z) {
10694    
10695        return (MathMDE.gcd (x, z));
10696      }
10697    
10698      public InvariantStatus check_modified(long x, long y,
10699                                          long z, int count) {
10700        return (check_ordered (y, x, z, count));
10701      }
10702    
10703      public InvariantStatus add_modified(long x, long y,
10704                                          long z, int count) {
10705        if (Debug.logDetail())
10706          log (Fmt.spf ("result=%s, arg1=%s, arg2=%s", "" + y, "" + x,
10707                        "" + z));
10708        return (add_ordered (y, x, z, count));
10709      }
10710    
10711      public boolean isGcd() {
10712        return (true);
10713      }
10714    
10715      /**
10716       * Returns a list of non-instantiating suppressions for this invariant.
10717       */
10718      public /*@Nullable*/ NISuppressionSet get_ni_suppressions() {
10719        if (NIS.dkconfig_enabled && dkconfig_enabled)
10720          return (suppressions);
10721        else
10722          return (null);
10723      }
10724    
10725      /** definition of this invariant (the suppressee) **/
10726      private static NISuppressee suppressee
10727                        = new NISuppressee (GcdLong_yxz.class, 3);
10728    
10729      // suppressor definitions (used below)
10730      private static NISuppressor result_eq_arg1
10731        = new NISuppressor (1, 0, IntEqual.class);
10732      private static NISuppressor result_eq_arg2
10733        = new NISuppressor (1, 2, IntEqual.class);
10734      private static NISuppressor arg1_eq_arg2
10735        = new NISuppressor (0, 2, IntEqual.class);
10736    
10737      private static NISuppressor result_lt_arg1
10738        = new NISuppressor (1, 0, IntLessThan.class);
10739      private static NISuppressor result_lt_arg2
10740        = new NISuppressor (1, 2, IntLessThan.class);
10741      private static NISuppressor arg1_lt_arg2
10742        = new NISuppressor (0, 2, IntLessThan.class);
10743      private static NISuppressor arg2_lt_arg1
10744        = new NISuppressor (2, 0, IntLessThan.class);
10745    
10746      private static NISuppressor result_le_arg1
10747        = new NISuppressor (1, 0, IntLessEqual.class);
10748      private static NISuppressor result_le_arg2
10749        = new NISuppressor (1, 2, IntLessEqual.class);
10750      private static NISuppressor arg1_le_arg2
10751        = new NISuppressor (0, 2, IntLessEqual.class);
10752      private static NISuppressor arg2_le_arg1
10753        = new NISuppressor (2, 0, IntLessEqual.class);
10754    
10755      private static NISuppressor result_track0_arg1
10756        = new NISuppressor (1, 0, NumericInt.ZeroTrack.class);
10757      private static NISuppressor result_track0_arg2
10758        = new NISuppressor (1, 2, NumericInt.ZeroTrack.class);
10759      private static NISuppressor arg1_track0_arg2
10760        = new NISuppressor (0, 2, NumericInt.ZeroTrack.class);
10761      private static NISuppressor arg1_track0_result
10762        = new NISuppressor (0, 1, NumericInt.ZeroTrack.class);
10763      private static NISuppressor arg2_track0_result
10764        = new NISuppressor (2, 1, NumericInt.ZeroTrack.class);
10765      private static NISuppressor arg2_track0_arg1
10766        = new NISuppressor (2, 0, NumericInt.ZeroTrack.class);
10767    
10768      private static NISuppressor result_eq_1
10769        = new NISuppressor(1, RangeInt.EqualOne.class);
10770      private static NISuppressor arg1_eq_1
10771        = new NISuppressor (0, RangeInt.EqualOne.class);
10772      private static NISuppressor arg2_eq_1
10773        = new NISuppressor (2, RangeInt.EqualOne.class);
10774    
10775      private static NISuppressor result_eq_0
10776        = new NISuppressor(1,RangeInt.EqualZero.class);
10777      private static NISuppressor arg1_eq_0
10778        = new NISuppressor (0, RangeInt.EqualZero.class);
10779      private static NISuppressor arg2_eq_0
10780        = new NISuppressor (2, RangeInt.EqualZero.class);
10781    
10782      private static NISuppressor result_ne_0
10783        = new NISuppressor (1, NonZero.class);
10784      private static NISuppressor arg1_ne_0
10785        = new NISuppressor (0, NonZero.class);
10786      private static NISuppressor arg2_ne_0
10787        = new NISuppressor (2, NonZero.class);
10788    
10789      private static NISuppressor result_ge_0
10790        = new NISuppressor (1, RangeInt.GreaterEqualZero.class);
10791      private static NISuppressor arg1_ge_0
10792        = new NISuppressor (0, RangeInt.GreaterEqualZero.class);
10793      private static NISuppressor arg2_ge_0
10794        = new NISuppressor (2, RangeInt.GreaterEqualZero.class);
10795    
10796      private static NISuppressor result_ge_64
10797        = new NISuppressor (1, RangeInt.GreaterEqual64.class);
10798      private static NISuppressor arg1_ge_64
10799        = new NISuppressor (0, RangeInt.GreaterEqual64.class);
10800      private static NISuppressor arg2_ge_64
10801        = new NISuppressor (2, RangeInt.GreaterEqual64.class);
10802    
10803      private static NISuppressor result_boolean
10804        = new NISuppressor(1,RangeInt.BooleanVal.class);
10805      private static NISuppressor arg1_boolean
10806        = new NISuppressor (0, RangeInt.BooleanVal.class);
10807      private static NISuppressor arg2_boolean
10808        = new NISuppressor (2, RangeInt.BooleanVal.class);
10809    
10810      private static NISuppressor result_even
10811        = new NISuppressor (1, RangeInt.Even.class);
10812      private static NISuppressor arg1_even
10813        = new NISuppressor (0, RangeInt.Even.class);
10814      private static NISuppressor arg2_even
10815        = new NISuppressor (2, RangeInt.Even.class);
10816    
10817      private static NISuppressor result_power2
10818        = new NISuppressor(1,RangeInt.PowerOfTwo.class);
10819      private static NISuppressor arg1_power2
10820        = new NISuppressor (0, RangeInt.PowerOfTwo.class);
10821      private static NISuppressor arg2_power2
10822        = new NISuppressor (2, RangeInt.PowerOfTwo.class);
10823    
10824      private static NISuppressor result_and0_arg1
10825        = new NISuppressor (1, 0, NumericInt.BitwiseAndZero.class);
10826      private static NISuppressor result_and0_arg2
10827        = new NISuppressor (1, 2, NumericInt.BitwiseAndZero.class);
10828      private static NISuppressor arg1_and0_arg2
10829        = new NISuppressor (0, 2, NumericInt.BitwiseAndZero.class);
10830    
10831      // The arguments to bitwise subset are backwards from what one
10832      // might expect.  The second argument is a subset of the first
10833      // argument
10834      private static NISuppressor arg1_bw_subset_arg2
10835        = new NISuppressor (2, 0, NumericInt.BitwiseSubset.class);
10836      private static NISuppressor arg2_bw_subset_arg1
10837        = new NISuppressor (0, 2, NumericInt.BitwiseSubset.class);
10838    
10839      private static NISuppressor result_shift0_arg1
10840        = new NISuppressor (1, 0, NumericInt.ShiftZero.class);
10841      private static NISuppressor result_shift0_arg2
10842        = new NISuppressor (1, 2, NumericInt.ShiftZero.class);
10843      private static NISuppressor arg1_shift0_arg2
10844        = new NISuppressor (0, 2, NumericInt.ShiftZero.class);
10845    
10846      private static NISuppressor arg2_divides_arg1
10847        = new NISuppressor (0, 2, NumericInt.Divides.class);
10848      private static NISuppressor arg1_divides_arg2
10849        = new NISuppressor (2, 0, NumericInt.Divides.class);
10850    
10851      private static NISuppressor arg2_valid_shift
10852        = new NISuppressor (2, RangeInt.Bound0_63.class);
10853    
10854        // gcd (0, y) == y
10855        // gcd (0, 0) == 0
10856        // gcd (1, y) == 1
10857    
10858        private static NISuppressionSet suppressions
10859          = new NISuppressionSet (new NISuppression[] {
10860    
10861            // (r == x) && (x == z) && (r == z) && (r >= 0)
10862            //    ==> r = Gcd (x, z)
10863            new NISuppression (result_eq_arg1, arg1_eq_arg2, result_eq_arg2,
10864                               result_ge_0, suppressee),
10865    
10866            // (r == x) && (z == 0) && (r >= 0) ==> r = gcd (x,z)
10867            new NISuppression (result_eq_arg1, result_ge_0, arg2_eq_0, suppressee),
10868    
10869            // (r == z) && (x == 0) && (r >= 0) ==> r = gcd (x,z)
10870            new NISuppression (result_eq_arg2, result_ge_0, arg1_eq_0, suppressee),
10871    
10872            // (r == 1) && (z == 1)        ==> r = gcd (x, art2)
10873            new NISuppression (result_eq_1, arg2_eq_1, suppressee),
10874    
10875            // (r == 1) && (x == 1)        ==> r = gcd (x, art2)
10876            new NISuppression (result_eq_1, arg1_eq_1, suppressee),
10877    
10878            // (r == x) && (x divides z) && (r >= 0)
10879            new NISuppression (result_eq_arg1, arg1_divides_arg2, result_ge_0, suppressee),
10880    
10881            // (r == z) && (z divides x) && (r >= 0)
10882            new NISuppression (result_eq_arg2, arg2_divides_arg1, result_ge_0, suppressee),
10883    
10884            // (r == z) && (z boolean) && (z==0 ==> x==0)
10885            // 0 = gcd (x, 0) true when (x == 0)
10886            // 1 = gcd (x, 1) always true
10887            new NISuppression (result_eq_arg2, arg2_track0_arg1, arg2_boolean,
10888                               suppressee),
10889    
10890            // (r == x) && (x boolean) && (x==0 ==> z==0)
10891            // 0 = gcd (0, z), true if (z == 0)
10892            // 1 = gcd (1, z), always true
10893            new NISuppression (result_eq_arg1, arg1_boolean, arg1_track0_arg2,
10894                               suppressee),
10895    
10896          });
10897    
10898      // Create a suppression factory for functionBinary
10899    
10900    }
10901    
10902    /**
10903     * Represents the invariant <samp>z = Gcd (x, y)</samp>
10904     * over three long scalars.
10905     */
10906    public static class GcdLong_zxy extends FunctionBinary {
10907      // We are Serializable, so we specify a version to allow changes to
10908      // method signatures without breaking serialization.  If you add or
10909      // remove fields, you should change this number to the current date.
10910      static final long serialVersionUID = 20031030L;
10911    
10912      private static /*@Prototype*/ GcdLong_zxy proto;
10913    
10914      /** Returns the prototype invariant for GcdLong_zxy **/
10915      public static /*@Prototype*/ GcdLong_zxy get_proto() {
10916        if (proto == null)
10917          proto = new /*@Prototype*/ GcdLong_zxy ();
10918        return (proto);
10919      }
10920    
10921      /** instantiate an invariant on the specified slice **/
10922      protected GcdLong_zxy instantiate_dyn (PptSlice slice) /*@Prototype*/ {
10923        return new GcdLong_zxy (slice);
10924      }
10925    
10926      private GcdLong_zxy (PptSlice slice) {
10927        super (slice);
10928      }
10929    
10930      public GcdLong_zxy () /*@Prototype*/ {
10931        super ();
10932      }
10933    
10934      private static String[] method_name = new String[] {"plume.MathMDE.gcd(", ", ", ")"};
10935    
10936      public String[] get_method_name () {
10937        return (method_name);
10938      }
10939    
10940      private static int function_id = -1;
10941    
10942      public int get_function_id() {
10943        return (function_id);
10944      }
10945    
10946      public void set_function_id (int function_id) {
10947        assert GcdLong_zxy.function_id == -1;
10948        GcdLong_zxy.function_id = function_id;
10949      }
10950    
10951      private static int var_order = 3;
10952    
10953      public int get_var_order() {
10954        return var_order;
10955      }
10956    
10957      public boolean is_symmetric() {
10958    
10959          return (true);
10960      }
10961    
10962      public long func (long x, long y) {
10963    
10964        return (MathMDE.gcd (x, y));
10965      }
10966    
10967      public InvariantStatus check_modified(long x, long y,
10968                                          long z, int count) {
10969        return (check_ordered (z, x, y, count));
10970      }
10971    
10972      public InvariantStatus add_modified(long x, long y,
10973                                          long z, int count) {
10974        if (Debug.logDetail())
10975          log (Fmt.spf ("result=%s, arg1=%s, arg2=%s", "" + z, "" + x,
10976                        "" + y));
10977        return (add_ordered (z, x, y, count));
10978      }
10979    
10980      public boolean isGcd() {
10981        return (true);
10982      }
10983    
10984      /**
10985       * Returns a list of non-instantiating suppressions for this invariant.
10986       */
10987      public /*@Nullable*/ NISuppressionSet get_ni_suppressions() {
10988        if (NIS.dkconfig_enabled && dkconfig_enabled)
10989          return (suppressions);
10990        else
10991          return (null);
10992      }
10993    
10994      /** definition of this invariant (the suppressee) **/
10995      private static NISuppressee suppressee
10996                        = new NISuppressee (GcdLong_zxy.class, 3);
10997    
10998      // suppressor definitions (used below)
10999      private static NISuppressor result_eq_arg1
11000        = new NISuppressor (2, 0, IntEqual.class);
11001      private static NISuppressor result_eq_arg2
11002        = new NISuppressor (2, 1, IntEqual.class);
11003      private static NISuppressor arg1_eq_arg2
11004        = new NISuppressor (0, 1, IntEqual.class);
11005