Downloaded 0721 questions

This commit is contained in:
Federico Pizzari 2022-11-15 14:27:16 +01:00
parent eb8ea2909c
commit 935d4532aa
162 changed files with 1435 additions and 2 deletions

15
0721_20/correct.txt Normal file
View file

@ -0,0 +1,15 @@
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;

3
0721_20/quest.txt Normal file
View file

@ -0,0 +1,3 @@
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
0721_20/wrong1.txt Normal file
View file

@ -0,0 +1,15 @@
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;

15
0721_20/wrong2.txt Normal file
View file

@ -0,0 +1,15 @@
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;