0% found this document useful (0 votes)
143 views

CSCI910 Final Exam S123

The document outlines the examination paper for the CSCI910 subject on Software Requirements, Specification, and Formal Methods for Autumn 2023, detailing the exam duration, weighting, and permitted materials. It includes six questions covering topics such as functional and non-functional requirements, data flow diagrams, finite state machines, Petri nets, colored Petri nets, and Z schema writing. Students are instructed to answer each question on separate pages and submit their responses as a single PDF file to Moodle.

Uploaded by

rhzx3519
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
143 views

CSCI910 Final Exam S123

The document outlines the examination paper for the CSCI910 subject on Software Requirements, Specification, and Formal Methods for Autumn 2023, detailing the exam duration, weighting, and permitted materials. It includes six questions covering topics such as functional and non-functional requirements, data flow diagrams, finite state machines, Petri nets, colored Petri nets, and Z schema writing. Students are instructed to answer each question on separate pages and submit their responses as a single PDF file to Moodle.

Uploaded by

rhzx3519
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

School of Computing and Information Technology

Student to complete:
Family name
Other names
Student number

Subject Code: CSCI910


Subject Name: Software Requirements, Specification and
Formal Methods

South Western Sydney and Wollongong

Examination Paper
Autumn 2023

Exam duration 3 hours

Weighting 60 %

Items permitted by examiner OPEN BOOK (lecture notes, lab exercises)

Aids supplied Nil

Directions to students 1. This paper includes Six questions.


2. Each question is 10 marks.
3. Answer each question on a separate page clearly
4. Convert the answers into one pdf file
5. Submit the pdf file to Moodle

CSCI910 Autumn 2023


Please carefully read the following scenarios about an online student course
enrolment system and answer Question 1 and Question 2. You can make
reasonable assumptions if not specified.

(a) Searching for courses: The student logs into the system and navigates to the
course catalogue. They use the search feature to find courses that meet their
academic requirements and interests. They can search by keyword, course code,
or course title.
(b) Viewing course details: After finding a course they are interested in, the
student clicks on the course to view more details. They can see the course
description, prerequisites, and availability. If the course is full, they can see if
they can be added to a waitlist.
(c) Adding a course to their schedule: If the student decides to enroll in a course,
they can add it to their schedule by clicking the "register" button. The system
will check if the student meets any prerequisites or restrictions and add the
course to their schedule if everything is in order.
(d) Dropping a course: If the student needs to drop a course, they can navigate
to their schedule and click the "drop" button next to the course they want to
remove. The system will remove the course from their schedule and adjust their
billing as necessary.
(e) Viewing their class schedule: The student can view their class schedule at any
time by navigating to the appropriate section of the system. They can see which
courses they are enrolled in, their meeting times, and any other relevant details.
(f) Paying fees: The system should allow the student to pay for their course fees
online. The system should securely process the payment and provide a receipt
for the transaction.
(g) Requesting academic transcripts: If the student needs an academic transcript
for a scholarship or job application, they can request it through the system. The
system should securely process the request and provide the transcript in a
timely manner.

CSCI910 Autumn 2023


Question 1: Requirement Specification (10 marks)

(a) Write a set of functional requirements for the online student course
enrollment system. (6 marks)

(b) Write a set of non-functional requirements for the online student course
enrollment system. (4 marks)

Question 2: Data Flow Diagram (10 marks)


Draw a Data Flow Diagram for the online student course enrollment.
(a) Draw the level-0 diagram by considering all possible external entities and
data exchanges between the system. (3 marks)

(b) Draw the level-1 diagram by considering all possible sub-systems based on
the above descriptions. (4 marks)

(c) Complete the data dictionary for your DFD. (3 marks)

Question 3: Finite State Machine (10 marks)


A safe has a combination lock that can be in one of four positions 1, 2, 3, and 4.
The dial can be turned clockwise (C) or anticlockwise (A). Assume that the
correct combination for the lock is the sequence (2A, 1C, 3A, 1A, 4C, 3C) and
that any other combination will trigger an alarm.
(a) Define a Finite State Machine to specify the behaviour of the lock. (3 marks)

(b) Draw the FSM diagram to demonstrate your machine. (4 marks)

(c) Complete the state table for your FSM. (3 marks)

CSCI910 Autumn 2023


Question 4: Petri Nets Analysis (10 marks)
Please answer the following questions according to the Petri net diagram.

(a) Calculate the incidence matrix. (2 marks)

(b) Analyse whether there exists a repetitive sequence(s) for the Petri net
diagram. If so, please provide a characteristic vector of the repetitive
sequence(s). If not, please provide an explanation. (4 marks)

(c) Analyse whether the marking M = (0,0,1,0,0,1,0) is reachable through


T

calculations. If the marking M is reachable, please provide the firing vector with
its meaning. If not, please provide the reasons. (4 marks)

Question 5: Colored Petri Nets (10 marks)


(a) Please provide the reachability graph of the following Petri net. (5 marks)

CSCI910 Autumn 2023


(b) The diagram below is a timed CPN, where activities involved last for some
units of time. According to the information provided, please analyse the final
marking of the three places, i.e., Place ready, Place jobs and Place outcome with
your explanations. (5 marks)

Question 6: Z Schema Writing (10 marks)


A software system at a university is required to keep track of students enrolled
in a subject, and to record which of these students have done the assignment.
When a student attempts to enroll in a subject, he or she will be allowed to
enroll unless the subject is already full. A newly enrolled student will not have
done the subject's assignment. When a student completes the assignment, that
student is classed as tested and this fact will be recorded. Students are allowed
to leave the subject only when they completed the assignment. At the end of a
subject, only tested students are entitled to a completion certificate.

A formal specification of this software can be written in Z. The specification


provides an identifier for students. A maximum subject size and a type
definition for responses to operations are also defined. A state schema for a
Subject is defined and so is an Initial state. Operations to Enrol a student and to
Test a student are defined. This specification begins with the following
paragraphs.

CSCI910 Autumn 2023


Subject
enrolled : P STUDENT
tested : P STUDENT

tested Í enrolled
#(enrolled) < maxsize

InitSuject
DSubject

enrolled’=F

EnrolOk
DSubject
s? : STUDENT
m! : RESPONSE

(s? Ï enrolled) Ù (#(enrolled)+1 < maxsize)


enrolled’ = enrolled È {s?}
tested’ = tested
m! = Success

TestedOk
DSubject
s?: STUDENT
m!: RESPONSE

(s? Î enrolled) Ù (s? Ï tested)


tested’ = tested È {s?}
m!=Success

Please complete the specification by adding the following schemas.

(a) A schema to handle an unsuccessful EnrolFail schema where a student is


input and an appropriate response is output. (2 marks)

(b) A schema to handle an unsuccessful TestedFail schema where a student


is input and an appropriate response is output. (2 marks)

CSCI910 Autumn 2023


(c) A successful LeaveOK schema to record that a student is leaving the
subject. In the schema, a student is the input, and an appropriate
response is the output. (2 marks)

(d) An unsuccessful LeaveFail schema to record that a student is not


allowed to leave the subject. In the schema, a student is the input and
an appropriate response is an output. (2 marks)

(e) An Enquiry schema to report whether a student has done the test. In the
schema, a student is the input and an appropriate response is the
output. (2 marks)

End of the examination questions

CSCI910 Autumn 2023

You might also like