论文标题
同构数据类型转换
Isomorphic Data Type Transformations
论文作者
论文摘要
在从规格中逐步推导程序中,数据类型的修补是常见的。许多数据类型的改进涉及更抽象和更具体的数据表示之间的异构映射。 示例包括将有限套件的细化到重复的无订单列表或位矢量,添加记录组件,这些组件是其他字段的功能,以避免昂贵的重新构成等等。本文描述了APT(自动化程序转换)工具,以实现ACL2 Theorem Prover和其使用示例中的同构数据类型。 由于同构的固有对称性,这些工具也可以通过将更多具体的数据表示变成更抽象的数据来验证现有程序来验证现有程序。 通常,数据类型将具有相对较少的接口函数来访问该类型的内部。 一旦得出了这些接口函数的版本,可以在同构类型上工作,那么可以通过将旧函数替换为新功能来得出更高级别的功能。 我们已经实现了APT转换ISODATA来生成前者,并传播ISO来生成后者函数以及有关原始函数的定理函数的定理。 传播-ISO还处理类型是更复杂的组成部分的情况,例如具有类型字段的类型或记录列表:组件类型上的同构形态学会自动提升为更复杂的类型上的同构。 与所有APT转换一样,Isodata和spagagate-ISO产生了转换功能与原件的关系的证据。
In stepwise derivations of programs from specifications, data type refinements are common. Many data type refinements involve isomorphic mappings between the more abstract and more concrete data representations. Examples include refinement of finite sets to duplicate-free ordered lists or to bit vectors, adding record components that are functions of the other fields to avoid expensive recomputation, etc. This paper describes the APT (Automated Program Transformations) tools to carry out isomorphic data type refinements in the ACL2 theorem prover and gives examples of their use. Because of the inherent symmetry of isomorphisms, these tools are also useful to verify existing programs, by turning more concrete data representations into more abstract ones to ease verification. Typically, a data type will have relatively few interface functions that access the internals of the type. Once versions of these interface functions have been derived that work on the isomorphic type, higher-level functions can be derived simply by substituting the old functions for the new ones. We have implemented the APT transformations isodata to generate the former, and propagate-iso for generating the latter functions as well as theorems about the generated functions from the theorems about the original functions. Propagate-iso also handles cases where the type is a component of a more complex one such as a list of the type or a record that has a field of the type: the isomorphism on the component type is automatically lifted to an isomorphism on the more complex type. As with all APT transformations, isodata and propagate-iso generate proofs of the relationship of the transformed functions to the originals.