Formal methods - Homework assignment (2019 Spring)


The homework assignment

To fulfill the requirements of the course, a homework assignment must be solved and submitted.

During the homework, a system specified by free text should be described with a formal model, on which you will have to check the given requirements with model checking. 

  • The system described in the assignment must be modeled with (timed) automata in the UPPAAL tool.
  • The given requirements must be formalized with temporal logic formulas and checked with the verification module of UPPAAL.

The goal is to gain experience in formal modeling and verification. The formal model may be created in several different (valid) ways, but we require the model to conform to the informal specification provided in the assignment.

The scenario of completing the homework assignment is the following.

  1. Create the formal model of the informally specified system in UPPAAL.
    • Briefly document the structure of the model, the considered alternatives (if any) and the nontrivial constructs that you used.
    • Explain and justify the modeling decisions you made (if any).
    • If necessary, refine the informal specification (to account for underspecified parts).
  2. Formalize the informal requirements provided in the homework assignments with the temporal expressions of UPPAAL.
    • Document the formalized requirements.
  3. Check on the model the satisfaction of the requirements with the verification module of UPPAAL using the formalized expressions.
    • Document the results of the verification.
    • If the verification of a requirement failed (i.e. it is not satisfied by the model), interpret the counterexample to find out what went wrong and fix the model if possible (unless asked otherwise by the assignment).

During the design of the formal model, it is recommended to proceed with step-by-step refinement, documenting each step.

The homework assignment is an independent work. Since only a limited number of tasks are assigned, there will be multiple students working on the same task. During modeling, you may discuss the assignment with the others, but we ask you to primarily work on your own. The documentation should be prepared individually, without any discussion with the others! This is how you demonstrate that - even if you received help before - you have understood and learned the basics of formal modeling. Therefore, copied or excessively resembling documentations will not be accepted!

Tools to do the homework assignment

The model checking task should be done with the UPPAAL tool developed by the Information Technology Department of the Uppsala University and the Computer Science Department of the Aalborg University. UPPAAL provides an integrated environment for the modeling and analysis of distributed systems with the help of timed automata networks. Checking the correctness of the behavior (the verification of the model) is supported with a restricted form of computation-tree logic (CTL). Models in UPPAAL can be built using an extended set of data types (bounded integers, arrays, etc.) and simple functions.

The user interface of UPPAAL is written in the Java language. This means that the Java runtime environment is necessary to run the tool (e.g. J2SE Java Runtime Environment).

The current version of UPPAAL can be downloaded after registration from the UPPAAL webpage. Educational usage is free of charge.

  • We have experienced problems with the registration and downloading when using Internet Explorer 9. In this case, a different browser will usually solve the problem.
  • If the installed official version has errors, trying the development version or occasionally running the tool from the IP domain of BME (to refresh the license file) may solve the problem.

The following resources can be of help with the usage of UPPAAL and its modeling language:

Furthermore, it is recommended to study the sample models provided with the tool and the Help menu.

Tasks and their assignment to students

The homework assignments can be found as follows:

  • Assignment of tasks to students: After signing in as described on the page "Submitting homework and lab assignments", each student will find her/his homework assignment.
  • Those who requested us to accept their previously defended submissions (and we have accepted the request) do not have to submit a new task.

Consultation opportunity

On the 9th or 10th week of the semester (before the submission deadline) we offer an opportunity to ask questions about the tasks from the assigned supervisors.

Attending the consultation is not mandatory, but we kindly ask you to use only this opportunity to contact your supervisor in case you have questions. If you cannot attend the consultation due to a collision with your timetable, please notify your supervisor in e-mail to find a suitable time.

The time and place of consultation are found in the table below.

Assigned supervisor Time and place of consultation
Tamás Tóth April 10, Wednesday, 14:15-15:00, room I.L.405,
April 11, Thursday, 13:15-14:00, room I.L.405

Submission of the homework assignment

We require the following artifacts to be submitted:

  • Detailed documentation of the solution (textual description with figures) in accordance with the scenario above.
    The documentation should contain the description of the model and its verification, the results and the explanation and justification of the design decisions. The document should be in PDF format. 
  • Source files of the UPPAL model and the queries.  

All these artifacts should be submitted in a single ZIP archive.

Please make sure to include the following data in the documentation:

  • Personal details (name, Neptun code),
  • Task title (not the ID only!).

The solutions must be submitted electronically. After signing in as described on the page "Submitting homework and lab assignments", each student can upload her/his homework.

Submission deadline: 27. 04. 2019. (Saturday), 23:59:00. The web form will register the date of submission.

After the submission deadline, we accept delayed submissions only (see below for details).

Defending the submission

After submitting the homework assignment, the solution has to be presented to the supervisor in person (defence). The purpose of the defence is to make sure the student completed the assignment on their own, using only permitted sources of help. During the defence, short questions will be asked about the modeling task and the submitted documentation. The rating of the submission will be finalized during the defence.

Due to the individual presentations, we expect students to apply for time slots in order to reduce the waiting time. The schedule of the defence and the application forms will be available in the table below.

  • We kindly ask you to apply for a single slot only.
  • In case of a delayed submission, the defence will also occur later in the repetition period, so in this case, students should apply there. Those who cannot attend the defence should also apply for the delayed defence.
  • Students must attend the defence in person. Failing to do so invalidates the submission! If attending the selected time slot has serious obstacles, contact your supervisor to schedule a new appointment!
Assigned supervisor Application form (normal) Application form (delayed submissions)
Tamás Tóth May 15, 2019, room I.L.405
May 24, 2019, room I.L.405

Delayed submission

After the submission deadline, we accept delayed submissions only. The delayed submission has a 20% penalty in score (one grade less). If you completely fail to submit a solution, you will fail the course!

Delayed submissions should be submitted in the same way as in case of normal submissions (see above).

Delayed submission deadline: 22. 05. 2019. (Wednesday), 23:59:00.

The artifacts to submit are the same as in case of normal submissions (documentation, models, results). The defence is still part of the homework, which will take place in the repetition period.

Time of defence for delayed submissions: The time and place of defence for delayed submissions will be found in the table above.
At the same time, normally submitted but potentially delayed defences may be held.

Results of the homework assignment 

The grading of the submissions will be finalized during the defence.