Libraryless. Click here for Pure Java version (4092L/27K/88K).
!752 static S code = [=[ [ if [X < is < a < guy] then [X < has < a < gun] ] [ mark < is < a < guy ] ]=]; p { new Prolog p; //p.showStuff = true; p.addClauses(snlToTree(code)); printStructure(p.solve(snlToTree("mark < has < a < X"))); // prints X = gun! }
Began life as a copy of #1002828
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: | #1002829 |
Snippet name: | Test class Prolog 3 (rule parsing) |
Eternal ID of this version: | #1002829/1 |
Text MD5: | 188a6988f06aac15bc2b3e28919e371d |
Transpilation MD5: | cdb981c98f98a7411b8d7b3e7b1b91dc |
Author: | stefan |
Category: | javax |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-02-29 03:32:09 |
Source code size: | 305 bytes / 19 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 566 / 605 |
Referenced in: | #1002830 - Test class Prolog 4 (more complex rule parsing) #3000382 - Answer for ferdie (>> t = 1, f = 0) |