Add Sicurezza questions

This commit is contained in:
Marco Realacci 2023-04-12 03:06:17 +02:00
parent bfdeb730f0
commit 9b7de75cb8
33 changed files with 501 additions and 0 deletions

View file

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