Active automata learning is an effective approach for deriving behavioral models in learning-based software testing. A major obstacle, however, is defining the learning alphabet that captures possible user interactions with the system under test. We propose an AI-assisted method that leverages large language models (LLMs) to automate and guide this process. Our approach uses two designed prompts that analyze a web application’s source code: the first extracts all possible frontend interactions and presents them as an editable, human-readable list for validation and abstraction refinement; the second uses this refined list and the source code to define concrete alphabet symbols for learning including their implementation. This method lowers the entry barrier to applying active automata learning and improves the quality of resulting models. We demonstrate its effectiveness on a real web application and show how the learned model can serve as behavioral reference for formal analysis and comparison.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Formal Methods Meet AI Guidance for Correct Software Development

  • Marco Krumrey,
  • Tiziana Margaria,
  • Bernhard Steffen

摘要

Active automata learning is an effective approach for deriving behavioral models in learning-based software testing. A major obstacle, however, is defining the learning alphabet that captures possible user interactions with the system under test. We propose an AI-assisted method that leverages large language models (LLMs) to automate and guide this process. Our approach uses two designed prompts that analyze a web application’s source code: the first extracts all possible frontend interactions and presents them as an editable, human-readable list for validation and abstraction refinement; the second uses this refined list and the source code to define concrete alphabet symbols for learning including their implementation. This method lowers the entry barrier to applying active automata learning and improves the quality of resulting models. We demonstrate its effectiveness on a real web application and show how the learned model can serve as behavioral reference for formal analysis and comparison.