Automatically Generate EQ Taclets - #3949
Conversation
unp1
left a comment
There was a problem hiding this comment.
HeapSimplificationMacro and SupportedTaclets use the old names of subsetOf... and reach... that did not follow the normal naming approach
Same for saved SMT settings in:
key.ui/examples/completionscopes/ and key.core/src/test/resources/testcase/merge/
unp1
left a comment
There was a problem hiding this comment.
Thanks a lot! Only smaller changes.
One general comment:
Should we check whether the term given in generateEQ occurs in the find term, otherwise a wrong taclet might be easily generated (or is that done and I overlooked it)
That's not done. I can add it. |
Done |
Related Issue
This idea was mentioned in #3945 by @unp1.
Intended Change
We have many "EQ taclets" in our taclet base that all follow exactly the same schema. However, as they represent essentially a duplication of logic, it is easy for the "normal" taclets and its EQ version to go out of sync. In #3945 this was observed w.r.t. variable conditions.
This PR makes all of that superfluous, as EQ taclets are generated automatically.
To generate an EQ taclet, add the
\generateEQmodifier to it. It takes a term---the term to be put into the\assumespart. Let's look at two examples:generates the EQ taclet
Note that all properties of the taclet (annotations, rule sets, etc.) are copied over. The name is automatically extended with "EQ", an
\assumespart is added, andseqEmptyis replaced withEQin the\findand (original)\assumesparts. (Also for the\findof added rules).You can override the rule sets of the taclet as follows:
which generates
One side effect of all this: Some taclets change names, as the EQ was not at the end of its name previously. Personally, I prefer the consistency.
Plan
TacletPBuilderType of pull request
Ensuring quality
taclets.old.txtAdditional information and contact(s)
The contributions within this pull request are licensed under GPLv2 (only) for inclusion in KeY.