A number of SAT-based analysis concepts and tools for software product lines exist, that extract code dependencies in propositional logic from the source code assets of the product line. On these extracted conditions, SAT-solvers are used to reason about the variability. However, in practice, a lot of software product lines use integer-based variability. The variability variables hold integer values, and integer operators are used in the conditions. Most existing analysis tools can not handle this kind of variability; they expect pure Boolean conditions. This paper introduces an approach to convert integer-based variability conditions to propositional logic. Running this approach as a preparation on an integer-based product line allows the existing SAT-based analyses to work without any modifications. The pure Boolean formulas, that our approach builds as a replacement for the integer-based conditions, are mostly equivalent to the original conditions with respect to satisfiability. Our approach was motivated by and implemented in the context of a real-world industrial case-study, where such a preparation was necessary to analyze the variability. Our contribution is an approach to convert conditions, that use integer variables, into propositional formulas, to enable easy usage of SAT-solvers on the result. It works well on restricted variables (i.e. variables with a small range of allowed values); unrestricted integer variables are handled less exact, but still retain useful variability information.
翻译:存在一些基于SAT的软件产品系列分析概念和工具,这些概念和工具可以从产品系列源代码资产中的源代码资产中提取参数逻辑的代号依赖性。在这些提取的条件中,SAT-溶解器被用来解释变异性。然而,在实践中,许多软件产品系列使用基于整数的变异性。变异性变量持有整数值,整数操作员在条件中使用。大多数现有分析工具无法处理这种变异性;它们期望纯布林条件。本文介绍了一种将基于整数的变异性条件转换为假设逻辑的方法。作为基于整数的产品系列的准备,使现有的基于SAT的分析得以在不作任何修改的情况下发挥作用。纯布林公式是用来取代基于整数的变异性条件的,在多数情况下,这些变异性都相当于对可变性的原始条件。我们的方法是由现实世界的工业案例研究推动和实施的,而这种研究对于分析这种变异性是必要的。我们的贡献是将条件转换的一种方法,即使用基于整数变量,将基于整数的变异性变量变为基于基公式的公式,不作任何修改。