summaryrefslogtreecommitdiff
path: root/prolog/util.py
AgeCommit message (Collapse)Author
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-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-11Simplify prolog.util.map_varsTimotej Lazar
Return a single mapping instead of generating all possible permutations. Only the first solution was used anyway, with little effect on found solutions.
2015-08-11Add some ad-hoc test code to prolog/util.pyTimotej Lazar
2015-08-11Move PQueue and utility functions into util.pyTimotej Lazar
2015-08-11Use immutable values in queueTimotej Lazar
2015-08-11Remove unnecessary check from prolog.util.composeTimotej Lazar
2015-08-11Fix two bugs in prolog.util.decomposeTimotej Lazar
2015-08-11Optimize prolog.util.stringify (~15% faster)Timotej Lazar
2015-08-11CleanupsTimotej Lazar
2015-08-11Some cleanups in main programTimotej Lazar
2015-08-11Initial commit for pymonkeyTimotej Lazar