ic, which is based almost entirely on
Boolean and enumerated types.
The RM logic was broken down
into three components that could be
analyzed individually. While relatively
small (they contained a total of 169
primitive Simulink blocks organized
into 23 subsystems, with reachable
state spaces ranging from 2. 1 × 104
to 6.0 × 1013 states), the RM logic was
replicated in the OFP once for each of
the 10 control surfaces on the aircraft,
making it a significant portion of the
OFP logic.
To compare the effectiveness of
model checking and testing at discovering errors, this project had two independent verification teams, one that
used testing and one that used model
checking. The formal verification team
developed a total of 62 properties from
the OFP requirements and checked
these properties with the NuSMV model checker, uncovering 12 errors in the
RM logic. Of these 12 errors, four were
classified by Lockheed Martin as severity 3 (only severity 1 and 2 can affect
the safety of flight), two were classified
as severity 4, two resulted in requirements changes, one was redundant,
and three resulted from requirements
that had not yet been implemented in
the release of the software.
In similar fashion, the testing team
developed a series of tests from the
same OFP requirements. Even though
the testing team invested almost half
as much time in testing as the formal verification team spent in model
checking, testing failed to find any errors. The main reason for this was that
the demonstration was not a comprehensive test program. While some of
these errors could be found through
testing, the cost would be much higher, both to find and fix the errors. In
addition, the errors found through
model checking tended to be intermittent, near simultaneous, or combinatory sequences of failures that would
be very difficult to detect through testing. The conclusion of both teams was
that model checking was shown to
be more cost effective than testing in
finding design errors.
Cer Ta FCS Phase II. The purpose of
Phase II of the Cer TA FCS project was
to investigate whether model checking
could be used to verify large, numerically intensive models. In this study,
Running a set of
properties after
each model revision
is a quick and
easy way to see
if anything has
been broken. We
encourage our
developers
to “check your
models early and
check them often.”
the translation framework and model
checking tools were used to verify
important properties of the Effector
Blender (EB) logic of an OFP for a UAV
similar to that verified in Phase I.
The EB is a central component of
the OFP that generates the actuator
commands for the aircraft’s six control
surfaces. It is a large, complex model
that repeatedly manipulates a 3 × 6
matrix of floating point numbers. It inputs 32 floating point inputs and a 3 ×
6 matrix of floating point numbers and
outputs a 1 × 6 matrix of floating point
numbers. It contains over 2,000 basic
Simulink blocks organized into 166
Simulink subsystems, many of which
are Stateflow models.
Because of its extensive use of floating point numbers and large state
space, the EB cannot be verified using
a BDD-based model checker such as
NuSMV. Instead, the EB was analyzed
using the Prover SMT-solver from
Prover Technologies. Even with the additional capabilities of Prover, several
new issues had to be addressed, the
hardest being dealing with floating
point numbers.
While Prover has powerful decision
procedures for linear arithmetic with
real numbers and bit-level decision
procedures for integers, it does not
have decision procedures for floating
point numbers. Translating the floating point numbers into real numbers
was rejected since much of the arithmetic in the EB is inherently nonlinear.
Also, the use of real numbers would
mask floating point arithmetic errors
such as overflow and underflow.
Instead, the translator framework
was extended to convert floating point
numbers to fixed point numbers using
a scaling factor provided by the OFP
designers. The fixed point numbers
were then converted to integers using
bit-shifting to preserve their magnitude. While this allowed the EB to be
verified using Prover’s bit-level integer
decision procedures, the results were
unsound due to the loss of precision.
However, if errors were found in the
verified model, their presence could
easily be confirmed in the original
model. This allowed the verification
to be used as a highly effective debugging step, even though it did not guarantee correctness.
Determining what properties to