BGBin Gu

Bin Gu

*This is an algorithmically generated author record based on publicly available information.

Current Organizations / Institutes

The organizations/institutes from the scholar's latest article


Bin Gu has a total of 73 co-authors. Here are the top co-authors by number of shared publications:


Latest Publications

  • Open Access

    AutoFLC: An LLM-Based Flowchart Generation Tool for Legacy Code Repository

    by Yixing Luo, Longxing Yang, Xiaofeng Li, Bin Gu, Zhi Jin

  • Open Access

    MARS 2.0: A Toolchain for Designing Safety-Critical Cyber-Physical Systems

    by Xiong Xu, Shuling Wang, Bohua Zhan, Binghao Mu, Xiangyu Jin, Guanhua Lin, Xing Li, Fanjiang Xu, Bin Gu, Mengfei Yang, et al.

    This paper presents MARS 2.0, an integrated toolchain for the model-driven design of safety-critical Cyber-Physical Systems (CPSs). MARS 2.0 supports an end-to-end workflow spanning unified modeling, formal verification, and trusted code generation. Building on its predecessor, MARS 2.0 introduces three key enhancements: (1) a co-modeling framework that combines AADL (for system architecture) and Simulink/Stateflow (for functional and physical behaviors)—denoted \(\textsf {AADL}\!\oplus \!\textsf {S/S} \) ; (2) provers based on Hybrid Hoare Logic (HHL) for verifying formal models; and (3) correct-by-construction code generation from verified models. In MARS 2.0, users first construct an \(\textsf {AADL}\!\oplus \!\textsf {S/S} \) model to capture the system’s architecture, control logic, and continuous dynamics in a unified framework. This model is then automatically translated into Hybrid Communicating Sequential Processes (HCSP), a formal modeling language for hybrid systems. The resulting HCSP program can be (1) simulated for rapid validation, and (2) formally verified using the HHLProver suite. Finally, once verified, the HCSP model is compiled into executable ANSI-C or SystemC code. Critically, both the “ \(\textsf {AADL}\!\oplus \!\textsf {S/S} \) to HCSP” translation and the “HCSP to ANSI-C/SystemC” code generation are backed by formal proofs of semantic preservation. By bridging industrial modeling notations with formal methods, MARS 2.0 makes rigorous CPS development accessible to engineers.

  • Open Access

    Derivative-Agnostic Inference of Nonlinear Hybrid Systems

    by Hengzhi Yu, Bohan Ma, Mingshuai Chen, Huangying Dong, Jie An, Bin Gu, Naijun Zhan, Jianwei Yin

  • Open Access

    A Tale of 1001 LoC: Potential Runtime Error-Guided Specification Synthesis for Verifying Large-Scale Programs

    by Zhongyi Wang, Tengjie Lin, Mingshuai Chen, Haokun Li, Mingqi Yang, Xiao Yi, Shengchao Qin, Yixing Luo, Xiaofeng Li, Bin Gu, et al.

    Fully automated verification of large-scale software and hardware systems is arguably the holy grail of formal methods. Large language models (LLMs) have recently demonstrated their potential for enhancing the degree of automation in formal verification by, e.g., generating formal specifications as essential to deductive verification, yet exhibit poor scalability due to long-context reasoning limitations and, more importantly, the difficulty of inferring complex, interprocedural specifications. This paper presents Preguss - a modular, fine-grained framework for automating the generation and refinement of formal specifications. Preguss synergizes between static analysis and deductive verification by steering two components in a divide-and-conquer fashion: (i) potential runtime error-guided construction and prioritization of verification units, and (ii) LLM-aided synthesis of interprocedural specifications at the unit level. We show that Preguss substantially outperforms state-of-the-art LLM-based approaches and, in particular, it enables highly automated RTE-freeness verification for real-world programs with over a thousand LoC, with a reduction of 80.6%~88.9% human verification effort.


  • Open Access

    Evaluating Large Language Models for Requirements Question Answering in Industrial Aerospace Software

    by Longxing Yang, Yixing Luo, Hao Gao, Yingshuang Fan, Jingru Zhang, Xiaofeng Li, Xiaogang Dong, Bin Gu, Zhi Jin, Mengfei Yang


  • Open Access

    STRUT: Structured Seed Case Guided Unit Test Generation for C Programs using LLMs

    by Jinwei Liu, Chao Li, Rui Chen, Shaofeng Li, Bin Gu, Mengfei Yang

    Unit testing plays a crucial role in bug detection and ensuring software correctness. It helps developers identify errors early in development, thereby reducing software defects. In recent years, large language models (LLMs) have demonstrated significant potential in automating unit test generation. However, using LLMs to generate unit tests faces many challenges. 1) The execution pass rate of the test cases generated by LLMs is low. 2) The test case coverage is inadequate, making it challenging to detect potential risks in the code. 3) Current research methods primarily focus on languages such as Java and Python, while studies on C programming are scarce, despite its importance in the real world. To address these challenges, we propose STRUT, a novel unit test generation method. STRUT utilizes structured test cases as a bridge between complex programming languages and LLMs. Instead of directly generating test code, STRUT guides LLMs to produce structured test cases, thereby alleviating the limitations of LLMs when generating code for programming languages with complex features. First, STRUT analyzes the context of focal methods and constructs structured seed test cases for them. These seed test cases then guide LLMs to generate a set of structured test cases. Subsequently, a rule-based approach is employed to convert the structured set of test cases into executable test code. We conducted a comprehensive evaluation of STRUT, which achieved an impressive execution pass rate of 96.01%, along with 77.67% line coverage and 63.60% branch coverage. This performance significantly surpasses that of the LLMs-based baseline methods and the symbolic execution tool SunwiseAUnit. These results highlight STRUT's superior capability in generating high-quality unit test cases by leveraging the strengths of LLMs while addressing their inherent limitations.


  • Open Access

    Test Case Generation for Simulink Models using Model Fuzzing and State Solving

    by Zhuo Su, Zehong Yu, Dongyan Wang, Wanli Chang, Bin Gu, Yu Jiang

    Simulink plays an important role in the industry for modeling and synthesis of embedded systems. Ensuring system stability requires using numerous test cases to validate the functionality and safety of the models. However, as requirements increase, the complexity of the models poses new challenges to traditional testing methods. Traditional methods such as constraint solving and random search run into significant obstacles when navigating the complex branching logic and states within models. In this paper, we introduce HybridTCG, a test case generation method by collaborating model fuzzing and state solving for Simulink models. First, HybridTCG starts a code-based fuzzer to generate high-coverage test cases rapidly. Then, it refines the test cases generated by the fuzzer, preserving only those that can achieve new model coverage. These selected test cases are input into the state-solving engine to derive corresponding states and resolve the constraints of subsequent branches. Ultimately, the test cases produced by the solving engine will be fed back into the fuzzer as high-quality seeds to enhance the fuzzing process. We have implemented HybridTCG and conducted a comprehensive evaluation using various benchmark Simulink models. Compared to the built-in Simulink Design Verifier and state-of-the-art academic work SimCoTest and STCG, HybridTCG achieves an average improvement of 54%, 108% and 24% on Decision Coverage, 50%, 62% and 6% on Condition Coverage, 291%, 282% and 45% on Modified Condition Decision Coverage, respectively. Moreover, HybridTCG is also much more efficient in testing than other tools.


  • Open Access

    Reset controller synthesis: a correct-by-construction way to the design of CPS

    by Naijun Zhan, Han Su, Mengfei Yang, Bin Gu

    Controller synthesis offers a correct-by-construction methodology to ensure the correctness and reliability of safety-critical cyber-physical systems (CPS). Controllers are classified based on the types of controls they employ, which include reset controllers, feedback controllers and switching logic controllers. Reset controllers steer the behavior of a CPS to achieve system objectives by restricting its initial set and redefining its reset map associated with discrete jumps. Although the synthesis of feedback controllers and switching logic controllers has received considerable attention, research on reset controller synthesis is still in its early stages, despite its theoretical and practical significance. This paper outlines our recent efforts to address this gap. Our approach reduces the problem to computing differential invariants and reach-avoid sets. For polynomial CPS, the resulting problems can be solved by further reduction to convex optimizations. Moreover, considering the inevitable presence of time delays in CPS design, we further consider synthesizing reset controllers for CPS that incorporate delays.