Moa Johansson
2018-10-19 12:46:35 UTC
Hi,
We’ve got a tool (Hipster) which relies on external tools to generate candidate lemmas for Isabelle theories. However, it is not always stable when it comes to translation between Isabelle-Haskell and back.
Currently we use Isabelle’s code generator to first generate Haskell code, which then gets processed by another tool in charge of producing the conjectures. The conjectures are then read back into Isabelle. We regularly come across problems with how (library) functions and datatypes gets renamed during this process. For instance, functions over natural numbers will, when translated to Haskell, get names like “plus_nat”, “mult_nat” and so on. However, when reading a conjecture about e.g. “plus_nat” back it needs to be parsed in Isabelle as its internal long name “Groups.plus_class.plus”.
I know we’re using the code generator in a way it was never intended, but is there a way of knowing which constants in Isabelle gets renamed by code generation (and to what)?
Would like to have a less brittle way of translating back and forth if at all possible. Preferably without having to resort to
We’ve got a tool (Hipster) which relies on external tools to generate candidate lemmas for Isabelle theories. However, it is not always stable when it comes to translation between Isabelle-Haskell and back.
Currently we use Isabelle’s code generator to first generate Haskell code, which then gets processed by another tool in charge of producing the conjectures. The conjectures are then read back into Isabelle. We regularly come across problems with how (library) functions and datatypes gets renamed during this process. For instance, functions over natural numbers will, when translated to Haskell, get names like “plus_nat”, “mult_nat” and so on. However, when reading a conjecture about e.g. “plus_nat” back it needs to be parsed in Isabelle as its internal long name “Groups.plus_class.plus”.
I know we’re using the code generator in a way it was never intended, but is there a way of knowing which constants in Isabelle gets renamed by code generation (and to what)?
Would like to have a less brittle way of translating back and forth if at all possible. Preferably without having to resort to