diff --git a/Domande Sicurezza.txt b/Domande Sicurezza.txt new file mode 100644 index 0000000..f281dde --- /dev/null +++ b/Domande Sicurezza.txt @@ -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: +
+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
+}
+
+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 diff --git a/Ingegneria del Software - Domande duplicate/1/correct.txt b/Ingegneria del Software - Domande duplicate/1/correct.txt new file mode 100644 index 0000000..0179ee7 --- /dev/null +++ b/Ingegneria del Software - Domande duplicate/1/correct.txt @@ -0,0 +1,19 @@ +
+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;
+
\ No newline at end of file diff --git a/Ingegneria del Software - Domande duplicate/1/quest.txt b/Ingegneria del Software - Domande duplicate/1/quest.txt new file mode 100644 index 0000000..1d28ae0 --- /dev/null +++ b/Ingegneria del Software - Domande duplicate/1/quest.txt @@ -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? \ No newline at end of file diff --git a/Ingegneria del Software - Domande duplicate/1/wrong 2.txt b/Ingegneria del Software - Domande duplicate/1/wrong 2.txt new file mode 100644 index 0000000..f31bec2 --- /dev/null +++ b/Ingegneria del Software - Domande duplicate/1/wrong 2.txt @@ -0,0 +1,19 @@ +
+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;
+
\ No newline at end of file diff --git a/Ingegneria del Software - Domande duplicate/1/wrong.txt b/Ingegneria del Software - Domande duplicate/1/wrong.txt new file mode 100644 index 0000000..b80f909 --- /dev/null +++ b/Ingegneria del Software - Domande duplicate/1/wrong.txt @@ -0,0 +1,19 @@ +
+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;
+
\ No newline at end of file diff --git a/Ingegneria del Software - Domande duplicate/18/correct.txt b/Ingegneria del Software - Domande duplicate/18/correct.txt new file mode 100644 index 0000000..4a0e81e --- /dev/null +++ b/Ingegneria del Software - Domande duplicate/18/correct.txt @@ -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. diff --git a/Ingegneria del Software - Domande duplicate/18/quest.txt b/Ingegneria del Software - Domande duplicate/18/quest.txt new file mode 100644 index 0000000..dac6767 --- /dev/null +++ b/Ingegneria del Software - Domande duplicate/18/quest.txt @@ -0,0 +1,2 @@ +Quale delle seguenti frasi meglio descrive il criterio di "requirements verifiability" che è parte della "requirements +validation activity". \ No newline at end of file diff --git a/Ingegneria del Software - Domande duplicate/18/wrong 2.txt b/Ingegneria del Software - Domande duplicate/18/wrong 2.txt new file mode 100644 index 0000000..4098e9d --- /dev/null +++ b/Ingegneria del Software - Domande duplicate/18/wrong 2.txt @@ -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. diff --git a/Ingegneria del Software - Domande duplicate/18/wrong.txt b/Ingegneria del Software - Domande duplicate/18/wrong.txt new file mode 100644 index 0000000..99f80d4 --- /dev/null +++ b/Ingegneria del Software - Domande duplicate/18/wrong.txt @@ -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. diff --git a/Ingegneria del Software - Domande duplicate/27/correct.txt b/Ingegneria del Software - Domande duplicate/27/correct.txt new file mode 100644 index 0000000..cfa0931 --- /dev/null +++ b/Ingegneria del Software - Domande duplicate/27/correct.txt @@ -0,0 +1,15 @@ +
+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;
+
\ No newline at end of file diff --git a/Ingegneria del Software - Domande duplicate/27/quest.txt b/Ingegneria del Software - Domande duplicate/27/quest.txt new file mode 100644 index 0000000..bb0692c --- /dev/null +++ b/Ingegneria del Software - Domande duplicate/27/quest.txt @@ -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 ? \ No newline at end of file diff --git a/Ingegneria del Software - Domande duplicate/27/wrong 2.txt b/Ingegneria del Software - Domande duplicate/27/wrong 2.txt new file mode 100644 index 0000000..1bf9371 --- /dev/null +++ b/Ingegneria del Software - Domande duplicate/27/wrong 2.txt @@ -0,0 +1,15 @@ +
+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;
+
\ No newline at end of file diff --git a/Ingegneria del Software - Domande duplicate/27/wrong.txt b/Ingegneria del Software - Domande duplicate/27/wrong.txt new file mode 100644 index 0000000..5f07b8b --- /dev/null +++ b/Ingegneria del Software - Domande duplicate/27/wrong.txt @@ -0,0 +1,15 @@ +
+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;
+
\ No newline at end of file diff --git a/Ingegneria del Software - Domande duplicate/28/correct.txt b/Ingegneria del Software - Domande duplicate/28/correct.txt new file mode 100644 index 0000000..8fda7cc --- /dev/null +++ b/Ingegneria del Software - Domande duplicate/28/correct.txt @@ -0,0 +1,15 @@ +
+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;
+
\ No newline at end of file diff --git a/Ingegneria del Software - Domande duplicate/28/quest.txt b/Ingegneria del Software - Domande duplicate/28/quest.txt new file mode 100644 index 0000000..4786a89 --- /dev/null +++ b/Ingegneria del Software - Domande duplicate/28/quest.txt @@ -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 ? \ No newline at end of file diff --git a/Ingegneria del Software - Domande duplicate/28/wrong 2.txt b/Ingegneria del Software - Domande duplicate/28/wrong 2.txt new file mode 100644 index 0000000..52459aa --- /dev/null +++ b/Ingegneria del Software - Domande duplicate/28/wrong 2.txt @@ -0,0 +1,15 @@ +
+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;
+
\ No newline at end of file diff --git a/Ingegneria del Software - Domande duplicate/28/wrong.txt b/Ingegneria del Software - Domande duplicate/28/wrong.txt new file mode 100644 index 0000000..553e500 --- /dev/null +++ b/Ingegneria del Software - Domande duplicate/28/wrong.txt @@ -0,0 +1,15 @@ +
+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;
+
\ No newline at end of file diff --git a/Ingegneria del Software - Domande duplicate/30/correct.txt b/Ingegneria del Software - Domande duplicate/30/correct.txt new file mode 100644 index 0000000..427eb75 --- /dev/null +++ b/Ingegneria del Software - Domande duplicate/30/correct.txt @@ -0,0 +1,15 @@ +
+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;
+
\ No newline at end of file diff --git a/Ingegneria del Software - Domande duplicate/30/quest.txt b/Ingegneria del Software - Domande duplicate/30/quest.txt new file mode 100644 index 0000000..f2ab4c4 --- /dev/null +++ b/Ingegneria del Software - Domande duplicate/30/quest.txt @@ -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 ? \ No newline at end of file diff --git a/Ingegneria del Software - Domande duplicate/30/wrong 2.txt b/Ingegneria del Software - Domande duplicate/30/wrong 2.txt new file mode 100644 index 0000000..5065310 --- /dev/null +++ b/Ingegneria del Software - Domande duplicate/30/wrong 2.txt @@ -0,0 +1,15 @@ +
+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;
+
\ No newline at end of file diff --git a/Ingegneria del Software - Domande duplicate/30/wrong.txt b/Ingegneria del Software - Domande duplicate/30/wrong.txt new file mode 100644 index 0000000..e324f25 --- /dev/null +++ b/Ingegneria del Software - Domande duplicate/30/wrong.txt @@ -0,0 +1,15 @@ +
+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;
+
\ No newline at end of file diff --git a/Ingegneria del Software - Domande duplicate/36/correct.txt b/Ingegneria del Software - Domande duplicate/36/correct.txt new file mode 100644 index 0000000..7f1e255 --- /dev/null +++ b/Ingegneria del Software - Domande duplicate/36/correct.txt @@ -0,0 +1,15 @@ +
+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;
+
\ No newline at end of file diff --git a/Ingegneria del Software - Domande duplicate/36/quest.txt b/Ingegneria del Software - Domande duplicate/36/quest.txt new file mode 100644 index 0000000..efd8c1c --- /dev/null +++ b/Ingegneria del Software - Domande duplicate/36/quest.txt @@ -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 ? \ No newline at end of file diff --git a/Ingegneria del Software - Domande duplicate/36/wrong 2.txt b/Ingegneria del Software - Domande duplicate/36/wrong 2.txt new file mode 100644 index 0000000..a51ae0c --- /dev/null +++ b/Ingegneria del Software - Domande duplicate/36/wrong 2.txt @@ -0,0 +1,15 @@ +
+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;
+
\ No newline at end of file diff --git a/Ingegneria del Software - Domande duplicate/36/wrong.txt b/Ingegneria del Software - Domande duplicate/36/wrong.txt new file mode 100644 index 0000000..a18541f --- /dev/null +++ b/Ingegneria del Software - Domande duplicate/36/wrong.txt @@ -0,0 +1,15 @@ +
+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;
+
\ No newline at end of file diff --git a/Ingegneria del Software - Domande duplicate/42/correct.txt b/Ingegneria del Software - Domande duplicate/42/correct.txt new file mode 100644 index 0000000..753671c --- /dev/null +++ b/Ingegneria del Software - Domande duplicate/42/correct.txt @@ -0,0 +1,15 @@ +
+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;
+
\ No newline at end of file diff --git a/Ingegneria del Software - Domande duplicate/42/quest.txt b/Ingegneria del Software - Domande duplicate/42/quest.txt new file mode 100644 index 0000000..c669df0 --- /dev/null +++ b/Ingegneria del Software - Domande duplicate/42/quest.txt @@ -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 ? \ No newline at end of file diff --git a/Ingegneria del Software - Domande duplicate/42/wrong 2.txt b/Ingegneria del Software - Domande duplicate/42/wrong 2.txt new file mode 100644 index 0000000..baacdc3 --- /dev/null +++ b/Ingegneria del Software - Domande duplicate/42/wrong 2.txt @@ -0,0 +1,15 @@ +
+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;
+
\ No newline at end of file diff --git a/Ingegneria del Software - Domande duplicate/42/wrong.txt b/Ingegneria del Software - Domande duplicate/42/wrong.txt new file mode 100644 index 0000000..03d64ee --- /dev/null +++ b/Ingegneria del Software - Domande duplicate/42/wrong.txt @@ -0,0 +1,15 @@ +
+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;
+
\ No newline at end of file diff --git a/Ingegneria del Software - Domande duplicate/7/correct.txt b/Ingegneria del Software - Domande duplicate/7/correct.txt new file mode 100644 index 0000000..deba1f5 --- /dev/null +++ b/Ingegneria del Software - Domande duplicate/7/correct.txt @@ -0,0 +1,17 @@ +
+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;
+
\ No newline at end of file diff --git a/Ingegneria del Software - Domande duplicate/7/quest.txt b/Ingegneria del Software - Domande duplicate/7/quest.txt new file mode 100644 index 0000000..b99e2e2 --- /dev/null +++ b/Ingegneria del Software - Domande duplicate/7/quest.txt @@ -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? \ No newline at end of file diff --git a/Ingegneria del Software - Domande duplicate/7/wrong 2.txt b/Ingegneria del Software - Domande duplicate/7/wrong 2.txt new file mode 100644 index 0000000..f2a9214 --- /dev/null +++ b/Ingegneria del Software - Domande duplicate/7/wrong 2.txt @@ -0,0 +1,20 @@ +
+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;
+
\ No newline at end of file diff --git a/Ingegneria del Software - Domande duplicate/7/wrong.txt b/Ingegneria del Software - Domande duplicate/7/wrong.txt new file mode 100644 index 0000000..6a0d3e9 --- /dev/null +++ b/Ingegneria del Software - Domande duplicate/7/wrong.txt @@ -0,0 +1,19 @@ +
+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;
+
\ No newline at end of file