Context: Conditional statements like "If A and B then C" are core elements for describing software requirements. However, there are many ways to express such conditionals in natural language and also many ways how they can be interpreted. We hypothesize that conditional statements in requirements are a source of ambiguity, potentially affecting downstream activities such as test case generation negatively. Objective: Our goal is to understand how specific conditionals are interpreted by readers who work with requirements. Method: We conduct a descriptive survey with 104 RE practitioners and ask how they interpret 12 different conditional clauses. We map their interpretations to logical formulas written in Propositional (Temporal) Logic and discuss the implications. Results: The conditionals in our tested requirements were interpreted ambiguously. We found that practitioners disagree on whether an antecedent is only sufficient or also necessary for the consequent. Interestingly, the disagreement persists even when the system behavior is known to the practitioners. We also found that certain cue phrases are associated with specific interpretations. Conclusion: Conditionals in requirements are a source of ambiguity and there is not just one way to interpret them formally. This affects any analysis that builds upon formalized requirements (e.g., inconsistency checking, test-case generation). Our results may also influence guidelines for writing requirements.
翻译:背景:“如果A和B然后C”等有条件声明是描述软件要求的核心要素。然而,有许多方法可以以自然语言表达这种条件,并用许多方法解释这些条件。我们假设,要求中的有条件声明是一个模糊的根源,有可能对下游活动产生负面的影响,例如产生测试案例。目标:我们的目标是了解使用要求的读者如何解释具体条件。方法:我们与104个RE从业者进行描述性调查,并询问它们如何解释12个不同的有条件条款。我们绘制了它们对以Propositional(临时)逻辑书写的逻辑公式的解释图,并讨论了其影响。结果:我们测试要求中的有条件声明被含糊地解释。我们发现,从业者对于由此产生的要求是否仅仅足够或是否也有必要存在分歧。有趣的是,即使从业者知道系统行为与要求相关。我们还发现某些提示短语与具体解释有关。结论:要求中的条件是一个模糊的来源,而且没有一种正式解释它们的方法。这也影响到根据正式要求进行的任何分析(例如,检查不一致性)。