@@ -263,7 +263,7 @@ public Object visitDatatype_decl(KeYParser.Datatype_declContext ctx) {
263263 for (int i = 0 ; i < constructor .sortId ().size (); i ++) {
264264 var argName = constructor .argName .get (i ).getText ();
265265
266- var tbDeconstructor = createDeconstructorTaclet (constructor , argName , i );
266+ var tbDeconstructor = createDeconstructorTaclet (constructor , argName , i , dtSort );
267267 registerTaclet (ctx , tbDeconstructor );
268268
269269 var tbDeconsEq = createDeconstructorEQTaclet (constructor , argName , i , dtSort );
@@ -275,12 +275,15 @@ public Object visitDatatype_decl(KeYParser.Datatype_declContext ctx) {
275275 }
276276
277277 private TacletBuilder <? extends Taclet > createDeconstructorTaclet (
278- KeYParser .Datatype_constructorContext constructor , String argName , int argIndex ) {
278+ KeYParser .Datatype_constructorContext constructor , String argName , int argIndex ,
279+ Sort dtSort ) {
279280 var tacletBuilder = new RewriteTacletBuilder <>();
280281 tacletBuilder
281- .setName (new Name (String .format ("%s_Dec_%s" , argName , constructor .name .getText ())));
282+ .setName (new Name (String .format ("DT_%s#Dec_%s#%s" , dtSort .name (), argName ,
283+ constructor .name .getText ())));
282284 tacletBuilder .setDisplayName (
283- String .format ("%s_Deconstruct_%s" , argName , constructor .name .getText ()));
285+ String .format ("DT %s Deconstructor %s (for %s)" , dtSort .name (), argName ,
286+ constructor .name .getText ()));
284287
285288 var schemaVariables = new JOperatorSV [constructor .argName .size ()];
286289 var args = new JTerm [constructor .argName .size ()];
@@ -305,6 +308,7 @@ private TacletBuilder<? extends Taclet> createDeconstructorTaclet(
305308 new RewriteTacletGoalTemplate (tb .var (schemaVariables [argIndex ])));
306309 tacletBuilder .setApplicationRestriction (
307310 new ApplicationRestriction (ApplicationRestriction .SAME_UPDATE_LEVEL ));
311+ tacletBuilder .addRuleSet (ruleSets ().lookup (new Name ("simplify" )));
308312
309313 return tacletBuilder ;
310314 }
@@ -314,9 +318,11 @@ private TacletBuilder<? extends Taclet> createDeconstructorEQTaclet(
314318 Sort dtSort ) {
315319 var tacletBuilder = new RewriteTacletBuilder <>();
316320 tacletBuilder .setName (
317- new Name (String .format ("%s_DecEQ_%s" , argName , constructor .name .getText ())));
321+ new Name (String .format ("DT_%s#Dec_%s#%s#EQ" , dtSort .name (), argName ,
322+ constructor .name .getText ())));
318323 tacletBuilder .setDisplayName (
319- String .format ("%s_DeconstructEQ_%s" , argName , constructor .name .getText ()));
324+ String .format ("DT %s Deconstructor %s (for %s)" , dtSort .name (), argName ,
325+ constructor .name .getText ()));
320326
321327 var schemaVariables = new JOperatorSV [constructor .argName .size ()];
322328 var args = new JTerm [constructor .argName .size ()];
@@ -342,10 +348,11 @@ private TacletBuilder<? extends Taclet> createDeconstructorEQTaclet(
342348 tacletBuilder .setFind (tb .func (function , tb .var (x )));
343349 tacletBuilder .setIfSequent (JavaDLSequentKit .createAnteSequent (
344350 ImmutableSLList
345- .singleton (new SequentFormula (tb .equals (tb .var ( x ), tb .func ( consFn , args ))))));
351+ .singleton (new SequentFormula (tb .equals (tb .func ( consFn , args ), tb .var ( x ))))));
346352 tacletBuilder .addTacletGoalTemplate (new RewriteTacletGoalTemplate (tb .var (res )));
347353 tacletBuilder .setApplicationRestriction (
348354 new ApplicationRestriction (ApplicationRestriction .SAME_UPDATE_LEVEL ));
355+ tacletBuilder .addRuleSet (ruleSets ().lookup (new Name ("simplify" )));
349356
350357 return tacletBuilder ;
351358 }
@@ -354,7 +361,6 @@ private TacletBuilder<? extends Taclet> createDeconstructorEQTaclet(
354361 private TacletBuilder <? extends Taclet > createInductionTaclet (
355362 KeYParser .Datatype_declContext ctx ) {
356363 var tacletBuilder = new NoFindTacletBuilder ();
357- tacletBuilder .setName (new Name (String .format ("%s_Ind" , ctx .name .getText ())));
358364 final var sort = sorts ().lookup (ctx .name .getText ());
359365 var phi = declareSchemaVariable (ctx , "phi" , JavaDLTheory .FORMULA , true ,
360366 false , false , new SchemaVariableModifierSet .FormulaSV ());
@@ -376,7 +382,8 @@ private TacletBuilder<? extends Taclet> createInductionTaclet(
376382 cases .add (useCase );
377383
378384 cases .forEach (tacletBuilder ::addTacletGoalTemplate );
379- tacletBuilder .setDisplayName ("Induction_for_" + sort .name ());
385+ tacletBuilder .setName (new Name (String .format ("DT_%s_Induction" , sort .name ())));
386+ tacletBuilder .setDisplayName (String .format ("DT %s Induction" , sort .name ()));
380387 return tacletBuilder ;
381388 }
382389
@@ -395,7 +402,6 @@ private TacletGoalTemplate createGoalDtConstructor(KeYParser.Datatype_constructo
395402 private TacletBuilder <NoFindTaclet > createAxiomTaclet (
396403 KeYParser .Datatype_declContext ctx ) {
397404 var tacletBuilder = new NoFindTacletBuilder ();
398- tacletBuilder .setName (new Name (String .format ("%s_Axiom" , ctx .name .getText ())));
399405 final var sort = sorts ().lookup (ctx .name .getText ());
400406 var phi = declareSchemaVariable (ctx , "phi" , JavaDLTheory .FORMULA , true ,
401407 false , false , new SchemaVariableModifierSet .FormulaSV ());
@@ -417,7 +423,8 @@ private TacletBuilder<NoFindTaclet> createAxiomTaclet(
417423 ImmutableSLList .nil ());
418424 tacletBuilder .addTacletGoalTemplate (goal );
419425
420- tacletBuilder .setDisplayName ("Axiom_for_" + sort .name ());
426+ tacletBuilder .setName (new Name (String .format ("DT_%s_Axiom" , sort .name ())));
427+ tacletBuilder .setDisplayName (String .format ("DT %s Axiom" , sort .name ()));
421428 return tacletBuilder ;
422429 }
423430
@@ -452,7 +459,7 @@ private JTerm createQuantifiedFormula(KeYParser.Datatype_constructorContext cont
452459 }
453460
454461 if (ind .isEmpty ()) {
455- return tb .all (qvs , tb .func (fn , args ));
462+ return tb .all (qvs , tb .subst ( qvX , tb . func (fn , args ), phi ));
456463 } else {
457464 var base = tb .and (ind );
458465 return tb .all (qvs , tb .imp (base , tb .subst (qvX , tb .func (fn , args ), phi )));
@@ -482,8 +489,8 @@ private RewriteTacletBuilder<RewriteTaclet> createConstructorSplit(
482489 new ApplicationRestriction (ApplicationRestriction .SAME_UPDATE_LEVEL ));
483490 final var sort = sorts ().lookup (ctx .name .getText ());
484491
485- b .setName (new Name (sort .name () + "_ctor_split" ));
486- b .setDisplayName (" case distinction of " + sort .name ());
492+ b .setName (new Name ("DT_" + sort .name () + "_ctor_split" ));
493+ b .setDisplayName (String . format ( "DT %s case distinction " , sort .name () ));
487494
488495 var phi = declareSchemaVariable (ctx , "var" , sort ,
489496 false , false , false ,
0 commit comments