Isabelle2Cpp is a code generation framework that supports automatic generation of C++ code from Isabelle/HOL specifications. However, if some type information of Isabelle/HOL specification is missing, Isabelle2Cpp may not complete the code generation automatically. In order to solve this problem, this paper provides a type system for Isabelle2Cpp, which is used to perform type inference and type unification for expressions of the intermediate representation in Isabelle2Cpp. The system introduces new type inference rules and unification algorithms to enhance the Isabelle2Cpp framework. By incorporating the type system, the Isabelle2Cpp framework can provide more comprehensive type information for expression generation, which leads to more complete and accurate C++ code.
翻译:Isabelle2Cpp是一个代码生成框架,支持从Isabelle/HOL规范自动生成C++代码。然而,当Isabelle/HOL规范中某些类型信息缺失时,Isabelle2Cpp可能无法自动完成代码生成。为解决此问题,本文为Isabelle2Cpp设计了一个类型系统,用于对其中间表示表达式进行类型推断与类型统一。该系统引入了新的类型推断规则与统一算法,以增强Isabelle2Cpp框架。通过集成该类型系统,Isabelle2Cpp框架可为表达式生成提供更全面的类型信息,从而生成更完整、更精确的C++代码。