← Latest papers
💻 computer science

Separation Logic for Memory Conflict Detection in High-Level Synthesis

This paper presents a spatial verification framework at the LLVM IR level that utilizes Separation Logic and SMT solvers to detect and prevent memory conflicts in High-Level Synthesis by modeling non-affine array accesses as polymorphic spatial predicates, thereby enabling safe parallelization without the performance-degrading over-approximations of conventional polyhedral methods.

Original authors: Yeonseok Lee

Published 2026-07-09
📖 4 min read☕ Coffee break read

Original authors: Yeonseok Lee

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are the director of a busy factory (the High-Level Synthesis or HLS process). Your goal is to build a super-fast machine that can do many tasks at the exact same time. To do this, you tell your workers to stop doing things one by one and start doing them all together in a single "clock cycle."

However, there's a major problem: The Memory Bottleneck.

The Problem: The Single-Door Warehouse

In your factory, all the workers need to grab parts from a giant warehouse (the Memory Bank). But this warehouse only has one door.

  • If Worker A and Worker B both try to walk through that single door at the exact same second, they will crash into each other. This is a Memory Conflict.
  • To prevent this, your old safety rules (called Polyhedral Frameworks) are very cautious. They look at the workers' instructions. If the instructions involve complex math (like dividing or multiplying numbers that change on the fly, known as non-affine arithmetic), the old rules get confused.
  • Because they can't prove the workers won't crash, the old rules say: "Better safe than sorry. Let's make everyone wait in line." This turns your super-fast parallel factory back into a slow, single-file line, destroying your speed gains.

The Solution: The "Separation Logic" Map

This paper introduces a new, smarter way to check for crashes using a concept called Separation Logic. Think of this not as a math equation, but as a spatial map of the factory floor.

1. The "Getelementptr" Translator
First, the system translates the complex code into simple, flat instructions (like a GPS giving a single street address instead of a complex set of directions). It looks at the raw instructions the computer understands (LLVM IR) to see exactly where a worker is trying to go.

2. The "Exclusive Ownership" Rule
Separation Logic has a golden rule: You cannot own the same piece of land twice.

  • Imagine the warehouse is divided into 4 smaller rooms (Memory Banks).
  • The system asks: "Does Worker A own Room 1, and does Worker B own Room 2?"
  • If the answer is yes, they are safe. They can go in simultaneously because they are in different rooms.
  • The magic happens if they both try to claim Room 1. In this logic, trying to say "I own Room 1" AND "I also own Room 1" at the same time creates a logical contradiction (a crash in the logic itself). The system instantly sees this as "Impossible" and flags a conflict.

3. The "Math Detective" (SMT Solver)
The system uses a powerful math detective (an SMT Oracle) to check the workers' paths.

  • If the math is simple: The detective quickly proves, "Yes, Worker A goes to Room 1, Worker B goes to Room 2. No crash!" The factory runs in parallel.
  • If the math is too weird (undecidable): Sometimes the workers' paths involve math so complex the detective can't solve it in time.
    • Old System: Would guess "Maybe they crash" and force a line.
    • This System: Admits, "I can't prove they are safe." It then triggers a Safe Fallback. It says, "Since I can't prove it's safe, I will make them take turns." This ensures the machine never actually crashes, even if it's slightly slower than it could have been.

The Result: A Safer, Faster Factory

By using this "Spatial Map" approach, the paper claims to:

  1. Stop guessing: It doesn't just assume everything is dangerous because the math is hard. It tries to prove exactly which rooms are safe to use together.
  2. Catch the invisible crashes: It catches conflicts that the old "line-up" rules would have missed, allowing more workers to run in parallel.
  3. Guarantee Safety: If the math is too hard to solve, it defaults to a safe, slow mode. It promises that the final machine (the hardware) will never have two workers trying to walk through the same door at the same time.

In short: This paper replaces a cautious, "assume the worst" safety rule with a smart, map-based system that tries to prove workers can work together safely. If it can't prove it, it forces them to wait, ensuring the final hardware is perfectly collision-free.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →