experiment_results.json 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368
  1. {
  2. "experiments": [
  3. {
  4. "name": "SUCC (后继函数)",
  5. "tests": [
  6. {
  7. "input": "3",
  8. "expected": "4",
  9. "actual": "4",
  10. "passed": true
  11. },
  12. {
  13. "input": "4",
  14. "expected": "5",
  15. "actual": "5",
  16. "passed": true
  17. },
  18. {
  19. "input": "7",
  20. "expected": "8",
  21. "actual": "8",
  22. "passed": true
  23. },
  24. {
  25. "input": "10",
  26. "expected": "11",
  27. "actual": "11",
  28. "passed": true
  29. },
  30. {
  31. "input": "15",
  32. "expected": "16",
  33. "actual": "16",
  34. "passed": true
  35. },
  36. {
  37. "input": "42",
  38. "expected": "43",
  39. "actual": "43",
  40. "passed": true
  41. },
  42. {
  43. "input": "127",
  44. "expected": "128",
  45. "actual": "128",
  46. "passed": true
  47. },
  48. {
  49. "input": "255",
  50. "expected": "256",
  51. "actual": "256",
  52. "passed": true
  53. }
  54. ],
  55. "passed": 8,
  56. "total": 8
  57. },
  58. {
  59. "name": "TRUE/FALSE (Church 布尔值)",
  60. "tests": [
  61. {
  62. "input": "TRUE(A='sun', B='moon')",
  63. "expected": "sun",
  64. "actual": "sun",
  65. "passed": true
  66. },
  67. {
  68. "input": "FALSE(A='sun', B='moon')",
  69. "expected": "moon",
  70. "actual": "moon",
  71. "passed": true
  72. },
  73. {
  74. "input": "TRUE(A='hello', B='world')",
  75. "expected": "hello",
  76. "actual": "hello",
  77. "passed": true
  78. },
  79. {
  80. "input": "FALSE(A='hello', B='world')",
  81. "expected": "world",
  82. "actual": "world",
  83. "passed": true
  84. },
  85. {
  86. "input": "TRUE(A='42', B='0')",
  87. "expected": "42",
  88. "actual": "42",
  89. "passed": true
  90. },
  91. {
  92. "input": "FALSE(A='42', B='0')",
  93. "expected": "0",
  94. "actual": "0",
  95. "passed": true
  96. },
  97. {
  98. "input": "TRUE(A='alpha', B='omega')",
  99. "expected": "alpha",
  100. "actual": "alpha",
  101. "passed": true
  102. },
  103. {
  104. "input": "FALSE(A='alpha', B='omega')",
  105. "expected": "omega",
  106. "actual": "omega",
  107. "passed": true
  108. }
  109. ],
  110. "passed": 8,
  111. "total": 8
  112. },
  113. {
  114. "name": "AND/OR/NOT (逻辑运算)",
  115. "tests": [
  116. {
  117. "input": "AND(TRUE, TRUE)",
  118. "expected": "TRUE",
  119. "actual": "TRUE",
  120. "passed": true
  121. },
  122. {
  123. "input": "AND(TRUE, FALSE)",
  124. "expected": "FALSE",
  125. "actual": "FALSE",
  126. "passed": true
  127. },
  128. {
  129. "input": "AND(FALSE, TRUE)",
  130. "expected": "FALSE",
  131. "actual": "FALSE",
  132. "passed": true
  133. },
  134. {
  135. "input": "AND(FALSE, FALSE)",
  136. "expected": "FALSE",
  137. "actual": "FALSE",
  138. "passed": true
  139. },
  140. {
  141. "input": "OR(TRUE, TRUE)",
  142. "expected": "TRUE",
  143. "actual": "TRUE",
  144. "passed": true
  145. },
  146. {
  147. "input": "OR(TRUE, FALSE)",
  148. "expected": "TRUE",
  149. "actual": "TRUE",
  150. "passed": true
  151. },
  152. {
  153. "input": "OR(FALSE, TRUE)",
  154. "expected": "TRUE",
  155. "actual": "TRUE",
  156. "passed": true
  157. },
  158. {
  159. "input": "OR(FALSE, FALSE)",
  160. "expected": "FALSE",
  161. "actual": "FALSE",
  162. "passed": true
  163. },
  164. {
  165. "input": "NOT(TRUE)",
  166. "expected": "FALSE",
  167. "actual": "FALSE",
  168. "passed": true
  169. },
  170. {
  171. "input": "NOT(FALSE)",
  172. "expected": "TRUE",
  173. "actual": "TRUE",
  174. "passed": true
  175. }
  176. ],
  177. "passed": 10,
  178. "total": 10
  179. },
  180. {
  181. "name": "IF-THEN-ELSE (条件分支)",
  182. "tests": [
  183. {
  184. "input": "condition=TRUE, then='accept', else='reject'",
  185. "expected": "accept",
  186. "actual": "accept",
  187. "passed": true
  188. },
  189. {
  190. "input": "condition=FALSE, then='accept', else='reject'",
  191. "expected": "reject",
  192. "actual": "reject",
  193. "passed": true
  194. },
  195. {
  196. "input": "condition=TRUE, then='100', else='-1'",
  197. "expected": "100",
  198. "actual": "100",
  199. "passed": true
  200. },
  201. {
  202. "input": "condition=FALSE, then='100', else='-1'",
  203. "expected": "-1",
  204. "actual": "-1",
  205. "passed": true
  206. }
  207. ],
  208. "passed": 4,
  209. "total": 4
  210. },
  211. {
  212. "name": "PAIR/FST/SND (有序对)",
  213. "tests": [
  214. {
  215. "input": "PAIR(10, 20)",
  216. "expected": "(10, 20)",
  217. "actual": "(10, 20)",
  218. "passed": true
  219. },
  220. {
  221. "input": "FST((5, 8))",
  222. "expected": "5",
  223. "actual": "5",
  224. "passed": true
  225. },
  226. {
  227. "input": "SND((5, 8))",
  228. "expected": "8",
  229. "actual": "8",
  230. "passed": true
  231. },
  232. {
  233. "input": "FST(PAIR(alpha, beta))",
  234. "expected": "alpha",
  235. "actual": "alpha",
  236. "passed": true
  237. },
  238. {
  239. "input": "SND(PAIR(alpha, beta))",
  240. "expected": "beta",
  241. "actual": "beta",
  242. "passed": true
  243. }
  244. ],
  245. "passed": 5,
  246. "total": 5
  247. },
  248. {
  249. "name": "函数组合 (DOUBLE ∘ SUCC)",
  250. "tests": [
  251. {
  252. "input": "DOUBLE(SUCC(0))",
  253. "expected": "2",
  254. "actual": "2",
  255. "passed": true
  256. },
  257. {
  258. "input": "DOUBLE(SUCC(1))",
  259. "expected": "4",
  260. "actual": "4",
  261. "passed": true
  262. },
  263. {
  264. "input": "DOUBLE(SUCC(3))",
  265. "expected": "8",
  266. "actual": "8",
  267. "passed": true
  268. },
  269. {
  270. "input": "DOUBLE(SUCC(5))",
  271. "expected": "12",
  272. "actual": "12",
  273. "passed": true
  274. },
  275. {
  276. "input": "DOUBLE(SUCC(10))",
  277. "expected": "22",
  278. "actual": "22",
  279. "passed": true
  280. }
  281. ],
  282. "passed": 5,
  283. "total": 5
  284. },
  285. {
  286. "name": "FACTORIAL (递归/Y 组合子)",
  287. "tests": [
  288. {
  289. "input": "2!",
  290. "expected": "2",
  291. "actual": "2",
  292. "passed": true
  293. },
  294. {
  295. "input": "4!",
  296. "expected": "24",
  297. "actual": "24",
  298. "passed": true
  299. },
  300. {
  301. "input": "6!",
  302. "expected": "720",
  303. "actual": "720",
  304. "passed": true
  305. },
  306. {
  307. "input": "7!",
  308. "expected": "5040",
  309. "actual": "5040",
  310. "passed": true
  311. }
  312. ],
  313. "passed": 4,
  314. "total": 4
  315. },
  316. {
  317. "name": "CHURCH 数 (f^n(x))",
  318. "tests": [
  319. {
  320. "input": "add1^4(0)",
  321. "expected": "4",
  322. "actual": "4",
  323. "passed": true
  324. },
  325. {
  326. "input": "add1^5(0)",
  327. "expected": "5",
  328. "actual": "5",
  329. "passed": true
  330. },
  331. {
  332. "input": "add1^7(0)",
  333. "expected": "7",
  334. "actual": "7",
  335. "passed": true
  336. },
  337. {
  338. "input": "double^1(1)",
  339. "expected": "2",
  340. "actual": "2",
  341. "passed": true
  342. },
  343. {
  344. "input": "double^2(1)",
  345. "expected": "4",
  346. "actual": "4",
  347. "passed": true
  348. },
  349. {
  350. "input": "double^3(1)",
  351. "expected": "8",
  352. "actual": "8",
  353. "passed": true
  354. },
  355. {
  356. "input": "double^5(1)",
  357. "expected": "32",
  358. "actual": "32",
  359. "passed": true
  360. }
  361. ],
  362. "passed": 7,
  363. "total": 7
  364. }
  365. ],
  366. "total_passed": 51,
  367. "total_tests": 51
  368. }