Rev 12131 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
12130 | schaersvoo | 1 | # only usable in chroot 29/11/2017 |
12131 | schaersvoo | 2 | # see H4/logic/logica-1.nl/exos/src |
12130 | schaersvoo | 3 | |
4 | goback=0 |
||
5 | score=0 |
||
6 | extra=$empty |
||
7 | n=$counter |
||
8 | |||
9 | !if ? isin $(reply$n) |
||
10 | maxscore=0 |
||
11 | remark$n=$NOK |
||
12 | goback=0 |
||
13 | !exit |
||
14 | !endif |
||
15 | |||
16 | AAA=!singlespace $(reply$n) |
||
17 | GGG=!singlespace $(answer$n) |
||
18 | |||
19 | AAA=!replace internal empty by $ nil $ in $AAA |
||
20 | GGG=!replace internal empty by $ nil $ in $GGG |
||
21 | |||
22 | !for p in <->,<-->,<==>,<=> |
||
23 | AAA=!replace internal $p by @ in $AAA |
||
24 | GGG=!replace internal $p by @ in $GGG |
||
25 | AAA=!replace internal @@ by @ in $AAA |
||
26 | GGG=!replace internal @@ by @ in $GGG |
||
27 | !next p |
||
28 | # in orginele logic.lisp wordt 'eq' '\sim' ... vervangen door \Leftrightarrow !! |
||
29 | AAA=!replace internal @ by $ eq $ in $AAA |
||
30 | GGG=!replace internal @ by $ eq $ in $GGG |
||
31 | |||
32 | !for p in ==>,=>, -->, -> |
||
33 | AAA=!replace internal $p by @ in $AAA |
||
34 | GGG=!replace internal $p by @ in $GGG |
||
35 | AAA=!replace internal @@ by @ in $AAA |
||
36 | GGG=!replace internal @@ by @ in $GGG |
||
37 | !next p |
||
38 | # in logic.list implies ... -> \Rightarrow |
||
39 | AAA=!replace internal @ by $ implies $ in $AAA |
||
40 | GGG=!replace internal @ by $ implies $ in $GGG |
||
41 | |||
42 | |||
43 | test=!exec maxima load("logic/logic.lisp");\ |
||
44 | logic_equiv($AAA,$GGG);\ |
||
45 | tex1($AAA); |
||
46 | |||
47 | !if ljad isin $test |
||
48 | !for p=1 to $total_exos |
||
49 | textanswer$p=<span style="color:red">this module requires a <b>chrooted wims server</b>...</span> |
||
50 | !next p |
||
51 | goback=0 |
||
52 | counter=$total_exos |
||
53 | !exit |
||
54 | !endif |
||
55 | |||
56 | res=!line 2 of $test |
||
57 | tex_res=!line 3 of $test |
||
58 | tex_res=!replace internal " by $empty in $tex_res |
||
59 | tex_res=!replace internal \\ by \ in $tex_res |
||
60 | tex_res=!replace internal nil by $ \varnothing $ in $tex_res |
||
61 | tex_res=!mathmlmath \Huge{$tex_res} |
||
12131 | schaersvoo | 62 | |
12130 | schaersvoo | 63 | !if true isin $res |
64 | maxscore=1 |
||
65 | !else |
||
66 | maxscore=0 |
||
67 | !endif |
||
68 | |||
69 | !if $maxscore>0.9 |
||
70 | remark$n=$OK |
||
71 | !else |
||
72 | !if $maxscore>0.5 |
||
73 | remark$n=$BOK |
||
74 | !else |
||
75 | remark$n=$NOK |
||
76 | !endif |
||
77 | !endif |
||
78 | |||
12132 | schaersvoo | 79 | math=0 |
12130 | schaersvoo | 80 | reply$n=!append line $ <br />$tex_res $ to $(reply$n) |
81 | modulescore=$[$modulescore + $maxscore] |
||
82 | goback=0 |
||
83 | !exit |
||
84 |