论文标题
基于SAT提取的Java库的行为模型,并带有藏书
SAT-Based Extraction of Behavioural Models for Java Libraries with Collections
论文作者
论文摘要
行为模型是用于软件验证,测试,监视,发布的有价值的工具。但是,软件开发人员很少提供它们,必须从源或编译的代码中提取。在Java程序的背景下,有许多用于构建行为模型的方法。这些方法中的大多数都依赖于编译字节码的分析。取而代之的是,我们希望以有限状态机器(FSM)的形式从Java源代码中提取行为模型,以确保软件开发人员可以轻松理解所获得的FSM,并在必要时更新或集成到原始源代码,例如。以注释的形式。现代软件系统巨大,依靠外部库并与其环境互动。因此,提取有用的行为模型需要抽象。在本文中,我们通过关注FSMS建模库API的提取来提出针对此问题的初步方法。我们专注于涉及使用集合的Java代码的分析。为此,我们使用布尔谓词模式编码收集操作的操作语义。这些模式是根据对API实现方法的源代码进行的分析来实例化的,以形成可能的FSM过渡的编码。然后使用SAT求解器来确定这些过渡的启用条件(守卫)。
Behavioural models are a valuable tool for software verification, testing, monitoring, publishing etc. However, they are rarely provided by the software developers and have to be extracted either from the source or from the compiled code. In the context of Java programs, a number of approaches exist for building behavioural models. Most of these approaches rely on the analysis of the compiled bytecode. Instead, we are looking to extract behavioural models in the form of Finite State Machines (FSMs) from the Java source code to ensure that the obtained FSMs can be easily understood by the software developers and, if necessary, updated or integrated into the original source code, e.g. in the form of annotations. Modern software systems are huge, rely on external libraries and interact with their environment. Hence, extracting useful behavioural models requires abstraction. In this paper, we present an initial approach to this problem by focusing on the extraction of FSMs modelling library APIs. We focus on the analysis of Java code involving the use of collections. To this end, we encode the operational semantics of collection operations using patterns of Boolean predicates. These patterns are instantiated based on the analysis of the source code of API implementation methods to form an encoding of the possible FSM transitions. A SAT solver is then used to determine the enabledness conditions (guards) of these transitions.