0% found this document useful (0 votes)
54 views

Analyzing Correctness

This document discusses formal methods for analyzing correctness in models. It describes verifying syntactic and semantic correctness by analyzing models automatically using modeling tools or manually through inspections. Model checking is introduced as an automated approach to verify that a model satisfies requirements by exploring all possible states. The process of model checking involves creating a model and formalizing requirements, then using a model checker to determine if the model satisfies the requirements.

Uploaded by

NF study Study
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views

Analyzing Correctness

This document discusses formal methods for analyzing correctness in models. It describes verifying syntactic and semantic correctness by analyzing models automatically using modeling tools or manually through inspections. Model checking is introduced as an automated approach to verify that a model satisfies requirements by exploring all possible states. The process of model checking involves creating a model and formalizing requirements, then using a model checker to determine if the model satisfies the requirements.

Uploaded by

NF study Study
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Formal Methods

Analyzing Correctness
Analyzing Correctness
❖Correctness is the degree to which a model satisfies its software requirements
and software design specifications, is free of defects, and ultimately meets the
stakeholders’ needs.
❖Analyzing for correctness includes verifying syntactic correctness of the model
(that is, correct use of the modeling language grammar and constructs)
❖and
❖verifying semantic correctness of the model (that is, use of the modeling
language constructs to correctly represent the meaning of that which is being
modeled).
Analyzing Correctness Contd
• To analyze a model for syntactic and semantic correctness, one
analyzes it
• either automatically (for example, using the modeling tool to check
for model syntactic correctness) or
• manually (using inspections or other review techniques)
• searching for possible defects and then removing or repairing the
confirmed defects before the software is released for use.
Model checking
• Model checking is an automated approach to verify that a model of a
finite state system satisfies a formal specification of requirements to
the system. In this approach the models describe how the state of the
system may evolve over time, and the requirements are some
constraints on how the state of the system is allowed to evolve over
time.
The process of applying model checking
• Given a system that should be verified to meet some given informal
requirements (some desired properties of the system), the first step is
to create a model of the system and to formalize the requirements
obtaining a formal specification of these (called a property
specification in the model checking community). The next step is to
use a model checker to check whether the model actually satisfies the
property specification.
Contd
• The model checker decides this by completely exploring all system
states that can be reached according to the model and check that the
property specification holds for these.
• The complete exploration is possible as only system models having a
finite number of states are considered.
• The model checker returns information about whether the model
satisfied the property specification or not.
• In the latter case it will provide a counterexample, i.e. a description of
a run of the system (model) that leads to a state for which a the
property specification is not meet.
Models
• In the model checking approach, a system model describes how the
state of the system may change over time.
• It is typically expressed in terms of so called finite-state automata
(also called finite state machines) that describe the (potential)
possible states, the initial state, and the possible state transitions.
Model checking
ATM Model checking
States in ATM model checking
Vending machine model checking
States in Vending machine model checking
Computer based tools
• A model checker is a computer based tool that automatically
performs model checking. Many model checkers exist. Each of these
uses a specific language for expressing models and a specific language
for expressing properties, and they are implemented using specific
model checking techniques/algorithms. Some tools offer the user the
choice between different kinds of model checking techniques. Some
notable examples of model checkers are SPIN [SPI], NuSMV [NuS],
and SAL [SAL01].

You might also like