Professional Documents
Culture Documents
Specification of E-Health System Using Z: A Motivation To Formal Methods
Specification of E-Health System Using Z: A Motivation To Formal Methods
net/publication/301403830
CITATIONS READS
4 501
4 authors, including:
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Nasir Mehmood Minhas on 03 January 2018.
Abstract: Formal Method (FM) is an emergent feature that uses A formal specification language such as Z notation, OCL,
mathematical notations to mark accurate and explicit VDM, LARCH can be used to specify the task at hand in a
specifications that error and discrepancies are identified during clear and concise manner. Formal methods and formal
early phases of the software development process. By using the Z specification language has strong mathematical basis, it
specification, system specification, design and verification can
provides to prove that the specification is reachable, perfect,
improve the quality effectively. In this paper, we present the
formal specification for the e-Health system by using Z schema. reliable and clear [4].
This paper will be motivation to Formal Methods that FM not The primary goal of this paper is to produce specification
only beneficial for mission critical systems but also in the of an e-Health system using Z schema to manage the doctor’s
commercial and business oriented applications, because the appointment, schedule of the doctors. It will be a chance to
development time, verification and maintenance cost will open a way for other scholars and investigators toward the use
drastically reduce. of Formal Methods for the commercial systems specification
design and verification. It is the reality that Z language has not
Keywords: Formal Methods, Formal Specification, E-health, Z been widely used in the business oriented applications.
Schema. Section II related work and Section III demonstrates the e-
Health system case study that present a use case diagram of
I. INTRODUCTION
the system. Section IV describes the Z specification of the
The major objective of software engineering is to allow system, section V motivation and finally Section VI concludes
developers to develop software’s that work efficiently. One of the paper.
the way to attain this objective is the use of formal method [5].
One of the key problems with software systems is the lack II. RELATED WORK
of software specification. These are discrepancies and The requirement specifications are often defined by the
misunderstandings which therefore cause difficulties in later natural languages, which are indefinite and unclear. FM can
phases of design and implementation. These difficulties are be used to produce precise, unambiguous specification. These
often familiar in the integration stages of system. These issues can be describe that what should do the system without
are reduced by formal methods because they specify the describing how it is to be done [12].
system precisely, and provide a smooth way from By the use of FM faults in the specification can be reduced
specification through design to implementation [2]. deeply and as a result the specifications can be created that are
Formal methods are mathematically based practices that more complete, reliable and explicit than those created by
can be useful during the development of a software system to using traditional methods [5].
accurately define a system to ensure the correctness, Formal specification is a complete mathematical
completeness and consistency of specification [3]. representation that is used to validate about system
E-health is a system that is supported by electronic process description. Commonly, formal specification, verification and
and communication. The information kept in the system must validation performed manually. Currently, tools of FM like Z
be accurate. The aim of E-Health system is to provide remote and VDM++ to perform verification [8].
access to only authorized doctors and patients through internet By using Z, not only more errors are uncovered in the
[9]. specification during the software system development, but
One of the key benefits of E-Health systems is in the also that they are already uncovered in early stages rather than
digitization of data, which allows electronic digital
transmission, sorting, retrieval and other manipulations.[5]
978-1-4799-3759-2/14/$31.00©2014 IEEE 1
International Conference for Convergence of Technology - 2014
in the testing and maintenance stage. Cost of fixing errors in Entities in the System
later phase is much higher than in earlier phase[3].
[USER],[DOCTOR],[DOCTORSCHEDULE],[APPOINTMENT]
The Z language is a way of decomposing a specification
[UserId,Username, Password,State,UserStatus,Role]
into small parts called schemas[9]. A schema generally
consists of two parts: a declaration of variables; and a [DoctorId, Name ,Max_Appointment_per_Day,DoctorFee,UserId]
predicate compelling their values [3]. The Z is actually
prevailing on mathematical notations, set and function [9]. [DoctorId, Date ,Tot_Appointment ]
The most unique feature of Z is the schema. Z schema are
[AppointmentId, AppointmentDetails, UserId, AppointmentDate,
a boxed notation used to describe both system state and DoctorId,AppointmentStatus ,Amount,Prescription]
operations. The Z schema make it possible to made
specifications in an incremental manner. Figure .1Entities in the system
The Z schema can effectively improve system reliability
and reduce defect in developing the system [10]. Below is the use case diagram of the system, and the flow
Formal methods has the ability of ensuring precision, of the system is specified in the algorithm.
consistency and assurance during the different stages of
building a trusted computing system [11].
Using Z language, the number of the faults in developed E-Health Use Case Diagram
system is less than the systems developed by other
approaches, the resulted system also have more productivity &
efficiency and the using of FM language didn’t add extra cost, Change Password
so the using of formal language was effective and accomplish Register User
«extends»
its goal. Z language to enhance the Commercial Development Admin «extends»
Process and develop system that can add more reliability &
productivity [4]. Manage Payments Login
Using FM like Z notation & B method can improve user
trust in the system and its impacts on system usage[7]. «extends»
Patient
FM are required to improve the software system
correctness and trust. The paper describes the C-by-C Manage Prescription
Make/Change
Appointment Check Availability
(Correctness by Construction) methodology and how to apply
formal methods with it. The paper describes how to apply the «uses»
«uses» «uses»
formal methods with the C-by-C methodology to increase «uses»
978-1-4799-3759-2/14/$31.00©2014 IEEE 2
International Conference for Convergence of Technology - 2014
BEGIN ChangePassword
Login (Admin, Doctor, Patient) provided by the Admin. Ǽ User
Change Password (Admin, Doctor, Patient)
If login success, following actions can be performed: Username, Password? :P User //inputs
Register user (Admin) U_state ! : State
Appointment(Patient)
Check availability of doctors
Make Appointment If username ^ password ∈ User ^ U_Status Ѯ Normal
Change Appointment ^ U_state ѮOnline
Manage Doctors username! = username?
Add doctors (Admin) password!=password?
Update doctors schedule (Patient)
R! = Success
Update doctors configuration (Admin)
Make Payments& Prescription Else
Payments (Admin) R! = Failed
Prescription (doctor)
Else, re-login. Figure 5. Change Password Schema
END
RegisterUser
IV SPECIFICATIONS OF AN E-HEALTH SYSTEM
The specification of the proposed e-health system has been Ǽ User
generated by making the Z schema. Z schema provides the
complete specification that will be used for the development, UserId, UserName,Password,UserId,State,Role: U? User//input
verification and maintenance process of the system.
R! : Response
a) Z Schema for users login
The first schema is LOGIN (shown in figure 4) and it
checks if the username and passwords are match in the If DoctorId? ∉ Doctor ^ (Role ∈ Admin or Role ∈ Patient ˅ Role ∈
database Table of the users, then system will respond success Doctor) then
and goes to the main window of the system, if not, then the
user cannot log on to the system. If user login successfully
U` = U` U {U?}
then user state will change to online and also user can change R! = Success
his/her password as in the figure 5 change password schema. Else
The change password required that the user must be login and R! = Failed
registered, otherwise he/she needs to login/request for
register(Figure 6.) Figure 6. Register user schema
978-1-4799-3759-2/14/$31.00©2014 IEEE 3
International Conference for Convergence of Technology - 2014
978-1-4799-3759-2/14/$31.00©2014 IEEE 4
International Conference for Convergence of Technology - 2014
In this schema, the prescription is specified, if all the Time (days) Time (days)
conditions are met, then prescription of the patients are
Specifications Development 27 40
specified. This completes the specification of an e-health
system. Design 15 12
V. MOTIVATION& DISCUSSION
Implementation & Test 18 10
In 2012, a comprehensive study was conducted for
analysis of FM (Z and B). In this study it is found that errors Verification & Maintenance 30 17
in the specification can be drastically reduced by using FM, by Total 90 79
which analyst can create a specifications that are more
complete, reliable and explicit. They conclude that [3]:
x Z and B formal specification language is basically These factors are clearly indicating that Formal Methods
established for recording user requirements in a form are better than traditional approaches for the development of
that can be proved mathematically. the system, so it is the motivation to the developers as well as
978-1-4799-3759-2/14/$31.00©2014 IEEE 5
International Conference for Convergence of Technology - 2014
the organization to use FM in developing the systems and [8] M. Man, "Designing Spatial Information Databases Integration
bridging the gap between industry and academia. Modelling using Z Spec," Proc. of the Second Intl. Conf. on
Advances in Computer and Information Technology -ACIT,
VI. CONCLUSION 2013.
[9] P. Salini and S. Kanmani, "Elicitation of Security
In this paper, we have presented some cases of Requirements for E-Health System by applying Model
specifications for an e-Health system using Z. Formal Oriented Security Requirements Engineering (MOSRE)
Methods make it possible to uncover those errors which Framework," in CCSEIT-12, October 26-28, 2012,
remain during the early phase of requirements collection. Coimbatore, India.
Because a program is said to be correct if it behaves exactly [10] S.H. Bakri, H.Harun, A. Alzoubi, and R. Ibrahim, “ The
what is defined in the specification. By using the Z language Formal Specification for the Inventory System Usning Z
system design and development can improve the quality Language,” 4th International Conference on Computing and
Informatics, ICOCI, 28-30 August, 2013 Sarawak, Malaysia.
efficiently and reduce time, cost, fixing bugs at an initial phase [11] W. James and A. Marshall, "Formal Methods and Models,"
is cheaper than adjusting in the deployed system.We have Information Security: An Integrated Collection of Essays, 2005,
implemented the specifications in traditional method and in pp. 170-186.
formal method and found that formal methods are better than [12] Y. Jun and H. Zhi-Yi, "Using Formal Methods to Design a
traditional. It is also be proved from the literature. This study Class Scheduling System," 2008 IEEE International
is motivation for developers and industry to develop their Conference on Computer Science and Software Engineering,
system specifications by using Formal Methods which results China.
in systems developed in less time and cost. This will also
bridge the gap between industry and academia. These methods
not only helpful for safety critical systems but will also in the
commercial and business oriented applications, because time,
verification and maintenance cost will drastically reduce and
system performance also be increased. In future Z
specifications can be implemented for large systems and can
be tested in terms of cost and time for the whole software life
cycle to check the significance of formal methods in
commercial system development.
ACKNOWLEDGEMENT
We would like to thankful of PMAS-Arid Agriculture
University, Rawalpindi, ZTBL, Islamabad and Higher
Education Commission of Pakistan for supporting to conduct
this study.
REFERENCES
978-1-4799-3759-2/14/$31.00©2014 IEEE 6
View publication stats