mirror of
https://github.com/appinfosapienza/so-un-bot.git
synced 2025-05-06 14:19:38 +02:00
Refactor repo structure
This commit is contained in:
parent
36ac339086
commit
8fc89fbc03
1732 changed files with 3812 additions and 67 deletions
44
Data/Questions/ingsw/1122_1/correct.txt
Normal file
44
Data/Questions/ingsw/1122_1/correct.txt
Normal file
|
@ -0,0 +1,44 @@
|
|||
<pre>
|
||||
block FSA // Finite State Automaton
|
||||
|
||||
/* connector declarations outside this block:
|
||||
connector InputInteger = input Integer;
|
||||
connector OutputInteger = output Integer;
|
||||
*/
|
||||
|
||||
|
||||
InputInteger u; // external input
|
||||
OutputInteger x; // state
|
||||
parameter Real T = 1;
|
||||
|
||||
|
||||
algorithm
|
||||
|
||||
|
||||
when initial() then
|
||||
x := 0;
|
||||
|
||||
|
||||
elsewhen sample(0,T) then
|
||||
|
||||
|
||||
if (pre(x) == 0) and (pre(u) == 1) then x := 1;
|
||||
elseif (pre(x) == 0) and (pre(u) == 2) then x := 1;
|
||||
elseif (pre(x) == 1) and (pre(u) == 0) then x := 2;
|
||||
elseif (pre(x) == 1) and (pre(u) == 1) then x := 4;
|
||||
elseif (pre(x) == 1) and (pre(u) == 2) then x := 3;
|
||||
elseif (pre(x) == 2) and (pre(u) == 0) then x := 0;
|
||||
elseif (pre(x) == 2) and (pre(u) == 2) then x := 4;
|
||||
elseif (pre(x) == 3) and (pre(u) == 0) then x := 0;
|
||||
elseif (pre(x) == 3) and (pre(u) == 1) then x := 2;
|
||||
elseif (pre(x) == 3) and (pre(u) == 2) then x := 4;
|
||||
elseif (pre(x) == 4) and (pre(u) == 0) then x := 3;
|
||||
elseif (pre(x) == 4) and (pre(u) == 1) then x := 1;
|
||||
elseif (pre(x) == 4) and (pre(u) == 2) then x := 1;
|
||||
else x := pre(x); // default
|
||||
end if;
|
||||
|
||||
|
||||
end when;
|
||||
end FSA;
|
||||
</pre>
|
2
Data/Questions/ingsw/1122_1/quest.txt
Normal file
2
Data/Questions/ingsw/1122_1/quest.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
img=https://i.imgur.com/jS97TUd.png
|
||||
Quale dei seguenti modelli Modelica rappresenta lo state diagram in figura?
|
77
Data/Questions/ingsw/1122_1/wrong 1.txt
Normal file
77
Data/Questions/ingsw/1122_1/wrong 1.txt
Normal file
|
@ -0,0 +1,77 @@
|
|||
<pre>
|
||||
block FSA // Finite State Automaton
|
||||
|
||||
|
||||
|
||||
/* connector declarations outside this block:
|
||||
|
||||
connector InputInteger = input Integer;
|
||||
|
||||
connector OutputInteger = output Integer;
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
InputInteger u; // external input
|
||||
|
||||
OutputInteger x; // state
|
||||
|
||||
parameter Real T = 1;
|
||||
|
||||
|
||||
|
||||
algorithm
|
||||
|
||||
|
||||
|
||||
when initial() then
|
||||
|
||||
x := 0;
|
||||
|
||||
|
||||
|
||||
elsewhen sample(0,T) then
|
||||
|
||||
|
||||
|
||||
if (pre(x) == 0) and (pre(u) == 0) then x := 1;
|
||||
|
||||
elseif (pre(x) == 0) and (pre(u) == 1) then x := 1;
|
||||
|
||||
elseif (pre(x) == 0) and (pre(u) == 2) then x := 1;
|
||||
|
||||
elseif (pre(x) == 1) and (pre(u) == 0) then x := 2;
|
||||
|
||||
elseif (pre(x) == 1) and (pre(u) == 1) then x := 3;
|
||||
|
||||
elseif (pre(x) == 1) and (pre(u) == 2) then x := 0;
|
||||
|
||||
elseif (pre(x) == 2) and (pre(u) == 0) then x := 0;
|
||||
|
||||
elseif (pre(x) == 2) and (pre(u) == 1) then x := 3;
|
||||
|
||||
elseif (pre(x) == 2) and (pre(u) == 2) then x := 3;
|
||||
|
||||
elseif (pre(x) == 3) and (pre(u) == 0) then x := 4;
|
||||
|
||||
elseif (pre(x) == 3) and (pre(u) == 1) then x := 4;
|
||||
|
||||
elseif (pre(x) == 3) and (pre(u) == 2) then x := 0;
|
||||
|
||||
elseif (pre(x) == 4) and (pre(u) == 0) then x := 3;
|
||||
|
||||
elseif (pre(x) == 4) and (pre(u) == 1) then x := 3;
|
||||
|
||||
elseif (pre(x) == 4) and (pre(u) == 2) then x := 1;
|
||||
|
||||
else x := pre(x); // default
|
||||
|
||||
end if;
|
||||
|
||||
|
||||
|
||||
end when;
|
||||
|
||||
end FSA;
|
||||
</pre>
|
67
Data/Questions/ingsw/1122_1/wrong 2.txt
Normal file
67
Data/Questions/ingsw/1122_1/wrong 2.txt
Normal file
|
@ -0,0 +1,67 @@
|
|||
<pre>
|
||||
block FSA // Finite State Automaton
|
||||
|
||||
|
||||
|
||||
/* connector declarations outside this block:
|
||||
|
||||
connector InputInteger = input Integer;
|
||||
|
||||
connector OutputInteger = output Integer;
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
InputInteger u; // external input
|
||||
|
||||
OutputInteger x; // state
|
||||
|
||||
parameter Real T = 1;
|
||||
|
||||
|
||||
|
||||
algorithm
|
||||
|
||||
|
||||
|
||||
when initial() then
|
||||
|
||||
x := 0;
|
||||
|
||||
|
||||
|
||||
elsewhen sample(0,T) then
|
||||
|
||||
|
||||
|
||||
if (pre(x) == 0) and (pre(u) == 0) then x := 2;
|
||||
|
||||
elseif (pre(x) == 0) and (pre(u) == 1) then x := 3;
|
||||
|
||||
elseif (pre(x) == 1) and (pre(u) == 0) then x := 2;
|
||||
|
||||
elseif (pre(x) == 1) and (pre(u) == 1) then x := 4;
|
||||
|
||||
elseif (pre(x) == 2) and (pre(u) == 0) then x := 3;
|
||||
|
||||
elseif (pre(x) == 2) and (pre(u) == 1) then x := 1;
|
||||
|
||||
elseif (pre(x) == 2) and (pre(u) == 2) then x := 0;
|
||||
|
||||
elseif (pre(x) == 3) and (pre(u) == 1) then x := 2;
|
||||
|
||||
elseif (pre(x) == 4) and (pre(u) == 0) then x := 1;
|
||||
|
||||
elseif (pre(x) == 4) and (pre(u) == 1) then x := 1;
|
||||
|
||||
else x := pre(x); // default
|
||||
|
||||
end if;
|
||||
|
||||
|
||||
|
||||
end when;
|
||||
|
||||
end FSA;
|
||||
</pre>
|
Loading…
Add table
Add a link
Reference in a new issue