Software Engineering Project: Z Schema for Wheat Truck Control System

Verified

Added on  2020/03/23

|20
|4444
|171
Project
AI Summary
This project focuses on developing a Z schema formal specification for the Wheat Truck Control System (WTC). The assignment begins with an introduction to the Z schema and its application in representing computing systems, including state spaces and operations. It describes the Z-language specification, its features, and its role in removing ambiguity and preventing errors. The document then delves into the specifics of Z schema, including data dictionaries, schema conventions, and structural modeling constructs. The core of the project involves the Z schema for the WTC system, detailing procedures such as initialization, silo entry, delivery acceptance, and queue management. The project also covers Z schema coding and concludes with a summary of the key concepts and their practical application in designing a WTC system. The WTC is designed to handle wheat deliveries from farms to silos, and the Z schema is used to formalize the system's functionality, including data refinement and direct refinement. This assignment highlights the use of Z notation in specifying both the static and dynamic aspects of the system.
Document Page
Software Engineering
Methodologies
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Table of Contents
1. Introduction.......................................................................................................................................1
2. Z- Language specification.................................................................................................................2
3. Z- Schema...........................................................................................................................................2
4. WTC...................................................................................................................................................6
5. Z Schema Procedures........................................................................................................................7
6. Z-Schema Conventions:....................................................................................................................8
7. Structural Modeling Constructs of Z schema..................................................................................9
8. Z-scheme for WTC system..............................................................................................................10
9. Z schema WTC Coding...................................................................................................................13
10. Conclusion....................................................................................................................................14
References................................................................................................................................................15
1
Document Page
1. Introduction
The project relates in evolving z schema formal specifications for the Wheat Truck
control System. The accounts of wheat farmers & Truck Deliveries to and from Portland Wheat
Board silos will be handled by an automated system. The basics of Z schema, its operations, and
state spaces of WTC system will clearly be defined. Z-language specification will be described
and explained clearly. Features of z schema, WTC refinement and its conventions will be clearly
defined. The z schema operations for Wheat Truck Control System and its initialization
operations will be clearly mentioned. The structural modeling constructs for Z-schema based on
WTC system will be described. The Z schema will be used as per the material provided as per
the information. Z-schema for WTC system will be investigated and provided. The Z-schema for
WTC coding will be provided as a separate section.
2. Z- Language specification
The formal specification language based on Z-notation which is used for recitation and
representing the computing based systems. Z language is labeled as a Software where
Mathematical Function carried out. It defines a software by using functions and the relation in
between. This formal language pressures that the,
It mainly helps in removing the Ambiguity in the requirement and avoid the
reasoning errors, mistakes and proving the executing description correct allowing to
the requirement.
It helps to achieve methodical deduction of programs grounded on the predicate
language.
It automates QA techniques and also performs computing systems and Automated Testing
the models .The concept used for reasoning and specifications ("Software Engineering Mike
Wooldridge", n.d.). Data: Sets, Relations and Functions, bag, sequences.
Logic: Predicated Language and Propositional Language ("The Z Specification Language",
2017)
2
Document Page
3. Z- Schema
Z-Schema:
Z is recognized description language for the computer systems that is based on the set theory and
the predicate logic.
The Z schema is a 2-dimensional (2D) graphical symbolization for describing:
a. state spaces and
b. Operations.
Z-schema Language
The Z-schema is also known as a formal language which is based on the z-notation. Basically z-
schema can explain as well as modeling the computing based systems. It also referred as the
structure of the system; it is a 2-Dimensional graphical notation for describing the following,
i. State Spaces
ii. Operations (Butler, 2001)
This language is full and fully based on the typed set theory. It is built upon schemas. It contains
Basic building blocks
Permit modularity
Simple to understand via the graphical presentation ("Z lecture notes: Schemas and
Schema Calculus", 2017)
Z-Schema
i. Schema predicates at all times true (Spivey, n.d.)
ii. Predicates can pass on only to component is in the signature.
Types
Types are mainly used to differentiate the multiple of data which is present in a particular
specification by using this type, there are many advantages that is,
It helps in the specifications of structure that is differentiating by the objects.
It can also prevent the errors by not permit the meaningless sentence, which is checked
by the computer.
3
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Data Dictionary Specification
Data dictionary is one of the most important parts of the CASE system. It is mostly used to keep
track the each and every system names. The data dictionary structure contains the item name,
description and the data of creation (Stepney & Lord, n.d.).
A system requirement in Z consists of some state variables, an initialization, and it also contains
set of actions on state variables. The state variables is also having some invariants that is
associated with them demonstrating “healthiness conditions” which must always be well
satisfied. Usually all of these are quantified using schemas (Saiedian, 2007).
For example, the state variables of a counter system may be specified using the following
schema:
• Definition of schemas symbolization:
A vertical-form schema is either of the form the following
The above shows how schema should represent. It can also be written as the follwing
• Once presented that the Schema Name will be related with WTC schema proper, which is the
contents
The statements part of the schema will contain: –
I. A brief list of variable declarations
II. References to other schematics. this is also called schematic inclusion.
• Variable statements have the usual form:
x1, x2, . . . , xn. It has n values.
The predicate part of a schema includes a list of predicates, detached either by semi-colons or
new lines. This is the format of schema.
In Z, schemas are
4
Document Page
It is mainly used to define both the static and dynamic aspects of a scheme.
The static aspects include the following. They are
The conditions it can take
The invariant relationships that are preserved as the scheme to state.
The active aspects include:
the actions that are conceivable
the association between their inputs and the relevant outputs
The variations in the state that happen.
The formal model commonly used for an access manage system which can permits the
users and services from various administrations in order to communicate with each other, while
still permitting the administrators to maintain the control of their individual elements of the
network. The formal model, written by using the Z specification Language, has been developed
as the accesses manage system.
Formal methods can able to assist in order to achieving the most of the important properties; in
particular:
i. Un Ambiguity
ii. Verifiability
iii. Reliability
iv. Succinctness and neatness
v. Annotation
Advantages
Unambiguous descriptions that is one unique understanding of a model which is
specified in a formal notation.
Analyze the product. That the property contains both the completeness and
reliability that can be checked by using the mechanisms.
Disadvantages
Mathematical skills, interest are essential
The improvement and confirmation process is very costly and effort-intensive
Complexity may blow up with the dimension of the difficulty and it can become
uncontrollable
5
Document Page
While the Formal Methods can be useful during the variety of stages of the overall software
improvement, their maximum impact would be done during the in the early stages, that is the
modeling and requirement stages
Program confirmation can be well thought-out in a secondary concern.
Z-notation Features:
Decomposition of specification into many small pieces (Schemas) that helps in
describing both static and dynamic aspects in the field of system (Groves, 2017).
Data Refinement:
It helps in representing the abstract data in the specification. Direct Refinement: Go directly
from specification to design.
4. WTC
In the project, WTC has to implement in Z-schema. Some basic descriptions regarding WTC
is explained below. Wheat and other breakfast cereal grain making is a land concentrated, an
effective and energetic transportation system is spirited to the capability of these farmers to
participate in international market place. The participation between and volume of those modes
have provided well-organized and market place approachable service in region (Parziale,
Gunreben, Miranda, W Novak & Werner, 2015).
The Wheat produce happens throughout late seasonal as the crop develops ready. Due to
harvest, more amount of wheat is passed by farm truck to initial storage. Till current periods,
such activities are directed by the smaller trucks, though these trucks are constantly replaced by
the larger trucks passed up to 26 tons of wheat production at a time.
6
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
A single load of wheat evaluates approximately a 60 pounds, production the whole mass of
the 2012 crop approximately 4.23 millions of tons. This harvest can produces an appraised
162,716 trucks of trips among the grain and farm silo.
5. Z Schema Procedures
First generate a Z schema that sufficiently defines the Wheat Truck Control system. It must
include single state space in WTC. The basic operations of the Z schema is given below,
An initialization procedure named Init. (Liapis, 2008)
The process enter new silo that a worker customs to come up with the truths of a fresh
silo into the structure system. The silo is presently empty (Concrete stave silos, brooks
patent, 2010).
7
Document Page
The process Accept delivery that a worker customs to signal the system to begin off-
loading x tons of materials from the truck. The entire system need do a verification
process in Wheat truck Control system. If that loading or storing capacity is obtainable in
silo container, if not then a fault or error message must be production output and no
automobile or truck unloading done. Extra data desired through routine is the truck
recording, registering as well as farmer’s address and name (Coutts, n.d.).
The procedure and process stores total essential particulars into the system organization
for that distribution delivery (Commission, 2010).
If an automobile is previously drop, after that new automobile will be located in a line
and to come for turn to drop.
The process Leave queue performed. The process is in track through the scheme operator
every period there is a line for a silo and driver of an identified automobile selects the
expected waiting period is extended and they leave (Shagaida, 2016).
The process results to the worker the number of automobiles in the queue after the
indicated truck is eliminated. The sensible faults will be shown when nobody or none in
the line.
The action Silo account in WTC provides the overall amount of wheat in tons and it’s
supplied to a specific silo via ALL farmers in a quantified time period. It provides the
global operation number in simplified systems (O’Keeffe & Neave, 2017).
For instance, global operations between 10000 and 10500 in WTC ("Glossary of Z
notation", 2017).
The process Ships_total_account delivers the total number of wheat and amount of wheat
in certain ship and it has taken from entire silos in the whole history of the system.
The process framers_account in Wheat truck control system provides the wheat amount
and it’s supplied to all silos in between two specified global operation numbers. The
global operation number is 10000 and 10500 ("z-schema", 2017).
6. Z-Schema Conventions:
Place the name of the schema in declaration part. It is done by using-‘includes’, by using
variables in it.
Input variable name is terminated by question mark (?).
8
Document Page
Only input will be variable name.
The output variable is terminated by an exclamation mark (!).
The ≡ (Xi) symbol means that schema is not changed.
If we write ▲ (delta) instead of ≡ then it means that Schema will change.
The post condition is defined by using ‘tel’ .The pre- condition is defined by using
‘Known’ and it is under variable name.
7. Structural Modeling Constructs of Z schema
Based on previous discussion, this paper means to formalize the features of a component in a
model with few showing elements of component in z schema. There are many modeling
elements the following describes and helps in designing few of those elements.
Service
Class
Interfaces:
a. Service:
A service can be well-defined as a small part of requirement. It specifies that the thing user
is doing. A service comprises an Eid for itself, a Cid for a class, and the explanation where it
defines the service it delivers which has declared generally at the time of type inspection. A
service can be graphically noted as a triangular box ("FpML Coding Schemes (Master
View)", 2017).
b. Class:
A class can be well-defined as a collection of facilities i.e., the overall description of the related
services. It apparatuses one or more border also. A class covers and Cid for itself, and an Eid
where Eid are taken from the area of services (GmbH, 2017).
Another condition is that Eid must have a limit which means it specifies that how many facilities
can be occupied by the class. A class can be graphically noted ascircle. Figure 1(b)shows the Z
specification of class.
c. Interfaces:
It defines the physical nature of a system and is only used for examination syntactic needs and
compositionality. They are represented in terms of signatures of service operations.
9
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
There are many user interfaces.
Cid has the area of the class. It must have a boundary which specifies many classes may use or
implement this interface. An interface can be realistically noted as pipe.
Component:
It is a group of classes and boundaries by which the small sections of specification can be
combined into single unit. A module contains a Coid for itself.
Cid and Iid where Cid & Iid are taken from the area of class and interface correspondingly and
they have bounds which helps in specifying that how many modules or border maybe collected
in the components. A module can be realistically noted as a rectangular box. The limit is a
worldwide variable.
8. Z-scheme for WTC system
[Truck] set of distinct trucks ("Sample:The Formal Specification Language Z", 2017)
[Silos] set of silos
[Queue] the set of all Queue at this silo
[Ships] The set of all Ships that have been registered
[Farmers] the set of all farmers that supply wheat to Silos
Initialization Operation
The below operation is done.
Operation Init;
Start
1. Login to Wheat Control system
2. Select operation to perform
3. Execute the operation
4. Accept result
End
As a first step login into WTC. Then select the operation which is needed to perform. Further,
execute the operation which needs to be done. The results generate as the final results are the
outcome.
The name of the operation is Entering new silo account.
10
Document Page
Operation Enter_new_Silo;
Start
1. Open new account for Silo.
2. Enter name , Name should be unique from the stored list.
3. Enter Storage Capacity.
4. Display-Silo is currently empty.
End
A new sil account is created. After creating enter the name. the name provided
Operation Accept Delivery
Start
1. Select Operation Accept Delivery.
2. Verify Truck Registration No.
3. Verify Farmer Name
4. Check load in Truck (XIA & GENG, 2013)
5. Check if Silo has capacity to store this load(Silo Capacity> current Silo Load+
Truck Load)
6. If Silo can store load then
7. Check loaded status of Truck (Unloaded or Not Unloaded)
8. If not unloaded then unload wheat from Truck
9. Else bring next Truck from the Queue
10.Perform Operation Accept Delivery.
End
Operation Leave_Queue
Start
1. Select Operation Leave_Queue .
2. Check Truck Queue
3. If no truck in queue then display message “ No Truck in the queue”
11
chevron_up_icon
1 out of 20
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]