{'fraction_non_alphanumeric': 0.03395585738539898, 'fraction_numerical': 0.001697792869269949, 'mean_word_length': 5.304812834224599, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Economical Transformations of Structured Data ( Extended Version )

Reliability of large-scale hardware and software systems often depends on the correctness of the underlying structured data. Examples of structured data include heap-allocated linked data structures, files, and program states in software, and netlists and simulator states for modeling hardware. In this paper, we focus on automatically transforming structured data to make it satisfy certain properties of interest. In particular, we consider tree-like structured data (i.e. trees and lists), and finite state properties of such structures (e.g. acyclicity, sorted-ness). We address two separate problems: (1) given an input structure, transforming it in a minimal fashion to obtain a desired output structure, and (2) given an input property and an output property, synthesizing a (small) update program that transforms any input satisfying the input property to some desired output. Our approach uses automata-theoretic constructions to enable efficient reasoning. The practical utility of our approach is in its ability to scale to input structures of arbitrary sizes, as illustrated by our prototype tool.