mirror of
https://github.com/appinfosapienza/so-un-bot.git
synced 2025-03-13 14:45:22 +01:00
Add 06/21 by Matteo
This commit is contained in:
parent
970467fe89
commit
1be2085d94
169 changed files with 962 additions and 0 deletions
Ingegneria del Software
0621_0
0621_1
0621_10
0621_11
0621_12
0621_13
0621_14
0621_15
0621_16
0621_17
0621_18
0621_19
0621_2
0621_20
0621_21
0621_22
0621_23
0621_24
0621_25
0621_26
0621_27
0621_28
0621_29
0621_3
14
Ingegneria del Software/0621_0/correct.txt
Normal file
14
Ingegneria del Software/0621_0/correct.txt
Normal file
|
@ -0,0 +1,14 @@
|
|||
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;
|
4
Ingegneria del Software/0621_0/quest.txt
Normal file
4
Ingegneria del Software/0621_0/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 ?
|
14
Ingegneria del Software/0621_0/wrong0.txt
Normal file
14
Ingegneria del Software/0621_0/wrong0.txt
Normal file
|
@ -0,0 +1,14 @@
|
|||
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;
|
14
Ingegneria del Software/0621_0/wrong1.txt
Normal file
14
Ingegneria del Software/0621_0/wrong1.txt
Normal file
|
@ -0,0 +1,14 @@
|
|||
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;
|
14
Ingegneria del Software/0621_1/correct.txt
Normal file
14
Ingegneria del Software/0621_1/correct.txt
Normal file
|
@ -0,0 +1,14 @@
|
|||
model System
|
||||
Integer y;
|
||||
Real r1024;
|
||||
Integer state1024[Modelica.Math.Random.Generators.Xorshift1024star.nState];
|
||||
equation
|
||||
y = if (r1024 <= 0.3) then 1 else 0;
|
||||
algorithm
|
||||
when initial() then
|
||||
state1024 := Modelica.Math.Random.Generators.Xorshift1024star.initialState(614657, 30020);
|
||||
r1024 := 0;
|
||||
elsewhen sample(0,1) then
|
||||
(r1024,state1024) := Modelica.Math.Random.Generators.Xorshift1024star.random(pre(state1024));
|
||||
end when;
|
||||
end System;
|
1
Ingegneria del Software/0621_1/quest.txt
Normal file
1
Ingegneria del Software/0621_1/quest.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Si consideri l'ambiente (use case) che consiste di un utente che, ad ogni unità di tempo (ad esempio, un secondo) manda al nostro sistema input 1 (ad esempio, esegue una prenotazione) con probabilità 0.3 oppure input 0 con probabilità 0.7. Quale dei seguenti modelli Modelica rappresenta correttamente tale ambiente.
|
13
Ingegneria del Software/0621_1/wrong1.txt
Normal file
13
Ingegneria del Software/0621_1/wrong1.txt
Normal file
|
@ -0,0 +1,13 @@
|
|||
model System
|
||||
Integer y; Real r1024;
|
||||
Integer state1024[Modelica.Math.Random.Generators.Xorshift1024star.nState];
|
||||
equation
|
||||
y = if (r1024 <= 0.3) then 0 else 1;
|
||||
algorithm
|
||||
when initial() then
|
||||
state1024 := Modelica.Math.Random.Generators.Xorshift1024star.initialState(614657, 30020);
|
||||
r1024 := 0;
|
||||
elsewhen sample(0,1) then
|
||||
(r1024,state1024) := Modelica.Math.Random.Generators.Xorshift1024star.random(pre(state1024));
|
||||
end when;
|
||||
end System;
|
13
Ingegneria del Software/0621_1/wrong2.txt
Normal file
13
Ingegneria del Software/0621_1/wrong2.txt
Normal file
|
@ -0,0 +1,13 @@
|
|||
model System
|
||||
Integer y; Real r1024;
|
||||
Integer state1024[Modelica.Math.Random.Generators.Xorshift1024star.nState];
|
||||
equation
|
||||
y = if (r1024 >= 0.3) then 1 else 0;
|
||||
algorithm
|
||||
when initial() then
|
||||
state1024 := Modelica.Math.Random.Generators.Xorshift1024star.initialState(614657, 30020);
|
||||
r1024 := 0;
|
||||
elsewhen sample(0,1) then
|
||||
(r1024,state1024) := Modelica.Math.Random.Generators.Xorshift1024star.random(pre(state1024));
|
||||
end when;
|
||||
end System;
|
1
Ingegneria del Software/0621_10/correct.txt
Normal file
1
Ingegneria del Software/0621_10/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Per tutti gli istanti di tempo della forma 1 + 4*k (con k = 0, 1, 2, 3, ...) x vale 1.
|
13
Ingegneria del Software/0621_10/quest.txt
Normal file
13
Ingegneria del Software/0621_10/quest.txt
Normal file
|
@ -0,0 +1,13 @@
|
|||
Si consideri il seguente modello Modelica:
|
||||
<html>
|
||||
class System
|
||||
Integer x;
|
||||
initial equation
|
||||
x = 0;
|
||||
equation
|
||||
when sample(0, 2) then
|
||||
x = 1 - pre(x);
|
||||
end when;
|
||||
end System;
|
||||
</html>
|
||||
Quale delle seguenti affermazioni è vera per la variabile intera x?
|
1
Ingegneria del Software/0621_10/wrong0.txt
Normal file
1
Ingegneria del Software/0621_10/wrong0.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Per tutti gli istanti di tempo della forma 3 + 4*k (con k = 0, 1, 2, 3, ...) x vale 1.
|
1
Ingegneria del Software/0621_10/wrong1.txt
Normal file
1
Ingegneria del Software/0621_10/wrong1.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Per tutti gli istanti di tempo della forma 1 + 4*k (con k = 0, 1, 2, 3, ...) x vale 0.
|
13
Ingegneria del Software/0621_11/correct.txt
Normal file
13
Ingegneria del Software/0621_11/correct.txt
Normal file
|
@ -0,0 +1,13 @@
|
|||
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;
|
5
Ingegneria del Software/0621_11/quest.txt
Normal file
5
Ingegneria del Software/0621_11/quest.txt
Normal file
|
@ -0,0 +1,5 @@
|
|||
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 ?
|
13
Ingegneria del Software/0621_11/wrong0.txt
Normal file
13
Ingegneria del Software/0621_11/wrong0.txt
Normal file
|
@ -0,0 +1,13 @@
|
|||
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;
|
14
Ingegneria del Software/0621_11/wrong1.txt
Normal file
14
Ingegneria del Software/0621_11/wrong1.txt
Normal file
|
@ -0,0 +1,14 @@
|
|||
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;
|
4
Ingegneria del Software/0621_12/quest.txt
Normal file
4
Ingegneria del Software/0621_12/quest.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
L'input ad un sistema è costituito da un utente (umano) che preme due pulsanti etichettati, rispettivamente, con 1 ed 2.
|
||||
L'utente può anche decidere di non premere alcun pulsante.
|
||||
Con probabilità 0.2 l'utente preme il pulsante 1, con probabilità 0.3 l'utente preme il pulsante 2, con probabilità 0.5 non fa nulla (pulsante 0 per convenzione).
|
||||
Quale dei seguenti modelli Modelica fornisce un modello ragionevole per l'utente di cui sopra?
|
19
Ingegneria del Software/0621_12/wrong0.txt
Normal file
19
Ingegneria del Software/0621_12/wrong0.txt
Normal file
|
@ -0,0 +1,19 @@
|
|||
model Env
|
||||
Integer x; // Pulsante premuto dall'utente (0 nessun pulsante)
|
||||
Real r1024;
|
||||
Integer state1024[Modelica.Math.Random.Generators.Xorshift1024star.nState];
|
||||
algorithm
|
||||
when initial() then
|
||||
state1024 := Modelica.Math.Random.Generators.Xorshift1024star.initialState(614657, 30020);
|
||||
x := 0;
|
||||
r1024 := 0;
|
||||
elsewhen sample(0,1) then
|
||||
(r1024,state1024) := Modelica.Math.Random.Generators.Xorshift1024star.random(pre(state1024));
|
||||
if (r1024 <= 0.5)
|
||||
then x := 0;
|
||||
else
|
||||
(r1024,state1024) := Modelica.Math.Random.Generators.Xorshift1024star.random(pre(state1024));
|
||||
if (r1024 <= 0.4) then x := 1; else x:= 0; end if;
|
||||
end if;
|
||||
end when;
|
||||
end Env;
|
19
Ingegneria del Software/0621_12/wrong1.txt
Normal file
19
Ingegneria del Software/0621_12/wrong1.txt
Normal file
|
@ -0,0 +1,19 @@
|
|||
model Env
|
||||
Integer x; // Pulsante premuto dall'utente (0 nessun pulsante)
|
||||
Real r1024;
|
||||
Integer state1024[Modelica.Math.Random.Generators.Xorshift1024star.nState];
|
||||
algorithm
|
||||
when initial() then
|
||||
state1024 := Modelica.Math.Random.Generators.Xorshift1024star.initialState(614657, 30020);
|
||||
x := 0;
|
||||
r1024 := 0;
|
||||
elsewhen sample(0,1) then
|
||||
(r1024,state1024) := Modelica.Math.Random.Generators.Xorshift1024star.random(pre(state1024));
|
||||
if (r1024 <= 0.5)
|
||||
then x := 0;
|
||||
else
|
||||
(r1024,state1024) := Modelica.Math.Random.Generators.Xorshift1024star.random(pre(state1024));
|
||||
if (r1024 <= 0.3) then x := 0; else x:= 1; end if;
|
||||
end if;
|
||||
end when;
|
||||
end Env;
|
19
Ingegneria del Software/0621_12/wrong2.txt
Normal file
19
Ingegneria del Software/0621_12/wrong2.txt
Normal file
|
@ -0,0 +1,19 @@
|
|||
model Env
|
||||
Integer x; // Pulsante premuto dall'utente (0 nessun pulsante)
|
||||
Real r1024;
|
||||
Integer state1024[Modelica.Math.Random.Generators.Xorshift1024star.nState];
|
||||
algorithm
|
||||
when initial() then
|
||||
state1024 := Modelica.Math.Random.Generators.Xorshift1024star.initialState(614657, 30020);
|
||||
x := 0;
|
||||
r1024 := 0;
|
||||
elsewhen sample(0,1) then
|
||||
(r1024,state1024) := Modelica.Math.Random.Generators.Xorshift1024star.random(pre(state1024));
|
||||
if (r1024 <= 0.5)
|
||||
then x := 0;
|
||||
else
|
||||
(r1024,state1024) := Modelica.Math.Random.Generators.Xorshift1024star.random(pre(state1024));
|
||||
if (r1024 <= 0.2) then x := 1; else x:= 0; end if;
|
||||
end if;
|
||||
end when;
|
||||
end Env;
|
1
Ingegneria del Software/0621_13/correct.txt
Normal file
1
Ingegneria del Software/0621_13/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Sviluppo plan-driven.
|
1
Ingegneria del Software/0621_13/quest.txt
Normal file
1
Ingegneria del Software/0621_13/quest.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Si pianifica di sviluppare un software gestionale per una università. Considerando che questo può essere considerato un sistema mission-critical, quali dei seguenti modelli di processi software generici è più adatto per lo sviluppo di tale software.
|
1
Ingegneria del Software/0621_13/wrong0.txt
Normal file
1
Ingegneria del Software/0621_13/wrong0.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Sviluppo Iterativo
|
1
Ingegneria del Software/0621_13/wrong1.txt
Normal file
1
Ingegneria del Software/0621_13/wrong1.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Sviluppo Agile.
|
1
Ingegneria del Software/0621_14/correct.txt
Normal file
1
Ingegneria del Software/0621_14/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Testare l'interazione tra le componenti del sistema (cioè, integrazione di molte unità di sistema).
|
1
Ingegneria del Software/0621_14/quest.txt
Normal file
1
Ingegneria del Software/0621_14/quest.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Il system testing si concentra su:
|
1
Ingegneria del Software/0621_14/wrong0.txt
Normal file
1
Ingegneria del Software/0621_14/wrong0.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Testare le interfacce per ciascuna componente.
|
1
Ingegneria del Software/0621_14/wrong1.txt
Normal file
1
Ingegneria del Software/0621_14/wrong1.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Testare le funzionalità di unità software individuali, oggetti, classi o metodi.
|
1
Ingegneria del Software/0621_15/correct.txt
Normal file
1
Ingegneria del Software/0621_15/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Testare funzionalità di unità software individuali, oggetti, classi o metodi.
|
1
Ingegneria del Software/0621_15/quest.txt
Normal file
1
Ingegneria del Software/0621_15/quest.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Unit testing si concentra su:
|
1
Ingegneria del Software/0621_15/wrong0.txt
Normal file
1
Ingegneria del Software/0621_15/wrong0.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Testare le interfacce di ciascuna componente.
|
1
Ingegneria del Software/0621_15/wrong1.txt
Normal file
1
Ingegneria del Software/0621_15/wrong1.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Testare l'interazione tra componenti.
|
1
Ingegneria del Software/0621_16/correct.txt
Normal file
1
Ingegneria del Software/0621_16/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
1/1000
|
1
Ingegneria del Software/0621_16/quest.txt
Normal file
1
Ingegneria del Software/0621_16/quest.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Il rischio R può essere calcolato come R = P*C, dove P è la probabilità dell'evento avverso (software failure nel nostro contesto) e C è il costo dell'occorrenza dell'evento avverso. Si consideri un software il cui costo per la failure è C = 1000000 EUR. Volendo un rischio non superiore a 1000 EUR quale è il valore massimo della probabilità di failure P accettabile?
|
1
Ingegneria del Software/0621_16/wrong0.txt
Normal file
1
Ingegneria del Software/0621_16/wrong0.txt
Normal file
|
@ -0,0 +1 @@
|
|||
1/10
|
1
Ingegneria del Software/0621_16/wrong1.txt
Normal file
1
Ingegneria del Software/0621_16/wrong1.txt
Normal file
|
@ -0,0 +1 @@
|
|||
1/100
|
13
Ingegneria del Software/0621_17/correct.txt
Normal file
13
Ingegneria del Software/0621_17/correct.txt
Normal file
|
@ -0,0 +1,13 @@
|
|||
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;
|
5
Ingegneria del Software/0621_17/quest.txt
Normal file
5
Ingegneria del Software/0621_17/quest.txt
Normal file
|
@ -0,0 +1,5 @@
|
|||
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 ?
|
14
Ingegneria del Software/0621_17/wrong0.txt
Normal file
14
Ingegneria del Software/0621_17/wrong0.txt
Normal file
|
@ -0,0 +1,14 @@
|
|||
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;
|
13
Ingegneria del Software/0621_17/wrong1.txt
Normal file
13
Ingegneria del Software/0621_17/wrong1.txt
Normal file
|
@ -0,0 +1,13 @@
|
|||
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;
|
1
Ingegneria del Software/0621_18/correct.txt
Normal file
1
Ingegneria del Software/0621_18/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
2*A*(p +1)
|
1
Ingegneria del Software/0621_18/quest.txt
Normal file
1
Ingegneria del Software/0621_18/quest.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Si consideri un software sviluppato seguendo un approccio iterativo implementato con due fasi: F1 seguita da F2. Ciascuna fase ha costo A e deve essere ripetuta una seconda volta con probabilità p. Qual'e' il costo atteso dello sviluppo dell'intero software?
|
1
Ingegneria del Software/0621_18/wrong0.txt
Normal file
1
Ingegneria del Software/0621_18/wrong0.txt
Normal file
|
@ -0,0 +1 @@
|
|||
3*A*(p + 1)
|
1
Ingegneria del Software/0621_18/wrong1.txt
Normal file
1
Ingegneria del Software/0621_18/wrong1.txt
Normal file
|
@ -0,0 +1 @@
|
|||
2*A*(p + 2)
|
1
Ingegneria del Software/0621_19/correct.txt
Normal file
1
Ingegneria del Software/0621_19/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Ad ogni istante di tempo della forma 1 + 4*k (k = 0, 1, 2, 3, ...), x vale "true".
|
13
Ingegneria del Software/0621_19/quest.txt
Normal file
13
Ingegneria del Software/0621_19/quest.txt
Normal file
|
@ -0,0 +1,13 @@
|
|||
Si consideri il seguente modello Modelica.
|
||||
<html>
|
||||
class System
|
||||
Boolean x;
|
||||
initial equation
|
||||
x = false;
|
||||
equation
|
||||
when sample(0, 2) then
|
||||
x = not (pre(x));
|
||||
end when;
|
||||
end System;
|
||||
</html>
|
||||
Quale delle seguenti affermazioni vale per la variabile booleana x ?
|
1
Ingegneria del Software/0621_19/wrong0.txt
Normal file
1
Ingegneria del Software/0621_19/wrong0.txt
Normal file
|
@ -0,0 +1 @@
|
|||
At time instants of form 1 + 4*k (with k = 0, 1, 2, 3, ...) x takes value "false".
|
1
Ingegneria del Software/0621_19/wrong1.txt
Normal file
1
Ingegneria del Software/0621_19/wrong1.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Ad ogni istante di tempo della forma 3 + 4*k (k = 0, 1, 2, 3, ...), x vale "true".
|
1
Ingegneria del Software/0621_2/correct.txt
Normal file
1
Ingegneria del Software/0621_2/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
6*A
|
1
Ingegneria del Software/0621_2/quest.txt
Normal file
1
Ingegneria del Software/0621_2/quest.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Si consideri un software sviluppato seguendo un approccio plan-driven implementato con tre fasi: F1, F2, F3 ciascuna con costo A. Le "change request" possono arrivare solo al fine di una fase e provocano la ripetizione (con relativo costo) di tutte le fasi che precedono. Si assuma che dopo la fase F3 (cioè al termine dello sviluppo) arriva una change request. Qual'e' il costo totale per lo sviluppo del software in questione.
|
1
Ingegneria del Software/0621_2/wrong0.txt
Normal file
1
Ingegneria del Software/0621_2/wrong0.txt
Normal file
|
@ -0,0 +1 @@
|
|||
5*A
|
1
Ingegneria del Software/0621_2/wrong1.txt
Normal file
1
Ingegneria del Software/0621_2/wrong1.txt
Normal file
|
@ -0,0 +1 @@
|
|||
4*A
|
1
Ingegneria del Software/0621_20/correct.txt
Normal file
1
Ingegneria del Software/0621_20/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
S = (1/b)*ln(C/R)
|
1
Ingegneria del Software/0621_20/quest.txt
Normal file
1
Ingegneria del Software/0621_20/quest.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Il rischio R può essere calcolato come R = P*C, dove P è la probabilità dell'evento avverso (software failure nel nostro contesto) e C è il costo dell'occorrenza dell'evento avverso. Assumiamo che la probabilità P sia legata al costo di sviluppo S dalla formula P = exp(-b*S), dove b è una opportuna costante note da dati storici aziendali. Quale sarà il costo dello sviluppo S di un software il cui costo della failure è C ed il rischio ammesso è R?
|
1
Ingegneria del Software/0621_20/wrong0.txt
Normal file
1
Ingegneria del Software/0621_20/wrong0.txt
Normal file
|
@ -0,0 +1 @@
|
|||
S = b*ln(R/C)
|
1
Ingegneria del Software/0621_20/wrong1.txt
Normal file
1
Ingegneria del Software/0621_20/wrong1.txt
Normal file
|
@ -0,0 +1 @@
|
|||
S = (1/b)*ln(R/C)
|
1
Ingegneria del Software/0621_21/correct.txt
Normal file
1
Ingegneria del Software/0621_21/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
A*(2 + p)
|
1
Ingegneria del Software/0621_21/quest.txt
Normal file
1
Ingegneria del Software/0621_21/quest.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Si consideri un software costituito da due fasi F1 ed F2 ciascuna di costo A. Con probabilità p la fase F1 deve essere ripetuta (a causa di change requests) e con probabilità (1 - p) si passa alla fase F2 e poi al completamento (End) dello sviluppo. Qual'eè il costo atteso per lo sviluppo del software seguendo il processo sopra descritto ?
|
1
Ingegneria del Software/0621_21/wrong0.txt
Normal file
1
Ingegneria del Software/0621_21/wrong0.txt
Normal file
|
@ -0,0 +1 @@
|
|||
3*A*p
|
1
Ingegneria del Software/0621_21/wrong1.txt
Normal file
1
Ingegneria del Software/0621_21/wrong1.txt
Normal file
|
@ -0,0 +1 @@
|
|||
A*(1 + p)
|
BIN
Ingegneria del Software/0621_22/1.png
Normal file
BIN
Ingegneria del Software/0621_22/1.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 30 KiB |
BIN
Ingegneria del Software/0621_22/2.png
Normal file
BIN
Ingegneria del Software/0621_22/2.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 24 KiB |
BIN
Ingegneria del Software/0621_22/3.png
Normal file
BIN
Ingegneria del Software/0621_22/3.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 21 KiB |
1
Ingegneria del Software/0621_22/correct.txt
Normal file
1
Ingegneria del Software/0621_22/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
img=https://i.imgur.com/LSxqSIl.png
|
1
Ingegneria del Software/0621_22/quest.txt
Normal file
1
Ingegneria del Software/0621_22/quest.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Si consideri un software sviluppato seguendo un approccio plan-driven implementato con tre fasi: F1, F2, F3. Dopo ogni fase c'e' una probabilità p di dover ripeter la fase precedente ed una probabilità (1 - p) di passare alla fase successiva (sino ad arrivare al termine dello sviluppo). Quale delle seguenti catene di Markov modella il processo software descritto sopra?
|
1
Ingegneria del Software/0621_22/wrong0.txt
Normal file
1
Ingegneria del Software/0621_22/wrong0.txt
Normal file
|
@ -0,0 +1 @@
|
|||
img=https://i.imgur.com/yGc7Zf2.png
|
1
Ingegneria del Software/0621_22/wrong1.txt
Normal file
1
Ingegneria del Software/0621_22/wrong1.txt
Normal file
|
@ -0,0 +1 @@
|
|||
img=https://i.imgur.com/3t92wEw.png
|
15
Ingegneria del Software/0621_23/correct.txt
Normal file
15
Ingegneria del Software/0621_23/correct.txt
Normal file
|
@ -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;
|
3
Ingegneria del Software/0621_23/quest.txt
Normal file
3
Ingegneria del Software/0621_23/quest.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
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/0621_23/wrong0.txt
Normal file
15
Ingegneria del Software/0621_23/wrong0.txt
Normal file
|
@ -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;
|
15
Ingegneria del Software/0621_23/wrong1.txt
Normal file
15
Ingegneria del Software/0621_23/wrong1.txt
Normal file
|
@ -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;
|
1
Ingegneria del Software/0621_24/correct.txt
Normal file
1
Ingegneria del Software/0621_24/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
La variabile x è nell'intervallo [1, 4] oppure nell'intervallo [15, 20].
|
17
Ingegneria del Software/0621_24/quest.txt
Normal file
17
Ingegneria del Software/0621_24/quest.txt
Normal file
|
@ -0,0 +1,17 @@
|
|||
Si consideri il monitor seguente che ritorna true appena il sistema viola il requisito monitorato.
|
||||
<html>
|
||||
block Monitor
|
||||
input Real x;
|
||||
output Boolean y;
|
||||
Boolean w;
|
||||
initial equation
|
||||
y = false;
|
||||
equation
|
||||
w = ((x < 1) or (x > 4)) and ((x < 15) or (x > 20));
|
||||
algorithm
|
||||
when edge(w) then
|
||||
y := true;
|
||||
end when;
|
||||
end Monitor;
|
||||
</html>
|
||||
Quale delle seguenti affermazioni meglio descrive il requisito monitorato?
|
1
Ingegneria del Software/0621_24/wrong0.txt
Normal file
1
Ingegneria del Software/0621_24/wrong0.txt
Normal file
|
@ -0,0 +1 @@
|
|||
La variabile x è fuori dall'intervallo [1, 4] e fuori dall'intervallo [15, 20].
|
1
Ingegneria del Software/0621_24/wrong1.txt
Normal file
1
Ingegneria del Software/0621_24/wrong1.txt
Normal file
|
@ -0,0 +1 @@
|
|||
La variabile x è nell'intervallo [1, 4] e fuori dall'intervallo [15, 20].
|
12
Ingegneria del Software/0621_25/correct.txt
Normal file
12
Ingegneria del Software/0621_25/correct.txt
Normal file
|
@ -0,0 +1,12 @@
|
|||
class System
|
||||
Real x; // MB in buffer
|
||||
Real u; // input pulse
|
||||
initial equation
|
||||
x = 3;
|
||||
u = 0;
|
||||
equation
|
||||
when sample(0, 1) then
|
||||
u = 1 - pre(u);
|
||||
end when;
|
||||
der(x) = 2*u - 1.0;
|
||||
end System;
|
1
Ingegneria del Software/0621_25/quest.txt
Normal file
1
Ingegneria del Software/0621_25/quest.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Un I/O buffer è alimentato da una componente che fornisce un input periodico di periodo 2 secondi. Durante la prima metà del periodo, l'input rate è 2MB/s mentre durante la seconda metà del periodo l'input rate è 0. Quindi l'input rate medio è di 1MB/s. L' I/O buffer, a sua volta, alimenta una componente che richiede (in media) 1MB/s. Quale dei seguenti modelli Modelica è un modello ragionevole per il sistema descritto sopra ?
|
12
Ingegneria del Software/0621_25/wrong1.txt
Normal file
12
Ingegneria del Software/0621_25/wrong1.txt
Normal file
|
@ -0,0 +1,12 @@
|
|||
class System
|
||||
Real x; // MB in buffer
|
||||
Real u; // input pulse
|
||||
initial equation
|
||||
x = 3;
|
||||
u = 0;
|
||||
equation
|
||||
when sample(0, 1) then
|
||||
u = 1 - pre(u);
|
||||
end when;
|
||||
der(x) = 2*u - 2.0;
|
||||
end System;
|
12
Ingegneria del Software/0621_25/wrong2.txt
Normal file
12
Ingegneria del Software/0621_25/wrong2.txt
Normal file
|
@ -0,0 +1,12 @@
|
|||
class System
|
||||
Real x; // MB in buffer
|
||||
Real u; // input pulse
|
||||
initial equation
|
||||
x = 3;
|
||||
u = 0;
|
||||
equation
|
||||
when sample(0, 1) then
|
||||
u = 1 - pre(u);
|
||||
end when;
|
||||
der(x) = 2*u + 1.0;
|
||||
end System;
|
1
Ingegneria del Software/0621_26/correct.txt
Normal file
1
Ingegneria del Software/0621_26/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Testare le interfacce per ciascun componente.
|
1
Ingegneria del Software/0621_26/quest.txt
Normal file
1
Ingegneria del Software/0621_26/quest.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Il component testing si concentra su:
|
1
Ingegneria del Software/0621_26/wrong0.txt
Normal file
1
Ingegneria del Software/0621_26/wrong0.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Testare funzionalità di unità software individuali, oggetti, classi o metodi.
|
1
Ingegneria del Software/0621_26/wrong1.txt
Normal file
1
Ingegneria del Software/0621_26/wrong1.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Testare l'interazione tra molte componenti (cioè integrazione di molte unità).
|
1
Ingegneria del Software/0621_27/correct.txt
Normal file
1
Ingegneria del Software/0621_27/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Requisito utente.
|
1
Ingegneria del Software/0621_27/quest.txt
Normal file
1
Ingegneria del Software/0621_27/quest.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Si consideri il seguente requisito: "Il sistema fornisce l'elenco dei clienti in ordine alfabetico". Di che tipo di requisito si tratta?
|
1
Ingegneria del Software/0621_27/wrong0.txt
Normal file
1
Ingegneria del Software/0621_27/wrong0.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Requisito di sistema.
|
1
Ingegneria del Software/0621_27/wrong1.txt
Normal file
1
Ingegneria del Software/0621_27/wrong1.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Requisito non-funzionale.
|
BIN
Ingegneria del Software/0621_28/1.png
Normal file
BIN
Ingegneria del Software/0621_28/1.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 21 KiB |
33
Ingegneria del Software/0621_28/correct.txt
Normal file
33
Ingegneria del Software/0621_28/correct.txt
Normal file
|
@ -0,0 +1,33 @@
|
|||
model System
|
||||
parameter Integer F1 = 1;
|
||||
parameter Integer F2 = 2;
|
||||
parameter Integer F3 = 3;
|
||||
parameter Integer End = 4;
|
||||
parameter Real p = 0.3;
|
||||
parameter Real A[4, 4] =
|
||||
[
|
||||
0, 1, 0, 0;
|
||||
p, 0, 1-p, 0;
|
||||
0, p, 0, 1-p;
|
||||
0, 0, 0, 1
|
||||
];
|
||||
Integer x; Real r1024;
|
||||
Integer state1024[Modelica.Math.Random.Generators.Xorshift1024star.nState];
|
||||
algorithm
|
||||
when initial() then
|
||||
state1024 := Modelica.Math.Random.Generators.Xorshift1024star.initialState(614657, 30020);
|
||||
x := F1;
|
||||
r1024 := 0;
|
||||
elsewhen sample(0,1) then
|
||||
(r1024,state1024) := Modelica.Math.Random.Generators.Xorshift1024star.random(pre(state1024));
|
||||
if (r1024 <= A[x, F1]) then
|
||||
x := F1;
|
||||
elseif (r1024 <= A[x, F1] + A[x, F2]) then
|
||||
x := F2;
|
||||
elseif (r1024 <= A[x, F1] + A[x, F2] + A[x, F3]) then
|
||||
x := F3;
|
||||
else
|
||||
x := End;
|
||||
end if;
|
||||
end when;
|
||||
end System;
|
3
Ingegneria del Software/0621_28/quest.txt
Normal file
3
Ingegneria del Software/0621_28/quest.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
img=https://i.imgur.com/t1KV4Qy.png
|
||||
Si consideri la seguente Markov Chain:
|
||||
Quale dei seguenti modelli Modelica fornisce un modello ragionevole per la Markov Chain di cui sopra?
|
33
Ingegneria del Software/0621_28/wrong0.txt
Normal file
33
Ingegneria del Software/0621_28/wrong0.txt
Normal file
|
@ -0,0 +1,33 @@
|
|||
model System
|
||||
parameter Integer F1 = 1;
|
||||
parameter Integer F2 = 2;
|
||||
parameter Integer F3 = 3;
|
||||
parameter Integer End = 4;
|
||||
parameter Real p = 0.3;
|
||||
parameter Real A[4, 4] =
|
||||
[
|
||||
0, 1, 0, 0;
|
||||
p, 0, 0, 1-p;
|
||||
0, 0, p, 1-p;
|
||||
0, 0, 0, 1
|
||||
];
|
||||
Integer x; Real r1024;
|
||||
Integer state1024[Modelica.Math.Random.Generators.Xorshift1024star.nState];
|
||||
algorithm
|
||||
when initial() then
|
||||
state1024 := Modelica.Math.Random.Generators.Xorshift1024star.initialState(614657, 30020);
|
||||
x := F1;
|
||||
r1024 := 0;
|
||||
elsewhen sample(0,1) then
|
||||
(r1024,state1024) := Modelica.Math.Random.Generators.Xorshift1024star.random(pre(state1024));
|
||||
if (r1024 <= A[x, F1]) then
|
||||
x := F1;
|
||||
elseif (r1024 <= A[x, F1] + A[x, F2]) then
|
||||
x := F2;
|
||||
elseif (r1024 <= A[x, F1] + A[x, F2] + A[x, F3]) then
|
||||
x := F3;
|
||||
else
|
||||
x := End;
|
||||
end if;
|
||||
end when;
|
||||
end System;
|
33
Ingegneria del Software/0621_28/wrong2.txt
Normal file
33
Ingegneria del Software/0621_28/wrong2.txt
Normal file
|
@ -0,0 +1,33 @@
|
|||
model System
|
||||
parameter Integer F1 = 1;
|
||||
parameter Integer F2 = 2;
|
||||
parameter Integer F3 = 3;
|
||||
parameter Integer End = 4;
|
||||
parameter Real p = 0.3;
|
||||
parameter Real A[4, 4] =
|
||||
[
|
||||
0, 1, 0, 0;
|
||||
p, 1-p, 0, 0;
|
||||
0, 0, p, 1-p;
|
||||
0, 0, 0, 1
|
||||
];
|
||||
Integer x; Real r1024;
|
||||
Integer state1024[Modelica.Math.Random.Generators.Xorshift1024star.nState];
|
||||
algorithm
|
||||
when initial() then
|
||||
state1024 := Modelica.Math.Random.Generators.Xorshift1024star.initialState(614657, 30020);
|
||||
x := F1;
|
||||
r1024 := 0;
|
||||
elsewhen sample(0,1) then
|
||||
(r1024,state1024) := Modelica.Math.Random.Generators.Xorshift1024star.random(pre(state1024));
|
||||
if (r1024 <= A[x, F1]) then
|
||||
x := F1;
|
||||
elseif (r1024 <= A[x, F1] + A[x, F2]) then
|
||||
x := F2;
|
||||
elseif (r1024 <= A[x, F1] + A[x, F2] + A[x, F3]) then
|
||||
x := F3;
|
||||
else
|
||||
x := End;
|
||||
end if;
|
||||
end when;
|
||||
end System;
|
1
Ingegneria del Software/0621_29/correct.txt
Normal file
1
Ingegneria del Software/0621_29/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
1.5*A
|
1
Ingegneria del Software/0621_29/quest.txt
Normal file
1
Ingegneria del Software/0621_29/quest.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Si consideri un software sviluppato seguendo un approccio plan-driven implementato con due fasi: F1, F2. La fase F1 ha costo A e la fase F2 ha costo il 50% di A. Qual'e' il costo dello sviluppo del software?
|
1
Ingegneria del Software/0621_29/wrong0.txt
Normal file
1
Ingegneria del Software/0621_29/wrong0.txt
Normal file
|
@ -0,0 +1 @@
|
|||
0.5*A
|
1
Ingegneria del Software/0621_29/wrong1.txt
Normal file
1
Ingegneria del Software/0621_29/wrong1.txt
Normal file
|
@ -0,0 +1 @@
|
|||
A
|
1
Ingegneria del Software/0621_3/correct.txt
Normal file
1
Ingegneria del Software/0621_3/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Una release del software è resa disponibile agli utenti (beta users) per permettergli di sperimentare e quindi segnalare eventuali problemi rilevati agli sviluppatori.
|
1
Ingegneria del Software/0621_3/quest.txt
Normal file
1
Ingegneria del Software/0621_3/quest.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Quale delle seguenti affermazione è vera riguardo al beta testing ?
|
1
Ingegneria del Software/0621_3/wrong0.txt
Normal file
1
Ingegneria del Software/0621_3/wrong0.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Test automatizzato sono eseguiti sulla versione finale del sistema presso il sito di sviluppo del software.
|
1
Ingegneria del Software/0621_3/wrong1.txt
Normal file
1
Ingegneria del Software/0621_3/wrong1.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Test automatizzato sono eseguiti sulla versione finale del sistema presso il cliente.
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue