Re: [isabelle] simps_of_case has problems with records
> Though, I do not see why the free constructor architecture would have to be extended. An extended extensible record like 'a bar_scheme just abbreviates "'a bar_ext foo_ext" and the functions foo_ext and bar_ext can serve as constructors for foo_ext and bar_ext, respectively. That is, we just have nested types with free constructors. What am I missing?
Some of the architecture doesnât like complex types like ââa bar_ext foo_extâ â e.g. lookup is performed on a type name. Thatâs the main problem IIRC. It might be easy to fix. I thought there was also an issue with the âbar_extâ constant being an abbreviation, but I apparently remembered this wrong.
Another worry I have is just the naming and wealth of theorems. Automatically performing what you do when you manually do âfree_constructorsâ yields quite a few theorems coming from two worlds. It seems like the prefixes keep things apart, e.g. âfoo.splitsâ (generated by record) vs. âfoo_ext.splitsâ (generated by âfree_constructorsâ) â but the situation is still not entirely satisfactory IMO. Hence, I would rather tread carefully here, and perhaps wait one more iteration of Isabelle and new datatypes before doing more âreformsâ.
Iâm also not sure all infrastructure will be equally happy to have two views on records â the records one and the âctr_sugarâ one (which has largely displaced the old datatype one here and there). This is a minor issue that can be addressed one tool at a time (Nitpick, Quickcheck, etc.), but it might require some weeks before all problems have been identified and solved.
Finally, this would enable the datatype plugins on records â generation of a size function etc. Again, this is not completely impact-free, if nothing else on the number of theorems/constants/etc. generated and hence on the performance of the prover. This is another reason why Iâm inclined to wait.
All this having been said, I believe that records belong in âctr_sugarâ and that the convenience of having them in there by default would be appreciated by many users. If anybody is willing to jump in and make it happen faster than Iâm likely going to, theyâre welcome. ;)
> Unfortunately, the record package is still completely unlocalised. That's probably the bigger hurdle.
I think thatâs fine as far as âCtr_Sugarâ goes, thanks to the âgeneric dataâ abstraction. âCtr_Sugarâ can also deal with old-style datatypes, after all.
This archive was generated by a fusion of
Pipermail (Mailman edition) and