mirror of
https://github.com/appinfosapienza/so-un-bot.git
synced 2025-05-06 12:39:37 +02:00
Add new ingsw questions
This commit is contained in:
parent
258ee4e2cf
commit
0873165c52
800 changed files with 5605 additions and 0 deletions
17
Ingegneria del Software/0613_15/correct.txt
Normal file
17
Ingegneria del Software/0613_15/correct.txt
Normal file
|
@ -0,0 +1,17 @@
|
|||
<pre>
|
||||
class Monitor
|
||||
|
||||
InputReal x; // plant output
|
||||
OutputBoolean y;
|
||||
|
||||
Boolean z;
|
||||
initial equation
|
||||
y = false;
|
||||
equation
|
||||
z = (time > 0) and ((x > 5) or (x < 0));
|
||||
algorithm
|
||||
when edge(z) then
|
||||
y := true;
|
||||
end when;
|
||||
end Monitor;
|
||||
</pre>
|
3
Ingegneria del Software/0613_15/quest.txt
Normal file
3
Ingegneria del Software/0613_15/quest.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
Si consideri il seguente requisito:
|
||||
RQ: Durante l'esecuzione del programma (cioè per tutti gli istanti di tempo positivi) la variabile x è sempre nell'intervallo [0, 5].
|
||||
Quale dei seguenti monitor meglio descrive il requisito RQ ?
|
17
Ingegneria del Software/0613_15/wrong1.txt
Normal file
17
Ingegneria del Software/0613_15/wrong1.txt
Normal file
|
@ -0,0 +1,17 @@
|
|||
<pre>
|
||||
class Monitor
|
||||
|
||||
InputReal x; // plant output
|
||||
OutputBoolean y;
|
||||
|
||||
Boolean z;
|
||||
initial equation
|
||||
y = false;
|
||||
equation
|
||||
z = (time > 0) and ((x > 0) or (x < 5));
|
||||
algorithm
|
||||
when edge(z) then
|
||||
y := true;
|
||||
end when;
|
||||
end Monitor;
|
||||
</pre>
|
17
Ingegneria del Software/0613_15/wrong2.txt
Normal file
17
Ingegneria del Software/0613_15/wrong2.txt
Normal file
|
@ -0,0 +1,17 @@
|
|||
<pre>
|
||||
class Monitor
|
||||
|
||||
InputReal x; // plant output
|
||||
OutputBoolean y;
|
||||
|
||||
Boolean z;
|
||||
initial equation
|
||||
y = false;
|
||||
equation
|
||||
z = (time > 0) and (x > 0) and (x < 5);
|
||||
algorithm
|
||||
when edge(z) then
|
||||
y := true;
|
||||
end when;
|
||||
end Monitor;
|
||||
</pre>
|
Loading…
Add table
Add a link
Reference in a new issue