# Software Correctness

Published articles for Software Correctness.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Formal-Methods-Based Bugfinding for LLVM's AArch64 Backend

DevFeed: [Formal-Methods-Based Bugfinding for LLVM's AArch64 Backend](<https://devfeed.tech/articles/formal-methods-based-bugfinding-for-llvm-s-aarch64-backend-39749.md>)

Original publisher: [Read original article](<https://blog.regehr.org/archives/2265>)

Author: regehr

Published: 2022-06-06T14:58:02Z

Content type: article

Language: en

Sources: [Embedded in Academia](<https://devfeed.tech/sources/embedded-in-academia.md>)

Topics: [Formal methods](<https://devfeed.tech/topics/formal-methods.md>), [LLVM](<https://devfeed.tech/topics/llvm.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>), [backends](<https://devfeed.tech/topics/backends.md>), [Assembly](<https://devfeed.tech/topics/assembly.md>)

Tags: [assembly](<https://devfeed.tech/tags/assembly.md>), [backend](<https://devfeed.tech/tags/backend.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [compilers](<https://devfeed.tech/tags/compilers.md>), [computer-science](<https://devfeed.tech/tags/computer-science.md>), [formal-methods](<https://devfeed.tech/tags/formal-methods.md>), [frontend](<https://devfeed.tech/tags/frontend.md>), [llvm](<https://devfeed.tech/tags/llvm.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [software-correctness](<https://devfeed.tech/tags/software-correctness.md>)

### AI overview

The article explains how Alive2, a formal methods tool, is extended to validate LLVM's AArch64 backend. The approach lifts compiled AArch64 code into Alive2 IR and checks whether the lifted code refines the original LLVM code, helping identify backend correctness violations.

### Source excerpt

[This piece is co-authored by Ryan Berger and Stefan Mada (both Utah CS undergrads), by Nader Boushehri, and by John Regehr.] An optimizing compiler traditionally has three main parts: a frontend that translates a source language into an intermediate representation (IR), a "middle end" that rewrites IR into better IR, and then a backend that [...]

## Responsible and Effective Bugfinding

DevFeed: [Responsible and Effective Bugfinding](<https://devfeed.tech/articles/responsible-and-effective-bugfinding-39744.md>)

Original publisher: [Read original article](<https://blog.regehr.org/archives/2037>)

Author: regehr

Published: 2020-08-17T18:36:43Z

Content type: article

Language: en

Sources: [Embedded in Academia](<https://devfeed.tech/sources/embedded-in-academia.md>)

Topics: [bug](<https://devfeed.tech/topics/bug.md>), [Software](<https://devfeed.tech/topics/software.md>), [Open Source](<https://devfeed.tech/topics/open-source.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [bug](<https://devfeed.tech/tags/bug.md>), [computer-science](<https://devfeed.tech/tags/computer-science.md>), [defects](<https://devfeed.tech/tags/defects.md>), [report](<https://devfeed.tech/tags/report.md>), [software-correctness](<https://devfeed.tech/tags/software-correctness.md>)

### AI overview

The article explains how to conduct external bug-finding efforts so they maximize overall benefit. It argues that bug finders should work carefully and collaboratively with software developers instead of overwhelming projects with large numbers of reports.

### Source excerpt

NB: This piece is not about responsible disclosure of security issues. For almost as long as people have written code, we have also worked to create methods for finding software defects. Much more recently, it has become common to treat "external bug finding" -- looking for defects in other people's software -- as an activity [...]

## Alive2 Part 3: Things You Can and Can't Do with Undef in LLVM

DevFeed: [Alive2 Part 3: Things You Can and Can't Do with Undef in LLVM](<https://devfeed.tech/articles/alive2-part-3-things-you-can-and-can-t-do-with-undef-in-llvm-39743.md>)

Original publisher: [Read original article](<https://blog.regehr.org/archives/1837>)

Author: regehr

Published: 2020-07-31T20:33:05Z

Content type: tutorial

Language: en

Sources: [Embedded in Academia](<https://devfeed.tech/sources/embedded-in-academia.md>)

Topics: [LLVM](<https://devfeed.tech/topics/llvm.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>), [C](<https://devfeed.tech/topics/c.md>), [C++](<https://devfeed.tech/topics/c-plus-plus.md>), [functions](<https://devfeed.tech/topics/functions.md>)

Tags: [c](<https://devfeed.tech/tags/c.md>), [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [compilers](<https://devfeed.tech/tags/compilers.md>), [computer-science](<https://devfeed.tech/tags/computer-science.md>), [functions](<https://devfeed.tech/tags/functions.md>), [llvm](<https://devfeed.tech/tags/llvm.md>), [software-correctness](<https://devfeed.tech/tags/software-correctness.md>), [transformation](<https://devfeed.tech/tags/transformation.md>), [undef](<https://devfeed.tech/tags/undef.md>)

### AI overview

This article explains how LLVM handles undef and poison values and why they complicate compiler transformations. It uses equivalent C and C++ functions to show that LLVM can replace addition with a shift under refinement, but cannot generally reverse that transformation.

### Source excerpt

[Also see Part 1 and Part 2 in this series.] Let's talk about these functions: unsigned add(unsigned x) { return x + x; } unsigned shift(unsigned x) { return x << 1; } From the point of view of the C and C++ abstract machines, their behavior is equivalent: in a program you're writing, you [...]