AsmL can be used to faithfully capture the abstract structure and step-wise behaviour of any discrete systems, including very complex ones such as:.. Integrated circuits, software co[r]
Trang 1Formal Methods in SE
Lecture 30
Trang 2OSI reference model
Application
Presentation
Session
Transport
Network
Data link
Physical
7
6
5
4
3
2
1
Communica tions medium
Network Data link Physical
Application Presentation Session
Transport Network Data link Physical
Application
Model-based specification
Algebraic specification
Trang 3Language (AsmL)
AsmL is a language for modelling the structure
and behaviour of digital systems
AsmL can be used to faithfully capture the
abstract structure and step-wise behaviour of
any discrete systems, including very complex
ones such as:
both hardware and software
Trang 4Abstract State
An AsmL model is said to be abstract because it
encodes only those aspects of the system’s structure that affect the behaviour being modelled
The goal is to use the minimum amount of detail
that accurately reproduces (or predicts) the
behaviour of the system
Abstraction helps us reduce complex problems into
manageable units and prevents us from getting lost in a sea of details
AsmL provides a variety of features that allow you to describe the
relevant state of a system in a very economical, highlevel way
Trang 5Turing Machine
An abstract state machine is a particular
kind of mathematical machine, like the
Turing machine (TM)
But unlike a TM, ASMs may be defined a
very high level of abstraction
An easy way to understand ASMs is to see
them as defining a succession of states
that may follow an initial state
Trang 6State transitions
The behaviour of a machine (its run) can always
be depicted as a sequence of states linked by
state transitions
• Moving from state A to state B is a state
transition
paint in green paint in red
Trang 7Each state is a particular “configuration” of the machine
The state may be simple or it may be very
large, with complex structure
But no matter how complex the state might
be, each step of the machine’s operation can
be seen as a well-defined transition from
one particular state to another
Trang 8Evolution of state variables
paint in green paint in red
We can view any machine’s state as a dictionary of
(Name, Value)
pairs, called state variables
(Colour, Red) is a variable, where “Colour” is the name of variable, “Red” is the value
Trang 9Evolution of state variables
Names are given by the machine’s symbolic vocabulary
Values are fixed elements, like numbers and strings of characters
The run of a machine is a series of
results form applying operations
to each state in succession
Trang 10Diagram shows the run of a machine that models how orders might be processed
S1
S3
S2
Each transition operation:
• can be seen as the result of invoking the machine’s
• calculates the subsequence state as output