Computer Science · Artificial Intelligence
This work is licensed under the Creative Commons Attribution License. Formal Semantics of Heterogeneous CUDA-C: A Modular Approach with Applications
F. Cassez, R. Huuck, G. Klein, B. Schlich (eds, Chris Hathhorn, Michela Becchi, William L. Harrison, Adam Procter
See on the mapAbstract
We extend an off-the-shelf, executable formal semantics of C (Ellison and Ros,u’s K Framework se-mantics) with the core features of CUDA-C. The hybrid CPU/GPU computation model of CUDA-C presents challenges not just for programmers, but also for practitioners of formal methods. Our for-mal semantics helps expose and clarify these issues. We demonstrate the usefulness of our semantics by generating a tool from it capable of detecting some race conditions and deadlocks in CUDA-C programs. We discuss limitations of our model and argue that its extensibility can easily enable a wider range of verification tasks. 1