mirror of
https://github.com/appinfosapienza/so-un-bot.git
synced 2025-05-06 12:59:38 +02:00
Add 21-50 question of 01/22
This commit is contained in:
parent
604c2269b6
commit
5c561b5538
121 changed files with 697 additions and 0 deletions
15
Ingegneria del Software/27/correct.txt
Normal file
15
Ingegneria del Software/27/correct.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
<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)) and ((x >= 15) or (x <= 10)) ;
|
||||
algorithm
|
||||
when edge(z) then
|
||||
y := true;
|
||||
end when;
|
||||
end Monitor;
|
||||
</pre>
|
4
Ingegneria del Software/27/quest.txt
Normal file
4
Ingegneria del Software/27/quest.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
Si consideri il seguente requisito:
|
||||
RQ1: Durante l'esecuzione del programma (cioè per tutti gli istanti di tempo positivi) la variabile x è sempre nell'intervallo
|
||||
[0, 5] oppure [10, 15]
|
||||
Quale dei seguenti monitor meglio descrive il requisito RQ1 ?
|
15
Ingegneria del Software/27/wrong 2.txt
Normal file
15
Ingegneria del Software/27/wrong 2.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
<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)) or ((x >= 10) and (x <= 15)) );
|
||||
algorithm
|
||||
when edge(z) then
|
||||
y := true;
|
||||
end when;
|
||||
end Monitor;
|
||||
</pre>
|
15
Ingegneria del Software/27/wrong.txt
Normal file
15
Ingegneria del Software/27/wrong.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
<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)) and ((x >= 10) or (x <= 15)) );
|
||||
algorithm
|
||||
when edge(z) then
|
||||
y := true;
|
||||
end when;
|
||||
end Monitor;
|
||||
</pre>
|
Loading…
Add table
Add a link
Reference in a new issue