This is the final assignment, worth 80% of the module marks, based on the attached archive

computer science




This is the final assignment, worth 80% of the module marks, based on the attached archive

While an automated grading system will be used initially, your code will be looked at, particularly  in the event of it giving really wrong answers or code failing to compile. A failure of code to compile for any part below will cap the maximum mark for that component to 39% of its full mark.


It has three parts, each of which can be done and assessed independently of the others.

1.       An exercise using Promela/SPIN to model a non-deterministic finite-state-automaton (NDFA)

2.       An exercise to add dynamic priority (Linux-style) to the xv6 operating system.

3.       An exercise to add more levels of indirection to file block access in xv6


Each is described in more detail below.


Part 1 (20% of overall)

Using Promela to model non-deterministic finite-state-automatons was described in Lecture 16. In the archive you will find the image for an example (EXAMPLE-NDFA.png) along with a PML file (ndfa4.pml) that implements that example. This has added printf statements that make its behaviour easier to observe. It has been setup to allow SPIN to search for all possible accepting sequences of exactly length 4.

To do this search you need to do the following step:  spin -run -E -c0 -e ndfa4.pml

This will generate a number of trail files, of which the nth can be viewed using spin -tn ndfa4.pml. So, for example, the 3rd trail file can be viewed using spin -t3 ndfa4.pml.



Create a pml file called final.pml, that models the NDFA shown in FINAL-NDFA.png, and that also can search for accepting sequences of length less than or equal to 4.

Base your answer on ndfa4.pml, leaving lines 1..4 and 38..42 intact.

For submission for Part-1 :  final.pml


Related Questions in computer science category