mirror of
https://github.com/appinfosapienza/so-un-bot.git
synced 2025-03-14 13:06:14 +01:00
Add Sicurezza questions
This commit is contained in:
parent
bfdeb730f0
commit
9b7de75cb8
33 changed files with 501 additions and 0 deletions
124
Domande Sicurezza.txt
Normal file
124
Domande Sicurezza.txt
Normal file
|
@ -0,0 +1,124 @@
|
|||
1) L'autenticazione dei messaggi consente di
|
||||
(scegli una o più alternative)
|
||||
> Garantire la segretezza del messaggio
|
||||
> Garantire il non-ripudio del mittente (non-repudiation of origin)
|
||||
> Verificare l'integrità del messaggio
|
||||
> le prime due sono corrette
|
||||
v le ultime due sono corrette
|
||||
> la prima e l'ultima sono corrette
|
||||
|
||||
2) Possiamo affermare che un sistema è sicuro se, partendo da uno stato autorizzato non entra mai in uno stato non-autorizzato
|
||||
v V
|
||||
> F
|
||||
|
||||
3) Una delle primarie assunzioni dell'anomaly detection è la seguente:
|
||||
Le attività normali e quelle anomale non hanno evidenze distinte
|
||||
> V
|
||||
v F
|
||||
|
||||
4) L'SSL Handshake Protocol permette al client ed al server di negoziare l'algoritmo di cifratura e l'algoritmo MAC.
|
||||
> V
|
||||
v F
|
||||
|
||||
5) Quale delle seguenti è una caratteristica di un certificato utente (user certificate) generato da una CA?
|
||||
> Le chiavi pubbliche utente che sono state certificate dalla CA sono disponibili in una directory accessibile a chiunque
|
||||
v Ogni utente con accesso alla chiave pubblica della CA può recuperare la chiave pubblica utente che è stata certificata OK
|
||||
> Ogni utente con accesso alla chiave pubblica della CA può modificare il certificato senza essere scoperto
|
||||
|
||||
6) Si consideri il Role-Based Access Control:
|
||||
I ruoli (role) possono essere utilizzati per gestire un'assegnazione di permessi che soddisfi il principio del Least Privilege.
|
||||
v V
|
||||
> F
|
||||
|
||||
7) Un sistema di Misuse detection è in grado di identificare anche attacchi sconosciuti a chi sviluppa i set di regole.
|
||||
> V
|
||||
v F
|
||||
|
||||
8) Il principio del Fail-Safe Defaults asserisce che se un soggetto non ha accesso esplicito a un oggetto, dovrebbe essere garantito l'accesso a quell'oggetto. Scegli una risposta:
|
||||
> V
|
||||
v F
|
||||
|
||||
9) La cifratura a chiave pubblica trova campo di applicazione nella firma digitale ma non è opportuno utilizzarla per lo scambio di chiavi.
|
||||
> V
|
||||
v F
|
||||
|
||||
10) La crittografia offre protezione solo da attacchi di passivi
|
||||
> V
|
||||
v F
|
||||
|
||||
11) Quale è la definizione corretta di Mandatory Access Control?
|
||||
v Un meccanismo di sistema, basato su regole, che controlla l'accesso ad oggetti e in cui gli utenti individuali non possono alterare la politica di accesso.
|
||||
> Un meccanismo di sistema, basato su regole, che controlla l'accesso ad oggetti e in cui gli utenti individuali possono alterare la politica di accesso ai loro oggetti.
|
||||
> Un meccanismo, basato sull'identità, che permette agli utenti individuali di controllare chi può accedere o no agli oggetti del sistema.
|
||||
|
||||
12) Il principio di Separazione dei Privilegi (Separation of Privilege) prevede che vengano verificate più condizioni per concedere i privilegi e che due o più componenti lavorino insieme per imporre il livello di sicurezza desiderato.
|
||||
v V
|
||||
> F
|
||||
|
||||
13) Quali dei seguenti criteri vengono utilizzati nel Attribute-based Access Control per autorizzare o negare un operazione su di un oggetto?
|
||||
(scegli una o più alternative)
|
||||
> Attributi assegnati del soggetto
|
||||
> Condizioni dell'ambiente
|
||||
> Tipo di operazione da effettuare
|
||||
v le prime due sono corrette
|
||||
> le ultime due sono corrette
|
||||
> la prima e l'ultima sono corrette
|
||||
|
||||
14) Si consideri il Role-Based Access Control.
|
||||
I ruoli (role) possono essere utilizzati per gestire un'assegnazione di permessi che soddisfi il principio del Least Privilege.
|
||||
v V
|
||||
> F
|
||||
|
||||
15) Considerando un sistema Firewall, quali delle seguenti affermazioni è corretta?
|
||||
> Il Firewall non penalizza le prestazioni
|
||||
v Il Firewall è un single-point-of-failure
|
||||
> Il firewall non è un single-point-of-failure
|
||||
|
||||
16) Considerando un sistema Firewall, quali delle seguenti affermazioni è corretta?
|
||||
> Il firewall, tracciando il traffico in uscita ed in entrate, protegge anche dagli Insider-attacks.
|
||||
> Il firewall non è un single-point-of-failure.
|
||||
v Il firewall è il punto centrale per le decisioni relative alla sicurezza di una rete.
|
||||
|
||||
17) Supponiamo di dover definire una politica che vieti ad un programma di accedere al file delle password /etc/passwd.
|
||||
Supponiamo anche di usare un linguaggio ad alto livello, e che i metodi del programma per accedere ai file sono i seguenti:
|
||||
<pre>
|
||||
class File {
|
||||
public file(String name); //Crea un file
|
||||
public String getfilename(); // Restituisce il nome di un file
|
||||
public char read(); //Accede ad un file in lettura
|
||||
}
|
||||
</pre>
|
||||
Quali delle seguenti politiche è corretta?
|
||||
> allow( |-> file.read) when (file.getfilename() == "/etc/passwd")
|
||||
> deny( |-> file.read) when (file.file(/etc/passwd) == true)
|
||||
v deny( |-> file.read) when (file.getfilename() == "/etc/passwd")
|
||||
|
||||
18) Si supponga di utilizzare un controllo di accessi basato sui ruoli (RBAC) per gestire i permessi in un'azienda.
|
||||
Si supponga che il dipendente U1 abbia funzione F1 e F1 è associata al ruolo R1.
|
||||
Se U1 viene rimpiazzato dal dipendente U2 nella funzione F1 quale delle seguenti affermazioni è corretta?
|
||||
> Il fatto che U2 rimpiazzi U1 nella sua funzione F1 non ha alcuna relazione con l'assegnazione di U2 ad un ruolo.
|
||||
> U2 può avere tutti i permessi di U1 solo se viene creato un nuovo ruolo R2=R1 e U2 viene assegnato a R2.
|
||||
v U2 acquisisce automaticamente tutti i permessi di U1.
|
||||
|
||||
19) Quale tra i seguenti NON è uno dei principi di progettazione sicura dei sistemi?
|
||||
v Separation of Responsibilities
|
||||
> Open Design
|
||||
> Economy of Mechanisms
|
||||
|
||||
20) In un sistema di Verifica e Identificazione Biometrica, la fase di Verifica potrebbe dare un esito inconcludente.
|
||||
v V
|
||||
> F
|
||||
|
||||
21) Una matrice di controllo degli accessi (Access Control Matrix) è definita da:
|
||||
soggetti (subjects) S = { s ,…,s }
|
||||
oggetti (objects) O = { o ,…,o }
|
||||
Diritti (rights) R = { r ,…,r }
|
||||
Quale è il significato di un elemento A[s, o ] = { r , ..., r } della matrice R?
|
||||
v Il soggetto s ha diritti r ,...,r sull'oggetto o
|
||||
> Il soggetto s può utilizzare le risorse r ,...,r dell'oggetto o
|
||||
> Il soggetto s non ha i diritti r ,...,r sull'oggetto o
|
||||
|
||||
22) Si consideri il Role-Based Access Control.
|
||||
I ruoli (role) possono essere utilizzati per gestire un'assegnazione di permessi che soddisfi il principio del Least Privilege.
|
||||
v V
|
||||
> F
|
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…
Reference in a new issue