1 | static void lispStandardEvaluators() { |
2 | // True |
3 | |
4 | addLispEvaluator("zivsiiacmvqrolto", main.<Lisp, Bool>f1_const(Bool.TRUE)); |
5 | |
6 | // Not (X) |
7 | |
8 | addLispEvaluator("wynynoujiakixjus", new F1<Lisp,Bool>() { |
9 | Bool get(Lisp l) { |
10 | ret !isTrue(callLispEvaluator(l.get(0))); |
11 | } |
12 | }); |
13 | |
14 | // X <> Y |
15 | addLispEvaluator("buahjsodljsaxvaq", new F1<Lisp,Bool>() { |
16 | Bool get(Lisp l) { |
17 | ret l.size() == 2 && neq(l.get(0), l.get(1)); |
18 | } |
19 | }); |
20 | |
21 | // X > Y |
22 | addLispEvaluator("wdbphzfoxwlrhdyl", new F1<Lisp,Bool>() { |
23 | Bool get(Lisp l) { |
24 | ret l.size() == 2 && eq(compareIfNotNull(lispToBigInt(l.get(0)), lispToBigInt(l.get(1))), 1); |
25 | } |
26 | }); |
27 | |
28 | // I don't know if (X) |
29 | addLispEvaluator("mzdvauejerzefagk", new F1<Lisp,Bool>() { |
30 | Bool get(Lisp l) { |
31 | ret l.size() == 1 && notKnownIf(l.get(0)); |
32 | } |
33 | }); |
34 | |
35 | // There is no statement with operator X. |
36 | addLispEvaluator("zhoulgsatpswstfa", new F1<Lisp,Bool>() { |
37 | Bool get(Lisp l) { |
38 | ret l.size() == 1 && !hasTruthWithHead(l.raw(0)); |
39 | } |
40 | }); |
41 | |
42 | // There is no answer to (X). |
43 | addLispEvaluator("xikyminwmeahxiws", new F1<Lisp,Bool>() { |
44 | Bool get(Lisp l) { |
45 | bool ok = l.size() == 1 && null == lispForward("pxavyqesoqyqbipb", l.get(0)); |
46 | print("Checking for answer to " + l.get(0) + " => " + ok); |
47 | ret ok; |
48 | } |
49 | }); |
50 | |
51 | // :- rules |
52 | for (final Lisp rule : lispTruth2("sicrogpdrtkiptun")) |
53 | addLispEvaluator(rule.raw(0), new F1<Lisp,Bool>() { |
54 | Bool get(Lisp l) { |
55 | ret l.isLeaf() && matchCondition_simple(rule.get(1)); |
56 | } |
57 | }); |
58 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1008126 |
Snippet name: | lispStandardEvaluators - these are the Lisp -> Bool evaluators |
Eternal ID of this version: | #1008126/8 |
Text MD5: | c5068f0ca21aac0a7b45902b0e2a1702 |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-04-29 19:57:57 |
Source code size: | 1615 bytes / 58 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 505 / 545 |
Version history: | 7 change(s) |
Referenced in: | [show references] |