当前位置: X-MOL 学术arXiv.cs.LO › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Isomorphic Data Type Transformations
arXiv - CS - Logic in Computer Science Pub Date : 2020-09-29 , DOI: arxiv-2009.13771
Alessandro Coglio (Kestrel Institute), Stephen Westfold (Kestrel Institute)

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.

中文翻译:

同构数据类型转换

在从规范逐步推导程序的过程中,数据类型的细化很常见。许多数据类型改进涉及更抽象和更具体的数据表示之间的同构映射。示例包括将有限集细化为无重复的有序列表或位向量,添加作为其他字段的函数的记录组件以避免昂贵的重新计算等。 本文描述了 APT(自动程序转换)工具来执行同构数据ACL2 定理证明器中的类型改进并给出了它们的使用示例。由于同构的固有对称性,这些工具也可用于验证现有程序,通过将更具体的数据表示转换为更抽象的表示以简化验证。通常,数据类型将具有相对较少的访问该类型内部结构的接口函数。一旦派生出适用于同构类型的这些接口函数的版本,就可以简单地通过用旧函数替换新函数来派生出更高级别的函数。我们已经实现了 APT 变换 isodata 以生成前者,并实现了传播 iso 以生成后者函数以及从原始函数的定理生成的函数的定理。Propagate-iso 还处理类型是更复杂类型的组件的情况,例如类型列表或具有该类型字段的记录:组件类型的同构自动提升为更多的同构复杂类型。与所有 APT 转换一样,
更新日期:2020-09-30
down
wechat
bug