mirror of
https://github.com/appinfosapienza/so-un-bot.git
synced 2025-03-13 22:45:23 +01:00
commit
31d41f38ce
121 changed files with 696 additions and 0 deletions
Ingegneria del Software
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
1
Ingegneria del Software/21/correct.txt
Normal file
1
Ingegneria del Software/21/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Una volta selezionato il piatto di mare da preparare, la preparazione del pesce e del contorno procedono in parallelo.
|
2
Ingegneria del Software/21/quest.txt
Normal file
2
Ingegneria del Software/21/quest.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
img=https://imgur.com/jHN6wRm
|
||||
Quale delle seguenti frasi è corretta riguardo all'activity diagram in figura ?
|
1
Ingegneria del Software/21/wrong 2.txt
Normal file
1
Ingegneria del Software/21/wrong 2.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Una volta selezionato il piatto di mare da preparare, la preparazione del pesce e del contorno procedono in sequenza.
|
1
Ingegneria del Software/21/wrong.txt
Normal file
1
Ingegneria del Software/21/wrong.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Una volta selezionato il piatto di mare da preparare, la stessa persona prepara prima il pesce e poi il contorno.
|
23
Ingegneria del Software/22/correct.txt
Normal file
23
Ingegneria del Software/22/correct.txt
Normal file
|
@ -0,0 +1,23 @@
|
|||
<pre>
|
||||
block MarkovChain
|
||||
//external function myrandom() returns a random real number in [0, 1]
|
||||
parameter Real x0 = 1;
|
||||
OutputReal x;
|
||||
algorithm
|
||||
when initial() then
|
||||
x := x0;
|
||||
elsewhen sample(0, 1) then
|
||||
if (myrandom() <= 0.9)
|
||||
then
|
||||
if (myrandom() <= 0.7)
|
||||
then
|
||||
x := 1.1*x;
|
||||
else
|
||||
x := 0.9*x;
|
||||
end if;
|
||||
else
|
||||
x := 0.73*x;
|
||||
end if;
|
||||
end when;
|
||||
end MarkovChain;
|
||||
</pre>
|
5
Ingegneria del Software/22/quest.txt
Normal file
5
Ingegneria del Software/22/quest.txt
Normal file
|
@ -0,0 +1,5 @@
|
|||
L'input di un sistema software è costituito da un sensore che ogni unità di tempo (ad esempio, un secondo) invia un numero
|
||||
reale. Con probabilità 0.63 il valore inviato in una unità di tempo è maggiore del 10% rispetto quello inviato nell'unità di tempo
|
||||
precedente. Con probabilità 0.1 è inferiore del 27% rispetto al valore inviato nell'unità di tempo precedente. Con probabilità 0.27
|
||||
è inferiore del 10% rispetto quello inviato nell'unità di tempo precedente.
|
||||
Quale dei seguenti modelli Modelica modella correttamente l'environment descritto sopra
|
21
Ingegneria del Software/22/wrong 2.txt
Normal file
21
Ingegneria del Software/22/wrong 2.txt
Normal file
|
@ -0,0 +1,21 @@
|
|||
block MarkovChain
|
||||
//external function myrandom() returns a random real number in [0, 1]
|
||||
parameter Real x0 = 1;
|
||||
OutputReal x;
|
||||
algorithm
|
||||
when initial() then
|
||||
x := x0;
|
||||
elsewhen sample(0, 1) then
|
||||
if (myrandom() <= 0.7)
|
||||
then
|
||||
if (myrandom() <= 0.9)
|
||||
then
|
||||
x := 1.1*x;
|
||||
else
|
||||
x := 0.9*x;
|
||||
end if;
|
||||
else
|
||||
x := 0.73*x;
|
||||
end if;
|
||||
end when;
|
||||
end MarkovChain;
|
23
Ingegneria del Software/22/wrong.txt
Normal file
23
Ingegneria del Software/22/wrong.txt
Normal file
|
@ -0,0 +1,23 @@
|
|||
<pre>
|
||||
block MarkovChain
|
||||
//external function myrandom() returns a random real number in [0, 1]
|
||||
parameter Real x0 = 1;
|
||||
OutputReal x;
|
||||
algorithm
|
||||
when initial() then
|
||||
x := x0;
|
||||
elsewhen sample(0, 1) then
|
||||
if (myrandom() <= 0.9)
|
||||
then
|
||||
if (myrandom() <= 0.7)
|
||||
then
|
||||
x := 0.9*x;
|
||||
else
|
||||
x := 01.1*x;
|
||||
end if;
|
||||
else
|
||||
x := 0.73*x;
|
||||
end if;
|
||||
end when;
|
||||
end MarkovChain;
|
||||
</pre>
|
1
Ingegneria del Software/23/correct.txt
Normal file
1
Ingegneria del Software/23/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Testare funzionalità di unità software individuali, oggetti, classi o metodi.
|
1
Ingegneria del Software/23/quest.txt
Normal file
1
Ingegneria del Software/23/quest.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Unit testing si concentra su:
|
1
Ingegneria del Software/23/wrong 2.txt
Normal file
1
Ingegneria del Software/23/wrong 2.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Testare le interfacce di ciascuna componente.
|
1
Ingegneria del Software/23/wrong.txt
Normal file
1
Ingegneria del Software/23/wrong.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Testare l'interazione tra componenti.
|
1
Ingegneria del Software/24/correct.txt
Normal file
1
Ingegneria del Software/24/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
3*A
|
2
Ingegneria del Software/24/quest.txt
Normal file
2
Ingegneria del Software/24/quest.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Si consideri un software sviluppato seguendo un approccio iterativo implementato con tre fasi: F1, F2, F3. Ciascuna fase ha
|
||||
costo A. Qual'e' il costo dello sviluppo dell'intero software?
|
1
Ingegneria del Software/24/wrong 2.txt
Normal file
1
Ingegneria del Software/24/wrong 2.txt
Normal file
|
@ -0,0 +1 @@
|
|||
2*A
|
1
Ingegneria del Software/24/wrong.txt
Normal file
1
Ingegneria del Software/24/wrong.txt
Normal file
|
@ -0,0 +1 @@
|
|||
A
|
1
Ingegneria del Software/25/correct.txt
Normal file
1
Ingegneria del Software/25/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Costruire un prototipo, eseguirlo usando dati storici dai log di produzione e valutare la capacità del prototipo di ridurre gli scarti.
|
3
Ingegneria del Software/25/quest.txt
Normal file
3
Ingegneria del Software/25/quest.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
Una azienda manifatturiera desidera costruire un sistema software per monitorare (attraverso sensori) la produzione al fine di
|
||||
ridurre gli scarti. Quali delle seguenti attività contribuisce a validare i requisiti del sistema.
|
||||
Scegli un'alternativa:
|
1
Ingegneria del Software/25/wrong 2.txt
Normal file
1
Ingegneria del Software/25/wrong 2.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Costruire un prototipo, eseguirlo usando dati storici dai log di produzione e valutarne le performance.
|
1
Ingegneria del Software/25/wrong.txt
Normal file
1
Ingegneria del Software/25/wrong.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Costruire un prototipo, eseguirlo usando dati storici dai log di produzione ed identificare errori di implementazione.
|
1
Ingegneria del Software/26/correct.txt
Normal file
1
Ingegneria del Software/26/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Accertarsi che i requisiti definiscano un sistema che risolve il problema che l'utente pianifica di risolvere.
|
2
Ingegneria del Software/26/quest.txt
Normal file
2
Ingegneria del Software/26/quest.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Quali delle seguenti attività è parte del processo di validazione dei requisiti ?
|
||||
Scegli un'alternativa:
|
1
Ingegneria del Software/26/wrong 2.txt
Normal file
1
Ingegneria del Software/26/wrong 2.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Accertarsi che il sistema soddisfi i requisiti dati.
|
1
Ingegneria del Software/26/wrong.txt
Normal file
1
Ingegneria del Software/26/wrong.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Accertarsi che l'architettura del sistema soddisfi i requisiti dati.
|
15
Ingegneria del Software/27/correct.txt
Normal file
15
Ingegneria del Software/27/correct.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
<pre>
|
||||
class Monitor
|
||||
InputReal x; // plant output
|
||||
OutputBoolean y;
|
||||
Boolean z;
|
||||
initial equation
|
||||
y = false;
|
||||
equation
|
||||
z = (time > 0) and ((x >= 5) or (x <= 0)) and ((x >= 15) or (x <= 10)) ;
|
||||
algorithm
|
||||
when edge(z) then
|
||||
y := true;
|
||||
end when;
|
||||
end Monitor;
|
||||
</pre>
|
4
Ingegneria del Software/27/quest.txt
Normal file
4
Ingegneria del Software/27/quest.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
Si consideri il seguente requisito:
|
||||
RQ1: Durante l'esecuzione del programma (cioè per tutti gli istanti di tempo positivi) la variabile x è sempre nell'intervallo
|
||||
[0, 5] oppure [10, 15]
|
||||
Quale dei seguenti monitor meglio descrive il requisito RQ1 ?
|
15
Ingegneria del Software/27/wrong 2.txt
Normal file
15
Ingegneria del Software/27/wrong 2.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
<pre>
|
||||
class Monitor
|
||||
InputReal x; // plant output
|
||||
OutputBoolean y;
|
||||
Boolean z;
|
||||
initial equation
|
||||
y = false;
|
||||
equation
|
||||
z = (time > 0) and ( ((x >= 0) and (x <= 5)) or ((x >= 10) and (x <= 15)) );
|
||||
algorithm
|
||||
when edge(z) then
|
||||
y := true;
|
||||
end when;
|
||||
end Monitor;
|
||||
</pre>
|
15
Ingegneria del Software/27/wrong.txt
Normal file
15
Ingegneria del Software/27/wrong.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
<pre>
|
||||
class Monitor
|
||||
InputReal x; // plant output
|
||||
OutputBoolean y;
|
||||
Boolean z;
|
||||
initial equation
|
||||
y = false;
|
||||
equation
|
||||
z = (time > 0) and ((x >= 0) or (x <= 5)) and ((x >= 10) or (x <= 15)) );
|
||||
algorithm
|
||||
when edge(z) then
|
||||
y := true;
|
||||
end when;
|
||||
end Monitor;
|
||||
</pre>
|
15
Ingegneria del Software/28/correct.txt
Normal file
15
Ingegneria del Software/28/correct.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
<pre>
|
||||
class Monitor
|
||||
InputReal x, y;
|
||||
OutputBoolean wy;
|
||||
Boolean wz;
|
||||
initial equation
|
||||
wy = false;
|
||||
equation
|
||||
wz = (time > 60) and (delay(x, 10) > 0) and (y <= 0);
|
||||
algorithm
|
||||
when edge(wz) then
|
||||
wy := true;
|
||||
end when;
|
||||
end Monitor;
|
||||
</pre>
|
7
Ingegneria del Software/28/quest.txt
Normal file
7
Ingegneria del Software/28/quest.txt
Normal file
|
@ -0,0 +1,7 @@
|
|||
Si consideri il seguente requisito:
|
||||
RQ: Dopo 60 unità di tempo dall'inizio dell'esecuzione vale la seguente proprietà:
|
||||
se 10 unità di tempo nel passato era stata richiesta una risorsa (variabile x positiva) allora ora è concesso l'accesso alla
|
||||
risorsa (variabile y positiva)
|
||||
Tenendo presente che, al tempo time, delay(z, w) ritorna 0 se time < w e ritorna il valore che z aveva al tempo (time - w), se time
|
||||
>= w.
|
||||
Quale dei seguenti monitor meglio descrive il requisito RQ ?
|
15
Ingegneria del Software/28/wrong 2.txt
Normal file
15
Ingegneria del Software/28/wrong 2.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
<pre>
|
||||
class Monitor
|
||||
InputReal x, y;
|
||||
OutputBoolean wy;
|
||||
Boolean wz;
|
||||
initial equation
|
||||
wy = false;
|
||||
equation
|
||||
wz = (time > 60) and (delay(x, 10) > 0) and (y > 0);
|
||||
algorithm
|
||||
when edge(wz) then
|
||||
wy := true;
|
||||
end when;
|
||||
end Monitor;
|
||||
</pre>
|
15
Ingegneria del Software/28/wrong.txt
Normal file
15
Ingegneria del Software/28/wrong.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
<pre>
|
||||
class Monitor
|
||||
InputReal x, y;
|
||||
OutputBoolean wy;
|
||||
Boolean wz;
|
||||
initial equation
|
||||
wy = false;
|
||||
equation
|
||||
wz = (time > 60) or (delay(x, 10) > 0) or (y <= 0);
|
||||
algorithm
|
||||
when edge(wz) then
|
||||
wy := true;
|
||||
end when;
|
||||
end Monitor;
|
||||
</pre>
|
1
Ingegneria del Software/29/correct.txt
Normal file
1
Ingegneria del Software/29/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Plan driven
|
3
Ingegneria del Software/29/quest.txt
Normal file
3
Ingegneria del Software/29/quest.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
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/29/wrong 2.txt
Normal file
1
Ingegneria del Software/29/wrong 2.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Iterativo
|
1
Ingegneria del Software/29/wrong.txt
Normal file
1
Ingegneria del Software/29/wrong.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Basato sul riuso
|
15
Ingegneria del Software/30/correct.txt
Normal file
15
Ingegneria del Software/30/correct.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
<pre>
|
||||
class Monitor
|
||||
InputReal x; // plant output
|
||||
OutputBoolean y;
|
||||
Boolean z;
|
||||
initial equation
|
||||
y = false;
|
||||
equation
|
||||
z = (time > 20) and ((x >= 30) or (x <= 20)) ;
|
||||
algorithm
|
||||
when edge(z) then
|
||||
y := true;
|
||||
end when;
|
||||
end Monitor;
|
||||
</pre>
|
3
Ingegneria del Software/30/quest.txt
Normal file
3
Ingegneria del Software/30/quest.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
Si consideri il seguente requisito:
|
||||
RQ1: Dopo 20 unità di tempo dall'inizio dell'esecuzione la variabile x è sempre nell'intervallo [20, 30] .
|
||||
Quale dei seguenti monitor meglio descrive il requisito RQ1 ?
|
15
Ingegneria del Software/30/wrong 2.txt
Normal file
15
Ingegneria del Software/30/wrong 2.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
<pre>
|
||||
class Monitor
|
||||
InputReal x; // plant output
|
||||
OutputBoolean y;
|
||||
Boolean z;
|
||||
initial equation
|
||||
y = false;
|
||||
equation
|
||||
z = (time > 20) or ((x >= 20) and (x <= 30)) ;
|
||||
algorithm
|
||||
when edge(z) then
|
||||
y := true;
|
||||
end when;
|
||||
end Monitor;
|
||||
</pre>
|
15
Ingegneria del Software/30/wrong.txt
Normal file
15
Ingegneria del Software/30/wrong.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
<pre>
|
||||
class Monitor
|
||||
InputReal x; // plant output
|
||||
OutputBoolean y;
|
||||
Boolean z;
|
||||
initial equation
|
||||
y = false;
|
||||
equation
|
||||
z = (time > 20) and (x >= 20) and (x <= 30) ;
|
||||
algorithm
|
||||
when edge(z) then
|
||||
y := true;
|
||||
end when;
|
||||
end Monitor;
|
||||
</pre>
|
21
Ingegneria del Software/31/correct.txt
Normal file
21
Ingegneria del Software/31/correct.txt
Normal file
|
@ -0,0 +1,21 @@
|
|||
<pre>
|
||||
block MarkovChain
|
||||
//external function myrandom() returns a random real number in [0, 1]
|
||||
parameter Real x0 = 0;
|
||||
OutputReal x;
|
||||
Integer countdown;
|
||||
algorithm
|
||||
when initial() then
|
||||
x := x0;
|
||||
countdown := 0;
|
||||
elsewhen sample(0, 1) then
|
||||
if (countdown <= 0)
|
||||
then
|
||||
countdown := 1 + integer(floor(10*myrandom()));
|
||||
x := x + (-1 + 2*myrandom());
|
||||
else
|
||||
countdown := countdown - 1;
|
||||
end if;
|
||||
end when;
|
||||
end MarkovChain;
|
||||
</pre>
|
4
Ingegneria del Software/31/quest.txt
Normal file
4
Ingegneria del Software/31/quest.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
L'input di un sistema software è costituito da una sequenza di valori reali. Ad ogni unità di tempo il valore di input può
|
||||
rimanere uguale al precedente oppure differire di un numero random in [-1, 1]. L'input resta costante per numero random di
|
||||
unità di tempo in [1, 10].
|
||||
Quale dei seguenti modelli Modelica modella meglio l'environment descritto sopra.
|
21
Ingegneria del Software/31/wrong 2.txt
Normal file
21
Ingegneria del Software/31/wrong 2.txt
Normal file
|
@ -0,0 +1,21 @@
|
|||
<pre>
|
||||
block MarkovChain
|
||||
//external function myrandom() returns a random real number in [0, 1]
|
||||
parameter Real x0 = 0;
|
||||
OutputReal x;
|
||||
Integer countdown;
|
||||
algorithm
|
||||
when initial() then
|
||||
x := x0;
|
||||
countdown := 0;
|
||||
elsewhen sample(0, 1) then
|
||||
if (countdown <= 0)
|
||||
then
|
||||
countdown := 1 + integer(floor(10*myrandom()));
|
||||
x := x + (-1 + 4*myrandom());
|
||||
else
|
||||
countdown := countdown - 1;
|
||||
end if;
|
||||
end when;
|
||||
end MarkovChain;
|
||||
</pre>
|
21
Ingegneria del Software/31/wrong.txt
Normal file
21
Ingegneria del Software/31/wrong.txt
Normal file
|
@ -0,0 +1,21 @@
|
|||
<pre>
|
||||
block MarkovChain
|
||||
//external function myrandom() returns a random real number in [0, 1]
|
||||
parameter Real x0 = 0;
|
||||
OutputReal x;
|
||||
Integer countdown;
|
||||
algorithm
|
||||
when initial() then
|
||||
x := x0;
|
||||
countdown := 0;
|
||||
elsewhen sample(0, 1) then
|
||||
if (countdown <= 0)
|
||||
then
|
||||
countdown := 1 + integer(floor(10*myrandom()));
|
||||
x := x - myrandom();
|
||||
else
|
||||
countdown := countdown - 1;
|
||||
end if;
|
||||
end when;
|
||||
end MarkovChain;
|
||||
</pre>
|
1
Ingegneria del Software/32/correct.txt
Normal file
1
Ingegneria del Software/32/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
img=https://imgur.com/qKyYHVj
|
3
Ingegneria del Software/32/quest.txt
Normal file
3
Ingegneria del Software/32/quest.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
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/32/wrong 2.txt
Normal file
1
Ingegneria del Software/32/wrong 2.txt
Normal file
|
@ -0,0 +1 @@
|
|||
img=https://imgur.com/5I3NjLb
|
1
Ingegneria del Software/32/wrong.txt
Normal file
1
Ingegneria del Software/32/wrong.txt
Normal file
|
@ -0,0 +1 @@
|
|||
img=https://imgur.com/NDNLPgt
|
1
Ingegneria del Software/33/correct.txt
Normal file
1
Ingegneria del Software/33/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
La variabile x è nell'intervallo [0, 5].
|
17
Ingegneria del Software/33/quest.txt
Normal file
17
Ingegneria del Software/33/quest.txt
Normal file
|
@ -0,0 +1,17 @@
|
|||
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/33/wrong 2.txt
Normal file
1
Ingegneria del Software/33/wrong 2.txt
Normal file
|
@ -0,0 +1 @@
|
|||
La variable x è minore di 0.
|
1
Ingegneria del Software/33/wrong.txt
Normal file
1
Ingegneria del Software/33/wrong.txt
Normal file
|
@ -0,0 +1 @@
|
|||
La variabile x è fuori dall'intervallo [0, 5].
|
21
Ingegneria del Software/34/correct.txt
Normal file
21
Ingegneria del Software/34/correct.txt
Normal file
|
@ -0,0 +1,21 @@
|
|||
<pre>
|
||||
block MarkovChain
|
||||
//external function myrandom() returns a random real number in [0, 1]
|
||||
parameter Real x0 = 0;
|
||||
OutputReal x;
|
||||
Integer countdown;
|
||||
algorithm
|
||||
when initial() then
|
||||
x := x0;
|
||||
countdown := 0;
|
||||
elsewhen sample(0, 1) then
|
||||
if (countdown <= 0)
|
||||
then
|
||||
countdown := 1 + integer(floor(10*myrandom()));
|
||||
x := 1 - pre(x);
|
||||
else
|
||||
countdown := countdown - 1;
|
||||
end if;
|
||||
end when;
|
||||
end MarkovChain;
|
||||
</pre>
|
3
Ingegneria del Software/34/quest.txt
Normal file
3
Ingegneria del Software/34/quest.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
L'input di un sistema software è costituito da una sequenza di 0 (false) ed 1 (true). Ad uno 0 segue un 1 ed ad un 1 segue uno 0.
|
||||
Il tempo tra un valore di input e l'altro è un valore random compreso tra 1 e 10 unità di tempo.
|
||||
Quale dei seguenti modelli Modelica modella meglio l'environment descritto sopra.
|
22
Ingegneria del Software/34/wrong 2.txt
Normal file
22
Ingegneria del Software/34/wrong 2.txt
Normal file
|
@ -0,0 +1,22 @@
|
|||
block MarkovChain
|
||||
//external function myrandom() returns a random real number in [0, 1]
|
||||
parameter Real x0 = 0;
|
||||
OutputReal x;
|
||||
Integer countdown;
|
||||
algorithm
|
||||
when initial() then
|
||||
x := x0;
|
||||
countdown := 0;
|
||||
elsewhen sample(0, 10) then
|
||||
if (countdown <= 0)
|
||||
then
|
||||
countdown := 1 + integer(floor(myrandom()));
|
||||
x := 1 - pre(x);
|
||||
Domanda 35
|
||||
Risposta non data
|
||||
Punteggio max.: 1,00
|
||||
else
|
||||
countdown := countdown - 1;
|
||||
end if;
|
||||
end when;
|
||||
end MarkovChain;
|
19
Ingegneria del Software/34/wrong.txt
Normal file
19
Ingegneria del Software/34/wrong.txt
Normal file
|
@ -0,0 +1,19 @@
|
|||
block MarkovChain
|
||||
//external function myrandom() returns a random real number in [0, 1]
|
||||
parameter Real x0 = 0;
|
||||
OutputReal x;
|
||||
Integer countdown;
|
||||
algorithm
|
||||
when initial() then
|
||||
x := x0;
|
||||
countdown := 0;
|
||||
elsewhen sample(0, 1) then
|
||||
if (countdown >= 0)
|
||||
then
|
||||
countdown := 1 + integer(floor(10*myrandom()));
|
||||
x := 1 - pre(x);
|
||||
else
|
||||
countdown := countdown - 1;
|
||||
end if;
|
||||
end when;
|
||||
end MarkovChain;
|
1
Ingegneria del Software/35/correct.txt
Normal file
1
Ingegneria del Software/35/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Stiamo costruendo il sistema giusto ?
|
1
Ingegneria del Software/35/quest.txt
Normal file
1
Ingegneria del Software/35/quest.txt
Normal file
|
@ -0,0 +1 @@
|
|||
La validazione risponde alla seguente domanda:
|
1
Ingegneria del Software/35/wrong 2.txt
Normal file
1
Ingegneria del Software/35/wrong 2.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Sono soddisfatti i requisti funzionali ?
|
1
Ingegneria del Software/35/wrong.txt
Normal file
1
Ingegneria del Software/35/wrong.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Stiamo costruendo il sistema nel modo giusto ?
|
15
Ingegneria del Software/36/correct.txt
Normal file
15
Ingegneria del Software/36/correct.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
<pre>
|
||||
class Monitor
|
||||
InputReal x, y; // plant output
|
||||
OutputBoolean wy;
|
||||
Boolean wz;
|
||||
initial equation
|
||||
wy = false;
|
||||
equation
|
||||
wz = (time > 10) and (x >= 10) and (x <= 20) and ((y < 0.5*x) or (y > 0.7*x)) ;
|
||||
algorithm
|
||||
when edge(wz) then
|
||||
wy := true;
|
||||
end when;
|
||||
end Monitor;
|
||||
</pre>
|
4
Ingegneria del Software/36/quest.txt
Normal file
4
Ingegneria del Software/36/quest.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
Si consideri il seguente requisito:
|
||||
RQ: Dopo 10 unità di tempo dall'inizio dell'esecuzione vale la seguente proprietà: se la variabile x è nell'intervallo [10, 20]
|
||||
allora la variabile y è compresa tra il 50% di x ed il 70% di x.
|
||||
Quale dei seguenti monitor meglio descrive il requisito RQ ?
|
15
Ingegneria del Software/36/wrong 2.txt
Normal file
15
Ingegneria del Software/36/wrong 2.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
<pre>
|
||||
class Monitor
|
||||
InputReal x, y; // plant output
|
||||
OutputBoolean wy;
|
||||
Boolean wz;
|
||||
initial equation
|
||||
wy = false;
|
||||
equation
|
||||
wz = (time > 10) and (x >= 10) and (x <= 20) and (y >= 0.5*x) and (y <= 0.7*x) ;
|
||||
algorithm
|
||||
when edge(wz) then
|
||||
wy := true;
|
||||
end when;
|
||||
end Monitor;
|
||||
</pre>
|
15
Ingegneria del Software/36/wrong.txt
Normal file
15
Ingegneria del Software/36/wrong.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
<pre>
|
||||
class Monitor
|
||||
InputReal x, y; // plant output
|
||||
OutputBoolean wy;
|
||||
Boolean wz;
|
||||
initial equation
|
||||
wy = false;
|
||||
equation
|
||||
wz = (time > 10) and ((x < 10) or (x > 20)) and ((y < 0.5*x) or (y > 0.7*x)) ;
|
||||
algorithm
|
||||
when edge(wz) then
|
||||
wy := true;
|
||||
end when;
|
||||
end Monitor;
|
||||
</pre>
|
1
Ingegneria del Software/37/correct.txt
Normal file
1
Ingegneria del Software/37/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Requisito funzionale.
|
2
Ingegneria del Software/37/quest.txt
Normal file
2
Ingegneria del Software/37/quest.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
"Ogni giorno, per ciascuna clinica, il sistema genererà una lista dei pazienti che hanno un appuntamento quel giorno."
|
||||
La frase precedente è un esempio di:
|
1
Ingegneria del Software/37/wrong 2.txt
Normal file
1
Ingegneria del Software/37/wrong 2.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Requisito non-funzionale
|
1
Ingegneria del Software/37/wrong.txt
Normal file
1
Ingegneria del Software/37/wrong.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Requisito di performance.
|
1
Ingegneria del Software/38/correct.txt
Normal file
1
Ingegneria del Software/38/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Costruire un prototipo, metterlo in esercizio ed accertarsi che i porti i benefici attesi.
|
1
Ingegneria del Software/38/quest.txt
Normal file
1
Ingegneria del Software/38/quest.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Quali delle seguenti attività può contribuire a validare i requisiti di un sistema ?
|
1
Ingegneria del Software/38/wrong 2.txt
Normal file
1
Ingegneria del Software/38/wrong 2.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Costruire un prototipo e valutarne attentamente le performance.
|
1
Ingegneria del Software/38/wrong.txt
Normal file
1
Ingegneria del Software/38/wrong.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Costruire un prototipo e testarlo a fondo per evidenziare subito errori di implementazione
|
1
Ingegneria del Software/39/correct.txt
Normal file
1
Ingegneria del Software/39/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Il performance testing è tipicamente eseguito una volta che il sistema è stato completamento integrato
|
1
Ingegneria del Software/39/quest.txt
Normal file
1
Ingegneria del Software/39/quest.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Quale delle seguenti affermazioni è vera riguardo al performance testing?
|
1
Ingegneria del Software/39/wrong 2.txt
Normal file
1
Ingegneria del Software/39/wrong 2.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Il performance testing è tipicamente eseguito su un prototipo del sistema
|
1
Ingegneria del Software/39/wrong.txt
Normal file
1
Ingegneria del Software/39/wrong.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Il performance testing è tipicamente eseguito solo sulle componenti del sistema prima dell'integrazione.
|
1
Ingegneria del Software/40/correct.txt
Normal file
1
Ingegneria del Software/40/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Testare le interfacce per ciascun componente.
|
1
Ingegneria del Software/40/quest.txt
Normal file
1
Ingegneria del Software/40/quest.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Il component testing si concentra su:
|
1
Ingegneria del Software/40/wrong 2.txt
Normal file
1
Ingegneria del Software/40/wrong 2.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Testare funzionalità di unità software individuali, oggetti, classi o metodi.
|
1
Ingegneria del Software/40/wrong.txt
Normal file
1
Ingegneria del Software/40/wrong.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Testare l'interazione tra molte componenti (cioè integrazione di molte unità).
|
1
Ingegneria del Software/41/correct.txt
Normal file
1
Ingegneria del Software/41/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
2*A*(p +1)
|
2
Ingegneria del Software/41/quest.txt
Normal file
2
Ingegneria del Software/41/quest.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
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/41/wrong 2.txt
Normal file
1
Ingegneria del Software/41/wrong 2.txt
Normal file
|
@ -0,0 +1 @@
|
|||
3*A*(p + 1)
|
1
Ingegneria del Software/41/wrong.txt
Normal file
1
Ingegneria del Software/41/wrong.txt
Normal file
|
@ -0,0 +1 @@
|
|||
2*A*(p + 2)
|
15
Ingegneria del Software/42/correct.txt
Normal file
15
Ingegneria del Software/42/correct.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
<pre>
|
||||
class Monitor
|
||||
InputReal x, y, z; // plant output
|
||||
OutputBoolean wy;
|
||||
Boolean wz;
|
||||
initial equation
|
||||
wy = false;
|
||||
equation
|
||||
wz = (time > 50) and (x < 0.6*y) and (x + y <= 0.3*z);
|
||||
algorithm
|
||||
when edge(wz) then
|
||||
wy := true;
|
||||
end when;
|
||||
end Monitor;
|
||||
</pre>
|
4
Ingegneria del Software/42/quest.txt
Normal file
4
Ingegneria del Software/42/quest.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
Si consideri il seguente requisito:
|
||||
RQ: Dopo 50 unità di tempo dall'inizio dell'esecuzione vale la seguente proprietà:
|
||||
se la variabile x è minore del 60% della variabile y allora la somma di x ed y è maggiore del 30% della variabile z
|
||||
Quale dei seguenti monitor meglio descrive il requisito RQ ?
|
15
Ingegneria del Software/42/wrong 2.txt
Normal file
15
Ingegneria del Software/42/wrong 2.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
<pre>
|
||||
class Monitor
|
||||
InputReal x, y, z; // plant output
|
||||
OutputBoolean wy;
|
||||
Boolean wz;
|
||||
initial equation
|
||||
wy = false;
|
||||
equation
|
||||
wz = (time > 50) and (x < 0.6*y) and (x + y > 0.3*z);
|
||||
algorithm
|
||||
when edge(wz) then
|
||||
wy := true;
|
||||
end when;
|
||||
end Monitor;
|
||||
</pre>
|
15
Ingegneria del Software/42/wrong.txt
Normal file
15
Ingegneria del Software/42/wrong.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
<pre>
|
||||
class Monitor
|
||||
InputReal x, y, z; // plant output
|
||||
OutputBoolean wy;
|
||||
Boolean wz;
|
||||
initial equation
|
||||
wy = false;
|
||||
equation
|
||||
wz = (time > 50) and (x >= 0.6*y) and (x + y <= 0.3*z);
|
||||
algorithm
|
||||
when edge(wz) then
|
||||
wy := true;
|
||||
end when;
|
||||
end Monitor;
|
||||
</pre>
|
15
Ingegneria del Software/43/correct.txt
Normal file
15
Ingegneria del Software/43/correct.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
<pre>
|
||||
lass Monitor
|
||||
InputReal x, y;
|
||||
OutputBoolean wy;
|
||||
Boolean wz;
|
||||
initial equation
|
||||
wy = false;
|
||||
equation
|
||||
wz = (time > 40) and (delay(x, 10) > 1) and (y < 0);
|
||||
algorithm
|
||||
when edge(wz) then
|
||||
wy := true;
|
||||
end when;
|
||||
end Monitor;
|
||||
</pre>
|
6
Ingegneria del Software/43/quest.txt
Normal file
6
Ingegneria del Software/43/quest.txt
Normal file
|
@ -0,0 +1,6 @@
|
|||
Si consideri il seguente requisito:
|
||||
RQ: Dopo 40 unità di tempo dall'inizio dell'esecuzione vale la seguente proprietà:
|
||||
se 10 unità di tempo nel passato x era maggiore di 1 allora ora y è nonegativa.
|
||||
Tenendo presente che, al tempo time, delay(z, w) ritorna 0 se time <= w e ritorna il valore che z aveva al tempo (time - w), se
|
||||
time = w.
|
||||
Quale dei seguenti monitor meglio descrive il requisito RQ ?
|
15
Ingegneria del Software/43/wrong 2.txt
Normal file
15
Ingegneria del Software/43/wrong 2.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
<pre>
|
||||
class Monitor
|
||||
InputReal x, y;
|
||||
OutputBoolean wy;
|
||||
Boolean wz;
|
||||
initial equation
|
||||
wy = false;
|
||||
equation
|
||||
wz = (time > 40) and (delay(x, 10) > 1) and (y >= 0);
|
||||
algorithm
|
||||
when edge(wz) then
|
||||
wy := true;
|
||||
end when;
|
||||
end Monitor;
|
||||
</pre>
|
15
Ingegneria del Software/43/wrong.txt
Normal file
15
Ingegneria del Software/43/wrong.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
<pre>
|
||||
class Monitor
|
||||
InputReal x, y;
|
||||
OutputBoolean wy;
|
||||
Boolean wz;
|
||||
initial equation
|
||||
wy = false;
|
||||
equation
|
||||
wz = (time > 40) and (delay(x, 10) > 1) and (y < 0);
|
||||
algorithm
|
||||
when edge(wz) then
|
||||
wy := true;
|
||||
end when;
|
||||
end Monitor;
|
||||
</pre>
|
20
Ingegneria del Software/44/correct.txt
Normal file
20
Ingegneria del Software/44/correct.txt
Normal file
|
@ -0,0 +1,20 @@
|
|||
<pre>
|
||||
block MarkovChain
|
||||
//external function myrandom() returns a random real number in [0, 1]
|
||||
parameter Integer x0 = 0;
|
||||
parameter Integer xmax = 100;
|
||||
OutputInteger x; // Connector
|
||||
algorithm
|
||||
when initial() then
|
||||
x := x0;
|
||||
elsewhen sample(0, 1) then
|
||||
if (x < xmax)
|
||||
then
|
||||
if (myrandom() <= 0.8)
|
||||
then
|
||||
x := x + 1;
|
||||
end if;
|
||||
end if;
|
||||
end when;
|
||||
end MarkovChain;
|
||||
</pre>
|
8
Ingegneria del Software/44/quest.txt
Normal file
8
Ingegneria del Software/44/quest.txt
Normal file
|
@ -0,0 +1,8 @@
|
|||
Un'azienda decide di organizzare il processo di sviluppo di un grosso software in 101 phasi sequenziali, numerate da 0 a 100. La
|
||||
phase 0 è quella iniziale. La phase 100 è quella finale in cui lo sviluppo è completato. Tutte le fasi hanno circa la stessa durata.
|
||||
Si decide di realizzare un approccio incrementale in cui, alla fine di ogni fase, si passa alla fase successiva solo nel caso in cui
|
||||
tutti i test per la fase vengono superati. In caso contrario bisogna ripetere la phase. Dai dati storici è noto che la probabilità che
|
||||
il team di sviluppo passi da una fase a quella successiva è 0.8.
|
||||
Allo scopo di stimare attraverso una simulazione MonteCarlo il valore atteso del tempo di completamento del progetto viene
|
||||
realizzato un modello Modelica delo processo di sviluppo descritto sopra.
|
||||
Quale dei seguenti modelli Modelica modella correttamente il processo di sviluppo descritto sopra?
|
20
Ingegneria del Software/44/wrong 2.txt
Normal file
20
Ingegneria del Software/44/wrong 2.txt
Normal file
|
@ -0,0 +1,20 @@
|
|||
<pre>
|
||||
block MarkovChain
|
||||
//external function myrandom() returns a random real number in [0, 1]
|
||||
parameter Integer x0 = 0;
|
||||
parameter Integer xmax = 100;
|
||||
OutputInteger x; // Connector
|
||||
algorithm
|
||||
when initial() then
|
||||
x := x0;
|
||||
elsewhen sample(0, 1) then
|
||||
if (x < xmax)
|
||||
then
|
||||
if (myrandom() >= 0.8)
|
||||
then
|
||||
x := x + 1;
|
||||
end if;
|
||||
end if;
|
||||
end when;
|
||||
end MarkovChain;
|
||||
</pre>
|
22
Ingegneria del Software/44/wrong.txt
Normal file
22
Ingegneria del Software/44/wrong.txt
Normal file
|
@ -0,0 +1,22 @@
|
|||
<pre>
|
||||
block MarkovChain
|
||||
//external function myrandom() returns a random real number in [0, 1]
|
||||
parameter Integer x0 = 0;
|
||||
parameter Integer xmax = 100;
|
||||
OutputInteger x; // Connector
|
||||
algorithm
|
||||
when initial() then
|
||||
x := x0;
|
||||
elsewhen sample(0, 1) then
|
||||
if (x < xmax)
|
||||
then
|
||||
if (myrandom() <= 0.8)
|
||||
then
|
||||
x := x + 1;
|
||||
else
|
||||
x := x - 1;
|
||||
end if;
|
||||
end if;
|
||||
end when;
|
||||
end MarkovChain
|
||||
</pre>
|
1
Ingegneria del Software/45/correct.txt
Normal file
1
Ingegneria del Software/45/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Layred architecture.
|
2
Ingegneria del Software/45/quest.txt
Normal file
2
Ingegneria del Software/45/quest.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
img = https://imgur.com/7DG7vhi
|
||||
Quale pattern architetturale meglio descrive l'architettura in figura ?
|
1
Ingegneria del Software/45/wrong 2.txt
Normal file
1
Ingegneria del Software/45/wrong 2.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Model View Controller
|
1
Ingegneria del Software/45/wrong.txt
Normal file
1
Ingegneria del Software/45/wrong.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Pipe and filter architecture.
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue