{'fraction_non_alphanumeric': 0.018867924528301886, 'fraction_numerical': 0.0020964360587002098, 'mean_word_length': 5.51912568306011, '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}}
Complex program transformations via simple online dynamic analyses

Online dynamic program analyses execute while a program is running in its production state. In this environment, they have access to a wealth of concrete information, such as heap values and call stacks, that can drive recompilation and program transformation based on behavior that is execution-specific or simply hard to analyze statically. 
At the same time, because these analyses execute while a program is running, they are computationally constrained, since any overhead imposed by an analysis is reflected in the program's execution time. Thus, online dynamic analyses necessarily tend to measure simple events. Such constraints present a challenge: is it possible to construct sophisticated program transformations from simple dynamic analyses? 
In this dissertation, we show that sophisticated program transformations are possible without proving complex program properties. Instead, dynamic analysis of simple properties can sufficiently approximate complex ones when coupled with runtime support such as speculation. We describe two complex automatic program optimizations based on simple dynamic analyses that yield order-of-magnitude speedups. 
The first is a specializer. While a program is running, it automatically determines which heap locations are constant, and selects portions of the program to recompile, using these heap constants to seed constant propagation, loop unrolling, and other classic optimizations. The specializer achieves speedups of up to 500% on programs that depend heavily on constant heap values. 
The second transformation is an incrementalizer, known as DITTO . DITTO monitors data structure invariant checks as they execute, dynamically constructing models of their computation. When a check is invoked again, DITTO automatically reuses applicable portions of previous invocations and only computes anew computations based on new input. It speeds up common invariant checks by an asymptotic factor. 
These two optimizations indicate that complex transformations are possible despite the limited complexity afforded to the online dynamic analyses that drive them. We find that these results can be achieved when (1) the transformation is tailored to a domain and (2) dynamic analyses are carefully constructed to exploit the common-case behavior of programs in that domain.