A Case Study on Model Checking and Runtime Verification for Awkernel
- URL: http://arxiv.org/abs/2503.09282v1
- Date: Wed, 12 Mar 2025 11:27:45 GMT
- Title: A Case Study on Model Checking and Runtime Verification for Awkernel
- Abstract summary: It is difficult for humans to manually review concurrent behaviors or to write test cases covering all possible executions.<n>This paper proposes a development method for concurrent software, such as schedulers.
- Score: 0.7199733380797578
- License: http://creativecommons.org/licenses/by-nc-nd/4.0/
- Abstract: In operating system development, concurrency poses significant challenges. It is difficult for humans to manually review concurrent behaviors or to write test cases covering all possible executions, often resulting in critical bugs. Preemption in schedulers serves as a typical example. This paper proposes a development method for concurrent software, such as schedulers. Our method incorporates model checking as an aid for tracing code, simplifying the analysis of concurrent behavior; we refer to this as model checking-assisted code review. While this approach aids in tracing behaviors, the accuracy of the results is limited because of the semantics gap between the modeling language and the programming language. Therefore, we also introduce runtime verification to address this limitation in model checking-assisted code review. We applied our approach to a real-world operating system, Awkernel, as a case study. This new operating system, currently under development for autonomous driving, is designed for preemptive task execution using asynchronous functions in Rust. After implementing our method, we identified several bugs that are difficult to detect through manual reviews or simple tests.
Related papers
- A Survey on Self-Improving Test-Time Intelligence: Feedback-Driven Adapting, Learning, and Scaling at Inference [72.19201465132619]
We present feedback-driven Test-Time Intelligence (TTI) as a unified perspective for understanding such deployment-time improvement.<n>We use this view to relate test-time adaptation, test-time learning, and test-time scaling, highlighting both their distinctions and their growing overlap in hybrid systems.<n>Our goal is to provide a coherent foundation and research roadmap for the study of self-improving AI systems at test time.
arXiv Detail & Related papers (2026-09-01T11:41:39Z) - Learning Correct Behavior from Examples: Validating Sequential Execution in Autonomous Agents [6.9734639631942015]
Traditional testing approaches require manual specification, exact sequence matching, or thousands of training examples.<n>We present a novel algorithm that automatically learns correct behavior from just 2-10 passing execution traces.<n>In controlled experiments, our system achieved high accuracy in detecting product bugs and false successes.
arXiv Detail & Related papers (2026-05-04T21:07:56Z) - FlyCatcher: Neural Inference of Runtime Checkers from Tests [15.772540292298151]
FlyCatcher is an automated approach to derive runtime checkers from existing tests.<n>It infers a checker that monitors specific method calls and asserts properties that should hold when they are called.<n>Compared with a state-of-the-art approach, our approach infers 2.6x more correct checkers, which enables it to detect 5.2x more errors.
arXiv Detail & Related papers (2026-04-23T19:43:53Z) - You Don't Need Public Tests to Generate Correct Code [0.9668407688201359]
We show that large language models possess the capability to autonomously construct valid inputs and simulate execution flows for self-correction.<n>We introduce DryRUN, a framework that removes the necessity for ground-truth data by enabling the LLM to iteratively plan, synthesize its own test inputs, and run simulated executions.
arXiv Detail & Related papers (2026-04-23T12:21:03Z) - AI-Assisted Unit Test Writing and Test-Driven Code Refactoring: A Case Study [0.0]
We present a case study of using coding models for automated unit test generation and subsequent safe iteration.<n>We generated nearly 16,000 lines of reliable unit tests in hours rather than weeks, achieved up to 78% branch coverage in critical modules, and significantly reduced regression risk during large-scale iterations.
arXiv Detail & Related papers (2026-04-03T15:54:43Z) - Scaling Agentic Verifier for Competitive Coding [66.11758166379092]
Large language models (LLMs) have demonstrated strong coding capabilities but still struggle to solve competitive programming problems correctly in a single attempt.<n>Execution-based re-ranking offers a promising test-time scaling strategy, yet existing methods are constrained by either difficult test case generation or inefficient random input sampling.<n>We propose Agentic Verifier, an execution-based agent that actively reasons about program behaviors and searches for highly discriminative test inputs.
arXiv Detail & Related papers (2026-02-04T06:30:40Z) - Automatic Syntax Error Repair for Discrete Controller Synthesis using Large Language Model [8.741815980649667]
This paper presents an automated approach that leverages Large Language Models (LLMs) to repair syntax errors in DCS models.<n>It equips the LLM with DCS-specific domain knowledge, including formal grammar rules and illustrative examples, to guide accurate corrections.<n>It achieves a speedup of 3.46 times compared to human developers.
arXiv Detail & Related papers (2025-12-08T07:57:15Z) - InspectCoder: Dynamic Analysis-Enabled Self Repair through interactive LLM-Debugger Collaboration [71.18377595277018]
Large Language Models (LLMs) frequently generate buggy code with complex logic errors that are challenging to diagnose.<n>We present InspectCoder, the first agentic program repair system that empowers LLMs to actively conduct dynamic analysis via interactive debugger control.
arXiv Detail & Related papers (2025-10-21T06:26:29Z) - Taming Imperfect Process Verifiers: A Sampling Perspective on Backtracking [54.43083499412643]
Test-time algorithms that combine the generative power of language models with process verifiers offer a promising lever for eliciting new reasoning capabilities.<n>We introduce a new process-guided test-time sampling algorithm, VGB, which uses theoretically grounded backtracking to achieve provably better robustness to verifier errors.
arXiv Detail & Related papers (2025-10-03T16:21:14Z) - Multi-Threaded Software Model Checking via Parallel Trace Abstraction Refinement [1.955166888058497]
We propose a solution to parallelize trace abstraction, an abstraction-based approach to software model checking.<n>Our approach is more effective than DSS, a recent parallel approach to abstraction-based software model checking.
arXiv Detail & Related papers (2025-09-17T05:05:16Z) - Execution Guided Line-by-Line Code Generation [49.1574468325115]
We present a novel approach to neural code generation that incorporates real-time execution signals into the language model generation process.<n>Our method, ExecutionGuidedFree Guidance (EGCFG), incorporates execution signals as model generates code.
arXiv Detail & Related papers (2025-06-12T17:50:05Z) - Training Language Models to Generate Quality Code with Program Analysis Feedback [66.0854002147103]
Code generation with large language models (LLMs) is increasingly adopted in production but fails to ensure code quality.<n>We propose REAL, a reinforcement learning framework that incentivizes LLMs to generate production-quality code.
arXiv Detail & Related papers (2025-05-28T17:57:47Z) - Revisit Self-Debugging with Self-Generated Tests for Code Generation [18.643472696246686]
Self-ging with self-generated tests is a promising solution but lacks a full exploration of its limitations and practical potential.<n>We propose two paradigms for the process: post-execution and in-execution self-ging.<n>We find that post-execution self-ging struggles on basic problems but shows potential for improvement on competitive ones, due to the bias introduced by self-generated tests.
arXiv Detail & Related papers (2025-01-22T10:54:19Z) - Go-Oracle: Automated Test Oracle for Go Concurrency Bugs [6.773048267569272]
Bugs have become a prevalent issue within the Go programming language.<n>Our work seeks to address the test oracle problem for Go programs, to automatically classify test executions as pass or fail.<n>We capture a comprehensive array of execution events using the native Go execution tracer.<n>We preprocess and encode these traces before training a transformer-based neural network to effectively classify the traces as either passing or failing.
arXiv Detail & Related papers (2024-12-11T03:07:56Z) - Commit0: Library Generation from Scratch [77.38414688148006]
Commit0 is a benchmark that challenges AI agents to write libraries from scratch.<n>Agents are provided with a specification document outlining the library's API as well as a suite of interactive unit tests.<n> Commit0 also offers an interactive environment where models receive static analysis and execution feedback on the code they generate.
arXiv Detail & Related papers (2024-12-02T18:11:30Z) - CodeFlow: Program Behavior Prediction with Dynamic Dependencies Learning [11.347234752942684]
We present CodeFlow, a novel machine learning-based approach that predicts code coverage and detects runtime errors.<n>CodeFlow effectively represents all possible execution paths and the statistic relations between different statements.<n>Our empirical evaluation demonstrates that CodeFlow significantly improves code coverage prediction accuracy and effectively localizes runtime errors.
arXiv Detail & Related papers (2024-08-05T20:32:00Z) - NExT: Teaching Large Language Models to Reason about Code Execution [50.93581376646064]
Large language models (LLMs) of code are typically trained on the surface textual form of programs.
We propose NExT, a method to teach LLMs to inspect the execution traces of programs and reason about their run-time behavior.
arXiv Detail & Related papers (2024-04-23T01:46:32Z) - Improving the Learning of Code Review Successive Tasks with Cross-Task
Knowledge Distillation [1.0878040851638]
We introduce a novel deep-learning architecture, named DISCOREV, which employs cross-task knowledge distillation to address these tasks simultaneously.
We show that our approach generates better review comments, as measured by the BLEU score, as well as more accurate code refinement according to the CodeBLEU score.
arXiv Detail & Related papers (2024-02-03T07:02:22Z) - Understanding prompt engineering may not require rethinking
generalization [56.38207873589642]
We show that the discrete nature of prompts, combined with a PAC-Bayes prior given by a language model, results in generalization bounds that are remarkably tight by the standards of the literature.
This work provides a possible justification for the widespread practice of prompt engineering.
arXiv Detail & Related papers (2023-10-06T00:52:48Z) - Generative Models as a Complex Systems Science: How can we make sense of
large language model behavior? [75.79305790453654]
Coaxing out desired behavior from pretrained models, while avoiding undesirable ones, has redefined NLP.
We argue for a systematic effort to decompose language model behavior into categories that explain cross-task performance.
arXiv Detail & Related papers (2023-07-31T22:58:41Z) - A Static Evaluation of Code Completion by Large Language Models [65.18008807383816]
Execution-based benchmarks have been proposed to evaluate functional correctness of model-generated code on simple programming problems.
static analysis tools such as linters, which can detect errors without running the program, haven't been well explored for evaluating code generation models.
We propose a static evaluation framework to quantify static errors in Python code completions, by leveraging Abstract Syntax Trees.
arXiv Detail & Related papers (2023-06-05T19:23:34Z) - Execution Time Program Verification With Tight Bounds [6.36836017515443]
This paper presents a proof system for reasoning about execution time bounds for a core imperative programming language.
We define a Hoare logic for the three cases and prove its soundness with respect to an annotated cost-aware operational semantics.
The practicality of the proof system is demonstrated with an implementation in OCaml of the different modules needed to apply it to example programs.
arXiv Detail & Related papers (2022-10-20T09:02:13Z) - Measuring Coding Challenge Competence With APPS [54.22600767666257]
We introduce APPS, a benchmark for code generation.
Our benchmark includes 10,000 problems, which range from having simple one-line solutions to being substantial algorithmic challenges.
Recent models such as GPT-Neo can pass approximately 15% of the test cases of introductory problems.
arXiv Detail & Related papers (2021-05-20T17:58:42Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.