MISRust: Mapping MISRA-C++ Coding Guidelines to the Rust Programming Language
- URL: http://arxiv.org/abs/2605.23490v1
- Date: Fri, 22 May 2026 10:52:52 GMT
- Title: MISRust: Mapping MISRA-C++ Coding Guidelines to the Rust Programming Language
- Abstract summary: This paper systematically examines each of the 179 MISRA C++ 2023 coding guidelines.<n>We find that 47.75% of the 111 as-is applicable MISRA rules are automatically enforced by Rust's language design.<n>We find that 69 guidelines are still relevant and still require either direct application or adaptation for Rust.
- Score: 37.20818475839222
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: The Rust programming language is increasingly being considered for safety-critical system development. However, established safety standards such as ISO 26262 require the use of coding guidelines that do not yet exist for Rust. This paper systematically examines each of the 179 MISRA C++ 2023 coding guidelines and classifies them into 6 categories based on their applicability to Rust. Our approach analyzes the rationale behind each MISRA rule to determine whether it remains valid in the Rust programming context. We find that 47.75% of the 111 as-is applicable MISRA rules are automatically enforced by Rust's language design, eliminating the need for explicit guideline enforcement. Furthermore, our analysis explicitly distinguishes between safe and unsafe Rust. We find that 69 guidelines are still relevant and still require either direct application or adaptation for Rust. Importantly, 36 of these rules are automatically satisfied when only using the safe subset of the Rust language. However, they are required again if unsafe Rust features are introduced. We also identify specific areas where new Rust-specific guidelines are needed. Where a guideline does not directly translate, we propose Rust-specific adaptations that preserve its intent. All mapping results and supporting artifacts are publicly available as open-source materials at https://github.com/embedded-software-laboratory/MISRust.
Related papers
- Grounded Normative Rule Generation with Structured Search [47.28595196084396]
We formalize the problem as Grounded Normative Rule Synthesis (GNRS)<n>We introduce GNRS-Search, a framework that utilizes Markov Chain Monte Carlo (MCMC) sampling to optimize a discrete, five-slot And-Or Graph (AOG)<n>We evaluate our approach on GNRS-Bench, a benchmark spanning 116 controlled goals across eight scene families, and RealCharterBench, which evaluates transfer to 53 real-derived policy tasks with hidden source clauses.
arXiv Detail & Related papers (2026-08-23T05:43:42Z) - RustGo: Fairly Directed Greybox Fuzzing for Enforcing Rust Memory Safety [5.500253242856999]
Rust is a popular systems programming language that provides strong memory safety and introduces low-performance overhead.<n> Rust guarantees memory safety through strict security policies, such as ownership, but memory bugs can still occur in unsafe-related Rust codes.<n>We propose RustGo, the new Rust-directed greybox fuzzer that effectively and fairly focuses on code regions potentially containing memory bugs.
arXiv Detail & Related papers (2026-08-06T10:48:37Z) - Weave of Formal Thought [51.56484100374058]
We introduce Weave of Formal Thought (WoFT), a paradigm uniting rigorous syntactic validation with learned structural representations.<n>We present a latent-variable fine-tuning method training the language model to interleave non-terminal grammar symbols directly into generation.<n>For Python, fine-tuning StarCoder2-3B with our RWS objective reduces per-token cross-entropy by 14.3% relative to a text-only SFT baseline.
arXiv Detail & Related papers (2026-06-24T15:58:11Z) - Securing LLM Agents Need Intent-to-Execution Integrity [49.490963596514185]
We argue that securing LLM agents requires defining an end-to-end correctness property that specifies when an agent's execution faithfully reflects the user's intent.<n>We observe that LLM agents are structurally analogous to compilers, where security violations correspond to mis-executions that do not preserve user intent.<n>We derive four integrity properties that must hold simultaneously: emphTool Integrity, emphInstruction Integrity, emphJudgment Integrity, and emphData Flow Integrity.
arXiv Detail & Related papers (2026-05-16T12:53:31Z) - A Trace-based Approach for Code Safety Analysis [3.21110975604312]
Rust is a memory-safe programming language that disallows undefined behavior.<n>This paper establishes a systematic framework for understanding unsafe code and undefined behavior.
arXiv Detail & Related papers (2025-10-12T02:11:38Z) - RustAssure: Differential Symbolic Testing for LLM-Transpiled C-to-Rust Code [2.1413732583497826]
Rust is a memory-safe programming language that significantly improves software security.<n>Existings written in unsafe memory languages, such as C, must first be transpiled to Rust to take advantage of Rust's improved safety guarantees.<n>RustAssure presents a system that uses Large Language Models (LLMs) to automatically transpile existing Cs to Rust.
arXiv Detail & Related papers (2025-10-08T22:52:34Z) - CRUST-Bench: A Comprehensive Benchmark for C-to-safe-Rust Transpilation [51.18863297461463]
CRUST-Bench is a dataset of 100 C repositories, each paired with manually-written interfaces in safe Rust as well as test cases.<n>We evaluate state-of-the-art large language models (LLMs) on this task and find that safe and idiomatic Rust generation is still a challenging problem.<n>The best performing model, OpenAI o1, is able to solve only 15 tasks in a single-shot setting.
arXiv Detail & Related papers (2025-04-21T17:33:33Z) - Fixing Rust Compilation Errors using LLMs [2.1781086368581932]
The Rust programming language has established itself as a viable choice for low-level systems programming language over the traditional, unsafe alternatives like C/C++.
This paper presents a tool called RustAssistant that leverages the emergent capabilities of Large Language Models (LLMs) to automatically suggest fixes for Rust compilation errors.
RustAssistant is able to achieve an impressive peak accuracy of roughly 74% on real-world compilation errors in popular open-source Rust repositories.
arXiv Detail & Related papers (2023-08-09T18:30:27Z) - Is unsafe an Achilles' Heel? A Comprehensive Study of Safety
Requirements in Unsafe Rust Programming [4.981203415693332]
Rust is an emerging, strongly-typed programming language focusing on efficiency and memory safety.
Current unsafe API documents in the standard library exhibited variations, including inconsistency and insufficiency.
To enhance Rust security, we suggest unsafe API documents to list systematic descriptions of safety requirements for users to follow.
arXiv Detail & Related papers (2023-08-09T08:16:10Z) - Automatic Extraction of Rules Governing Morphological Agreement [103.78033184221373]
We develop an automated framework for extracting a first-pass grammatical specification from raw text.
We focus on extracting rules describing agreement, a morphosyntactic phenomenon at the core of the grammars of many of the world's languages.
We apply our framework to all languages included in the Universal Dependencies project, with promising results.
arXiv Detail & Related papers (2020-10-02T18:31:45Z)
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.