summaryrefslogtreecommitdiff
path: root/prolog/engine.py
AgeCommit message (Collapse)Author
2015-08-11Load prolog/lib.pl during PrologEngine initTimotej Lazar
This is always required for the safe_goal/1 predicate.
2015-08-11Add a test to prolog.engine and clean up a bitTimotej Lazar
2015-08-11Remember correct answers to test queriesTimotej Lazar
2015-08-11Start refactoring testing codeTimotej Lazar
Testing logic now lives in PrologEngine. The engine now has some notion of problems and users, which is necessary to avoid repeatedly loading code into Prolog. TODO: - support library loading - fix PrologEngine.test for unusual cases (more than one solution, …) - memoization of correct answers
2015-08-11Keep token positions when lexingTimotej Lazar
This will allow us to match line edits to original source locations.
2015-08-11Rework prolog query engineTimotej Lazar
Use exceptions to report errors. Used in the server branch.
2015-08-11Clean up prolog.engineTimotej Lazar
Use findnsols/4 to allow limiting the number of solutions found by prolog.engine.query. Add a basic test case to prolog.engine.
2015-08-11Add PL_clear_exception to prolog/core.pyTimotej Lazar
2015-08-11Add call(predicate, arguments) to PrologEngineTimotej Lazar
Also disable error messages printed by swipl library.
2015-08-11Improve testing procedureTimotej Lazar
- only run queries with correct code once - use msort/2 to implement quicksort/3, used for some tests - correctly split programs in the presence of =.. operator
2015-08-11Initial commit for pymonkeyTimotej Lazar