mirror of
https://github.com/appinfosapienza/so-un-bot.git
synced 2025-03-14 05:05:22 +01:00
commit
ad0bc91c7d
185 changed files with 1133 additions and 25 deletions
1
Ingegneria del Software/0321_1/correct.txt
Normal file
1
Ingegneria del Software/0321_1/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
3*(A + 2*B)
|
1
Ingegneria del Software/0321_1/quest.txt
Normal file
1
Ingegneria del Software/0321_1/quest.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Il team di sviluppo di un azienda consiste di un senior software engineer e due sviluppatori junior. Usando un approccio agile, ogni iterazione impegna tutti e tre i membri del team per un mese ed occorrono tre iterazioni per completare lo sviluppo. Si assuma che non ci siano "change requests" e che il membro senior costi A Eur/mese ed i membri junior B Eur/mese. Qual'e' il costo dello sviluppo usando un approccio agile ?
|
1
Ingegneria del Software/0321_1/wrong 1.txt
Normal file
1
Ingegneria del Software/0321_1/wrong 1.txt
Normal file
|
@ -0,0 +1 @@
|
|||
A + 2*B
|
1
Ingegneria del Software/0321_1/wrong 2.txt
Normal file
1
Ingegneria del Software/0321_1/wrong 2.txt
Normal file
|
@ -0,0 +1 @@
|
|||
3*A + 2*B
|
1
Ingegneria del Software/0321_10/correct.txt
Normal file
1
Ingegneria del Software/0321_10/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Gli utenti del sistema lavorano insieme al team di sviluppo per testare il software nel sito di sviluppo.
|
1
Ingegneria del Software/0321_10/quest.txt
Normal file
1
Ingegneria del Software/0321_10/quest.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Quale delle seguenti affermazioni è vera riguardo all'alpha testing ?
|
1
Ingegneria del Software/0321_10/wrong 1.txt
Normal file
1
Ingegneria del Software/0321_10/wrong 1.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Test automatizzati sono eseguiti su una versione preliminare del sistema.
|
1
Ingegneria del Software/0321_10/wrong 2.txt
Normal file
1
Ingegneria del Software/0321_10/wrong 2.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Test automatizzati sono eseguiti sulla prima release del sistema.
|
1
Ingegneria del Software/0321_11/correct.txt
Normal file
1
Ingegneria del Software/0321_11/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
3*(1 + p)*A
|
1
Ingegneria del Software/0321_11/quest.txt
Normal file
1
Ingegneria del Software/0321_11/quest.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Un processo di sviluppo agile consiste di 3 iterazioni identiche di costo A. Alla fine di ogni iterazione vengono prese in considerazione le "change requests" e, se ve ne sono, l'iterazione viene ripetuta. Sia p la probabilità che ci siano "change requests" all fine di una iterazione. Il valore atteso del costo del progetto è:
|
1
Ingegneria del Software/0321_11/wrong 1.txt
Normal file
1
Ingegneria del Software/0321_11/wrong 1.txt
Normal file
|
@ -0,0 +1 @@
|
|||
3*(A + p)
|
1
Ingegneria del Software/0321_11/wrong 2.txt
Normal file
1
Ingegneria del Software/0321_11/wrong 2.txt
Normal file
|
@ -0,0 +1 @@
|
|||
3*p*A
|
1
Ingegneria del Software/0321_12/correct.txt
Normal file
1
Ingegneria del Software/0321_12/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
P = 1/10
|
1
Ingegneria del Software/0321_12/quest.txt
Normal file
1
Ingegneria del Software/0321_12/quest.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Una azienda vende software utilizzando un contratto di Service Level Agreement (SLA) per cui l'utente paga 1000 Eur al mese di licenza e l'azienda garantisce che il software sia "up and running". Questo vuol dire che failures del software generano un costo (quello del repair). Sia C = 10000 Eur il costo del repair di una failure e R = P*C il valore atteso (rischio) del costo dovuto alle failures (dove P è la probabilità di una software failure). Ovviamente affinché il business sia profittevole deve essere che R sia al più 1000 Eur. Qual'e' il valore massimo di P che garantisce la validità del modello di business di cui sopra ?
|
1
Ingegneria del Software/0321_12/wrong 1.txt
Normal file
1
Ingegneria del Software/0321_12/wrong 1.txt
Normal file
|
@ -0,0 +1 @@
|
|||
P = 1/1000
|
1
Ingegneria del Software/0321_12/wrong 2.txt
Normal file
1
Ingegneria del Software/0321_12/wrong 2.txt
Normal file
|
@ -0,0 +1 @@
|
|||
P=1/10000
|
1
Ingegneria del Software/0321_13/correct.txt
Normal file
1
Ingegneria del Software/0321_13/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
S = (1/b)*ln(C/R)
|
1
Ingegneria del Software/0321_13/quest.txt
Normal file
1
Ingegneria del Software/0321_13/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/0321_13/wrong 1.txt
Normal file
1
Ingegneria del Software/0321_13/wrong 1.txt
Normal file
|
@ -0,0 +1 @@
|
|||
S = (1/b)*ln(R/C)
|
1
Ingegneria del Software/0321_13/wrong 2.txt
Normal file
1
Ingegneria del Software/0321_13/wrong 2.txt
Normal file
|
@ -0,0 +1 @@
|
|||
S = b*ln(R/C)
|
68
Ingegneria del Software/0321_14/correct.txt
Normal file
68
Ingegneria del Software/0321_14/correct.txt
Normal file
|
@ -0,0 +1,68 @@
|
|||
<pre>
|
||||
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] =
|
||||
|
||||
[
|
||||
|
||||
p, 1-p, 0, 0;
|
||||
|
||||
p, 0, 1-p, 0;
|
||||
|
||||
p, 0, 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;
|
||||
|
||||
</pre>
|
3
Ingegneria del Software/0321_14/quest.txt
Normal file
3
Ingegneria del Software/0321_14/quest.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
img=https://i.imgur.com/6cnLynh.png
|
||||
Si consideri la seguente Markov Chain, quale dei seguenti modelli Modelica fornisce un modello ragionevole per la Markov Chain di cui sopra?
|
||||
|
68
Ingegneria del Software/0321_14/wrong 1.txt
Normal file
68
Ingegneria del Software/0321_14/wrong 1.txt
Normal file
|
@ -0,0 +1,68 @@
|
|||
<pre>
|
||||
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] =
|
||||
|
||||
[
|
||||
|
||||
p, 0, 1-p, 0;
|
||||
|
||||
0, p, 1-p, 0;
|
||||
|
||||
p, 0, 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;
|
||||
|
||||
</pre>
|
67
Ingegneria del Software/0321_14/wrong 2.txt
Normal file
67
Ingegneria del Software/0321_14/wrong 2.txt
Normal file
|
@ -0,0 +1,67 @@
|
|||
<pre>
|
||||
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] =
|
||||
|
||||
[
|
||||
|
||||
p, 0 , 1-p, 0;
|
||||
|
||||
p, 1-p, 0, 0;
|
||||
|
||||
p, 0, 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;
|
||||
</pre>
|
1
Ingegneria del Software/0321_15/quest.txt
Normal file
1
Ingegneria del Software/0321_15/quest.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Un azienda ha un team di sviluppo in cui il 90% dei membri è junior (cioè con poca esperienza) ed il 10% è senior (cioè con molta esperienza). Con l'obiettivo di massimizzare il numero di progetti completati nell'unità di tempo, quale dei seguenti modelli di sviluppo software appare più opportuno.
|
1
Ingegneria del Software/0321_15/wrong 1.txt
Normal file
1
Ingegneria del Software/0321_15/wrong 1.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Basato sul riuso
|
40
Ingegneria del Software/0321_16/correct.txt
Normal file
40
Ingegneria del Software/0321_16/correct.txt
Normal file
|
@ -0,0 +1,40 @@
|
|||
<pre>
|
||||
connector InputInteger = input Integer;
|
||||
|
||||
connector OutputInteger = output Integer;
|
||||
|
||||
block Controller
|
||||
|
||||
InputInteger x;
|
||||
|
||||
OutputInteger Integer w;
|
||||
|
||||
...
|
||||
|
||||
end Controller;
|
||||
|
||||
block Plant
|
||||
|
||||
InputInteger u;
|
||||
|
||||
OutputInteger y;
|
||||
|
||||
...
|
||||
|
||||
end Plant;
|
||||
|
||||
class System
|
||||
|
||||
Controller k;
|
||||
|
||||
Plant p;
|
||||
|
||||
equation
|
||||
|
||||
connect(p.y, k.x);
|
||||
|
||||
connect(k.w, p.u);
|
||||
|
||||
end System;
|
||||
|
||||
</pre>
|
1
Ingegneria del Software/0321_16/quest.txt
Normal file
1
Ingegneria del Software/0321_16/quest.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Un sistema consiste di due sottosistemi: un controller ed un plant (sistema controllato). Il controllore misura l'output del plant e manda comandi al plant in accordo. Quale dei seguenti schemi Modelica modella l'architettura di sistema descritta sopra ?
|
40
Ingegneria del Software/0321_16/wrong 1.txt
Normal file
40
Ingegneria del Software/0321_16/wrong 1.txt
Normal file
|
@ -0,0 +1,40 @@
|
|||
<pre>
|
||||
connector InputInteger = input Integer;
|
||||
|
||||
connector OutputInteger = output Integer;
|
||||
|
||||
block Controller
|
||||
|
||||
InputInteger x;
|
||||
|
||||
OutputInteger Integer w;
|
||||
|
||||
...
|
||||
|
||||
end Controller;
|
||||
|
||||
block Plant
|
||||
|
||||
InputInteger u;
|
||||
|
||||
OutputInteger y;
|
||||
|
||||
...
|
||||
|
||||
end Plant;
|
||||
|
||||
class System
|
||||
|
||||
Controller k;
|
||||
|
||||
Plant p;
|
||||
|
||||
equation
|
||||
|
||||
connect(p.y, p.u);
|
||||
|
||||
connect(k.w, k.u);
|
||||
|
||||
end System;
|
||||
|
||||
</pre>
|
39
Ingegneria del Software/0321_16/wrong 2.txt
Normal file
39
Ingegneria del Software/0321_16/wrong 2.txt
Normal file
|
@ -0,0 +1,39 @@
|
|||
<pre>
|
||||
connector InputInteger = input Integer;
|
||||
|
||||
connector OutputInteger = output Integer;
|
||||
|
||||
block Controller
|
||||
|
||||
InputInteger x;
|
||||
|
||||
OutputInteger Integer w;
|
||||
|
||||
...
|
||||
|
||||
end Controller;
|
||||
|
||||
block Plant
|
||||
|
||||
InputInteger u;
|
||||
|
||||
OutputInteger y;
|
||||
|
||||
...
|
||||
|
||||
end Plant;
|
||||
|
||||
class System
|
||||
|
||||
Controller k;
|
||||
|
||||
Plant p;
|
||||
|
||||
equation
|
||||
|
||||
connect(p.y, k.w);
|
||||
|
||||
connect(k.x, p.u);
|
||||
|
||||
end System;
|
||||
</pre>
|
1
Ingegneria del Software/0321_17/correct.txt
Normal file
1
Ingegneria del Software/0321_17/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
La variabile x è fuori dall'intervallo [0, 5].
|
31
Ingegneria del Software/0321_17/quest.txt
Normal file
31
Ingegneria del Software/0321_17/quest.txt
Normal file
|
@ -0,0 +1,31 @@
|
|||
Si consideri il monitor seguente che ritorna true appena i requisiti per il sistema monitorato sono violati.
|
||||
<pre>
|
||||
//block Monitor
|
||||
|
||||
input Real x;
|
||||
|
||||
output Boolean y;
|
||||
|
||||
Boolean w;
|
||||
|
||||
initial equation
|
||||
|
||||
y = false;
|
||||
|
||||
equation
|
||||
|
||||
w = ((x < 0) or (x > 5));
|
||||
|
||||
algorithm
|
||||
|
||||
when edge(w) then
|
||||
|
||||
y := true;
|
||||
|
||||
end when;
|
||||
|
||||
end Monitor;//
|
||||
</pre>
|
||||
|
||||
Quale delle seguenti affermazioni meglio descrive il requisito monitorato?
|
||||
|
1
Ingegneria del Software/0321_17/wrong 1.txt
Normal file
1
Ingegneria del Software/0321_17/wrong 1.txt
Normal file
|
@ -0,0 +1 @@
|
|||
La variable x è minore di 0.
|
1
Ingegneria del Software/0321_17/wrong 2.txt
Normal file
1
Ingegneria del Software/0321_17/wrong 2.txt
Normal file
|
@ -0,0 +1 @@
|
|||
La variabile x è nell'intervallo [0, 5].
|
1
Ingegneria del Software/0321_18/correct.txt
Normal file
1
Ingegneria del Software/0321_18/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Sviluppo Plan-driven.
|
1
Ingegneria del Software/0321_18/quest.txt
Normal file
1
Ingegneria del Software/0321_18/quest.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Si pianifica lo sviluppo di un sistema software per controllare il sistema di anti-lock braking in un automobile. Quale dei seguenti è il tipico processo software usato per questo tipo di sistema software ?
|
1
Ingegneria del Software/0321_18/wrong 2.txt
Normal file
1
Ingegneria del Software/0321_18/wrong 2.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Extreme programming.
|
1
Ingegneria del Software/0321_19/correct.txt
Normal file
1
Ingegneria del Software/0321_19/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Le attività di definizione dei requisiti e di sviluppo sono interleaved.
|
1
Ingegneria del Software/0321_19/quest.txt
Normal file
1
Ingegneria del Software/0321_19/quest.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Focalizzandosi sui metodi agile di sviluppo del software, quale delle seguenti affermazioni è vera?
|
1
Ingegneria del Software/0321_19/wrong 1.txt
Normal file
1
Ingegneria del Software/0321_19/wrong 1.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Per evitare di sprecare tempo durante la fase di sviluppo del software, il customer non è mai coinvolto nel processo di sviluppo del software.
|
1
Ingegneria del Software/0321_19/wrong 2.txt
Normal file
1
Ingegneria del Software/0321_19/wrong 2.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Per evitare di sprecare tempo durante la fase di sviluppo del software, questa inizia solo quando i requisiti sono stati completamente definiti.
|
1
Ingegneria del Software/0321_2/correct.txt
Normal file
1
Ingegneria del Software/0321_2/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
img=https://i.imgur.com/AFS4W2C.png
|
1
Ingegneria del Software/0321_2/quest.txt
Normal file
1
Ingegneria del Software/0321_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. 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/0321_2/wrong 1.txt
Normal file
1
Ingegneria del Software/0321_2/wrong 1.txt
Normal file
|
@ -0,0 +1 @@
|
|||
img=https://i.imgur.com/Crqd1FF.png
|
1
Ingegneria del Software/0321_2/wrong 2.txt
Normal file
1
Ingegneria del Software/0321_2/wrong 2.txt
Normal file
|
@ -0,0 +1 @@
|
|||
img=https://i.imgur.com/fmFEpRh.png
|
69
Ingegneria del Software/0321_20/correct.txt
Normal file
69
Ingegneria del Software/0321_20/correct.txt
Normal file
|
@ -0,0 +1,69 @@
|
|||
<pre>
|
||||
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;
|
||||
|
||||
|
||||
</pre>
|
2
Ingegneria del Software/0321_20/quest.txt
Normal file
2
Ingegneria del Software/0321_20/quest.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
img=https://i.imgur.com/l6Qc8kQ.png
|
||||
Si consideri la seguente Markov Chain, quale dei seguenti modelli Modelica fornisce un modello ragionevole per la Markov Chain?
|
67
Ingegneria del Software/0321_20/wrong 1.txt
Normal file
67
Ingegneria del Software/0321_20/wrong 1.txt
Normal file
|
@ -0,0 +1,67 @@
|
|||
<pre>
|
||||
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;
|
||||
</pre>
|
68
Ingegneria del Software/0321_20/wrong 2.txt
Normal file
68
Ingegneria del Software/0321_20/wrong 2.txt
Normal file
|
@ -0,0 +1,68 @@
|
|||
<pre>
|
||||
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;
|
||||
|
||||
</pre>
|
1
Ingegneria del Software/0321_21/correct.txt
Normal file
1
Ingegneria del Software/0321_21/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
img=https://i.imgur.com/hrzgmMX.png
|
1
Ingegneria del Software/0321_21/quest.txt
Normal file
1
Ingegneria del Software/0321_21/quest.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Si consideri un software sviluppato seguendo un approccio plan-driven implementato con tre fasi: F1, F2, F3. Le "change requests" arrivano con probabilità p dopo ciascuna fase e provocano la ripetizione (con relativo costo) di tutte le fasi che precedono. Quali delle seguenti catene di Markov modella lo sviluppo software descritto.
|
1
Ingegneria del Software/0321_21/wrong 1.txt
Normal file
1
Ingegneria del Software/0321_21/wrong 1.txt
Normal file
|
@ -0,0 +1 @@
|
|||
img=https://i.imgur.com/FzqL7wa.png
|
1
Ingegneria del Software/0321_21/wrong 2.txt
Normal file
1
Ingegneria del Software/0321_21/wrong 2.txt
Normal file
|
@ -0,0 +1 @@
|
|||
img=https://i.imgur.com/PHih8ak.png
|
1
Ingegneria del Software/0321_22/correct.txt
Normal file
1
Ingegneria del Software/0321_22/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Costruire un modello di simulazione per i principali aspetti dei processi di business dell'azienda e per il sistema software da realizzare e valutare le migliorie apportate dal sistema software ai processi di business dell'azienda mediante simulazione.
|
1
Ingegneria del Software/0321_22/quest.txt
Normal file
1
Ingegneria del Software/0321_22/quest.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Una azienda finanziaria desidera costruire un sistema software per ottimizzare i processi di business. Quali delle seguenti attività può contribuire a validare i requisiti del sistema ?
|
1
Ingegneria del Software/0321_22/wrong 1.txt
Normal file
1
Ingegneria del Software/0321_22/wrong 1.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Costruire un prototipo del sistema e testarlo rispetto ai requisiti funzionali usando i dati storici dall'azienda.
|
1
Ingegneria del Software/0321_22/wrong 2.txt
Normal file
1
Ingegneria del Software/0321_22/wrong 2.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Costruire un prototipo del sistema e valutarne i requisiti non funzionali usando i dati storici dall'azienda.
|
1
Ingegneria del Software/0321_23/correct.txt
Normal file
1
Ingegneria del Software/0321_23/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
I metodi agile sono metodi di sviluppo incrementale.
|
1
Ingegneria del Software/0321_23/quest.txt
Normal file
1
Ingegneria del Software/0321_23/quest.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Quale delle seguenti affermazioni è vera riguardo ai metodi agile ?
|
1
Ingegneria del Software/0321_23/wrong 1.txt
Normal file
1
Ingegneria del Software/0321_23/wrong 1.txt
Normal file
|
@ -0,0 +1 @@
|
|||
I metodi agile sono metodi di sviluppo plan-driven.
|
1
Ingegneria del Software/0321_23/wrong 2.txt
Normal file
1
Ingegneria del Software/0321_23/wrong 2.txt
Normal file
|
@ -0,0 +1 @@
|
|||
I metodi agile sono metodi di sviluppo orientato al riuso.
|
1
Ingegneria del Software/0321_24/quest.txt
Normal file
1
Ingegneria del Software/0321_24/quest.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Unit testing si concentra su:
|
1
Ingegneria del Software/0321_24/wrong 1.txt
Normal file
1
Ingegneria del Software/0321_24/wrong 1.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Testare l'interazione tra componenti.
|
1
Ingegneria del Software/0321_24/wrong 2.txt
Normal file
1
Ingegneria del Software/0321_24/wrong 2.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Testare le interfacce di ciascuna componente.
|
1
Ingegneria del Software/0321_25/correct.txt
Normal file
1
Ingegneria del Software/0321_25/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/0321_25/quest.txt
Normal file
1
Ingegneria del Software/0321_25/quest.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Il system testing si concentra su:
|
30
Ingegneria del Software/0321_26/correct.txt
Normal file
30
Ingegneria del Software/0321_26/correct.txt
Normal file
|
@ -0,0 +1,30 @@
|
|||
<pre>
|
||||
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;
|
||||
|
||||
</pre>
|
1
Ingegneria del Software/0321_26/quest.txt
Normal file
1
Ingegneria del Software/0321_26/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.
|
28
Ingegneria del Software/0321_26/wrong 1.txt
Normal file
28
Ingegneria del Software/0321_26/wrong 1.txt
Normal file
|
@ -0,0 +1,28 @@
|
|||
<pre>
|
||||
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;
|
||||
|
||||
</pre>
|
27
Ingegneria del Software/0321_26/wrong 2.txt
Normal file
27
Ingegneria del Software/0321_26/wrong 2.txt
Normal file
|
@ -0,0 +1,27 @@
|
|||
<pre>
|
||||
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;
|
||||
</pre>
|
1
Ingegneria del Software/0321_27/correct.txt
Normal file
1
Ingegneria del Software/0321_27/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
2*A*(p +1)
|
1
Ingegneria del Software/0321_27/quest.txt
Normal file
1
Ingegneria del Software/0321_27/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/0321_27/wrong 1.txt
Normal file
1
Ingegneria del Software/0321_27/wrong 1.txt
Normal file
|
@ -0,0 +1 @@
|
|||
2*A*(p + 2)
|
1
Ingegneria del Software/0321_28/correct.txt
Normal file
1
Ingegneria del Software/0321_28/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
5*A
|
1
Ingegneria del Software/0321_28/quest.txt
Normal file
1
Ingegneria del Software/0321_28/quest.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Un processo di sviluppo plan-driven consiste di 2 fasi F1, F2, ciascuna costo A. Alla fine di ogni fase vengono prese in considerazione le "change requests" e, se ve ne sono, lo sviluppo viene ripetuto a partire dalla prima iterazione. Quindi con nessuna change request si hanno le fasi: F1, F2 e costo 2A. Con una "change request" dopo la prima fase si ha: F1, F1, F2 e costo 3A. Con una change request dopo la fase 2 si ha: F1, F2, F1, F2 e costo 4A. Qual'è il costo nel caso in cui ci siano change requests sia dopo la fase 1 che dopo la fase 2.
|
1
Ingegneria del Software/0321_28/wrong 1.txt
Normal file
1
Ingegneria del Software/0321_28/wrong 1.txt
Normal file
|
@ -0,0 +1 @@
|
|||
7*A
|
1
Ingegneria del Software/0321_28/wrong 2.txt
Normal file
1
Ingegneria del Software/0321_28/wrong 2.txt
Normal file
|
@ -0,0 +1 @@
|
|||
6*A
|
1
Ingegneria del Software/0321_29/correct.txt
Normal file
1
Ingegneria del Software/0321_29/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
La variabile x è nell'intervallo [1, 4] oppure nell'intervallo [15, 20].
|
31
Ingegneria del Software/0321_29/quest.txt
Normal file
31
Ingegneria del Software/0321_29/quest.txt
Normal file
|
@ -0,0 +1,31 @@
|
|||
Si consideri il monitor seguente che ritorna true appena il sistema viola il requisito monitorato.
|
||||
<pre>
|
||||
|
||||
// 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; //
|
||||
</pre>
|
||||
|
||||
Quale delle seguenti affermazioni meglio descrive il requisito monitorato?
|
1
Ingegneria del Software/0321_29/wrong 1.txt
Normal file
1
Ingegneria del Software/0321_29/wrong 1.txt
Normal file
|
@ -0,0 +1 @@
|
|||
La variabile x è fuori dall'intervallo [1, 4] e fuori dall'intervallo [15, 20].
|
1
Ingegneria del Software/0321_29/wrong 2.txt
Normal file
1
Ingegneria del Software/0321_29/wrong 2.txt
Normal file
|
@ -0,0 +1 @@
|
|||
La variabile x è nell'intervallo [1, 4] e fuori dall'intervallo [15, 20].
|
1
Ingegneria del Software/0321_3/correct.txt
Normal file
1
Ingegneria del Software/0321_3/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Stiamo costruendo il sistema giusto?
|
1
Ingegneria del Software/0321_3/quest.txt
Normal file
1
Ingegneria del Software/0321_3/quest.txt
Normal file
|
@ -0,0 +1 @@
|
|||
La validazione risponde alla seguenete domanda:
|
1
Ingegneria del Software/0321_3/wrong 1.txt
Normal file
1
Ingegneria del Software/0321_3/wrong 1.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Stiamo costruendo il sistema nel modo giusto?
|
1
Ingegneria del Software/0321_3/wrong 2.txt
Normal file
1
Ingegneria del Software/0321_3/wrong 2.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Sono soddisfatti i requisti funzionali?
|
26
Ingegneria del Software/0321_30/correct.txt
Normal file
26
Ingegneria del Software/0321_30/correct.txt
Normal file
|
@ -0,0 +1,26 @@
|
|||
<pre>
|
||||
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;
|
||||
|
||||
</pre>
|
1
Ingegneria del Software/0321_30/quest.txt
Normal file
1
Ingegneria del Software/0321_30/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 ?
|
26
Ingegneria del Software/0321_30/wrong 1.txt
Normal file
26
Ingegneria del Software/0321_30/wrong 1.txt
Normal file
|
@ -0,0 +1,26 @@
|
|||
<pre>
|
||||
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;
|
||||
|
||||
</pre>
|
25
Ingegneria del Software/0321_30/wrong 2.txt
Normal file
25
Ingegneria del Software/0321_30/wrong 2.txt
Normal file
|
@ -0,0 +1,25 @@
|
|||
<pre>
|
||||
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;
|
||||
</pre>
|
1
Ingegneria del Software/0321_31/correct.txt
Normal file
1
Ingegneria del Software/0321_31/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
(1 + p)*A
|
1
Ingegneria del Software/0321_31/quest.txt
Normal file
1
Ingegneria del Software/0321_31/quest.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Un processo di sviluppo agile consiste di varie iterazioni. Alla fine di ogni iterazione vengono prese in considerazione le "change requests" e, se ve ne sono, l'iterazione viene ripetuta. Sia p la probabilità che ci siano "change requests" all fine di una iterazione e sia A il costo di una iterazione. Il valore atteso del costo per l'iterazione è:
|
1
Ingegneria del Software/0321_31/wrong 1.txt
Normal file
1
Ingegneria del Software/0321_31/wrong 1.txt
Normal file
|
@ -0,0 +1 @@
|
|||
A
|
1
Ingegneria del Software/0321_31/wrong 2.txt
Normal file
1
Ingegneria del Software/0321_31/wrong 2.txt
Normal file
|
@ -0,0 +1 @@
|
|||
p*A
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue