Virtually all verification and synthesis techniques assume that the formal specifications are readily available, functionally correct, and fully match the engineer's understanding of the given system. However, this assumption is often unrealistic in practice: formalizing system requirements is notoriously difficult, error-prone, and requires substantial training. To alleviate this severe hurdle, we propose a fundamentally novel approach to writing formal specifications, named specification sketching for Linear Temporal Logic (LTL). The key idea is that an engineer can provide a partial LTL formula, called an LTL sketch, where parts that are hard to formalize can be left out. Given a set of examples describing system behaviors that the specification should or should not allow, the task of a so-called sketching algorithm is then to complete a given sketch such that the resulting LTL formula is consistent with the examples. We show that deciding whether a sketch can be completed falls into the complexity class NP and present two SAT-based sketching algorithms. We also demonstrate that sketching is a practical approach to writing formal specifications using a prototype implementation.
翻译:几乎所有的核查和综合技术几乎都假定,正式规格是现成的,功能正确,完全符合工程师对特定系统的理解。然而,这一假设在实践中往往不切实际:系统要求正规化非常困难,容易出错,需要大量培训。为了缓解这一严重障碍,我们提议了一种全新的方法来编写正式规格,为线性时空逻辑(LTL)指定规格。关键的想法是,工程师可以提供部分LTL公式,称为LTL草图,其中有些部分难以正式确定。鉴于一系列例子说明规格应该或不应该允许的系统行为,因此所谓的绘图算法的任务是完成某种特定草图,使由此产生的LTL公式与实例相一致。我们表明,确定草图能否完成,要到复杂的NP级,并推出两个基于SAT的草图算法。我们还表明,草图是使用原执行方式编写正式规格的实用方法。