ProsaBuddy: Assisting Mechanized Real-Time Schedulability Analysis with LLM-based Agents
Authors: Junyi Liu, Tianchi Ren, Fei Guan, Xu Jiang, Zhe Jiang, Wang Yi, Nan Guan
Organizations: City University of Hong Kong · Northeastern University (China) · Northeast Forestry University · University of Electronic Science and Technology of China · Southeast University · Uppsala University
Rigorous schedulability analysis is essential for the design of hard real-time systems, yet errors in pen-and-paper proofs threaten the safety of critical applications. The Prosa initiative addresses this by offering a foundation for building machine-checkable schedulability analysis proofs in the Rocq proof assistant. However, the substantial time and expertise required to construct such proofs remain a major barrier for wider adoption of Prosa. This work presents ProsaBuddy, an LLM?based agent system designed to lower the effort needed to develop mechanized real-time schedulability proofs. ProsaBuddy employs a ReAct loop with retrieval over the Prosa codebase, access to Rocq tools and optional human-written hints. It uses a subgoal?delegation architecture, decomposing a lemma into subgoals and dispatches them to subagents for proof. We evaluate ProsaBuddy on a mini benchmark drawn from real-time scheduling literature. Experiment results show that ProsaBuddy significantly outper?forms state-of-the-art LLM-based Rocq automated proving agent systems and a general coding agent OpenCode
Figures & tables
Name
Source
Year
Prover
Availability
CoqPilot
[ 32 ]
2024
Coq
Yes
PALM
[ 33 ]
2024
Coq
Yes
COPRA
[ 34 ]
2024
Coq
Yes
Liu etc.
[ 35 ]
2024
Coq
No
Lu etc.
[ 36 ]
2025
Coq
No
Rango
[ 37 ]
2025
Coq
Yes
TABLE I: LLM-based automated Coq/Rocq theorem proving systems
Fig. 2: Overview of ProsaBuddy
Name
Brief Description
Reshaping
If an expression is mathematically useful but its exact form does not match what a downstream lemma requires, we should create a subgoal dedicated to reshaping the expression into the exact needed form. Example: If the context contains size (filter P xs)≤1 , a useful subgoal is to reshape it into count P xs≤1 , so that a counting lemma can be applied directly.
Witnessing
An object may already be known to exist, but it is still hidden inside an existential statement or an informal paper description. Then the proof should create a subgoal to make that object explicit and record the facts that come with it before using it in later steps. Example: When the context contains an existential fact about a job arriving in an interval I and belonging to task tsk , a useful subgoal is to extract a concrete witness j together with facts such as arrives_in j I and job_task j = tsk .
Library Matching
Prosa, MathComp, or local lemma may already be the right tool, but the current proof state is not ready for applying it. Then the proof should create a subgoal dedicated to preparing that lemma application: specializing general hypotheses to the current case, and writing out the required premises as explicit subgoals to be proved. Example: Suppose a Prosa lemma can prove the desired conclusion once it is given premises such as job_task j = tsk and arrives_in j I . A useful low-level decomposition is to create separate subgoals for these premises, prove them first, and then apply the library lemma directly.
Case Splitting
A proof may need to be split into cases, but each branch should not be packed into one big proof region. Then the proof should create a subgoal to make the case split explicit: write out the branch condition, and leave the rest of the branch proof to later subgoals. Example: We already know that the next step depends on whether a job j belongs to the set of jobs arriving in interval I , but we should have a subgoal dedicated to splitting j ∈ jobs_arrived_during I , so that one branch explicitly carries the fact j ∈ jobs_arrived_during I , and the other branch explicitly carries the fact j ∈/ jobs_arrived_during I . Then the latter proof can handle the two branches separately, instead of hiding the whole case analysis inside one large proof step.
Lifting
When a goal concerns an set (e.g., counting, cardinality, or aggregation) but only per-element implications are available, introduce a subgoal to lift them to the set level. Example: If each job j that receives service in an interval I must have arrived before the end of I , a useful subgoal is to lift this fact to a counting inequality: count (fun j => receives_service_in I j) jobs ≤ count (fun j => arrived_before (end_of I) j) jobs .
TABLE II: Summary of Decomposition Guidelines
Fig. 3: An example of the decomposition-based proving procedure
Name
Brief Description
Small-step & inspect
Write one tactic at a time and inspect the resulting goal state after each step. This avoids writing long proof scripts without checking intermediate goals, and it helps keep the actual proof state in view.
Error priority
Resolve errors in priority order: syntax or parse errors first, then ill-typed terms, then unsolved goals or tactic failures, since later diagnostics are often consequences of earlier failures.
Tactic selection
Use simpler and more direct tactics before heavier or more search-based ones, such as reflexivity , lia , ring , tauto , congruence , auto / eauto , and decide / native_decide . For composite goals, decompose the goal first and automate each component separately.
Rewrite discipline
When rewrite fails because the rewritten term appears in dependent types, reorganize context with commands like generalize dependent or subst . Also, name small helper results with assert , pose proof , or set instead of packing too many steps into one long tactic chain.
Cleanup & final check
After a proof compiles, clean it up, choose deliberately between Qed and Defined , and then actually compile the file with a command such as coqc to make sure everything still works. A proof is not complete until temporary holes such as admit or Admitted. have been removed.
Syntax-driven rewrite
Before each rewrite, check whether the pattern required by the lemma already appears exactly in the current goal. If it does not, first transform the goal into that form instead of forcing the rewrite just because it seems mathematically correct.
TABLE III: Summary of Proving Skills
Classification
Operational role
Representative commands
Decision
VtProofStep
Advances or organizes the current proof state.
Tactic sentences, bullets, focusing commands and delimiters.
Allowed
VtQuery
Queries without modifying the interpretation state.
Check , Print , Search , Locate , and Show .
Allowed
VtStartProof
Initiates an interactive proof.
Lemma , Theorem , and proof-style Definition .
Forbidden
VtQed
Terminates or discards the current interactive proof.
Qed , Defined , Admitted , and Abort .
Forbidden
VtProofMode
Changes the proof mode used for subsequent proof commands.
Schedulability analysis is essential for certifying real-time systems, but existing tests are often developed through pen-and-paper proofs that are difficult to scale, validate, and maintain. Mechanized verification in PROSA/ROCQ offers a rigorous alternative, yet manually constructing such proofs requires substantial domain expertise and proof-engineering effort. Recent successes of large language models (LLMs) across a wide range of tasks make them promising candidates for generating PROSA/ROCQ scripts for mechanized theorem provers. However, state-of-the-art LLMs often lack the PROSA-specific knowledge required to correctly use its modeling abstractions and proof patterns. This paper introduces PROVE-RT, an LLM-assisted framework for generating PROSA/ROCQ scripts to mechanize schedulability analyses in real-time systems literature. PROVE-RT guides generation through dependency-aware informal sketches, retrieval from processed PROSA documentation, staged skeleton generation, and proof completion. We construct a mechanization-oriented corpus from 1, 191 real-time systems papers, containing 13, 134 informal sketches with dependency information. On a curated evaluation set, direct prompting of state-of-the-art LLMs fails to reliably generate valid PROSA mechanizations, whereas PROVE-RT achieves a success rate of 44.7%. These results show that retrieval-guided and staged LLM assistance can improve automated mechanization of schedulability analysis in PROSA/ROCQ.
Sadat Shahriyar, Shareef Ahmed, Abdullah Al Arafat
Florida International University · University of South Florida
The TLA+ (temporal logic of actions) formal specification toolkit has seen widespread adoption in modeling modern distributed software systems including databases, storage systems, ledgers and coordination protocols. This popularity is despite its two significant limitations for software verification: Firstly, TLA+ offers no way to detect drift between software implementation and mathematical specification; secondly, TLC and TLAPS cannot provide satisfactory proofs of arbitrary temporal logic properties. We address the second limitation and take a first step towards the first by translating TLA+ specifications into Verus, an auto-active verifier built for Rust, via both a deterministic transpiler and an agentic translator. We demonstrate that our LLM-based pipeline is able to generate proof obligations from TLA+ specifications at scale, and to produce fully machine checkable proofs of both safety and liveness properties. Since temporal logic reasoning in Verus is a largely new task for LLMs, our work yields a valuable evaluation dataset, which we use to map out current generation model capabilities in Verus theorem proving.
Kseniia Strelbytska, Balázs Szilágyi, Anna Mészáros +1
Stephen Perse Cambridge, UK · University of Cambridge, UK · Reasonable
Program verification establishes software correctness through machine-checkable proofs constructed in theorem provers. It's a guarantee especially valuable for code generated by large language models (LLMs), which is fluent but carries no assurance of correctness. Almost all existing provers, however, pursue pass rates alone at whatever sampling or search budget it takes, and overlook the success-vs-cost frontier; yet real software often carries hundreds of interdependent proof obligations, so what matters at scale is not whether one theorem can be proved, but how many can be proved economically. We introduce CoCo-Prover, which formalizes cost-efficient program proving as metalevel decision-making under cost, grounded on two-level proof graphs: an AND/OR proof hypergraph within each declaration is joined to a lemma-dependency graph across declarations; and at each step, it answers two questions: which open goals to select, and which actions to purchase on these goals. Selection stays symbolic as a topological pass over the proof graphs. Action choice is agent orchestration via metalevel decision-making: an agentic router treats every bounded specialist invocation as a separately priced, best-effort computation, matching heterogeneous specialist agents together with configurations, under evolved routing rules as evidence accumulates. On five program verification benchmarks in Lean 4 including function-level CLEVER, VERINA, and AlgoVeri, and repository-level NTP4VC and Vero, we show that CoCo-Prover achieves a better success-vs-cost frontier than baselines including frontier coding agents and state-of-the-art LLM-based provers: it achieves the best solve rate on every benchmark and up to 100% on two benchmarks. It also reduces cost by up to 30.9% compared to the strongest baseline with the strongest LLM in our evaluation.
Shuangjie Yao, Nikolaus Holzer, Mark Paul Santolucito +3
Columbia University · The Hong Kong University of Science and Technology · Barnard College, Columbia University