1414import de .uka .ilkd .key .logic .JavaBlock ;
1515import de .uka .ilkd .key .logic .op .*;
1616import de .uka .ilkd .key .rule .inst .SVInstantiations ;
17+ import de .uka .ilkd .key .rule .tacletbuilder .AntecSuccTacletGoalTemplate ;
18+ import de .uka .ilkd .key .rule .tacletbuilder .RewriteTacletGoalTemplate ;
1719
1820import org .key_project .logic .op .Operator ;
1921import org .key_project .logic .sort .Sort ;
2022import org .key_project .prover .rules .RuleApp ;
2123import org .key_project .prover .rules .instantiation .AssumesFormulaInstantiation ;
24+ import org .key_project .prover .rules .tacletbuilder .TacletGoalTemplate ;
2225import org .key_project .prover .sequent .PosInOccurrence ;
26+ import org .key_project .prover .sequent .Semisequent ;
2327import org .key_project .prover .sequent .Sequent ;
2428import org .key_project .prover .sequent .SequentFormula ;
2529import org .key_project .util .EqualsModProofIrrelevancyUtil ;
@@ -286,9 +290,7 @@ public static int hashCodeModProofIrrelevancy(JavaBlock jb) {
286290 * @param that the second SequentFormula
287291 * @return true if both arguments are equal modulo proof irrelevancy
288292 */
289- public static boolean equalsModProofIrrelevancy (
290- SequentFormula _this ,
291- SequentFormula that ) {
293+ public static boolean equalsModProofIrrelevancy (SequentFormula _this , SequentFormula that ) {
292294 if (_this == that ) {
293295 return true ;
294296 }
@@ -306,11 +308,70 @@ public static boolean equalsModProofIrrelevancy(
306308 * @param sf the {@link SequentFormula} for which to compute the hash
307309 * @return the hash code modulo proof irrelevancy for the given argument
308310 */
309- public static int hashCodeModProofIrrelevancy (
310- SequentFormula sf ) {
311+ public static int hashCodeModProofIrrelevancy (SequentFormula sf ) {
311312 return PROOF_IRRELEVANCY_PROPERTY .hashCodeModThisProperty ((JTerm ) sf .formula ());
312313 }
313314
315+ // Sequent
316+
317+ /**
318+ * test for equality modulo proof irrelevancy for the given arguments
319+ *
320+ * @param _this the first Sequent
321+ * @param that the second Sequent
322+ * @return true if both arguments are equal modulo proof irrelevancy
323+ */
324+ public static boolean equalsModProofIrrelevancy (Sequent _this , Sequent that ) {
325+ if (_this == that ) {
326+ return true ;
327+ } else if (_this == null || that == null ) {
328+ return false ;
329+ }
330+ return equalsModProofIrrelevancy (_this .antecedent (), that .antecedent ())
331+ && equalsModProofIrrelevancy (_this .succedent (), that .succedent ());
332+ }
333+
334+ /**
335+ * computes the hash code modulo proof irrelevancy for the given argument
336+ *
337+ * @param sequent the {@link Sequent} for which to compute the hash
338+ * @return the hash code modulo proof irrelevancy for the given argument
339+ */
340+ public static int hashCodeModProofIrrelevancy (Sequent sequent ) {
341+ return Objects .hash (hashCodeModProofIrrelevancy (sequent .antecedent ()),
342+ hashCodeModProofIrrelevancy (sequent .succedent ()));
343+ }
344+
345+ // Semisequent
346+
347+ /**
348+ * test for equality modulo proof irrelevancy for the given arguments
349+ *
350+ * @param _this the first Semisequent
351+ * @param that the second Semisequent
352+ * @return true if both arguments are equal modulo proof irrelevancy
353+ */
354+ public static boolean equalsModProofIrrelevancy (Semisequent _this , Semisequent that ) {
355+ if (_this == that ) {
356+ return true ;
357+ } else if (_this == null || that == null ) {
358+ return false ;
359+ }
360+ return EqualsModProofIrrelevancyUtil .compareImmutableLists (_this .asList (), that .asList (),
361+ EqualityModuloProofIrrelevancy ::equalsModProofIrrelevancy );
362+ }
363+
364+ /**
365+ * computes the hash code modulo proof irrelevancy for the given argument
366+ *
367+ * @param semi the {@link Semisequent} for which to compute the hash
368+ * @return the hash code modulo proof irrelevancy for the given argument
369+ */
370+ public static int hashCodeModProofIrrelevancy (Semisequent semi ) {
371+ return EqualsModProofIrrelevancyUtil .hashCodeIterable (semi .asList (),
372+ EqualityModuloProofIrrelevancy ::hashCodeModProofIrrelevancy );
373+ }
374+
314375 // RuleApp
315376
316377 /**
@@ -412,7 +473,8 @@ public static int hashCodeModProofIrrelevancy(IBuiltInRuleApp ruleApp) {
412473 * @param that the second Taclet
413474 * @return true if both arguments are equal modulo proof irrelevancy
414475 */
415- public static boolean equalsModProofIrrelevancy (Taclet _this , Taclet that ) {
476+ public static boolean equalsModProofIrrelevancy (org .key_project .prover .rules .Taclet _this ,
477+ org .key_project .prover .rules .Taclet that ) {
416478 if (that == _this )
417479 return true ;
418480
@@ -442,16 +504,17 @@ && equalsModProofIrrelevancy(if1.head(), if2.head())) {
442504 return false ;
443505 }
444506
445- return _this .goalTemplates ().equals (that .goalTemplates ());
507+ return EqualsModProofIrrelevancyUtil .compareImmutableLists (_this .goalTemplates (),
508+ that .goalTemplates (), EqualityModuloProofIrrelevancy ::equalsModProofIrrelevancy );
446509 }
447510
448511 /**
449512 * computes the hash code modulo proof irrelevancy for the given argument
450513 *
451- * @param taclet the {@link Taclet} for which to compute the hash
514+ * @param taclet the Taclet for which to compute the hash
452515 * @return the hash code modulo proof irrelevancy for the given argument
453516 */
454- public static int hashCodeModProofIrrelevancy (Taclet taclet ) {
517+ public static int hashCodeModProofIrrelevancy (org . key_project . prover . rules . Taclet taclet ) {
455518 Sequent sequentFormulas = taclet .assumesSequent ();
456519 return hashCodeModProofIrrelevancy (sequentFormulas .getFormulaByNr (1 ));
457520 }
@@ -508,6 +571,102 @@ public static int hashCodeModProofIrrelevancy(TacletApp app) {
508571 app .rule ());
509572 }
510573
574+ // TacletGoalTemplate
575+
576+ /**
577+ * test for equality modulo proof irrelevancy for the given arguments
578+ *
579+ * @param _this the first TacletGoalTemplate
580+ * @param that the second TacletGoalTemplate
581+ * @return true if both arguments are equal modulo proof irrelevancy
582+ */
583+ public static boolean equalsModProofIrrelevancy (TacletGoalTemplate _this ,
584+ TacletGoalTemplate that ) {
585+ if (_this == that ) {
586+ return true ;
587+ } else if (_this == null || that == null ) {
588+ return false ;
589+ }
590+ return equalsModProofIrrelevancy (_this .sequent (), that .sequent ())
591+ && EqualsModProofIrrelevancyUtil .compareImmutableLists (_this .rules (), that .rules (),
592+ EqualityModuloProofIrrelevancy ::equalsModProofIrrelevancy );
593+ }
594+
595+ /**
596+ * computes the hash code modulo proof irrelevancy for the given argument
597+ *
598+ * @param t the {@link TacletGoalTemplate} for which to compute the hash
599+ * @return the hash code modulo proof irrelevancy for the given argument
600+ */
601+ public static int hashCodeModProofIrrelevancy (TacletGoalTemplate t ) {
602+ return Objects .hash (hashCodeModProofIrrelevancy (t .sequent ()),
603+ EqualsModProofIrrelevancyUtil .hashCodeImmutableList (t .rules (),
604+ EqualityModuloProofIrrelevancy ::hashCodeModProofIrrelevancy ));
605+ }
606+
607+ // AntecSuccTacletGoalTemplate
608+
609+ /**
610+ * test for equality modulo proof irrelevancy for the given arguments
611+ *
612+ * @param _this the first AntecSuccTacletGoalTemplate
613+ * @param that the second AntecSuccTacletGoalTemplate
614+ * @return true if both arguments are equal modulo proof irrelevancy
615+ */
616+ public static boolean equalsModProofIrrelevancy (AntecSuccTacletGoalTemplate _this ,
617+ AntecSuccTacletGoalTemplate that ) {
618+ if (_this == that ) {
619+ return true ;
620+ } else if (_this == null || that == null ) {
621+ return false ;
622+ }
623+ return equalsModProofIrrelevancy ((TacletGoalTemplate ) _this , (TacletGoalTemplate ) that )
624+ && equalsModProofIrrelevancy (_this .replaceWith (), that .replaceWith ());
625+ }
626+
627+ /**
628+ * computes the hash code modulo proof irrelevancy for the given argument
629+ *
630+ * @param t the {@link AntecSuccTacletGoalTemplate} for which to compute the hash
631+ * @return the hash code modulo proof irrelevancy for the given argument
632+ */
633+ public static int hashCodeModProofIrrelevancy (AntecSuccTacletGoalTemplate t ) {
634+ return Objects .hash (hashCodeModProofIrrelevancy ((TacletGoalTemplate ) t ),
635+ hashCodeModProofIrrelevancy (t .replaceWith ()));
636+ }
637+
638+ // RewriteTacletGoalTemplate
639+
640+ /**
641+ * test for equality modulo proof irrelevancy for the given arguments
642+ *
643+ * @param _this the first RewriteTacletGoalTemplate
644+ * @param that the second RewriteTacletGoalTemplate
645+ * @return true if both arguments are equal modulo proof irrelevancy
646+ */
647+ public static boolean equalsModProofIrrelevancy (RewriteTacletGoalTemplate _this ,
648+ RewriteTacletGoalTemplate that ) {
649+ if (_this == that ) {
650+ return true ;
651+ } else if (_this == null || that == null ) {
652+ return false ;
653+ }
654+ return equalsModProofIrrelevancy ((TacletGoalTemplate ) _this , (TacletGoalTemplate ) that )
655+ && _this .replaceWith ().equalsModProperty (that .replaceWith (),
656+ PROOF_IRRELEVANCY_PROPERTY );
657+ }
658+
659+ /**
660+ * computes the hash code modulo proof irrelevancy for the given argument
661+ *
662+ * @param t the {@link RewriteTacletGoalTemplate} for which to compute the hash
663+ * @return the hash code modulo proof irrelevancy for the given argument
664+ */
665+ public static int hashCodeModProofIrrelevancy (RewriteTacletGoalTemplate t ) {
666+ return Objects .hash (hashCodeModProofIrrelevancy ((TacletGoalTemplate ) t ),
667+ t .replaceWith ().hashCodeModProperty (PROOF_IRRELEVANCY_PROPERTY ));
668+ }
669+
511670 // MatchConditions
512671 /**
513672 * test for equality modulo proof irrelevancy for the given arguments
0 commit comments