SBIR/STTR Research Award

CRAM: C++ to Rust Assisted Migration PH2

Award identifier d5e3a497d1fc1502bb0b9fe08b4f9c711e55b04cd5bea0e1c6bc7fd86a355120Awarding agency Department of Defense · Defense Advanced Research Projects Agency

Award amount

$1,499,786

Program and phase

SBIR · Phase II

Award year

2023

Explore This Research Award in CaptureIQ

Research the technology, evaluate the recipient and agency, identify related opportunities, and explore potential follow-on work with CaptureIQ.

Award details

Awarding agency
Department of Defense
Branch
Defense Advanced Research Projects Agency
Recipient company
GRAMMATECH INC
Proposal award date
2023-02-28
Contract end date
2026-02-28
UEI
CBXRSPNRF8F9
Solicitation number
HR001121S0007.I
Topic code
HR001121S0007-10

Research abstract

The C language has traditionally emphasized a program’s runtime performance, achieved by leaving low-level memory management to the programmer. Countless program crashes, hangs, and security vulnerabilities have been attributed to uninformed or malicious use of this freedom. C’s extension C++ provides better programming abstractions but insists on backward compatibility with C and thus suffers from similar risks, which are unacceptable in domains like systems programming or for defense applications. In contrast, languages considered to be (memory-)safe restrict direct memory access by programmers and include C#, Java, and Go. The Rust programming language offers safe programming features without resorting to expensive runtime management techniques like garbage collection and can therefore promise to deliver well-performing system-level and network applications. In order to extend the advantages of modern languages to legacy code, this proposal presents a strategy for migrating actively used C++ code to Rust that maximally benefits from the idiomatic and safety features of Rust, such as aggressively employing move semantics for assignments, and generics for reusable code patterns. We are seeking to produce human-maintainable programs in Rust, suitable for code under active development. Our strategy is to perform the migration in two stages. We begin with a refactoring step that attempts to harden the given C++ code, guided by Rust safe-programming rules. This step prepares the code for an easier migration to Rust, but also results in safer C++ code as a useful intermediate product. The refactoring is followed by a target code generation step, which attempts to recognize code segments with a particular intent, represents these in a language-agnostic concept representation, and retargets these concepts into Rust, using a library of Rust code templates. Acknowledging the hardness of the problem and the boldness of our proposed solution, our approach is semi-automatic, requesting user assistance to resolve ambiguities in inferring the intent of the code. The user interaction is supported by the integration of CRAM into an Integrated Development Environment, which displays the source code, the outcome of any refactorings, and the result of migrating code segments. For each operation performed on the source code, the user has the option of accepting or rejecting it, and of modifying its result. Despite human involvement, a problem of this magnitude demands an arsenal of assurance artifacts, such as tests and proofs, that aim to give evidence of the correctness of the migration, and the reliability of the target program. Our approach will deliver both migrated and automatically generated test cases, as well as proofs that establish the preservation of the program semantics by our refactoring and code generation steps.

Technology keywords

Not reported

Other awards by this recipient

Verified by the same UEI. These are other public SBIR/STTR award pages, not a merged company record.

Awards with the same topic code

Verified by an exact topic code match. This is not a text-similarity match.

Research funding history

132 SBIR/STTR records share this UEI (1989–2025). Reported award amounts total $51,342,070. Reported amounts are not federal obligations.

Phases: Phase I, Phase II, Phase II – Direct to Phase II

Agencies: Department of Defense, National Aeronautics and Space Administration, Department of Homeland Security, National Science Foundation, Department of Commerce

Agency intelligence

Department of Defense

Back to SBIR/STTR Research Awards

Don't take our word for it. Ask AI about RFPCapture.

See what leading AI assistants have to say about RFPCapture and CaptureIQ.

Gemini opens without a prefilled question. The question is copied to your clipboard when the button works. You can also copy it here:

What is RFPCapture.com and its CaptureIQ platform from Smart Logic AI? How does it help federal contractors discover opportunities, evaluate bid/no-bid decisions, research government contracts, and prepare proposals? How does it compare with other federal capture platforms? Use independent sources where available.