move legacy code to separate branch

This commit is contained in:
Marco Realacci 2025-01-17 21:06:51 +01:00
parent 68a30c8ee6
commit 11b4c48c3a
3528 changed files with 14477 additions and 53258 deletions

View file

@ -1,27 +0,0 @@
name: Update bot data
# Configures this workflow to run every time a change is pushed to the branch called `release`.
on:
push:
branches: ['main']
jobs:
validate-questions:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Validate questions
run: python scripts/validate_questions.py
shell: sh
update-data:
runs-on: ubuntu-latest
steps:
- name: Configure custom DNS resolver
run: echo "nameserver 1.1.1.1" | sudo tee /etc/resolv.conf
- name: Call webhook
run: curl -X POST ${{secrets.DEPLOY_WEBHOOK}}

View file

@ -1,15 +0,0 @@
name: Validate questions
# Configures this workflow to run every time a change is pushed to the branch called `release`.
on: [pull_request]
jobs:
validate-questions:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Validate questions
run: python scripts/validate_questions.py
shell: sh

View file

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 83 KiB

View file

Before

Width:  |  Height:  |  Size: 506 KiB

After

Width:  |  Height:  |  Size: 506 KiB

View file

Before

Width:  |  Height:  |  Size: 1 MiB

After

Width:  |  Height:  |  Size: 1 MiB

View file

Before

Width:  |  Height:  |  Size: 353 KiB

After

Width:  |  Height:  |  Size: 353 KiB

View file

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 76 KiB

View file

Before

Width:  |  Height:  |  Size: 214 KiB

After

Width:  |  Height:  |  Size: 214 KiB

View file

Before

Width:  |  Height:  |  Size: 87 KiB

After

Width:  |  Height:  |  Size: 87 KiB

View file

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 83 KiB

View file

Before

Width:  |  Height:  |  Size: 216 KiB

After

Width:  |  Height:  |  Size: 216 KiB

View file

Before

Width:  |  Height:  |  Size: 215 KiB

After

Width:  |  Height:  |  Size: 215 KiB

View file

Before

Width:  |  Height:  |  Size: 104 KiB

After

Width:  |  Height:  |  Size: 104 KiB

View file

Before

Width:  |  Height:  |  Size: 104 KiB

After

Width:  |  Height:  |  Size: 104 KiB

View file

Before

Width:  |  Height:  |  Size: 124 KiB

After

Width:  |  Height:  |  Size: 124 KiB

View file

Before

Width:  |  Height:  |  Size: 310 KiB

After

Width:  |  Height:  |  Size: 310 KiB

View file

Before

Width:  |  Height:  |  Size: 251 KiB

After

Width:  |  Height:  |  Size: 251 KiB

View file

Before

Width:  |  Height:  |  Size: 141 KiB

After

Width:  |  Height:  |  Size: 141 KiB

View file

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View file

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View file

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View file

@ -1,11 +1,11 @@
img=https://unspectacular-subdi.000webhostapp.com/0120_domanda_0.png
La transition coverage di un insieme di test cases (cioè sequenze di inputs) per uno state diagram è la percentuale di transizioni (archi nel grafo dello state diagram) percorsi almeno una volta.
Si consideri lo state diagram in figura
ed il seguente insieme di test cases:
Test case 1: act2 act1
Test case 2: act1 act0 act1 act0 act2
Test case 3: act0 act2 act2 act1
img=https://unspectacular-subdi.000webhostapp.com/0120_domanda_0.png
La transition coverage di un insieme di test cases (cioè sequenze di inputs) per uno state diagram è la percentuale di transizioni (archi nel grafo dello state diagram) percorsi almeno una volta.
Si consideri lo state diagram in figura
ed il seguente insieme di test cases:
Test case 1: act2 act1
Test case 2: act1 act0 act1 act0 act2
Test case 3: act0 act2 act2 act1
Quale delle seguenti è la migliore stima della transition coverage per i test cases di cui sopra?

View file

@ -1,17 +1,17 @@
<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 <pre 0.5*x) or (y > 0.7*x)) ;
algorithm
when edge(wz) then
wy := true;
end when;
end Monitor;
<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 <pre 0.5*x) or (y > 0.7*x)) ;
algorithm
when edge(wz) then
wy := true;
end when;
end Monitor;
</pre>

View file

@ -1,3 +1,3 @@
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.
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 ?

View file

@ -1,17 +1,17 @@
<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>
<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>

View file

@ -1,17 +1,17 @@
<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>
<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>

View file

@ -1,16 +1,16 @@
<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>
<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>

View file

@ -1,4 +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
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 ?

View file

@ -1,16 +1,16 @@
<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>
<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>

View file

@ -1,16 +1,16 @@
<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>
<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>

View file

@ -1,6 +1,6 @@
img=https://unspectacular-subdi.000webhostapp.com/0120_domanda_12.png
Si consideri il processo software con due fasi (0 ed 1) rappresentato con la Markov chain in figura. Lo stato iniziale 0 e p è in (0, 1). Il costo dello stato (fase) x è c(x). La fase 0 è la fase di design, che ha probabilità p di dover essere ripetuta causa errori. La fase 1 rappreenta il completamento del processo software, e quindi c(1) = 0.
Il costo di una istanza del processo software descritto sopra è la somma dei costi degli stati attraversati (tenendo presente che si parte sempre dallo stato 0.
Quindi il costo C(X) della sequenza di stati X = x(0), x(1), x(2), .... è C(X) = c(x(0)) + c(x(1)) + c(x(2)) + ...
Ad esempio se X = 0, 1 abbiamo C(X) = c(0) + c(1) = c(0) (poichè c(1) = 0).
img=https://unspectacular-subdi.000webhostapp.com/0120_domanda_12.png
Si consideri il processo software con due fasi (0 ed 1) rappresentato con la Markov chain in figura. Lo stato iniziale 0 e p è in (0, 1). Il costo dello stato (fase) x è c(x). La fase 0 è la fase di design, che ha probabilità p di dover essere ripetuta causa errori. La fase 1 rappreenta il completamento del processo software, e quindi c(1) = 0.
Il costo di una istanza del processo software descritto sopra è la somma dei costi degli stati attraversati (tenendo presente che si parte sempre dallo stato 0.
Quindi il costo C(X) della sequenza di stati X = x(0), x(1), x(2), .... è C(X) = c(x(0)) + c(x(1)) + c(x(2)) + ...
Ad esempio se X = 0, 1 abbiamo C(X) = c(0) + c(1) = c(0) (poichè c(1) = 0).
Quale delle seguenti formule calcola il valore atteso del costo per completare il processo software di cui sopra

View file

@ -1,9 +1,9 @@
Un test oracle per un programma P è una funzione booleana che ha come inputs gli inputs ed outputs di P e ritorna true se e solo se il valore di output di P (con i dati inputs) è quello atteso dalle specifiche.
Si consideri la seguente funzione C:
-----------
int f(int x, int y) {
int z = x;
while ( (x <= z) && (z <= y) ) { z = z + 1; }
return (z);
}
Un test oracle per un programma P è una funzione booleana che ha come inputs gli inputs ed outputs di P e ritorna true se e solo se il valore di output di P (con i dati inputs) è quello atteso dalle specifiche.
Si consideri la seguente funzione C:
-----------
int f(int x, int y) {
int z = x;
while ( (x <= z) && (z <= y) ) { z = z + 1; }
return (z);
}
Siano x, y, gli inputs del programma (f nel nostro caso) e z l'output. Assumendo il programma corretto, quale delle seguenti funzioni booleane F(x, y, z) è un test oracle per la funzione f.

View file

@ -1,6 +1,6 @@
Il partition coverage di un insieme di test cases è la percentuale di elementi della partition inclusi nei test cases. La partition è una partizione finita dell'insieme di input della funzione che si sta testando.
Si consideri la seguente funzione C:
int f1(int x) { return (x + 7); }
Si vuole testare la funzione f1(). A tal fine l'insieme degli interi viene partizionato come segue:
{(-inf, -101], [-100, -1], {0}, [1, 500], [501, +inf)}
Il partition coverage di un insieme di test cases è la percentuale di elementi della partition inclusi nei test cases. La partition è una partizione finita dell'insieme di input della funzione che si sta testando.
Si consideri la seguente funzione C:
int f1(int x) { return (x + 7); }
Si vuole testare la funzione f1(). A tal fine l'insieme degli interi viene partizionato come segue:
{(-inf, -101], [-100, -1], {0}, [1, 500], [501, +inf)}
Quale dei seguenti test cases consegue una partition coverage del 100% ?

View file

@ -1,2 +1,2 @@
"Ogni giorno, per ciascuna clinica, il sistema genererà una lista dei pazienti che hanno un appuntamento quel giorno."
"Ogni giorno, per ciascuna clinica, il sistema genererà una lista dei pazienti che hanno un appuntamento quel giorno."
La frase precedente è un esempio di:

Some files were not shown because too many files have changed in this diff Show more