code-generation - Isabelle - 代码生成 - typedef

标签 code-generation isabelle

我正在尝试从一个非常简单的 Isabelle 程序生成代码。

typedef point = "{p::(real*real). True}" by(auto)
definition xCoord :: "point ⇒ real" where "xCoord P ≡ fst(Rep_point P)"

export_code xCoord in Haskell module_name Example file code

但得到错误:
No code equations for Rep_point

反正我不明白。究竟缺少什么?

最佳答案

您可以在提升和传输包中注册类型。然后代码生成工作。此外,最好不要直接使用 Rep_point , 但要使用 lift_definition相反,例如,如下面的代码。

setup_lifting type_definition_point

lift_definition xCoord :: "point ⇒ real" is fst .

export_code xCoord in Haskell module_name Example 

关于code-generation - Isabelle - 代码生成 - typedef,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34731499/

相关文章:

compiler-errors - 如何使用 funset_avltree 库?

php - 管理员自动生成

latex - 伊莎贝尔的文件准备

scala - 伊莎贝尔和斯卡拉

isabelle - 搜索 Isabelle 的一般定义、定理、函数等的最佳方法是什么?

isabelle - 无法获取变量

choice - 伊莎贝尔的最大集合

c++ - matlab 代码生成中支持的函数

php - 从 PHP 生成 Javascript/ExtJS 代码的最可维护的方法是什么?

c# - 如何确定存储过程结果的列是否可以为空