Natural-language (NL) requirements remain the dominant specification medium in industrial software and cyber-physical systems,yet formal verification requires precise temporal logic formulas. Prior work introduced OnionL, a hierarchical intermediate representation (IR) that enables reliable NL-to-LTL translation by combining LLM based semantic decomposition with deterministic rule-based synthesis.This paper presents TlCrafter, a new interactive tool that (i) extends the original IR to OnionL+, which supports branching-time specifications in Computation Tree Logic (CTL) and to real-time specifications in Signal Temporal Logic (STL); (ii) automatically recommends the most suitable target temporal logic (LTL/CTL/STL) from NL based on semantic analysis; (iii) provides a user-friendly visual interface that supports human-in-the-loop correction on a structured OnionL+ tree; and (iv) closes the formalization loop via requirement refinement, generating unambiguous, temporally explicit NL paraphrases after users confirm the semi-formal OnionL+ structure. We demonstrate how our tool can be used to streamline the formalization of industrial requirements, reporting empirical results on aerospace, robotics, and automotive datasets that confirm high logic recommendation accuracy and translation quality.
We have released the implementation of TLCrafter and all associated data to encourage comparable and evidence-based studies. The artifact is publicly available on Zenodo ([https://zenodo.org/records/21150349]), which includes the source code and all datasets used in our experiments.
Additionally, we have deployed an online demonstration for users to experience the tool directly.
Web Access (Online Demo): Please Click Here to Use TLCrafter
The paper introduces a novel intermediate representation OnionL, which decomposes requirements into a compositional tree composed of semantic scopes, logical relations, and atomic propositions, thereby enabling structured and verifiable translation.
Automated logic judgment supporting
LTL, STL & CTL and generate
Onion-based decomposition into explicit
operator trees
Automated syntax validation and Visual
editing with human-in-the-loop
We propose TlCrafter, a human-in-the-loop tool for formalizing software requirements into temporal logic. The main workflow of TlCrafter is illustrated in the following Figure, which consists of the following steps:
(1)Logic Recommendation: TlCrafter begins by analyzing the input natural language (NL) requirement to recommend a suitable target logic from {LTL, CTL, STL}. This recommender is designed to be both explainable and overrideable: it reports the specific linguistic cues supporting its decision (e.g., metric time bounds suggesting STL, or existential branching suggesting CTL). Users review these cues and may force a different logic type if desired, ensuring the subsequent formalization aligns with the intended verification domain.
(2)NL-to-OnionL+ Decomposition: Based on the selected logic, TlCrafter constructs an OnionL+ tree from the NL input. This step transforms unstructured text into a structured intermediate representation, making explicit the requirement’s operator structure (scopes, relations) and leaf predicates (atomic signal/state constraints). The decomposition is logic-aware: for STL, the tree supports interval-annotated temporal scopes and real-valued signal predicates; for CTL, it integrates explicit path-quantified temporal scopes. This structured representation serves as the foundation for both deterministic compilation and user interaction.
(3)Human-in-the-loop Refinement: To bridge the semantic gap between natural language and formal logic, TlCrafter provides a visual tree interface for inspecting and editing the OnionL+ structure. Users can refine the specification by correcting scope attachments, operators, intervals, and predicates through structured edits. Furthermore, after confirming the tree structure, the user can require TlCrafter to generate a temporally explicit NL paraphrase aligned with the validated structure. This feedback mechanism helps users resolve ambiguity and reduces the risk of “silent” semantic mismatches.
(4)Validation and Deterministic Synthesis: In the final stage, the backend validates the OnionL+ trees using a logic-dependent typing discipline. This involves checking operator arity and well-formedness, enforcing logic-specific constraints (e.g., CTL path quantification or STL intervals), and normalizing predicate leaves into a canonical schema. Once validated, the tool deterministically compiles the OnionL+ tree into a unique formal formula. This process ensures the syntactic correctness of the output and produces standardized specifications suitable for downstream verification tasks.
We evaluate TLCrafter as a practical tool for translating industrial Natural Language (NL) requirements into formal temporal logic specifications across multiple logics, including LTL, CTL, and STL. To assess its end-to-end effectiveness, we utilize a combination of academic benchmarks and diverse industrial datasets:
We reuse the widely adopted NL-to-LTL benchmark, which encompasses three distinct domains: Circuit, Navigation, and Office Email. Our approach, ONIONL⁺, achieves consistently high accuracy across these domains, matching or exceeding established strong baselines.
To test the tool's performance in real-world scenarios, we evaluate it on three specialized industrial datasets, all paired with expert-validated gold formulas:
LTL-Aero: Consists of 112 requirements derived from two spacecraft systems (reused from prior research).
STL-62: Includes 62 requirements covering both real-world physically meaningful constraints and structurally complex synthetic formulas.
CTL-100: Features 100 requirements capturing branching-time reachability and inevitability properties within the field of robotics.
The Tool Visual Tree for the LTL Case Study
Natural Language:If the system is in the dual inertial navigation calculation angle working mode, then globally, the input angle is equal to 0.5 times the product of the sum of the angles in inertial navigation module 1 and inertial navigation module 2, and the reasonable flags of both inertial navigation modules is true.
Label STL:G (workmode = DualINUMode -> G ((InputAngle = 0.5 * Angle_Module1 + 0.5 *
Angle_Module2) /\ (RationalFlag_Module1 = True) /\ (RationalFlag_Module2 = True)))
Tool Final Result:G (mode == dual_inertial_navigation_calculation_angle -> G (input_angle == 0.5 * ((angle_module_1 + angle_module_2)) && (Module1 == true && Module2 == true)))
The Tool Visual Tree for the STL Case Study
Natural Language:Globally, in case that the Combustion Chamber Pressure signal is greater than 10.0 MPa and less than 15.0 MPa, and the value of Turbopump Speed is no less than 20,000 rpm and smaller than 25,000 rpm then all of the following conditions hold: there needs to exist a time within 2 to 10 time units, at which High-Frequency Vibration is at most 5.0 g consecutively in the future before the end of the execution.
Label STL:G (((Chamber > 10.0 && Chamber < 15.0) && (Turbopump >= 20000 && Turbopump < 25000)) -> F[2,10] (G (High-Frequency Vibration <= 5.0)))
Tool Final Result:G (((Combustion Chamber > 10.0 && Combustion Chamber < 15.0) && (Turbopump >= 20000 && Turbopump < 25000)) -> F[2,10] (G (High-Frequency Vibration <= 5.0)))
The Tool Visual Tree for the CTL Case Study
Natural Language:If the system is in the dual attitude determination working mode, then at the next control cycle, the output angular rate shall be equal to the average of the angular rates computed by attitude module A and attitude module B, and from that point on, both modules shall remain valid.
Label STL:AG (workmode = Dual_ATT -> (AX(InputAngle = 0.5*times Angle_Module1 + 0.5*times Angle_Module2) && AG(RationalFlag_Module1 = True && RationalFlag_Module2 = True)))
Tool Final Result:AG(((system == dual_attitude_determination_working_mode) -> (AX((output_angular_rate == average(angular_rate_module_A, angular_rate_module_B))) & AG(((module_A == valid) & (module_B == valid))))))