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; // 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>

View 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 ?

View 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>

View 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>