- ReachabilitySet rs2 = new ReachabilitySet( tts00 );
- ReachabilitySet rs3 = new ReachabilitySet( tts01 ).union( rs2 );
-
- System.out.println( "rs3 is "+rs3 );
-
- rs3 = rs3.increaseArity( new Integer( 11 ) );
- System.out.println( "rs3 is "+rs3 );
- */
-
- /*
- TokenTuple tt11 = new TokenTuple( new Integer( 1 ),
- false,
- TokenTuple.ARITY_ONE );
-
- TokenTuple tt12 = new TokenTuple( new Integer( 2 ),
- true,
- TokenTuple.ARITY_ONE );
-
- TokenTuple tt13 = new TokenTuple( new Integer( 3 ),
- true,
- TokenTuple.ARITY_MANY );
-
- TokenTuple tt14 = new TokenTuple( new Integer( 4 ),
- true,
- TokenTuple.ARITY_ONE );
-
- TokenTuple tt15 = new TokenTuple( new Integer( 5 ),
- true,
- TokenTuple.ARITY_ONE );
-
- TokenTuple tt16 = new TokenTuple( new Integer( 6 ),
- true,
- TokenTuple.ARITY_MANY );
- */
- /*
- TokenTupleSet tts10 = new TokenTupleSet();
- tts10 = tts10.add( tt11 );
- tts10 = tts10.add( tt12 );
- tts10 = tts10.add( tt13 );
- tts10 = tts10.add( tt14 );
- tts10 = tts10.add( tt15 );
- tts10 = tts10.add( tt16 );
- */
-
- /*
- TokenTuple tt21 = new TokenTuple( new Integer( 1 ),
- false,
- TokenTuple.ARITY_ONE );
-
- TokenTuple tt22 = new TokenTuple( new Integer( 5 ),
- true,
- TokenTuple.ARITY_ONE );
-
- TokenTuple tt23 = new TokenTuple( new Integer( 3 ),
- true,
- TokenTuple.ARITY_ONE );
-
- TokenTuple tt24 = new TokenTuple( new Integer( 6 ),
- true,
- TokenTuple.ARITY_MANY );
-
- TokenTuple tt25 = new TokenTuple( new Integer( 7 ),
- true,
- TokenTuple.ARITY_ONE );
-
- TokenTuple tt26 = new TokenTuple( new Integer( 8 ),
- true,
- TokenTuple.ARITY_MANY );
- */
- /*
- TokenTupleSet tts20 = new TokenTupleSet();
- tts20 = tts20.add( tt21 );
- tts20 = tts20.add( tt22 );
- tts20 = tts20.add( tt23 );
- tts20 = tts20.add( tt24 );
- tts20 = tts20.add( tt25 );
- tts20 = tts20.add( tt26 );
-
- TokenTupleSet tts30 = tts10.unionUpArity( tts20 );
-
- System.out.println( "tts10 is "+tts10 );
- System.out.println( "tts20 is "+tts20 );
- System.out.println( "" );
- System.out.println( "tts30 is "+tts30 );
- */
- /*
- TokenTupleSet tts40 = new TokenTupleSet();
- tts40 = tts40.add( tt21 );
- tts40 = tts40.add( tt23 );
-
- TokenTupleSet tts50 = new TokenTupleSet();
- tts50 = tts50.add( tt21 );
- tts50 = tts50.add( tt23 );
- tts50 = tts50.add( tt22 );
-
- TokenTupleSet tts60 = new TokenTupleSet();
- tts60 = tts60.add( tt21 );
- tts60 = tts60.add( tt24 );
-
- TokenTupleSet tts70 = new TokenTupleSet();
- tts70 = tts70.add( tt11 );
- tts70 = tts70.add( tt13 );
- tts70 = tts70.add( tt12 );
-
- TokenTupleSet tts71 = new TokenTupleSet();
- tts71 = tts71.add( tt13 );
- tts71 = tts71.add( tt11 );
- tts71 = tts71.add( tt15 );
-
- TokenTupleSet tts72 = new TokenTupleSet();
- tts72 = tts72.add( tt11 );
- tts72 = tts72.add( tt16 );
-
- TokenTupleSet tts73 = new TokenTupleSet();
- tts73 = tts73.add( tt12 );
-
- ReachabilitySet rs40 = new ReachabilitySet();
- rs40 = rs40.add( tts40 );
- rs40 = rs40.add( tts50 );
- rs40 = rs40.add( tts60 );
-
- ReachabilitySet rs50 = new ReachabilitySet();
- rs50 = rs50.add( tts70 );
- rs50 = rs50.add( tts71 );
- rs50 = rs50.add( tts72 );
- rs50 = rs50.add( tts73 );
-
- ReachabilitySet rs60 = rs50.unionUpArity( rs40 );
-
- System.out.println( "rs40 is "+rs40 );
- System.out.println( "rs50 is "+rs50 );
- System.out.println( "" );
- System.out.println( "rs60 is "+rs60 );
- */
+
+ TokenTuple tt0b = new TokenTuple( new Integer( 100 ), true, TokenTuple.ARITY_MANY ).makeCanonical();
+ TokenTuple tt1b = new TokenTuple( new Integer( 101 ), true, TokenTuple.ARITY_MANY ).makeCanonical();
+
+ TokenTupleSet tts01b28 = new TokenTupleSet().add( tt1b ).add( tt0 ).add( tt2 ).add( tt8 );
+ TokenTupleSet tts0b148 = new TokenTupleSet().add( tt0b ).add( tt1 ).add( tt4 ).add( tt8 );
+ TokenTupleSet tts0b1b = new TokenTupleSet().add( tt1b ).add( tt0b );
+ TokenTupleSet tts1278b = new TokenTupleSet().add( tt1 ).add( tt7 ).add( tt2 ).add( tt8b );
+ TokenTupleSet tts0478b = new TokenTupleSet().add( tt0 ).add( tt7 ).add( tt4 ).add( tt8b );
+ TokenTupleSet tts1078 = new TokenTupleSet().add( tt1 ).add( tt7 ).add( tt0 ).add( tt8 );
+
+ ChangeTuple ct0 = new ChangeTuple( tts01, tts01b28 );
+ ChangeTuple ct1 = new ChangeTuple( tts01, tts0b148 );
+ ChangeTuple ct2 = new ChangeTuple( tts01, tts0b1b );
+ ChangeTuple ct3 = new ChangeTuple( tts87, tts1278b );
+ ChangeTuple ct4 = new ChangeTuple( tts87, tts0478b );
+ ChangeTuple ct5 = new ChangeTuple( tts87, tts1078 );
+
+ ChangeTupleSet cts1
+ = new ChangeTupleSet( ct0 ).union( ct1 ).union( ct2 ).union( ct3 ).union( ct4 ).union( ct5 );
+
+ test( "cts1.equals( cts0 )?", true, cts1.equals( cts0 ) );
+ test( "cts1 == cts0?", true, cts1 == cts0 );
+ test( "cts1.hashCode() == cts0.hashCode()?", true, cts1.hashCode() == cts0.hashCode() );
+