Verifying term graph optimizations using Isabelle/HOL

12/14/2022
by   Brae J. Webb, et al.
0

Our objective is to formally verify the correctness of the hundreds of expression optimization rules used within the GraalVM compiler. When defining the semantics of a programming language, expressions naturally form abstract syntax trees, or, terms. However, in order to facilitate sharing of common subexpressions, modern compilers represent expressions as term graphs. Defining the semantics of term graphs is more complicated than defining the semantics of their equivalent term representations. More significantly, defining optimizations directly on term graphs and proving semantics preservation is considerably more complicated than on the equivalent term representations. On terms, optimizations can be expressed as conditional term rewriting rules, and proofs that the rewrites are semantics preserving are relatively straightforward. In this paper, we explore an approach to using term rewrites to verify term graph transformations of optimizations within the GraalVM compiler. This approach significantly reduces the overall verification effort and allows for simpler encoding of optimization rules.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/06/2020

A Term-Rewriting Semantics for Imperative Style Programming

Term rewriting systems have a simple syntax and semantics and facilitate...
research
09/13/2023

Deriving Abstract Interpreters from Skeletal Semantics

This paper describes a methodology for defining an executable abstract i...
research
02/06/2019

Semantics-Preserving DPO-Based Term Graph Rewriting

Term graph rewriting is important as "conceptual implementation" of the ...
research
07/05/2021

A Formal Semantics of the GraalVM Intermediate Representation

The optimization phase of a compiler is responsible for transforming an ...
research
11/23/2021

Caviar: An E-graph Based TRS for Automatic Code Optimization

Term Rewriting Systems (TRSs) are used in compilers to simplify and prov...
research
06/18/2023

Optimizing Stateful Dataflow with Local Rewrites

Optimizing a stateful dataflow language is a challenging task. There are...
research
02/06/2019

Modeling Terms by Graphs with Structure Constraints (Two Illustrations)

In the talk at the workshop my aim was to demonstrate the usefulness of ...

Please sign up or login with your details

Forgot password? Click here to reset