Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Final Term Exams Fall- 2020

Program: BCSE Semester: 5

Course Title: Formal Methods in Software Engineering Section: A, B & C

Instructor Name: Ms. Sadia Ali & Ms. Zobia Khan Max Marks: 25

Time Allowed: 3 hours Date:11-2-21

Email Id: sadia.ali.fui@gmail.com, zobiakhan.90@gmail.com

➢ Be brief and to the point.

Question # 1: Marks [5]


Draw Petri Net Diagram for University Admission Procedure:
• Write proper names/statements of the states and transitions
• Write one scenario for the flow of tokens through transitions in Petri nets.
At-least three states and two transitions should be included. Show starting Tokens also.

Question # 2: Marks [5]


Write a Z-Specification Schema to describe the two operations of the following scenario:
An author wants to keep a record of his publications. 1. An operation to add a new research
paper. 2. An operation to check that a paper has been published or not.

Question # 3: Marks [5]


Consider the given scenario for modeling system descriptions using a semi-formal activity
diagram, having symbols for a start, end, decision making, and activities.

We intend to develop an online voting system for general elections. The major use cases of the
voting model system include authorizing User that includes simple users and the staff of the
system. The system manages election districts and election units. The election unit is the system
counterpart of the “election center”. In the conceptual model, the election center is central to
the election procedure, as it is the fundamental tallying point. The votes are casted using
machines provided by the state and are places at the election center. The fundamental
assumption of this system is that almost all citizens above a certain age should be able to
participate in the election procedure. It is practically infeasible for election staff to manually
enter all electors into the system. The system should thus be able to import an electronic list of
electors. This system also manages different political parties and their respective candidates
participating in the election procedure. Any authenticated user can Preview Ballots to preview
the electronic ballots for any election district. An authenticated user can Cast Vote.
The system also deals with the final tally calculation. All internal system operations must be
logged without sacrificing voter confidentiality. Information regarding any of the above
functions should be private, even if transmitted over public networks.
Question # 4: Marks [5]

Consider given scenario requirements and their relevant constraints for formal verification
using temporal logic based on dining philosophers example. And design protocol to avoid
deadlock on the selected requirements and their constraints.

The director of Academics decides the courses to be offered in a semester and a student can
select a course from the approved ones. The student should be allowed to register for a course
if he has already passed its pre-requisite course (if any). Further, he/she can choose 2 courses
(max) from the elective courses. There is an upper limit on total credits to be registered in the
semester depending upon the student’s GPA. If there are more than one sections of a course
student can check which sections of a certain course are available. The Academic Officer can
perform adding, dropping, and changing the section of the course. Student and Academic
Officer should be able to view the list of courses already registered by him/her, tuition fee for
the selected courses, and later on during the semester marks of courses, and final exam
schedule. Teachers can update the course folders.

Question # 5: Marks [5]

Given a Z-schema, the purpose of the schema is to deposit some amount in the bank account
by the account holder. Identify errors and flaws in the schema and how we can overcome the
identify flaws and errors, finally give the strengthened version of the schema.

Deposit_in_Bankaccount
Ξ Bank account
accountholder? : NAME
amount! : AMOUNT
accountholder ϵ known

balance` = balance Ո { accountholder? amount?}

You might also like