Z Formal Specification Language An Overview IJERTV1IS6492
Z Formal Specification Language An Overview IJERTV1IS6492
ISSN: 2278-0181
Vol. 1 Issue 6, August - 2012
www.ijert.org 1
International Journal of Engineering Research & Technology (IJERT)
ISSN: 2278-0181
Vol. 1 Issue 6, August - 2012
www.ijert.org 2
International Journal of Engineering Research & Technology (IJERT)
ISSN: 2278-0181
Vol. 1 Issue 6, August - 2012
Concurrent systems are described using operator logs into the system. In this extract,
process oriented formal specification language. does the word it refers to the password or the
A specific implicit model for concurrency is operator identity?
the basis for these languages. In these Vagueness often occurs because a system
languages processes are denoted and built up specification is a very bulky document.
by expressions and elementary expressions, Achieving a high level of precision
respectively, which describe particularly consistently is an almost impossible task. It
simple processes. Ex. Communicating can lead to statements such as the
Sequential Processes (CSP) [8]. interface to the system used by radar operators
should be user-friendly or the virtual interface
2.3.4. Hybrid Languages shall be based on simple overall concepts that
Many systems are built with a combination of are straightforward to understand and use and
analog and digital components. In order to few in number. A casual perusal of these
specify and verify such systems it is necessary statements might not detect the underlying lack
to use a specification language that of any useful information.
encompasses both discrete and continuous Incompleteness: The most frequently
mathematics. There has been recent interest in occurring problems with system specifications.
these hybrid languages, such as CHARON [9]. For example, consider the functional
A simple example of a nonlinear hybrid requirement: The system should maintain the
system is that of a temperature controller. The hourly level of the reservoir from depth
temperature of a room is controlled through a sensors situated in the reservoir. These values
thermostat which continuously senses the should be stored for the past six months. This
temperature and turns the heater on and off. describes the main data storage part of a
system. If one of the commands for the system
3. Difference between Informal and was: The function of the AVERAGE
Formal Specification language command is to display on a PC the average
Requirements specification languages may be water level for a particular sensor between two
classified into two types: formal specification times. Assuming that no more detail was
languages and informal specification presented for this command, the details of the
languages. Informal specification language command would be seriously incomplete. For
uses natural language like English for example, the description of the command does
specifying requirements. But they tend to not include what should happen if a user of a
include various deficiencies such as a system system specifies a time that was more than six
specification can contain contradictions, months before the current hour.
ambiguities, vagueness, and incomplete On the other hand Formal specification
statements. languages have a mathematical (usually formal
Contradictions: Sets of statements that are at logic) basis and employ a formal notation to
variance with each other. For example, one model system requirements. The desired
part of a system specification may state that properties of a formal specification
the system must monitor all the temperatures consistency, completeness, and lack of
in a chemical reactor while another part, ambiguity are the objectives of all
perhaps written by another member of staff, specification methods. However, the use of
may state that only temperatures occurring formal methods results in a much higher
within a certain range are to be monitored. likelihood of achieving these ideals. The
Normally, contradictions that occur on the formal syntax of a specification language
same page of a system specification can be enables requirements or design to be
detected easily. However, contradictions are interpreted in only one way, eliminating
often separated by a large number of pages. ambiguity that often occurs when a natural
Ambiguities: Statements that can be language (e.g., English) or a graphical notation
interpreted in a number of ways. For example, must be interpreted by a reader. The
the following statement is ambiguous: The descriptive facilities of set theory and logic
operator identity consists of the operator name notation (enable clear statement of facts
and password; the password consists of six (requirements). To be consistent, facts stated in
digits. It should be displayed on the security one place in a specification should not be
VDU and deposited in the login file when an contradicted in another place. Consistency is
ensured by mathematically proving that initial
www.ijert.org 3
International Journal of Engineering Research & Technology (IJERT)
ISSN: 2278-0181
Vol. 1 Issue 6, August - 2012
4. Overview of Z Formal
Specification Language
Figure 2.1: Z Process
In this section, we briefly describe Z formal
specification language. A Z specification for Z also helps in refinement towards an
employee maintenance is presented to implementation by mathematically relating the
illustrate the use of language. We then describe abstract and concrete states. Z is being used by
how the specification can be strengthened. a wide variety of companies for many different
applications.
4.1. Description of Z Formal
Specification Language In the Z notation there are two languages [1]:
The Z language is a model oriented, Mathematical Language
formal specification language that was The mathematical language is used to describe
proposed by Jean-Raymond Abrail, Steve various aspects of a design: objects and the
Schuman and Betrand Meyer in 1977 and it relationships between them by using
was later further developed at the propositional logic, predicate logic, sets,
programming research group at Oxford relation and functions.
University [10]. It is based on Zermelo Fränkel
axiomatic set theory and first order predicate Schema Language
logic. The Z notation [1], [11] is a strongly The schema language is used to structure and
typed, mathematical, specification language. It compose descriptions: collecting pieces of
has robust commercially available tool support information, encapsulating them, and naming
for checking Z texts for syntax and type errors them for reuse.
in much the same way that a compiler checks
code in an executable programming language. 4.2. Structure for Z Specification
It cannot be executed, interpreted or compiled Schemas are box like structure that introduces
into a running program. It allows specification variables and specifies the relationship
to be decomposed into small pieces called between these variables [1]. A schema is
schemas. The schema is the main feature that shown below. All declarations are made above
distinguishes Z from other formal notations. In the central line and predicates are defined
Z, both static and dynamic aspects of a system below the central line.
can be described using schemas. The Z
specification describes the data model, system
state and operations of the system. Z SchemaName
specification is useful for those who find the
requirements, those who implement programs Declarations
to meet those requirements, those who test the Predicates
consequences, and those who write instruction
manuals for the system [1].
DECLARATION: The declarations part of the
schema will contain:
www.ijert.org 4
International Journal of Engineering Research & Technology (IJERT)
ISSN: 2278-0181
Vol. 1 Issue 6, August - 2012
www.ijert.org 5
International Journal of Engineering Research & Technology (IJERT)
ISSN: 2278-0181
Vol. 1 Issue 6, August - 2012
5.1. Specification
[ROLLNO,NAME,CLASS,SECTION,ADDRESS ]
5.2. Verification
www.ijert.org 6
International Journal of Engineering Research & Technology (IJERT)
ISSN: 2278-0181
Vol. 1 Issue 6, August - 2012
6. References
www.ijert.org 7