Isomorphic Data Type Transformations

09/29/2020
by   Alessandro Coglio, et al.
0

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.

READ FULL TEXT

Authors

page 1

page 2

page 3

page 4

11/10/2020

Data Flow Refinement Type Inference

Refinement types enable lightweight verification of functional programs....
12/11/2021

Overcoming Restraint: Composing Verification of Foreign Functions with Cogent

Cogent is a restricted functional language designed to reduce the cost o...
06/07/2019

When and Why Metaheuristics Researchers Can Ignore "No Free Lunch" Theorems

The No Free Lunch (NFL) theorem for search and optimisation states that ...
01/27/2020

Understanding Profunctor Optics: a representation theorem

Optics, aka functional references, are classes of tools that allow compo...
10/25/2011

Inducing Probabilistic Programs by Bayesian Program Merging

This report outlines an approach to learning generative models from data...
01/23/2021

Calculating a backtracking algorithm: an exercise in monadic program derivation

Equational reasoning is among the most important tools that functional p...
02/02/2010

Some improved results on communication between information systems

To study the communication between information systems, Wang et al. [C. ...
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.