Abstract
We provide a framework for registering automatic methods to derive class instances of datatypes, as it is possible using Haskell's ``deriving Ord, Show, ...'' feature.
We further implemented such automatic methods to derive comparators, linear orders, parametrizable equality functions, and hash-functions which are required in the Isabelle Collection Framework and the Container Framework. Moreover, for the tactic of Blanchette to show that a datatype is countable, we implemented a wrapper so that this tactic becomes accessible in our framework. All of the generators are based on the infrastructure that is provided by the BNF-based datatype package.
Our formalization was performed as part of the IsaFoR/CeTA project. With our new tactics we could remove several tedious proofs for (conditional) linear orders, and conditional equality operators within IsaFoR and the Container Framework.
Depends On
Used by
- LTL_Master_Theorem
- Groebner_Bases
- Formula_Derivatives
- Show
- MSO_Regex_Equivalence
- Affine_Arithmetic
- Real_Impl
- Containers
- Datatype_Order_Generator
Topics
Related Entries
Theories
- Derive_Manager
- files/derive_manager.ML
- Generator_Aux
- files/bnf_access.ML
- files/generator_aux.ML
- Comparator
- Compare
- files/compare_code.ML
- RBT_Compare_Order_Impl
- RBT_Comparator_Impl
- Comparator_Generator
- files/comparator_generator.ML
- Compare_Generator
- files/compare_generator.ML
- Compare_Instances
- Compare_Order_Instances
- Compare_Rat
- Compare_Real
- Equality_Generator
- files/equality_generator.ML
- Equality_Instances
- Hash_Generator
- files/hash_generator.ML
- Hash_Instances
- Countable_Generator
- Derive
- Derive_Examples