mirror of
https://github.com/appinfosapienza/so-un-bot.git
synced 2025-05-06 22:19:39 +02:00
Add 06/21 by Matteo
This commit is contained in:
parent
970467fe89
commit
1be2085d94
169 changed files with 962 additions and 0 deletions
15
Ingegneria del Software/0621_34/correct.txt
Normal file
15
Ingegneria del Software/0621_34/correct.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
class Monitor
|
||||
|
||||
InputReal x; // plant output
|
||||
OutputBoolean y;
|
||||
|
||||
Boolean z;
|
||||
initial equation
|
||||
y = false;
|
||||
equation
|
||||
z = (time > 20) and ((x >= 30) or (x <= 20)) ;
|
||||
algorithm
|
||||
when edge(z) then
|
||||
y := true;
|
||||
end when;
|
||||
end Monitor;
|
3
Ingegneria del Software/0621_34/quest.txt
Normal file
3
Ingegneria del Software/0621_34/quest.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
Si consideri il seguente requisito:
|
||||
RQ1: Dopo 20 unità di tempo dall'inizio dell'esecuzione la variabile x è sempre nell'intervallo [20, 30] .
|
||||
Quale dei seguenti monitor meglio descrive il requisito RQ1 ?
|
15
Ingegneria del Software/0621_34/wrong0.txt
Normal file
15
Ingegneria del Software/0621_34/wrong0.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
class Monitor
|
||||
|
||||
InputReal x; // plant output
|
||||
OutputBoolean y;
|
||||
|
||||
Boolean z;
|
||||
initial equation
|
||||
y = false;
|
||||
equation
|
||||
z = (time > 20) or ((x >= 20) and (x <= 30)) ;
|
||||
algorithm
|
||||
when edge(z) then
|
||||
y := true;
|
||||
end when;
|
||||
end Monitor;
|
15
Ingegneria del Software/0621_34/wrong1.txt
Normal file
15
Ingegneria del Software/0621_34/wrong1.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
class Monitor
|
||||
|
||||
InputReal x; // plant output
|
||||
OutputBoolean y;
|
||||
|
||||
Boolean z;
|
||||
initial equation
|
||||
y = false;
|
||||
equation
|
||||
z = (time > 20) and (x >= 20) and (x <= 30) ;
|
||||
algorithm
|
||||
when edge(z) then
|
||||
y := true;
|
||||
end when;
|
||||
end Monitor;
|
Loading…
Add table
Add a link
Reference in a new issue