mirror of
https://github.com/appinfosapienza/so-un-bot.git
synced 2025-05-06 20:59:37 +02:00
Add Sicurezza questions
This commit is contained in:
parent
bfdeb730f0
commit
9b7de75cb8
33 changed files with 501 additions and 0 deletions
19
Ingegneria del Software - Domande duplicate/1/correct.txt
Normal file
19
Ingegneria del Software - Domande duplicate/1/correct.txt
Normal 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>
|
3
Ingegneria del Software - Domande duplicate/1/quest.txt
Normal file
3
Ingegneria del Software - Domande duplicate/1/quest.txt
Normal 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?
|
19
Ingegneria del Software - Domande duplicate/1/wrong 2.txt
Normal file
19
Ingegneria del Software - Domande duplicate/1/wrong 2.txt
Normal 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>
|
19
Ingegneria del Software - Domande duplicate/1/wrong.txt
Normal file
19
Ingegneria del Software - Domande duplicate/1/wrong.txt
Normal 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>
|
|
@ -0,0 +1 @@
|
|||
Per ciascun requisito, dovremmo essere in grado di scrivere un inseme di test che può dimostrare che il sistema sviluppato soddisfa il requisito considerato.
|
2
Ingegneria del Software - Domande duplicate/18/quest.txt
Normal file
2
Ingegneria del Software - Domande duplicate/18/quest.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Quale delle seguenti frasi meglio descrive il criterio di "requirements verifiability" che è parte della "requirements
|
||||
validation activity".
|
|
@ -0,0 +1 @@
|
|||
Per ciascuna coppia di componenti, dovremmo essere in grado di scrivere un insieme di test che può dimostrare che l'interazione tra le componenti soddisfa tutti i requisiti di interfaccia.
|
1
Ingegneria del Software - Domande duplicate/18/wrong.txt
Normal file
1
Ingegneria del Software - Domande duplicate/18/wrong.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Per ciascuna componente del sistema, dovremmo essere in grado di scrivere un insieme di test che può dimostrare che essa soddisfa tutti i requisiti.
|
15
Ingegneria del Software - Domande duplicate/27/correct.txt
Normal file
15
Ingegneria del Software - Domande duplicate/27/correct.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
<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)) and ((x >= 15) or (x <= 10)) ;
|
||||
algorithm
|
||||
when edge(z) then
|
||||
y := true;
|
||||
end when;
|
||||
end Monitor;
|
||||
</pre>
|
4
Ingegneria del Software - Domande duplicate/27/quest.txt
Normal file
4
Ingegneria del Software - Domande duplicate/27/quest.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
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
Ingegneria del Software - Domande duplicate/27/wrong 2.txt
Normal file
15
Ingegneria del Software - Domande duplicate/27/wrong 2.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
<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)) or ((x >= 10) and (x <= 15)) );
|
||||
algorithm
|
||||
when edge(z) then
|
||||
y := true;
|
||||
end when;
|
||||
end Monitor;
|
||||
</pre>
|
15
Ingegneria del Software - Domande duplicate/27/wrong.txt
Normal file
15
Ingegneria del Software - Domande duplicate/27/wrong.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
<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)) and ((x >= 10) or (x <= 15)) );
|
||||
algorithm
|
||||
when edge(z) then
|
||||
y := true;
|
||||
end when;
|
||||
end Monitor;
|
||||
</pre>
|
15
Ingegneria del Software - Domande duplicate/28/correct.txt
Normal file
15
Ingegneria del Software - Domande duplicate/28/correct.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
<pre>
|
||||
class Monitor
|
||||
InputReal x, y;
|
||||
OutputBoolean wy;
|
||||
Boolean wz;
|
||||
initial equation
|
||||
wy = false;
|
||||
equation
|
||||
wz = (time > 60) and (delay(x, 10) > 0) and (y <= 0);
|
||||
algorithm
|
||||
when edge(wz) then
|
||||
wy := true;
|
||||
end when;
|
||||
end Monitor;
|
||||
</pre>
|
7
Ingegneria del Software - Domande duplicate/28/quest.txt
Normal file
7
Ingegneria del Software - Domande duplicate/28/quest.txt
Normal file
|
@ -0,0 +1,7 @@
|
|||
Si consideri il seguente requisito:
|
||||
RQ: Dopo 60 unità di tempo dall'inizio dell'esecuzione vale la seguente proprietà:
|
||||
se 10 unità di tempo nel passato era stata richiesta una risorsa (variabile x positiva) allora ora è concesso l'accesso alla
|
||||
risorsa (variabile y positiva)
|
||||
Tenendo presente che, al tempo time, delay(z, w) ritorna 0 se time < w e ritorna il valore che z aveva al tempo (time - w), se time
|
||||
>= w.
|
||||
Quale dei seguenti monitor meglio descrive il requisito RQ ?
|
15
Ingegneria del Software - Domande duplicate/28/wrong 2.txt
Normal file
15
Ingegneria del Software - Domande duplicate/28/wrong 2.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
<pre>
|
||||
class Monitor
|
||||
InputReal x, y;
|
||||
OutputBoolean wy;
|
||||
Boolean wz;
|
||||
initial equation
|
||||
wy = false;
|
||||
equation
|
||||
wz = (time > 60) and (delay(x, 10) > 0) and (y > 0);
|
||||
algorithm
|
||||
when edge(wz) then
|
||||
wy := true;
|
||||
end when;
|
||||
end Monitor;
|
||||
</pre>
|
15
Ingegneria del Software - Domande duplicate/28/wrong.txt
Normal file
15
Ingegneria del Software - Domande duplicate/28/wrong.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
<pre>
|
||||
class Monitor
|
||||
InputReal x, y;
|
||||
OutputBoolean wy;
|
||||
Boolean wz;
|
||||
initial equation
|
||||
wy = false;
|
||||
equation
|
||||
wz = (time > 60) or (delay(x, 10) > 0) or (y <= 0);
|
||||
algorithm
|
||||
when edge(wz) then
|
||||
wy := true;
|
||||
end when;
|
||||
end Monitor;
|
||||
</pre>
|
15
Ingegneria del Software - Domande duplicate/30/correct.txt
Normal file
15
Ingegneria del Software - Domande duplicate/30/correct.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
<pre>
|
||||
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;
|
||||
</pre>
|
3
Ingegneria del Software - Domande duplicate/30/quest.txt
Normal file
3
Ingegneria del Software - Domande duplicate/30/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 - Domande duplicate/30/wrong 2.txt
Normal file
15
Ingegneria del Software - Domande duplicate/30/wrong 2.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
<pre>
|
||||
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;
|
||||
</pre>
|
15
Ingegneria del Software - Domande duplicate/30/wrong.txt
Normal file
15
Ingegneria del Software - Domande duplicate/30/wrong.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
<pre>
|
||||
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;
|
||||
</pre>
|
15
Ingegneria del Software - Domande duplicate/36/correct.txt
Normal file
15
Ingegneria del Software - Domande duplicate/36/correct.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
<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) or (y > 0.7*x)) ;
|
||||
algorithm
|
||||
when edge(wz) then
|
||||
wy := true;
|
||||
end when;
|
||||
end Monitor;
|
||||
</pre>
|
4
Ingegneria del Software - Domande duplicate/36/quest.txt
Normal file
4
Ingegneria del Software - Domande duplicate/36/quest.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
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 ?
|
15
Ingegneria del Software - Domande duplicate/36/wrong 2.txt
Normal file
15
Ingegneria del Software - Domande duplicate/36/wrong 2.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
<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>
|
15
Ingegneria del Software - Domande duplicate/36/wrong.txt
Normal file
15
Ingegneria del Software - Domande duplicate/36/wrong.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
<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>
|
15
Ingegneria del Software - Domande duplicate/42/correct.txt
Normal file
15
Ingegneria del Software - Domande duplicate/42/correct.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
<pre>
|
||||
class Monitor
|
||||
InputReal x, y, z; // plant output
|
||||
OutputBoolean wy;
|
||||
Boolean wz;
|
||||
initial equation
|
||||
wy = false;
|
||||
equation
|
||||
wz = (time > 50) and (x < 0.6*y) and (x + y <= 0.3*z);
|
||||
algorithm
|
||||
when edge(wz) then
|
||||
wy := true;
|
||||
end when;
|
||||
end Monitor;
|
||||
</pre>
|
4
Ingegneria del Software - Domande duplicate/42/quest.txt
Normal file
4
Ingegneria del Software - Domande duplicate/42/quest.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
Si consideri il seguente requisito:
|
||||
RQ: Dopo 50 unità di tempo dall'inizio dell'esecuzione vale la seguente proprietà:
|
||||
se la variabile x è minore del 60% della variabile y allora la somma di x ed y è maggiore del 30% della variabile z
|
||||
Quale dei seguenti monitor meglio descrive il requisito RQ ?
|
15
Ingegneria del Software - Domande duplicate/42/wrong 2.txt
Normal file
15
Ingegneria del Software - Domande duplicate/42/wrong 2.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
<pre>
|
||||
class Monitor
|
||||
InputReal x, y, z; // plant output
|
||||
OutputBoolean wy;
|
||||
Boolean wz;
|
||||
initial equation
|
||||
wy = false;
|
||||
equation
|
||||
wz = (time > 50) and (x < 0.6*y) and (x + y > 0.3*z);
|
||||
algorithm
|
||||
when edge(wz) then
|
||||
wy := true;
|
||||
end when;
|
||||
end Monitor;
|
||||
</pre>
|
15
Ingegneria del Software - Domande duplicate/42/wrong.txt
Normal file
15
Ingegneria del Software - Domande duplicate/42/wrong.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
<pre>
|
||||
class Monitor
|
||||
InputReal x, y, z; // plant output
|
||||
OutputBoolean wy;
|
||||
Boolean wz;
|
||||
initial equation
|
||||
wy = false;
|
||||
equation
|
||||
wz = (time > 50) and (x >= 0.6*y) and (x + y <= 0.3*z);
|
||||
algorithm
|
||||
when edge(wz) then
|
||||
wy := true;
|
||||
end when;
|
||||
end Monitor;
|
||||
</pre>
|
17
Ingegneria del Software - Domande duplicate/7/correct.txt
Normal file
17
Ingegneria del Software - Domande duplicate/7/correct.txt
Normal file
|
@ -0,0 +1,17 @@
|
|||
<pre>
|
||||
class Monitor
|
||||
InputReal x, y;
|
||||
OutputBoolean wy;
|
||||
Boolean wz;
|
||||
|
||||
initial equation
|
||||
|
||||
wy = false;
|
||||
equation
|
||||
wz = (time > 60) and (delay(x, 10) > 0) and (y >= 0);
|
||||
algorithm
|
||||
when edge(wz) then
|
||||
wy := true;
|
||||
end when;
|
||||
end Monitor;
|
||||
</pre>
|
9
Ingegneria del Software - Domande duplicate/7/quest.txt
Normal file
9
Ingegneria del Software - Domande duplicate/7/quest.txt
Normal file
|
@ -0,0 +1,9 @@
|
|||
Si consideri il seguente requisito:
|
||||
|
||||
RQ: Dopo 60 unità di tempo dall'inizio dell'esecuzione vale la seguente proprietà:
|
||||
|
||||
se 10 unità di tempo nel passato x era maggiore di 0 allora ora y è negativa.
|
||||
|
||||
Tenendo presente che, al tempo time, delay(z, w) ritorna 0 se time <= w e ritorna il valore che z aveva al tempo (time - w), se time = w.
|
||||
|
||||
Quale dei seguenti monitor meglio descrive il requisito RQ?
|
20
Ingegneria del Software - Domande duplicate/7/wrong 2.txt
Normal file
20
Ingegneria del Software - Domande duplicate/7/wrong 2.txt
Normal file
|
@ -0,0 +1,20 @@
|
|||
<pre>
|
||||
class Monitor
|
||||
InputReal x, y;
|
||||
OutputBoolean wy;
|
||||
Boolean wz;
|
||||
|
||||
initial equation
|
||||
|
||||
wy = false;
|
||||
equation
|
||||
|
||||
wz = (time > 60) or (delay(x, 10) > 0) or (y >= 0);
|
||||
|
||||
|
||||
algorithm
|
||||
when edge(wz) then
|
||||
wy := true;
|
||||
end when;
|
||||
end Monitor;
|
||||
</pre>
|
19
Ingegneria del Software - Domande duplicate/7/wrong.txt
Normal file
19
Ingegneria del Software - Domande duplicate/7/wrong.txt
Normal file
|
@ -0,0 +1,19 @@
|
|||
<pre>
|
||||
class Monitor
|
||||
InputReal x, y;
|
||||
OutputBoolean wy;
|
||||
Boolean wz;
|
||||
|
||||
initial equation
|
||||
|
||||
wy = false;
|
||||
equation
|
||||
|
||||
wz = (time > 60) and (delay(x, 10) <= 0) and (y >= 0);
|
||||
|
||||
algorithm
|
||||
when edge(wz) then
|
||||
wy := true;
|
||||
end when;
|
||||
end Monitor;
|
||||
</pre>
|
Loading…
Add table
Add a link
Reference in a new issue