
International Journal of Engineering Research & Technology (IJERT) ISSN: 2278-0181 Vol. 1 Issue 6, August - 2012 Z Formal Specification Language - An Overview Mr. Vishal Ruhela Graduate Trainee Engineer, HCL Technologies, Noida, India In this paper an outline of formal method is Abstract described in Section 2.In Section 3 Difference between formal and informal specification language is presented. In Section 4 An Formal methods provide a much needed overview of Z formal specification language is solid software engineering foundation for the described. In Section 5 An example to describe ‘art’ of programming computers. Formal Z is presented. Conclusions are presented in specifications can be used to provide an Section 6. unambiguous and consistent supplement to natural language descriptions and can be rigorously validated and verified leading to the 2. An Outline early detection of specification errors. Z is a model oriented formal specification language In this section we describe formal method, based on Zermelo-Fränkel axiomatic set formal specification language and its different theory and first order predicate logic. It is a types. mathematical specification language, with the help of which natural language requirements 2.1. Formal Method can be converted into mathematical form. In this paper an overview of formal method is Formal methods used in developing presented. Z formal specification language is computer systems are mathematical techniques described using small example. for portraying system properties. Such formal methods provide structures within which software system can be specified, developed Keywords: Informal and Formal and verified in a systematic, rather than ad hoc, Specification Language, Model Oriented , Z. manner [2]. Formal methods can be applied throughout the development of a system to 1. Introduction precisely describe a system and involve the use of refinement techniques and proof obligation at each stage to ensure the correctness, With the ever-increasing complexity of completeness and consistency of specification. computer systems, reliable and effective, Formal methods used in developing computer design and development of high quality systems are mathematical based techniques for systems that satisfy their requirements is portraying system properties. extremely important. In the mission and safety critical system failure can cause cost overrun, loss of lives or even severe economic Formal methods can be used at a number consequences can arise. So, in such situations, of levels: it is necessary that errors are uncovered before software is put into operation. These Formal Specification: In computer science, challenges call for acceptance of proper a formal specification is a mathematical engineering methods and tools and have description of software or hardware that may motivated the use of formal methods in be used to develop an implementation. It software engineering. describes what the system should do, not There are varieties of formal specification (necessarily) how the system should do it. languages available to fulfill this goal and one Given such a specification, it is possible to use way to achieve this goal is by using Z formal formal verification techniques to demonstrate specification language. Z is model oriented that a candidate system design is correct with formal method based on set theory and first respect to the specification. This process of order predicate calculus [1]. formal specification is similar to the process of converting a word problem into algebraic notation. www.ijert.org 1 International Journal of Engineering Research & Technology (IJERT) ISSN: 2278-0181 Vol. 1 Issue 6, August - 2012 objects properly satisfy the specification. Formal development and verification: Formal specification languages use Formal development process involves mathematics as their basis. Most complex iteratively refining a formal specification to systems can be modeled using simple produce the finished system. Formal Methods mathematical objects, such as sets, relations differ from other specification systems by their and functions. A mathematical statement is heavy emphasis on provability and correctness. unambiguous and precise, which provides a By building a system using a formal way to give convincing arguments to justify specification, the designer is actually ones solutions, and allows proving that an developing a set of theorems about his system. implementation satisfies the mathematical By proving these theorems correct, the formal specification [2]. methods ensures the correctness of the system. The process of proving or disproving properties of the software system against a 2.3. Types of Formal Specification formal specification is known as formal Languages verification. Different types of Formal Specification Implementation: Once the model has been Languages are: specified and verified, it is implemented by converting the specification into code. As the 2.3.1. Model Based Languages difference between software and hardware design grows narrower, formal methods for There are a number of different ways to developing embedded systems have been write a precise specification. One approach is developed [2]. model based languages. In it the specification is expressed as a system state model. This state 2.2. Formal Specification Language model is constructed using well understood mathematical entities such as sets, relations, The representation used in formal methods is sequences and functions. Operations of a called a formal specification language. The system are specified by defining how they language is formal in the sense that it has a affect the state of the system model. formal semantics and as a result can be used to Operations are also described by the predicates express specifications in a clear and given in terms of pre and post conditions [3]. unambiguous manner. A formal specification The most widely used notations for developing language can be used to specify the task at model based languages are Vienna hand in a clear and concise manner. As formal Development Method (VDM) [4], Zed (Z) [1] methods and formal specification language has and B [5]. sound mathematical basis, it provides the means of proving that specification is 2.3.2. Algebraic Specification Languages realizable, complete, consistent and Process algebras are amenable to algebraic unambiguous. Even the most complex systems manipulation; however, there are also can be modeled using relatively simple languages which describe a system solely in mathematical objects, such as sets, relations terms of its algebraic properties. These and functions [2]. algebraic specification languages describe the A formal specification language is usually behavior of a system in terms of axioms that composed of three primary components or in characterize its desired properties. Examples of mathematical term we can say that it consists algebraic specification languages include OBJ of two sets, syntax and semantics and a set of [7] and the Common Algebraic Specification relation [2]. Language (CASL) [6]. In mathematical terms The specific notation with which specification algebra (or an algebraic system) consists of (1) is represented is defined by syntactic domain a set of symbols denoting values of some type, or syntax. Formal techniques can have referred to as the carrier set of the algebra; and considerably different semantic domain. (2) a set of operations on the carrier set. Semantics helps to define a universe of objects that will be used to describe the system. Set of 2.3.3. Process oriented Languages relations defines the rules that indicate which 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.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages7 Page
-
File Size-