summaryrefslogtreecommitdiff
path: root/prolog
AgeCommit message (Collapse)Author
2015-12-10Use the NLTK ParentedTree class for parser outputTimotej Lazar
2015-12-10Add copyright infoTimotej Lazar
2015-11-30Limit the number of inferences for Prolog queriesTimotej Lazar
2015-11-27Fix: response on /pengine/destroy_all is just "ok"Timotej Lazar
2015-11-18Disable predicate autoloading in Prolog engineTimotej Lazar
So that for example append/3 and member/2 are not accessible to users when solving conc/3 and memb/2.
2015-11-18Fix test code in prolog.engineTimotej Lazar
2015-11-04Fix prolog.engine.check_answersTimotej Lazar
Variables not specified in the set of expected answers are now ignored.
2015-10-05Add the prolog runner to be used for daemonisation in init scripts.Aleš Smodiš
2015-09-17Replace prolog.engine.ask_all with check_answersTimotej Lazar
When testing a program we can stop searching for new solutions after we have received a wrong one.
2015-09-10Update prolog engine (sasha's aux functions for prolog hint testing added).Aleksander Sadikov
2015-08-30Replaced localhost with 127.0.0.1Aleksander Sadikov
Windows takes a while to resolve the above.
2015-08-28Fix regex for stripping internal Prolog engine IDsTimotej Lazar
2015-08-27Strip trailing periods from Prolog queriesTimotej Lazar
2015-08-27Replace prolog.engine.run with ask_allTimotej Lazar
Creating and destroying the pengine should be handled somewhere else. This commit also removes query functionality from prolog.engine.create.
2015-08-27Fix a typo and add a commentTimotej Lazar
2015-08-26Use /destroy_all to abort and destroy penginesTimotej Lazar
Poorly documented, but works better than abort & destroy.
2015-08-21Add a hashbang line to the Prolog server scriptTimotej Lazar
2015-08-20Add a Prolog pengine server for running queriesTimotej Lazar
Run with "swipl main.pl".
2015-08-20Add prolog.engine.runTimotej Lazar
Collects all the answers to a given query within the specified timeout.
2015-08-20Simplify and privatize prolog.engine.get_messageTimotej Lazar
2015-08-20Add a timeout option for prolog.engine requestsTimotej Lazar
2015-08-20Replace strip_html function in prolog.engineTimotej Lazar
2015-08-11Print 'true' on success with no bindingsTimotej Lazar
2015-08-11Disable parser generationTimotej Lazar
The parser is currently unused.
2015-08-11Improve error & warning reportingTimotej Lazar
Hope it does not break anything.
2015-08-11Use json-html format for Prolog repliesTimotej Lazar
The only way to get residuals in CLP queries.
2015-08-11Merge prolog.engine.create{,_and_ask} functionsTimotej Lazar
2015-08-11Remove app-specific code from prolog.engineTimotej Lazar
2015-08-11Specify timeout when generating test casesTimotej Lazar
2015-08-11Silence warnings from ply.lex.lex()Timotej Lazar
2015-08-11Use Node class from monkey.util in parserTimotej Lazar
Also simplify rules for list expressions.
2015-08-11Add a parser for (simplified) PrologTimotej Lazar
2015-08-11Always lex , as COMMA, never as NAMETimotej Lazar
Also a testing loop to prolog.lexer.
2015-08-11Remove unused function from prolog.utilTimotej Lazar
2015-08-11Print a random failing test for incorrect solutionTimotej Lazar
2015-08-11prolog.engine: use .get() to access replyTimotej Lazar
In case SWI engine goes insane and returns a malformed reply (has happened). Also fix the test case in this file to use the new, classless methods.
2015-08-11Annotate tokens instead of splitting programTimotej Lazar
Instead of splitting the program by line numbers, do limited parsing (enough to distinguish , in "memb(X,Y)" from , in "a :- b, c."). Each token in the parsed program is annotated with rule and part number. Rewrite monkey.fix.step to take program as a sequence of annotated tokens instead of lists of lines and rules. Improve message passing to website.
2015-08-11Simplify calls to prolog.util.map_varsTimotej Lazar
2015-08-11Move normalize to prolog.utilTimotej Lazar
2015-08-11Clean up prolog.util.decomposeTimotej Lazar
2015-08-11Remove all trailing punctuation from linesTimotej Lazar
Remove trailing sequences of COMMAs and PERIODs when extracting edits from a trace. This is because subgoal order is rarely important in Prolog, and we don't care if the edit happened on the last line or not. This means that we treat for example "conc(A,B)," → "conc(A,B,C)." the same as "conc(A,B)" → "conc(A,B,C)".
2015-08-11Move monkey.prolog to root moduleTimotej Lazar
2015-08-11Move pymonkey stuff to monkey/Timotej Lazar
Importing pymonkey into webmonkey, let's see how this works.
2015-08-11Add prolog.engine.testTimotej Lazar
Depends on run_tests/3.
2015-08-11Improve error handling in PrologEngineTimotej Lazar
2015-08-11Delegate testing to a Prolog serverTimotej Lazar
... which obsoletes *a lot* of effort in making the testing procedure more robust in the past two years. Oh well. It seems to be the sanest way of coping with more than one simultaneous user (who could have predicted this use case?). The new way involves a PEngine server, and it seems to work quite well. Remember Knuth: premature optimization (as in ignoring possible solutions because they _might_ be to slow) is stupid. TODO: - library loading (again) - use of previous solution (again) - fix issues when converting non-ground terms to json Side note, constructivism works: in the past few days I have reached a much better but fundamentally ineffable intuition about Prolog, more so than in the past two years teaching it. So, fuck ITS and rather fix the schools by giving students something meaningful to do. Sigh.
2015-08-11PrologEngine: add load/unload functionsTimotej Lazar
2015-08-11Store test cases in PrologEngineTimotej Lazar
2015-08-11Add support for per-problem fact librariesTimotej Lazar
Each fact library is loaded at most once, so different problems can share the same library (e.g. family-relation problems).
2015-08-11Quote predicate name for abolish/1Timotej Lazar