بنقرة واحدة
concurrency-verifier
Verify concurrent and parallel programs for data races, deadlocks, and correctness.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Verify concurrent and parallel programs for data races, deadlocks, and correctness.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Implement abstract machines for defining and executing operational semantics of programming languages.
Implements alias and points-to analysis for pointer programs. Use for: (1) Optimizing compilers, (2) Verifying memory safety, (3) Program understanding, (4) Parallelization.
Define program meaning through logical assertions and proof rules (Hoare logic).
Transforms closures to explicit environments. Use when: (1) Implementing functional languages, (2) Building compilers, (3) Understanding closures.
Implements common subexpression elimination (CSE). Use when: (1) Building compilers, (2) Optimizing code, (3) Program analysis.
Implements general dataflow analysis framework. Use when: (1) Building compilers, (2) Static analysis tools, (3) Program verification.
| name | concurrency-verifier |
| description | Verify concurrent and parallel programs for data races, deadlocks, and correctness. |
| version | 1.0.0 |
| tags | ["verification","concurrency","parallelism","oopsla"] |
| difficulty | advanced |
| languages | ["rust","go","java"] |
| dependencies | ["hoare-logic-verifier","separation-logician","model-checker"] |
Concurrency verification ensures that parallel programs are free from data races, deadlocks, and other concurrency bugs. It is essential for reliable multi-threaded and distributed systems.
| Concept | Description |
|---|---|
| Data Race | Unsynchronized concurrent access to shared data |
| Deadlock | Circular waiting on locks |
| Lock Order | Protocol for acquiring locks to prevent deadlock |
| Ownership | Exclusive access right to data |
| Memory Model | Rules for visibility of writes across threads |
separation-logician - Foundation for concurrent separation logicmodel-checker - Exhaustive concurrent state explorationrust-borrow-checker - Rust's ownership systemweak-memory-model-verifier - For relaxed memory models| Reference | Why It Matters |
|---|---|
| O'Hearn, "Resources, Concurrency and Local Reasoning" (TCS 2007) | Concurrent separation logic |
| Herlihy & Shavit, "The Art of Multiprocessor Programming" | Concurrent algorithms |
| Herlihy & Wing, "Linearizability: A Correctness Condition for Concurrent Objects" (TOPLAS 1990) | Correctness criterion |
| Approach | Pros | Cons |
|---|---|---|
| Static analysis | Fast | May miss races |
| Model checking | Complete | State explosion |
| Type-based | Compile-time | Conservative |
A high-quality implementation should have:
| Criterion | What to Look For |
|---|---|
| Soundness | Catches all races |
| Precision | Few false positives |
| Scalability | Handles realistic programs |
| Usability | Clear error reporting |
✅ Good: Catches real races, handles common patterns ⚠️ Warning: Many false positives ❌ Bad: Misses real races
Real-world concurrency verification tools:
| Tool | Why It Matters |
|---|---|
| ThreadSanitizer | Dynamic race detection in LLVM/GCC |
| CHESS | Microsoft's deterministic concurrency testing |
| CalFuzzer | Dynamic race detection for Java |
| SPIN | Model checker for concurrent systems |
| Verifast | Concurrent separation logic |
| Iris | Higher-order concurrent separation logic |
Current concurrency verification research:
| Direction | Key Papers | Challenge |
|---|---|---|
| Weak memory | Alglave et al. "Weak Memory Models" | x86/ARM/POWER models |
| Lock-free | Various verification approaches | CAS and queues |
| Linearizability | Herlihy & Wing (TOPLAS 1990) | Atomic object verification |
| Fencing | "Fence Inference" (2015) | Minimal memory fences |
| Regression | "Concurrency Bug Detection" (2019) | Finding regression bugs |
Common concurrency verification bugs:
| Pitfall | Real Example | Prevention |
|---|---|---|
| Missing volatile | TSan missed race | Track atomics precisely |
| Lock ordering violations | Deadlock not detected | Check lock graph |
| Signal handlers | Unsafe signal usage | Model async signals |
| Atomics vs locks | Confusion about semantics | Separate verification |
| Condition variables | Spurious wakeups | Model precisely |
| Memory fences | Weaker than needed | Check fence model |