Add new ingsw questions

This commit is contained in:
Marco Realacci 2023-06-24 13:42:48 +02:00
parent 258ee4e2cf
commit 0873165c52
800 changed files with 5605 additions and 0 deletions

View file

@ -0,0 +1,17 @@
<pre>
class Monitor
InputReal x, y; // plant output
OutputBoolean wy;
Boolean wz;
initial equation
wy = false;
equation
wz = (time > 10) and (x >= 10) and (x <= 20) and ((y <pre 0.5*x) or (y > 0.7*x)) ;
algorithm
when edge(wz) then
wy := true;
end when;
end Monitor;
</pre>

View file

@ -0,0 +1,3 @@
Si consideri il seguente requisito:
RQ: Dopo 10 unità di tempo dall'inizio dell'esecuzione vale la seguente proprietà: se la variabile x è nell'intervallo [10, 20] allora la variabile y è compresa tra il 50% di x ed il 70% di x.
Quale dei seguenti monitor meglio descrive il requisito RQ ?

View file

@ -0,0 +1,17 @@
<pre>
class Monitor
InputReal x, y; // plant output
OutputBoolean wy;
Boolean wz;
initial equation
wy = false;
equation
wz = (time > 10) and ((x < 10) or (x > 20)) and ((y < 0.5*x) or (y > 0.7*x)) ;
algorithm
when edge(wz) then
wy := true;
end when;
end Monitor;
</pre>

View file

@ -0,0 +1,17 @@
<pre>
class Monitor
InputReal x, y; // plant output
OutputBoolean wy;
Boolean wz;
initial equation
wy = false;
equation
wz = (time > 10) and (x >= 10) and (x <= 20) and (y >= 0.5*x) and (y <= 0.7*x) ;
algorithm
when edge(wz) then
wy := true;
end when;
end Monitor;
</pre>