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

page 1

page 2

page 3

page 4

research
10/16/2022

A Formal Logic for Formal Category Theory

We present a domain-specific type theory for constructions and proofs in...
research
08/23/2022

Exchangeable Laws in Borel Data Structures

Motivated by statistical practice, category theory terminology is used t...
research
11/10/2020

Data Flow Refinement Type Inference

Refinement types enable lightweight verification of functional programs....
research
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 ...
research
01/27/2020

Understanding Profunctor Optics: a representation theorem

Optics, aka functional references, are classes of tools that allow compo...
research
02/02/2010

Some improved results on communication between information systems

To study the communication between information systems, Wang et al. [C. ...
research
10/25/2011

Inducing Probabilistic Programs by Bayesian Program Merging

This report outlines an approach to learning generative models from data...

Please sign up or login with your details

Forgot password? Click here to reset