mirror of
https://github.com/appinfosapienza/so-un-bot.git
synced 2025-03-14 17:26:14 +01:00
New questions correctly formatted
This commit is contained in:
parent
935d4532aa
commit
1a3767b4a9
123 changed files with 288 additions and 156 deletions
|
@ -1,4 +1,5 @@
|
||||||
Si consideri il seguente modello Modelica:
|
Si consideri il seguente modello Modelica:
|
||||||
|
<pre>
|
||||||
class System
|
class System
|
||||||
Integer x;
|
Integer x;
|
||||||
initial equation
|
initial equation
|
||||||
|
@ -8,4 +9,5 @@ when sample(0, 2) then
|
||||||
x = 1 - pre(x);
|
x = 1 - pre(x);
|
||||||
end when;
|
end when;
|
||||||
end System;
|
end System;
|
||||||
Quale delle seguenti affermazioni è vera per la variabile intera x?
|
</pre>
|
||||||
|
Quale delle seguenti affermazioni è vera per la variabile intera x?
|
|
@ -1 +1 @@
|
||||||
Il performance testing è tipicamente eseguito una volta che il sistema è stato completamento integrato.
|
Il performance testing è tipicamente eseguito una volta che il sistema è stato completamento integrato.
|
|
@ -1 +1 @@
|
||||||
Quale delle seguenti affermazioni è vera riguardo al performance testing?
|
Quale delle seguenti affermazioni è vera riguardo al performance testing?
|
|
@ -1 +1 @@
|
||||||
Il performance testing è tipicamente eseguito su un prototipo del sistema.
|
Il performance testing è tipicamente eseguito su un prototipo del sistema.
|
|
@ -1 +1 @@
|
||||||
Il performance testing è tipicamente eseguito solo sulle componenti del sistema prima dell'integrazione.
|
Il performance testing è tipicamente eseguito solo sulle componenti del sistema prima dell'integrazione.
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
class Monitor
|
class Monitor
|
||||||
InputReal x, y;
|
InputReal x, y;
|
||||||
OutputBoolean wy;
|
OutputBoolean wy;
|
||||||
|
@ -11,3 +12,4 @@ when edge(wz) then
|
||||||
wy := true;
|
wy := true;
|
||||||
end when;
|
end when;
|
||||||
end Monitor;
|
end Monitor;
|
||||||
|
</pre>
|
|
@ -1,5 +1,5 @@
|
||||||
Si consideri il seguente requisito:
|
Si consideri il seguente requisito:
|
||||||
RQ: Dopo 40 unità di tempo dall'inizio dell'esecuzione vale la seguente proprietà:
|
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.
|
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.
|
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 ?
|
Quale dei seguenti monitor meglio descrive il requisito RQ ?
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
class Monitor
|
class Monitor
|
||||||
InputReal x, y;
|
InputReal x, y;
|
||||||
OutputBoolean wy;
|
OutputBoolean wy;
|
||||||
|
@ -11,3 +12,4 @@ when edge(wz) then
|
||||||
wy := true;
|
wy := true;
|
||||||
end when;
|
end when;
|
||||||
end Monitor;
|
end Monitor;
|
||||||
|
</pre>
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
class Monitor
|
class Monitor
|
||||||
InputReal x, y;
|
InputReal x, y;
|
||||||
OutputBoolean wy;
|
OutputBoolean wy;
|
||||||
|
@ -11,3 +12,4 @@ when edge(wz) then
|
||||||
wy := true;
|
wy := true;
|
||||||
end when;
|
end when;
|
||||||
end Monitor;
|
end Monitor;
|
||||||
|
</pre>
|
|
@ -1 +1 @@
|
||||||
Costruire un prototipo, eseguirlo usando dati storici dai log di produzione e valutare la capacità del prototipo di ridurre gli scarti.
|
Costruire un prototipo, eseguirlo usando dati storici dai log di produzione e valutare la capacità del prototipo di ridurre gli scarti.
|
|
@ -1 +1 @@
|
||||||
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.
|
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.
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
function next
|
function next
|
||||||
input Integer x;
|
input Integer x;
|
||||||
output Integer y;
|
output Integer y;
|
||||||
|
@ -14,3 +15,4 @@ when sample(0, 1) then
|
||||||
x = next(pre(x));
|
x = next(pre(x));
|
||||||
end when;
|
end when;
|
||||||
end System;
|
end System;
|
||||||
|
</pre>
|
|
@ -1,4 +1,4 @@
|
||||||
Si consideri l'automa segunete:
|
Si consideri l'automa seguente:
|
||||||
|
0->1 e 1->0
|
||||||
|
|
||||||
Quale dei seguenti modelli Modelica fornisce un modello ragionevole per l'automa di cui sopra.
|
Quale dei seguenti modelli Modelica fornisce un modello ragionevole per l'automa di cui sopra.
|
|
@ -1,8 +1,9 @@
|
||||||
|
<pre>
|
||||||
function next
|
function next
|
||||||
input Integer x;
|
input Integer x;
|
||||||
output Integer y;
|
output Integer y;
|
||||||
algorithm
|
algorithm
|
||||||
y := 1 + x;
|
y := 1 - x;
|
||||||
end next;
|
end next;
|
||||||
|
|
||||||
class System
|
class System
|
||||||
|
@ -14,3 +15,4 @@ when sample(0, 1) then
|
||||||
x = next(pre(x));
|
x = next(pre(x));
|
||||||
end when;
|
end when;
|
||||||
end System;
|
end System;
|
||||||
|
</pre>
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
function next
|
function next
|
||||||
input Integer x;
|
input Integer x;
|
||||||
output Integer y;
|
output Integer y;
|
||||||
|
@ -14,3 +15,4 @@ when sample(0, 1) then
|
||||||
x = next(pre(x));
|
x = next(pre(x));
|
||||||
end when;
|
end when;
|
||||||
end System;
|
end System;
|
||||||
|
</pre>
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
class Monitor
|
class Monitor
|
||||||
|
|
||||||
InputReal x; // plant output
|
InputReal x; // plant output
|
||||||
|
@ -13,3 +14,4 @@ when edge(z) then
|
||||||
y := true;
|
y := true;
|
||||||
end when;
|
end when;
|
||||||
end Monitor;
|
end Monitor;
|
||||||
|
</pre>
|
|
@ -1,3 +1,3 @@
|
||||||
Si consideri il seguente requisito:
|
Si consideri il seguente requisito:
|
||||||
RQ1: Dopo 20 unità di tempo dall'inizio dell'esecuzione la variabile x è sempre nell'intervallo [20, 30] .
|
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 ?
|
Quale dei seguenti monitor meglio descrive il requisito RQ1 ?
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
class Monitor
|
class Monitor
|
||||||
|
|
||||||
InputReal x; // plant output
|
InputReal x; // plant output
|
||||||
|
@ -13,3 +14,4 @@ when edge(z) then
|
||||||
y := true;
|
y := true;
|
||||||
end when;
|
end when;
|
||||||
end Monitor;
|
end Monitor;
|
||||||
|
</pre>
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
class Monitor
|
class Monitor
|
||||||
|
|
||||||
InputReal x; // plant output
|
InputReal x; // plant output
|
||||||
|
@ -13,3 +14,4 @@ when edge(z) then
|
||||||
y := true;
|
y := true;
|
||||||
end when;
|
end when;
|
||||||
end Monitor;
|
end Monitor;
|
||||||
|
</pre>
|
|
@ -1 +1 @@
|
||||||
Quali delle seguenti attività può contribuire a validare i requisiti di un sistema ?
|
Quali delle seguenti attività può contribuire a validare i requisiti di un sistema ?
|
|
@ -1 +1 @@
|
||||||
Testare l'interazione tra le componenti del sistema (cioè, integrazione di molte unità di sistema).
|
Testare l'interazione tra le componenti del sistema (cioè, integrazione di molte unità di sistema).
|
|
@ -1 +1 @@
|
||||||
Testare le funzionalità di unità software individuali, oggetti, classi o metodi.
|
Testare le funzionalità di unità software individuali, oggetti, classi o metodi.
|
|
@ -1,4 +1,5 @@
|
||||||
Si consideri il seguente modello Modelica.
|
Si consideri il seguente modello Modelica.
|
||||||
|
<pre>
|
||||||
class System
|
class System
|
||||||
Boolean x;
|
Boolean x;
|
||||||
initial equation
|
initial equation
|
||||||
|
@ -8,4 +9,5 @@ when sample(0, 2) then
|
||||||
x = not (pre(x));
|
x = not (pre(x));
|
||||||
end when;
|
end when;
|
||||||
end System;
|
end System;
|
||||||
|
</pre>
|
||||||
Quale delle seguenti affermazioni vale per la variabile booleana x ?
|
Quale delle seguenti affermazioni vale per la variabile booleana x ?
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
model Env
|
model Env
|
||||||
Integer x; // Pulsante premuto dall'utente
|
Integer x; // Pulsante premuto dall'utente
|
||||||
Real r1024;
|
Real r1024;
|
||||||
|
@ -12,3 +13,4 @@ elsewhen sample(0,1) then
|
||||||
if (r1024 <= 0.6) then x := 0; else x := 1; end if;
|
if (r1024 <= 0.6) then x := 0; else x := 1; end if;
|
||||||
end when;
|
end when;
|
||||||
end Env;
|
end Env;
|
||||||
|
</pre>
|
|
@ -1,3 +1,3 @@
|
||||||
L'input ad un sistema è costituito da un utente (umano) che preme due pulsanti etichettati con 0 ed 1.
|
L'input ad un sistema è costituito da un utente (umano) che preme due pulsanti etichettati con 0 ed 1.
|
||||||
Con probabilità 0.6 l'utente preme il pulsante 0, con probabilità 0.4 l'utente preme il pulsante 1.
|
Con probabilità 0.6 l'utente preme il pulsante 0, con probabilità 0.4 l'utente preme il pulsante 1.
|
||||||
Quale dei seguenti modelli Modelica fornisce un modello ragionevole per l'utente di cui sopra?
|
Quale dei seguenti modelli Modelica fornisce un modello ragionevole per l'utente di cui sopra?
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
model Env
|
model Env
|
||||||
Integer x; // Pulsante premuto dall'utente
|
Integer x; // Pulsante premuto dall'utente
|
||||||
Real r1024;
|
Real r1024;
|
||||||
|
@ -12,3 +13,4 @@ elsewhen sample(0,1) then
|
||||||
if (r1024 >= 0.6) then x := 0; else x := 1; end if;
|
if (r1024 >= 0.6) then x := 0; else x := 1; end if;
|
||||||
end when;
|
end when;
|
||||||
end Env;
|
end Env;
|
||||||
|
</pre>
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
model Env
|
model Env
|
||||||
Integer x; // Pulsante premuto dall'utente
|
Integer x; // Pulsante premuto dall'utente
|
||||||
Real r1024;
|
Real r1024;
|
||||||
|
@ -12,3 +13,4 @@ elsewhen sample(0,1) then
|
||||||
if (r1024 <= 0.6) then x := 1; else x := 0; end if;
|
if (r1024 <= 0.6) then x := 1; else x := 0; end if;
|
||||||
end when;
|
end when;
|
||||||
end Env;
|
end Env;
|
||||||
|
</pre>
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
model System
|
model System
|
||||||
parameter Integer F1 = 1;
|
parameter Integer F1 = 1;
|
||||||
parameter Integer F2 = 2;
|
parameter Integer F2 = 2;
|
||||||
|
@ -7,17 +8,17 @@ parameter Real p = 0.3;
|
||||||
parameter Real A[4, 4] =
|
parameter Real A[4, 4] =
|
||||||
[
|
[
|
||||||
0, 1, 0, 0;
|
0, 1, 0, 0;
|
||||||
p, 1-p, 0, 0;
|
p, 0, 1-p, 0;
|
||||||
0, 0, p, 1-p;
|
0, p, 0, 1-p;
|
||||||
0, 0, 0, 1
|
0, 0, 0, 1
|
||||||
];
|
];
|
||||||
Integer x; Real r1024;
|
Integer x; Real r1024;
|
||||||
Integer state1024[Modelica.Math.Random.Generators.Xorshift1024star.nState];
|
Integer state1024[Modelica.Math.Random.Generators.Xorshift1024star.nState];
|
||||||
algorithm
|
algorithm
|
||||||
when initial() then
|
when initial() then
|
||||||
state1024 := Modelica.Math.Random.Generators.Xorshift1024star.initialState(614657, 30020);
|
state1024 := Modelica.Math.Random.Generators.Xorshift1024star.initialState(614657, 30020);
|
||||||
x := F1;
|
x := F1;
|
||||||
r1024 := 0;
|
r1024 := 0;
|
||||||
elsewhen sample(0,1) then
|
elsewhen sample(0,1) then
|
||||||
(r1024,state1024) := Modelica.Math.Random.Generators.Xorshift1024star.random(pre(state1024));
|
(r1024,state1024) := Modelica.Math.Random.Generators.Xorshift1024star.random(pre(state1024));
|
||||||
if (r1024 <= A[x, F1]) then
|
if (r1024 <= A[x, F1]) then
|
||||||
|
@ -31,3 +32,4 @@ if (r1024 <= A[x, F1]) then
|
||||||
end if;
|
end if;
|
||||||
end when;
|
end when;
|
||||||
end System;
|
end System;
|
||||||
|
</pre>
|
|
@ -1,4 +1,4 @@
|
||||||
|
img=https://i.imgur.com/c4UjAQc.png
|
||||||
Si consideri la seguente Markov Chain:
|
Si consideri la seguente Markov Chain:
|
||||||
|
|
||||||
|
|
||||||
Quale dei seguenti modelli Modelica fornisce un modello ragionevole per la Markov Chain di cui sopra?
|
Quale dei seguenti modelli Modelica fornisce un modello ragionevole per la Markov Chain di cui sopra?
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
model System
|
model System
|
||||||
parameter Integer F1 = 1;
|
parameter Integer F1 = 1;
|
||||||
parameter Integer F2 = 2;
|
parameter Integer F2 = 2;
|
||||||
|
@ -7,17 +8,17 @@ parameter Real p = 0.3;
|
||||||
parameter Real A[4, 4] =
|
parameter Real A[4, 4] =
|
||||||
[
|
[
|
||||||
0, 1, 0, 0;
|
0, 1, 0, 0;
|
||||||
p, 0, 1-p, 0;
|
p, 1-p, 0, 0;
|
||||||
0, p, 0, 1-p;
|
0, 0, p, 1-p;
|
||||||
0, 0, 0, 1
|
0, 0, 0, 1
|
||||||
];
|
];
|
||||||
Integer x; Real r1024;
|
Integer x; Real r1024;
|
||||||
Integer state1024[Modelica.Math.Random.Generators.Xorshift1024star.nState];
|
Integer state1024[Modelica.Math.Random.Generators.Xorshift1024star.nState];
|
||||||
algorithm
|
algorithm
|
||||||
when initial() then
|
when initial() then
|
||||||
state1024 := Modelica.Math.Random.Generators.Xorshift1024star.initialState(614657, 30020);
|
state1024 := Modelica.Math.Random.Generators.Xorshift1024star.initialState(614657, 30020);
|
||||||
x := F1;
|
x := F1;
|
||||||
r1024 := 0;
|
r1024 := 0;
|
||||||
elsewhen sample(0,1) then
|
elsewhen sample(0,1) then
|
||||||
(r1024,state1024) := Modelica.Math.Random.Generators.Xorshift1024star.random(pre(state1024));
|
(r1024,state1024) := Modelica.Math.Random.Generators.Xorshift1024star.random(pre(state1024));
|
||||||
if (r1024 <= A[x, F1]) then
|
if (r1024 <= A[x, F1]) then
|
||||||
|
@ -31,3 +32,4 @@ if (r1024 <= A[x, F1]) then
|
||||||
end if;
|
end if;
|
||||||
end when;
|
end when;
|
||||||
end System;
|
end System;
|
||||||
|
</pre>
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
model System
|
model System
|
||||||
parameter Integer F1 = 1;
|
parameter Integer F1 = 1;
|
||||||
parameter Integer F2 = 2;
|
parameter Integer F2 = 2;
|
||||||
|
@ -31,3 +32,4 @@ if (r1024 <= A[x, F1]) then
|
||||||
end if;
|
end if;
|
||||||
end when;
|
end when;
|
||||||
end System;
|
end System;
|
||||||
|
</pre>
|
|
@ -1 +1 @@
|
||||||
Una release del software è resa disponibile agli utenti (beta users) per permettergli di sperimentare e quindi segnalare eventuali problemi rilevati agli sviluppatori.
|
Una release del software è resa disponibile agli utenti (beta users) per permettergli di sperimentare e quindi segnalare eventuali problemi rilevati agli sviluppatori.
|
|
@ -1 +1 @@
|
||||||
Quale delle seguenti affermazione è vera riguardo al beta testing ?
|
Quale delle seguenti affermazione è vera riguardo al beta testing ?
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
class Monitor
|
class Monitor
|
||||||
|
|
||||||
InputReal x; // plant output
|
InputReal x; // plant output
|
||||||
|
@ -13,3 +14,4 @@ when edge(z) then
|
||||||
y := true;
|
y := true;
|
||||||
end when;
|
end when;
|
||||||
end Monitor;
|
end Monitor;
|
||||||
|
</pre>
|
|
@ -1,3 +1,3 @@
|
||||||
Si consideri il seguente requisito:
|
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]
|
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 ?
|
Quale dei seguenti monitor meglio descrive il requisito RQ1 ?
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
class Monitor
|
class Monitor
|
||||||
|
|
||||||
InputReal x; // plant output
|
InputReal x; // plant output
|
||||||
|
@ -13,3 +14,4 @@ when edge(z) then
|
||||||
y := true;
|
y := true;
|
||||||
end when;
|
end when;
|
||||||
end Monitor;
|
end Monitor;
|
||||||
|
</pre>
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
class Monitor
|
class Monitor
|
||||||
|
|
||||||
InputReal x; // plant output
|
InputReal x; // plant output
|
||||||
|
@ -13,3 +14,4 @@ when edge(z) then
|
||||||
y := true;
|
y := true;
|
||||||
end when;
|
end when;
|
||||||
end Monitor;
|
end Monitor;
|
||||||
|
</pre>
|
|
@ -1 +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 ?
|
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,8 +1,9 @@
|
||||||
|
<pre>
|
||||||
model System
|
model System
|
||||||
Integer y; Real r1024;
|
Integer y; Real r1024;
|
||||||
Integer state1024[Modelica.Math.Random.Generators.Xorshift1024star.nState];
|
Integer state1024[Modelica.Math.Random.Generators.Xorshift1024star.nState];
|
||||||
equation
|
equation
|
||||||
y = if (r1024 <= 0.3) then -1 else if (r1024 <= 0.7) then 0 else 1;
|
y = if (r1024 <= 0.2) then -1 else if (r1024 <= 0.7) then 0 else 1;
|
||||||
algorithm
|
algorithm
|
||||||
when initial() then
|
when initial() then
|
||||||
state1024 := Modelica.Math.Random.Generators.Xorshift1024star.initialState(614657, 30020);
|
state1024 := Modelica.Math.Random.Generators.Xorshift1024star.initialState(614657, 30020);
|
||||||
|
@ -11,3 +12,4 @@ elsewhen sample(0,1) then
|
||||||
(r1024,state1024) := Modelica.Math.Random.Generators.Xorshift1024star.random(pre(state1024));
|
(r1024,state1024) := Modelica.Math.Random.Generators.Xorshift1024star.random(pre(state1024));
|
||||||
end when;
|
end when;
|
||||||
end System;
|
end System;
|
||||||
|
</pre>
|
|
@ -1 +1 @@
|
||||||
Si consideri l'ambiente (use case) consistente di un utente che ad ogni unità di tempo (ad esempio, un secondo) invia al nostro sistema input -1 con probabilità 0.2, input 0 con probabilità 0.5 ed input 1 con probabilità 0.3. Quale dei seguenti modelli Modelica rappresenta correttamente tale ambiente.
|
Si consideri l'ambiente (use case) consistente di un utente che ad ogni unità di tempo (ad esempio, un secondo) invia al nostro sistema input -1 con probabilità 0.2, input 0 con probabilità 0.5 ed input 1 con probabilità 0.3. Quale dei seguenti modelli Modelica rappresenta correttamente tale ambiente.
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
model System
|
model System
|
||||||
Integer y; Real r1024;
|
Integer y; Real r1024;
|
||||||
Integer state1024[Modelica.Math.Random.Generators.Xorshift1024star.nState];
|
Integer state1024[Modelica.Math.Random.Generators.Xorshift1024star.nState];
|
||||||
|
@ -11,3 +12,4 @@ elsewhen sample(0,1) then
|
||||||
(r1024,state1024) := Modelica.Math.Random.Generators.Xorshift1024star.random(pre(state1024));
|
(r1024,state1024) := Modelica.Math.Random.Generators.Xorshift1024star.random(pre(state1024));
|
||||||
end when;
|
end when;
|
||||||
end System;
|
end System;
|
||||||
|
</pre>
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
model System
|
model System
|
||||||
Integer y; Real r1024;
|
Integer y; Real r1024;
|
||||||
Integer state1024[Modelica.Math.Random.Generators.Xorshift1024star.nState];
|
Integer state1024[Modelica.Math.Random.Generators.Xorshift1024star.nState];
|
||||||
|
@ -11,3 +12,4 @@ elsewhen sample(0,1) then
|
||||||
(r1024,state1024) := Modelica.Math.Random.Generators.Xorshift1024star.random(pre(state1024));
|
(r1024,state1024) := Modelica.Math.Random.Generators.Xorshift1024star.random(pre(state1024));
|
||||||
end when;
|
end when;
|
||||||
end System;
|
end System;
|
||||||
|
</pre>
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
class Monitor
|
class Monitor
|
||||||
InputReal x, y;
|
InputReal x, y;
|
||||||
OutputBoolean wy;
|
OutputBoolean wy;
|
||||||
|
@ -11,3 +12,4 @@ when edge(wz) then
|
||||||
wy := true;
|
wy := true;
|
||||||
end when;
|
end when;
|
||||||
end Monitor;
|
end Monitor;
|
||||||
|
</pre>
|
|
@ -1,5 +1,5 @@
|
||||||
Si consideri il seguente requisito:
|
Si consideri il seguente requisito:
|
||||||
RQ: Dopo 60 unità di tempo dall'inizio dell'esecuzione vale la seguente proprietà:
|
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)
|
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.
|
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 ?
|
Quale dei seguenti monitor meglio descrive il requisito RQ ?
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
class Monitor
|
class Monitor
|
||||||
InputReal x, y;
|
InputReal x, y;
|
||||||
OutputBoolean wy;
|
OutputBoolean wy;
|
||||||
|
@ -11,3 +12,4 @@ when edge(wz) then
|
||||||
wy := true;
|
wy := true;
|
||||||
end when;
|
end when;
|
||||||
end Monitor;
|
end Monitor;
|
||||||
|
</pre>
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
class Monitor
|
class Monitor
|
||||||
InputReal x, y;
|
InputReal x, y;
|
||||||
OutputBoolean wy;
|
OutputBoolean wy;
|
||||||
|
@ -6,9 +7,9 @@ initial equation
|
||||||
wy = false;
|
wy = false;
|
||||||
equation
|
equation
|
||||||
wz = (time > 60) or (delay(x, 10) > 0) or (y <= 0);
|
wz = (time > 60) or (delay(x, 10) > 0) or (y <= 0);
|
||||||
|
|
||||||
algorithm
|
algorithm
|
||||||
when edge(wz) then
|
when edge(wz) then
|
||||||
wy := true;
|
wy := true;
|
||||||
end when;
|
end when;
|
||||||
end Monitor;
|
end Monitor;
|
||||||
|
</pre>
|
|
@ -1,8 +1,10 @@
|
||||||
|
<pre>
|
||||||
model System
|
model System
|
||||||
Integer y; Real r1024;
|
Integer y;
|
||||||
|
Real r1024;
|
||||||
Integer state1024[Modelica.Math.Random.Generators.Xorshift1024star.nState];
|
Integer state1024[Modelica.Math.Random.Generators.Xorshift1024star.nState];
|
||||||
equation
|
equation
|
||||||
y = if (r1024 <= 0.3) then 0 else 1;
|
y = if (r1024 <= 0.3) then 1 else 0;
|
||||||
algorithm
|
algorithm
|
||||||
when initial() then
|
when initial() then
|
||||||
state1024 := Modelica.Math.Random.Generators.Xorshift1024star.initialState(614657, 30020);
|
state1024 := Modelica.Math.Random.Generators.Xorshift1024star.initialState(614657, 30020);
|
||||||
|
@ -11,3 +13,4 @@ elsewhen sample(0,1) then
|
||||||
(r1024,state1024) := Modelica.Math.Random.Generators.Xorshift1024star.random(pre(state1024));
|
(r1024,state1024) := Modelica.Math.Random.Generators.Xorshift1024star.random(pre(state1024));
|
||||||
end when;
|
end when;
|
||||||
end System;
|
end System;
|
||||||
|
</pre>
|
|
@ -1 +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.
|
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.
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
model System
|
model System
|
||||||
Integer y; Real r1024;
|
Integer y; Real r1024;
|
||||||
Integer state1024[Modelica.Math.Random.Generators.Xorshift1024star.nState];
|
Integer state1024[Modelica.Math.Random.Generators.Xorshift1024star.nState];
|
||||||
|
@ -11,3 +12,4 @@ elsewhen sample(0,1) then
|
||||||
(r1024,state1024) := Modelica.Math.Random.Generators.Xorshift1024star.random(pre(state1024));
|
(r1024,state1024) := Modelica.Math.Random.Generators.Xorshift1024star.random(pre(state1024));
|
||||||
end when;
|
end when;
|
||||||
end System;
|
end System;
|
||||||
|
</pre>
|
|
@ -1,9 +1,9 @@
|
||||||
|
<pre>
|
||||||
model System
|
model System
|
||||||
Integer y;
|
Integer y; Real r1024;
|
||||||
Real r1024;
|
|
||||||
Integer state1024[Modelica.Math.Random.Generators.Xorshift1024star.nState];
|
Integer state1024[Modelica.Math.Random.Generators.Xorshift1024star.nState];
|
||||||
equation
|
equation
|
||||||
y = if (r1024 <= 0.3) then 1 else 0;
|
y = if (r1024 <= 0.3) then 0 else 1;
|
||||||
algorithm
|
algorithm
|
||||||
when initial() then
|
when initial() then
|
||||||
state1024 := Modelica.Math.Random.Generators.Xorshift1024star.initialState(614657, 30020);
|
state1024 := Modelica.Math.Random.Generators.Xorshift1024star.initialState(614657, 30020);
|
||||||
|
@ -12,3 +12,4 @@ elsewhen sample(0,1) then
|
||||||
(r1024,state1024) := Modelica.Math.Random.Generators.Xorshift1024star.random(pre(state1024));
|
(r1024,state1024) := Modelica.Math.Random.Generators.Xorshift1024star.random(pre(state1024));
|
||||||
end when;
|
end when;
|
||||||
end System;
|
end System;
|
||||||
|
</pre>
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
class Monitor
|
class Monitor
|
||||||
|
|
||||||
InputReal x; // plant output
|
InputReal x; // plant output
|
||||||
|
@ -13,3 +14,4 @@ when edge(z) then
|
||||||
y := true;
|
y := true;
|
||||||
end when;
|
end when;
|
||||||
end Monitor;
|
end Monitor;
|
||||||
|
</pre>
|
|
@ -1,3 +1,3 @@
|
||||||
Si consideri il seguente requisito:
|
Si consideri il seguente requisito:
|
||||||
RQ: Durante l'esecuzione del programma (cioè per tutti gli istanti di tempo positivi) la variabile x è sempre nell'intervallo [0, 5].
|
RQ: Durante l'esecuzione del programma (cioè per tutti gli istanti di tempo positivi) la variabile x è sempre nell'intervallo [0, 5].
|
||||||
Quale dei seguenti monitor meglio descrive il requisito RQ ?
|
Quale dei seguenti monitor meglio descrive il requisito RQ ?
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
class Monitor
|
class Monitor
|
||||||
|
|
||||||
InputReal x; // plant output
|
InputReal x; // plant output
|
||||||
|
@ -13,3 +14,4 @@ when edge(z) then
|
||||||
y := true;
|
y := true;
|
||||||
end when;
|
end when;
|
||||||
end Monitor;
|
end Monitor;
|
||||||
|
</pre>
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
class Monitor
|
class Monitor
|
||||||
|
|
||||||
InputReal x; // plant output
|
InputReal x; // plant output
|
||||||
|
@ -13,3 +14,4 @@ when edge(z) then
|
||||||
y := true;
|
y := true;
|
||||||
end when;
|
end when;
|
||||||
end Monitor;
|
end Monitor;
|
||||||
|
</pre>
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
block MarkovChain
|
block MarkovChain
|
||||||
//external function myrandom() returns a random real number in [0, 1]
|
//external function myrandom() returns a random real number in [0, 1]
|
||||||
parameter Integer x0 = 0;
|
parameter Integer x0 = 0;
|
||||||
|
@ -16,3 +17,4 @@ then
|
||||||
end if;
|
end if;
|
||||||
end when;
|
end when;
|
||||||
end MarkovChain;
|
end MarkovChain;
|
||||||
|
</pre>
|
|
@ -1,4 +1,4 @@
|
||||||
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.
|
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.
|
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.
|
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?
|
Quale dei seguenti modelli Modelica modella correttamente il processo di sviluppo descritto sopra?
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
block MarkovChain
|
block MarkovChain
|
||||||
//external function myrandom() returns a random real number in [0, 1]
|
//external function myrandom() returns a random real number in [0, 1]
|
||||||
parameter Integer x0 = 0;
|
parameter Integer x0 = 0;
|
||||||
|
@ -16,3 +17,4 @@ then
|
||||||
end if;
|
end if;
|
||||||
end when;
|
end when;
|
||||||
end MarkovChain;
|
end MarkovChain;
|
||||||
|
</pre>
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
block MarkovChain
|
block MarkovChain
|
||||||
//external function myrandom() returns a random real number in [0, 1]
|
//external function myrandom() returns a random real number in [0, 1]
|
||||||
parameter Integer x0 = 0;
|
parameter Integer x0 = 0;
|
||||||
|
@ -18,3 +19,4 @@ then
|
||||||
end if;
|
end if;
|
||||||
end when;
|
end when;
|
||||||
end MarkovChain;
|
end MarkovChain;
|
||||||
|
</pre>
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
class Monitor
|
class Monitor
|
||||||
|
|
||||||
InputReal x, y, z; // plant output
|
InputReal x, y, z; // plant output
|
||||||
|
@ -12,3 +13,4 @@ when edge(wz) then
|
||||||
wy := true;
|
wy := true;
|
||||||
end when;
|
end when;
|
||||||
end Monitor;
|
end Monitor;
|
||||||
|
</pre>
|
|
@ -1,4 +1,4 @@
|
||||||
Si consideri il seguente requisito:
|
Si consideri il seguente requisito:
|
||||||
RQ: Dopo 50 unità di tempo dall'inizio dell'esecuzione vale la seguente proprietà:
|
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
|
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 ?
|
Quale dei seguenti monitor meglio descrive il requisito RQ ?
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
class Monitor
|
class Monitor
|
||||||
|
|
||||||
InputReal x, y, z; // plant output
|
InputReal x, y, z; // plant output
|
||||||
|
@ -12,3 +13,4 @@ when edge(wz) then
|
||||||
wy := true;
|
wy := true;
|
||||||
end when;
|
end when;
|
||||||
end Monitor;
|
end Monitor;
|
||||||
|
</pre>
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
class Monitor
|
class Monitor
|
||||||
|
|
||||||
InputReal x, y, z; // plant output
|
InputReal x, y, z; // plant output
|
||||||
|
@ -12,3 +13,4 @@ when edge(wz) then
|
||||||
wy := true;
|
wy := true;
|
||||||
end when;
|
end when;
|
||||||
end Monitor;
|
end Monitor;
|
||||||
|
</pre>
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
block MarkovChain
|
block MarkovChain
|
||||||
//external function myrandom() returns a random real number in [0, 1]
|
//external function myrandom() returns a random real number in [0, 1]
|
||||||
parameter Real x0 = 1;
|
parameter Real x0 = 1;
|
||||||
|
@ -19,3 +20,4 @@ else
|
||||||
end if;
|
end if;
|
||||||
end when;
|
end when;
|
||||||
end MarkovChain;
|
end MarkovChain;
|
||||||
|
</pre>
|
|
@ -1,2 +1,2 @@
|
||||||
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.
|
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.
|
Quale dei seguenti modelli Modelica modella correttamente l'environment descritto sopra.
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
block MarkovChain
|
block MarkovChain
|
||||||
//external function myrandom() returns a random real number in [0, 1]
|
//external function myrandom() returns a random real number in [0, 1]
|
||||||
parameter Real x0 = 1;
|
parameter Real x0 = 1;
|
||||||
|
@ -19,3 +20,4 @@ else
|
||||||
end if;
|
end if;
|
||||||
end when;
|
end when;
|
||||||
end MarkovChain;
|
end MarkovChain;
|
||||||
|
</pre>
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
block MarkovChain
|
block MarkovChain
|
||||||
//external function myrandom() returns a random real number in [0, 1]
|
//external function myrandom() returns a random real number in [0, 1]
|
||||||
parameter Real x0 = 1;
|
parameter Real x0 = 1;
|
||||||
|
@ -19,3 +20,4 @@ else
|
||||||
end if;
|
end if;
|
||||||
end when;
|
end when;
|
||||||
end MarkovChain;
|
end MarkovChain;
|
||||||
|
</pre>
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
block MarkovChain
|
block MarkovChain
|
||||||
//external function myrandom() returns a random real number in [0, 1]
|
//external function myrandom() returns a random real number in [0, 1]
|
||||||
parameter Real x0 = 0;
|
parameter Real x0 = 0;
|
||||||
|
@ -17,3 +18,4 @@ elsewhen sample(0, 1) then
|
||||||
end if;
|
end if;
|
||||||
end when;
|
end when;
|
||||||
end MarkovChain;
|
end MarkovChain;
|
||||||
|
</pre>
|
|
@ -1,2 +1,2 @@
|
||||||
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].
|
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.
|
Quale dei seguenti modelli Modelica modella meglio l'environment descritto sopra.
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
block MarkovChain
|
block MarkovChain
|
||||||
//external function myrandom() returns a random real number in [0, 1]
|
//external function myrandom() returns a random real number in [0, 1]
|
||||||
parameter Real x0 = 0;
|
parameter Real x0 = 0;
|
||||||
|
@ -17,3 +18,4 @@ elsewhen sample(0, 1) then
|
||||||
end if;
|
end if;
|
||||||
end when;
|
end when;
|
||||||
end MarkovChain;
|
end MarkovChain;
|
||||||
|
</pre>
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
block MarkovChain
|
block MarkovChain
|
||||||
//external function myrandom() returns a random real number in [0, 1]
|
//external function myrandom() returns a random real number in [0, 1]
|
||||||
parameter Real x0 = 0;
|
parameter Real x0 = 0;
|
||||||
|
@ -17,3 +18,4 @@ elsewhen sample(0, 1) then
|
||||||
end if;
|
end if;
|
||||||
end when;
|
end when;
|
||||||
end MarkovChain;
|
end MarkovChain;
|
||||||
|
</pre>
|
|
@ -1 +1 @@
|
||||||
Per ciascun requisito, dovremmo essere in grado di scrivere un inseme di test che può dimostrare che il sistema sviluppato soddisfa il requisito considerato.
|
Per ciascun requisito, dovremmo essere in grado di scrivere un inseme di test che può dimostrare che il sistema sviluppato soddisfa il requisito considerato.
|
|
@ -1 +1 @@
|
||||||
Quale delle seguenti frasi meglio descrive il criterio di "requirements verifiability" che è parte della "requirements validation activity".
|
Quale delle seguenti frasi meglio descrive il criterio di "requirements verifiability" che è parte della "requirements validation activity".
|
|
@ -1 +1 @@
|
||||||
Per ciascuna coppia di componenti, dovremmo essere in grado di scrivere un insieme di test che può dimostrare che l'interazione tra le componenti soddisfa tutti i requisiti di interfaccia.
|
Per ciascuna coppia di componenti, dovremmo essere in grado di scrivere un insieme di test che può dimostrare che l'interazione tra le componenti soddisfa tutti i requisiti di interfaccia.
|
|
@ -1 +1 @@
|
||||||
Per ciascuna componente del sistema, dovremmo essere in grado di scrivere un insieme di test che può dimostrare che essa soddisfa tutti i requisiti.
|
Per ciascuna componente del sistema, dovremmo essere in grado di scrivere un insieme di test che può dimostrare che essa soddisfa tutti i requisiti.
|
|
@ -1 +1 @@
|
||||||
Quale delle seguenti affermazioni è vera riguardo all'alpha testing ?
|
Quale delle seguenti affermazioni è vera riguardo all'alpha testing ?
|
|
@ -1 +1 @@
|
||||||
La variabile x è nell'intervallo [1, 4] oppure nell'intervallo [15, 20].
|
La variabile x è nell'intervallo [1, 4] oppure nell'intervallo [15, 20].
|
|
@ -1,4 +1,5 @@
|
||||||
Si consideri il monitor seguente che ritorna true appena il sistema viola il requisito monitorato.
|
Si consideri il monitor seguente che ritorna true appena il sistema viola il requisito monitorato.
|
||||||
|
<pre>
|
||||||
block Monitor
|
block Monitor
|
||||||
input Real x;
|
input Real x;
|
||||||
output Boolean y;
|
output Boolean y;
|
||||||
|
@ -12,4 +13,5 @@ when edge(w) then
|
||||||
y := true;
|
y := true;
|
||||||
end when;
|
end when;
|
||||||
end Monitor;
|
end Monitor;
|
||||||
|
</pre>
|
||||||
Quale delle seguenti affermazioni meglio descrive il requisito monitorato?
|
Quale delle seguenti affermazioni meglio descrive il requisito monitorato?
|
|
@ -1 +1 @@
|
||||||
La variabile x è nell'intervallo [1, 4] e fuori dall'intervallo [15, 20].
|
La variabile x è nell'intervallo [1, 4] e fuori dall'intervallo [15, 20].
|
|
@ -1 +1 @@
|
||||||
La variabile x è fuori dall'intervallo [1, 4] e fuori dall'intervallo [15, 20].
|
La variabile x è fuori dall'intervallo [1, 4] e fuori dall'intervallo [15, 20].
|
|
@ -1 +1 @@
|
||||||
Quali delle seguenti attività è parte del processo di validazione dei requisiti ?
|
Quali delle seguenti attività è parte del processo di validazione dei requisiti ?
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
block MarkovChain
|
block MarkovChain
|
||||||
//external function myrandom() returns a random real number in [0, 1]
|
//external function myrandom() returns a random real number in [0, 1]
|
||||||
parameter Integer x0 = 0;
|
parameter Integer x0 = 0;
|
||||||
|
@ -19,3 +20,4 @@ elsewhen sample(0, 1) then
|
||||||
end if;
|
end if;
|
||||||
end when;
|
end when;
|
||||||
end MarkovChain;
|
end MarkovChain;
|
||||||
|
</pre>
|
|
@ -1,2 +1,2 @@
|
||||||
L'environment di un sistema software è costituito da uno user che, ogni untià di tempo (ad esempio, un secondo) invia al sistema tre numeri: -1, 0, 1, con probabilità, rispettivamente, 0.2, 0.56, 0.24.
|
L'environment di un sistema software è costituito da uno user che, ogni untià di tempo (ad esempio, un secondo) invia al sistema tre numeri: -1, 0, 1, con probabilità, rispettivamente, 0.2, 0.56, 0.24.
|
||||||
Quale dei seguenti modelli Modelica modella correttamente l'environment descritto sopra.
|
Quale dei seguenti modelli Modelica modella correttamente l'environment descritto sopra.
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
block MarkovChain
|
block MarkovChain
|
||||||
//external function myrandom() returns a random real number in [0, 1]
|
//external function myrandom() returns a random real number in [0, 1]
|
||||||
parameter Integer x0 = 0;
|
parameter Integer x0 = 0;
|
||||||
|
@ -19,3 +20,4 @@ elsewhen sample(0, 1) then
|
||||||
end if;
|
end if;
|
||||||
end when;
|
end when;
|
||||||
end MarkovChain;
|
end MarkovChain;
|
||||||
|
</pre>
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
block MarkovChain
|
block MarkovChain
|
||||||
//external function myrandom() returns a random real number in [0, 1]
|
//external function myrandom() returns a random real number in [0, 1]
|
||||||
parameter Integer x0 = 0;
|
parameter Integer x0 = 0;
|
||||||
|
@ -19,3 +20,4 @@ elsewhen sample(0, 1) then
|
||||||
end if;
|
end if;
|
||||||
end when;
|
end when;
|
||||||
end MarkovChain;
|
end MarkovChain;
|
||||||
|
</pre>
|
|
@ -1 +1 @@
|
||||||
Testare l'interazione tra molte componenti (cioè integrazione di molte unità).
|
Testare l'interazione tra molte componenti (cioè integrazione di molte unità).
|
|
@ -1 +1 @@
|
||||||
Testare funzionalità di unità software individuali, oggetti, classi o metodi.
|
Testare funzionalità di unità software individuali, oggetti, classi o metodi.
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
class Monitor
|
class Monitor
|
||||||
|
|
||||||
InputReal x, y; // plant output
|
InputReal x, y; // plant output
|
||||||
|
@ -13,3 +14,4 @@ when edge(wz) then
|
||||||
wy := true;
|
wy := true;
|
||||||
end when;
|
end when;
|
||||||
end Monitor;
|
end Monitor;
|
||||||
|
</pre>
|
|
@ -1,3 +1,3 @@
|
||||||
Si consideri il seguente requisito:
|
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.
|
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 ?
|
Quale dei seguenti monitor meglio descrive il requisito RQ ?
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
class Monitor
|
class Monitor
|
||||||
|
|
||||||
InputReal x, y; // plant output
|
InputReal x, y; // plant output
|
||||||
|
@ -13,3 +14,4 @@ when edge(wz) then
|
||||||
wy := true;
|
wy := true;
|
||||||
end when;
|
end when;
|
||||||
end Monitor;
|
end Monitor;
|
||||||
|
</pre>
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
class Monitor
|
class Monitor
|
||||||
|
|
||||||
InputReal x, y; // plant output
|
InputReal x, y; // plant output
|
||||||
|
@ -13,3 +14,4 @@ when edge(wz) then
|
||||||
wy := true;
|
wy := true;
|
||||||
end when;
|
end when;
|
||||||
end Monitor;
|
end Monitor;
|
||||||
|
</pre>
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
class Monitor
|
class Monitor
|
||||||
InputReal x, y;
|
InputReal x, y;
|
||||||
OutputBoolean wy;
|
OutputBoolean wy;
|
||||||
|
@ -11,3 +12,4 @@ when edge(wz) then
|
||||||
wy := true;
|
wy := true;
|
||||||
end when;
|
end when;
|
||||||
end Monitor;
|
end Monitor;
|
||||||
|
</pre>
|
|
@ -1,5 +1,5 @@
|
||||||
Si consideri il seguente requisito:
|
Si consideri il seguente requisito:
|
||||||
RQ: Dopo 60 unità di tempo dall'inizio dell'esecuzione vale la seguente proprietà:
|
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.
|
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.
|
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 ?
|
Quale dei seguenti monitor meglio descrive il requisito RQ ?
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
class Monitor
|
class Monitor
|
||||||
InputReal x, y;
|
InputReal x, y;
|
||||||
OutputBoolean wy;
|
OutputBoolean wy;
|
||||||
|
@ -12,3 +13,4 @@ when edge(wz) then
|
||||||
wy := true;
|
wy := true;
|
||||||
end when;
|
end when;
|
||||||
end Monitor;
|
end Monitor;
|
||||||
|
</pre>
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
class Monitor
|
class Monitor
|
||||||
InputReal x, y;
|
InputReal x, y;
|
||||||
OutputBoolean wy;
|
OutputBoolean wy;
|
||||||
|
@ -11,3 +12,4 @@ when edge(wz) then
|
||||||
wy := true;
|
wy := true;
|
||||||
end when;
|
end when;
|
||||||
end Monitor;
|
end Monitor;
|
||||||
|
</pre>
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
block MarkovChain
|
block MarkovChain
|
||||||
//external function myrandom() returns a random real number in [0, 1]
|
//external function myrandom() returns a random real number in [0, 1]
|
||||||
parameter Integer x0 = 0;
|
parameter Integer x0 = 0;
|
||||||
|
@ -23,3 +24,4 @@ then
|
||||||
end if;
|
end if;
|
||||||
end when;
|
end when;
|
||||||
end MarkovChain;
|
end MarkovChain;
|
||||||
|
</pre>
|
|
@ -1,8 +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.
|
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.
|
||||||
Alla fine di ogni fase viene eseguita una batteria di tests. I risultati del testing possono essere:
|
Alla fine di ogni fase viene eseguita una batteria di tests. I risultati del testing possono essere:
|
||||||
a) si può passare alla fase successiva;
|
a) si può passare alla fase successiva;
|
||||||
b) bisogna ripetere la fase corrente;
|
b) bisogna ripetere la fase corrente;
|
||||||
c) bisogna rivedere il lavoro fatto nella fase precedente (reworking).
|
c) bisogna rivedere il lavoro fatto nella fase precedente (reworking).
|
||||||
Dai dati storici è noto che la probabilità del caso a) è 0.72, del caso b) è 0.18 e del caso c) è 0.1.
|
Dai dati storici è noto che la probabilità del caso a) è 0.72, del caso b) è 0.18 e del caso c) è 0.1.
|
||||||
Allo scopo di stimare attraverso una simulazione MonteCarlo il valore atteso del tempo di completamento del progetto viene realizzato un modello Modelica del processo di sviluppo descritto sopra.
|
Allo scopo di stimare attraverso una simulazione MonteCarlo il valore atteso del tempo di completamento del progetto viene realizzato un modello Modelica del processo di sviluppo descritto sopra.
|
||||||
Quale dei seguenti modelli Modelica modella correttamente il processo di sviluppo descritto sopra?
|
Quale dei seguenti modelli Modelica modella correttamente il processo di sviluppo descritto sopra?
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
block MarkovChain
|
block MarkovChain
|
||||||
//external function myrandom() returns a random real number in [0, 1]
|
//external function myrandom() returns a random real number in [0, 1]
|
||||||
parameter Integer x0 = 0;
|
parameter Integer x0 = 0;
|
||||||
|
@ -23,3 +24,4 @@ then
|
||||||
end if;
|
end if;
|
||||||
end when;
|
end when;
|
||||||
end MarkovChain;
|
end MarkovChain;
|
||||||
|
</pre>
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
block MarkovChain
|
block MarkovChain
|
||||||
//external function myrandom() returns a random real number in [0, 1]
|
//external function myrandom() returns a random real number in [0, 1]
|
||||||
parameter Integer x0 = 0;
|
parameter Integer x0 = 0;
|
||||||
|
@ -23,3 +24,4 @@ then
|
||||||
end if;
|
end if;
|
||||||
end when;
|
end when;
|
||||||
end MarkovChain;
|
end MarkovChain;
|
||||||
|
</pre>
|
|
@ -1,3 +1,4 @@
|
||||||
|
<pre>
|
||||||
block MarkovChain
|
block MarkovChain
|
||||||
//external function myrandom() returns a random real number in [0, 1]
|
//external function myrandom() returns a random real number in [0, 1]
|
||||||
parameter Real x0 = 0;
|
parameter Real x0 = 0;
|
||||||
|
@ -17,3 +18,4 @@ elsewhen sample(0, 1) then
|
||||||
end if;
|
end if;
|
||||||
end when;
|
end when;
|
||||||
end MarkovChain;
|
end MarkovChain;
|
||||||
|
</pre>
|
|
@ -1,2 +1,2 @@
|
||||||
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.
|
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.
|
Quale dei seguenti modelli Modelica modella meglio l'environment descritto sopra.
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue