Automatic generation of quality specifications

  • Authors:
  • Shaull Almagor;Guy Avni;Orna Kupferman

  • Affiliations:
  • School of Computer Science and Engineering, The Hebrew University, Jerusalem, Israel;School of Computer Science and Engineering, The Hebrew University, Jerusalem, Israel;School of Computer Science and Engineering, The Hebrew University, Jerusalem, Israel

  • Venue:
  • CAV'13 Proceedings of the 25th international conference on Computer Aided Verification
  • Year:
  • 2013

Quantified Score

Hi-index 0.00

Visualization

Abstract

The logic ${\ensuremath{\rm LTL}} ^{\triangledown } $ extends ${\ensuremath{\rm LTL}} $ by quality operators. The satisfaction value of an ${\ensuremath{\rm LTL}} ^{\triangledown } $ formula in a computation refines the 0/1 value of ${\ensuremath{\rm LTL}} $ formulas to a real value in [0,1]. The higher the value is, the better is the quality of the computation. The quality operator ∇λ, for a quality constant λ∈[0,1], enables the designer to prioritize different satisfaction possibilities. Formally, the satisfaction value of a sub-formula ∇λϕ is λ times the satisfaction value of ϕ. For example, the ${\ensuremath{\rm LTL}} ^{\triangledown } $ formula $G({\it req} \rightarrow (X {\it grant} \vee \triangledown _{\frac{1}{2}} F{\it grant}))$ has value 1 in computations in which every request is immediately followed by a grant, value $\frac{1}{2}$ if grants to some requests involve a delay, and value 0 if some request is not followed by a grant. The design of an ${\ensuremath{\rm LTL}} ^{\triangledown } $ formula typically starts with an ${\ensuremath{\rm LTL}} $ formula on top of which the designer adds the parameterized ∇ operators. In the Boolean setting, the problem of automatic generation of specifications from binary-tagged computations is of great importance and is a very challenging one. Here we consider the quantitative counterpart: an ${\ensuremath{\rm LTL}} ^{\triangledown } $ query is an ${\ensuremath{\rm LTL}} ^{\triangledown } $ formula in which some of the quality constants are replaced by variables. Given an ${\ensuremath{\rm LTL}} ^{\triangledown } $ query and a set of computations tagged by satisfaction values, the goal is to find an assignment to the variables in the query so that the obtained ${\ensuremath{\rm LTL}} ^{\triangledown } $ formula has the given satisfaction values, or, if this is impossible, best approximates them. The motivation to solving ${\ensuremath{\rm LTL}} ^{\triangledown } $ queries is that in practice it is easier for a designer to provide desired satisfaction values in representative computations than to come up with quality constants that capture his intuition of good and bad quality. We study the problem of solving ${\ensuremath{\rm LTL}} ^{\triangledown } $ queries and show that while the problem is NP-hard, interesting fragments can be solved in polynomial time. One such fragment is the case of a single tagged computation, which we use for introducing a heuristic for the general case. The polynomial solution is based on an analysis of the search space, showing that reasoning about the infinitely many possible assignments can proceed by reasoning about their partition into finitely many classes. Our experimental results show the effectiveness and favorable outcome of the heuristic.