Software Engineering Methodologies Assignment - Formal System Specification
Overview -
The purpose of this assessment is to provide students with the opportunity to apply knowledge and skills developed during the semester with particular reference to the formal specification of a system through the use of Z notation. Students complete the assignment in groups of two.
As described in this course's third study guide, Software Analysis, Modelling and Specification, a Formal Specification (Technique) is one that has a rigorous mathematical basis and one of its advantages is that it can be mathematically checked for completeness. The course's fourth study guide, System and Software Design, also states that by using formal methods it is possible to derive a formal design from a formal specification and then be able to prove that the design and specification are functionally equivalent.
Your text, Software Engineering: A Practitioners Approach (Pressman, 2010) indicates that formal methods provide frameworks that allow people to specify, develop and verify systems in a structured and systematic way and that the mathematical based specification language used in formal methods ensures a greater chance of consistency, completeness and lack of ambiguity in a specification. Pressman also discusses formal specification languages and their common components - syntax, semantics and sets of relations. Of the four formal specification languages he identifies - OCL, LARCH, VDM and Z - he provides useful discussion with respect to OCL and Z.
In this assignment, you will use the Z specification language to provide the sets, relations and functions in schemas to specify the Container Control System (CCS) described below. Your schemas should provide the stored data that the system accesses and alters and identify the operations that are applied to change the state as well as the relationships that occur within the system. Remember, as specified in Spivey's 2001 text, The Z Notation: A Reference Manual, schemas are utilized to illustrate both static and dynamic aspects of a system. Static aspects include such things as the states a system occupies and the invariant relationships that continue to exist as the system moves between states. Dynamic aspects include the changes of state that occur, possible operations and the relationships between their inputs and outputs. Remember also you should always be conscious of the fact that a specification tries to describe what the system must do without saying how it is to be done (Spivey, 2001).
Learning Outcomes -
The following course learning outcomes are assessed by completing this assessment:
- Critically analyse and use complex decision making to research and determine the appropriate Software Engineering tools and methodologies to utilize in a given situation.
- Apply professional communication skills to support and manage the engineering of a large software system.
- Review, critically analyse and develop artefacts to define processes for quality assurance, risk management and communication in large software development projects.
- Implement quality assurance activities in order to verify user requirements and validate design decisions.
- Analysis of a large system development problem to decide upon the best methodological approach.
- Development of appropriate artefacts to support and manage the software engineering process such as change control and configuration management.
Requirements -
Demonstrate an understanding of particular concepts covered in lectures, tutorials, laboratories and reading to provide the specification requested. This may require further reading and research beyond the material discussed in class.
Assessable Tasks/Requirements -
You are to create a set of Z schemas that adequately describes the CCS. It should include at least one state space and the following operations:
- An initialization operation called Init.
- An operation Enter_new_container_terminal that an operator uses to enter the details of a new container terminal into the system. Assume the new container terminal is currently empty.
- An operation Accept_delivery that an operator uses to signal to the system to begin delivery (placing in the container terminal) of x quantity and y tonnes of containers from a truck. Note that the system must do a check to see if that storage capacity is available in the container terminal. If it is not then an error message must be output and no truck delivery occurs. Additional information needed by this routine is the truck registration and the freight company's name. If successful, this operation stores all necessary details into the system for that delivery. If five trucks are already delivering then this new truck will be placed in a queue waiting for its turn to deliver.
- An operation Accept_pickup that an operator uses to signal to the system to begin pickup (placing on the truck) of x quantity and y tonnes of containers from the container terminal. Additional information needed by this routine is the truck registration and the freight company's name. If successful, this operation stores all necessary details into the system for that pickup. If five trucks are already picking up then this new truck will be placed in a queue waiting for its turn to pickup.
- An operation Leave_delivery_queue. This operation is run by the system operator each time there is a delivery queue for a container terminal and the driver of a specified truck decides that the anticipated waiting time is too long and leaves the queue. The operation outputs to the operator the list of trucks in the queue after the specified truck is removed. If no trucks are left in the queue a reasonable error message should be produced.
- An operation Unload_ship that an operator uses to signal to the system to begin unloading (placing in the container terminal) of x quantity and y tonnes of containers from the ship. Note the system must check that all deliveries and pickups have stopped before unloading can commence. A suitable message must be output until this has been achieved. The system must also do a check to see if the quantity and tonnage storage capacity is available in the container terminal. If this check fails, then an error message must be output and no ship unloading occurs. (From an operational perspective, the operator may, after consultation, try the operation again with adjusted values to have a successful 'partial' unload but you do not need to be concerned with this as the functionality already described would accommodate this process). Additional information needed by this routine is the ship identifier. If successful, this operation stores all necessary details into the system for that unloading.
- An operation Container_terminal_account that outputs the total number and tonnage of containers delivered to a particular container terminal by ALL freight companies in a specified time period (in this simplified system, that is the total quantity and tonnes delivered between two specified global count values e.g. 10000 and 10500).
- An operation Ships_total_account that outputs the total number and tonnage that a particular ship has loaded from ALL container terminals in the total history of the system.
- An operation Freight_company_account that outputs the total number and tonnage of containers delivered to and the total number and tonnage picked up from ALL container terminals for each freight company between two specified global count values.
You should provide robust versions of each operation that are capable of handling any possible error conditions. For example, if the ship or truck is not correctly registered in the system an appropriate error message must be given.
You should also add a narrative to explain any schemas or logic that you have used. Authorship should be made clear. You might be asked to explain and answer questions about your work.
Attachment:- Assignment File.rar