Formal Semantics for the Halide Language

10/27/2022
by   Alex Reinking, et al.
0

We present the first formalization and metatheory of language soundness for a user-schedulable language, the widely used array processing language Halide. User-schedulable languages strike a balance between abstraction and control in high-performance computing by separating the specification of what a program should compute from a schedule for how to compute it. In the process, they make a novel language soundness claim: the result of a program should always be the same, regardless of how it is scheduled. This soundness guarantee is tricky to provide in the presence of schedules that introduce redundant recomputation and computation on uninitialized data, rather than simply reordering statements. In addition, Halide ensures memory safety through a compile-time bounds inference engine that determines safe sizes for every buffer and loop in the generated code, presenting a novel challenge: formalizing and analyzing a language specification that depends on the results of unreliable program synthesis algorithms. Our formalization has revealed flaws and led to improvements in the practical Halide system, and we believe it provides a foundation for the design of new languages and tools that apply programmer-controlled scheduling to other domains.

READ FULL TEXT

page 1

page 3

research
12/23/2019

A Component-Based Formal Language Workbench

The CBS framework supports component-based specification of programming ...
research
04/28/2018

KRust: A Formal Executable Semantics of Rust

Rust is a new and promising high-level system programming language. It p...
research
01/25/2020

CounterExample Guided Neural Synthesis

Program synthesis is the generation of a program from a specification. C...
research
05/16/2022

Cloud Matrix Machine for Julia and Implicit Parallelization for Matrix Languages

Matrix computations are widely used in increasing sizes and complexity i...
research
08/09/2022

The Right Kind of Non-Determinism: Using Concurrency to Verify C Programs with Underspecified Semantics

We present a novel and well automatable approach to formal verification ...
research
09/06/2019

Making High-Performance Robots Safe and Easy to Use for an Introduction to Computing

Robots are a popular platform for introducing computing and artificial i...
research
05/24/2022

Properties of the Hebrew Calendar

We describe an ACL2 program that implements the Hebrew calendar and the ...

Please sign up or login with your details

Forgot password? Click here to reset