Document information
- University
- Politecnico di Milano
- Degree programme
- Computer Engineering
- Subject
- Software Engineering 2
- Academic year
- 2011-2012
- Classification
- Exam · Full exam
- Content
- Exam paper only
- Original format
- Text
- Searchable text
Full exam for Software Engineering 2 in the Computer Engineering degree programme at Politecnico di Milano. The document covers: Dipartimento di Elettronica e Informazione Politecnico di Milano prof. Elisabetta Di Nitto and prof. Raffaela Mirandola 20133 Milano (Italia) Piazza Leonardo da Vinci, 32 Tel. (39) 02-2399.3400 Fax (39) 02-2399.3411 Software Engineering II 11 January 2012 Last Name First Name Id
Full exam for Software Engineering 2 in the Computer Engineering degree programme at Politecnico di Milano. The document covers: Dipartimento di Elettronica e Informazione Politecnico di Milano prof. Elisabetta Di Nitto and prof. Raffaela Mirandola 20133 Milano (Italia) Piazza Leonardo da Vinci, 32 Tel. (39) 02-2399.3400 Fax (39) 02-2399.3411 Software Engineering II 11 January 2012 Last Name First Name Id
Import quality: text was extracted directly from the original document.
Representative passages recognised in different parts of the material. The full extracted text remains available to search, while this compact preview makes the page easier to read.
Dipartimento di Elettronica e Informazione Politecnico di Milano prof. Elisabetta Di Nitto and prof. Raffaela Mirandola 20133 Milano (Italia) Piazza Leonardo da Vinci, 32 Tel. (39) 02-2399.3400 Fax (39) 02-2399.3411 Software Engineering II 11 January 2012 Last Name First Name Id number (Matricola) Note 1. The exam is not valid if you don’t fill in the above data. 2. Write your answers on these pages. Extra sheets will be ignored. You may use a pencil. 3. The use of any electronic apparatus (computer, cell phone, camera, etc.) is strictly forbidden. 4. You cannot keep a copy of the exam when you leave the room. 2 Question 1 Alloy (7 points) A to-do list is composed of tasks. A task may have a precondition, that is a set of tasks that must be completed before the task can be executed. A task also has an associated capability that must be possessed by the agent that may execute the task. Agents are the entities that may execute tasks; they are characterized by a set of owned capabilities. To execute a task of the to-do list, it must satisfy a condition CanExecute, which returns true if the task’s precondition is fulfilled and a free agent possessing the required capability is available for the task. [here we should have written “which checks if the task’s precondition is fulfilled”…] 1. Specify this informal description in Alloy: the required signatures, the constraints and the predicate CanExecute. 2. Define the operation that executes a task. Solution Below you find a possible solution that makes the following assumptions: A task can belong to various todo lists. A task can belong to various todo lists and more than one agent can execute a task. This means that a task can be completed in the context of a certain todo list and still to be done or ongoing in the context…
First page of the document.