• The technique in the used analysis tool does not
enable a sufficient precision.
In the first case, it is still possible that a slightly
weaker form of the invariant holds. For example,
if the possible values of a variable are proven to be
bounded by a constant C in the model, it might be
possible to prove an invariant with a constant slightly
bigger than C on the model level. This has been done
in (Dierkes and K¨astner, 2012). In the second case, it
might still be possible to prove the invariant for cer-
tain cases, which are expressed by an additional con-
straint. The cases not covered by the constraint need
to be analyzed by testing.
The code level analysis was done using Astr´ee.
Concerning the first requirement, the proof of the
upper bounds of the equalization values which were
found on model level fails with Astr´ee, howeverit was
still possible to prove the following weaker property:
As long as
|Centering| ≤ 0.25,
it holds that
|EqualizationX| ≤ 1.0001 for X ∈ {A, B,C}.
This can be considered as a partial proof of the prop-
erty that we found on model level, and it means that
tests can only provide additional information if the
centering value exceeds 0.25. The condition that the
absolute value of the centering value must be less than
0.25 has to be found by the user, but it is easy to find
since it corresponds to the saturation limit which is
applied to the centering value. In other words, the
condition simply says that the centering value must
not be saturated. We suppose that this kind of condi-
tion would naturally be examined by a test engineer.
We can even further constrain the cases which
need to be tested, because we can prove that if the
system is in a state S where |EqualizationX| ≤ 0.96,
then in every state which is reachable from S in one
transition it holds that |EqualizationX| ≤ 1.0001.
For the second requirement, we did not succeed
in proving the property with additional constraints.
However, we still can prove that if the system is in
a state S in which for X,Y ∈ {A, B,C}
|EqualizationX − EqualizationY| ≤ 0.96,
then in every state which is reachable from S in one
transition it holds that for X,Y ∈ {A, B,C}
|EqualizationX − EqualizationY| ≤ 1.0.
This result is relatively weak, since it only says that
if we want to test whether the pairwise difference of
two equalization values can exceed 1.0, we first have
to reach a state where it exceeds 0.96. However, we
can still consider this as a quality criterion for tests,
i.e. that the difference value must exceed 0.96, and
furthermore it may be possible to get a larger bound
than 0.96 by using a more precise analysis, possibly
implemented in future versions of Astr´ee. Finally, the
result was easy to obtain, and even if in the end the
verification is mainly done by testing, the additional
overhead stays low.
In (Dierkes, 2011), we havepresented an approach
in which rounding errors are over-approximated on
the model level, and the resulting verification prob-
lem is treated using an SMT solver. This approach al-
lows to obtain a significantly higher precision as tools
based on abstract interpretation, but it has two draw-
backs:
1. The complexity of the resulting SMT problem is
very high, and the scalability of this approach is
very week.
2. No qualifiable tool exists today which can trans-
late C code into an SMT formula, and check the
SMT formula for satisfiability, and probably, no
such tool will be available in the near future. Re-
sults furnished by non-qualified tools can increase
confidence that an implementation behaves cor-
rectly, but they cannot be used to replace tests with
respect to certification. Therefore, the testing ef-
fort would not be diminished.
Note that the property that the sum of all three
equalization values is bounded by 1.5 that we have
proven to be invariant on model level cannot be ex-
ploited by the current version of Astr´ee, since it can-
not be represented with sufficient precision by any ab-
stract domain implemented into this tool under its cur-
rent version.
4.3 Test Generation
For the first requirement, the test objective is to find
an input sequence which leads to a state in which one
of the equalization values, let’s say EqualizationA, is
greater than 1.0001. We know from formal analysis
that this is only possible if a state is reached which
fulfills the predicate
P = EqualizationA > 0.96 and Centering > 0.25.
Therefore, our first test objective is to find an input
sequence which leads to a state satisfying P.
For a human test engineer, an intuitive way to
reach a state which satisfies P would be first to make
EqualizationA as large as possible. This can be ob-
tained by setting InputA to 0.5 and the two other
inputs to −0.5 for a large number of cycles, which
would set EqualizationA to a value close to 1.0. Then,
in order to make the centering value maximal, InputB
MODELSWARD2014-InternationalConferenceonModel-DrivenEngineeringandSoftwareDevelopment
642