summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-08-11Simplify monkey.edits.get_edits_from_tracesTimotej Lazar
2015-08-11Rename monkey.edits.edit_graph to trace_graphTimotej Lazar
2015-08-11CleanupsTimotej Lazar
2015-08-11Fix recording replacements (remove/insert)Timotej Lazar
2015-08-11Improve adding a rule in monkey.fix.stepTimotej Lazar
2015-08-11Improve codemirror markersTimotej Lazar
2015-08-11Improve monkey.fix.postprocessTimotej Lazar
2015-08-11Move normalize to prolog.utilTimotej Lazar
2015-08-11Ignore edits after the first correct versionTimotej Lazar
2015-08-11Clean up prolog.util.decomposeTimotej Lazar
2015-08-11Clean up monkey.fix.stepTimotej Lazar
2015-08-11Simplify get_edits_from_tracesTimotej Lazar
2015-08-11Minor fixes in monkey.testTimotej 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-11Small cleanupsTimotej Lazar
2015-08-11Clean up monkey.edits.get_pathsTimotej Lazar
2015-08-11Move monkey.prolog to root moduleTimotej Lazar
2015-08-11Clean up monkey.prolog.utilTimotej Lazar
2015-08-11Minor cleanups in monkey.monkeyTimotej Lazar
2015-08-11Initial error marking supportTimotej Lazar
Some cleanups in monkey.monkey. Need better namespacing. Basic postprocessing (merge edits to same line).
2015-08-11Pass auxiliary code to fix in monkey.testTimotej Lazar
2015-08-11Refactor monkey.monkey.fixTimotej Lazar
2015-08-11Remove a superfluous try/except blockTimotej Lazar
2015-08-11Reduce number of requests when testingTimotej Lazar
Allow running a query when creating the pengine. Also replace PrologEngine with a set of functions.
2015-08-11Find out pengine ID server-side in run_testsTimotej Lazar
2015-08-11Move get_aux_code to tutor/models.pyTimotej Lazar
2015-08-11Remove unused importsTimotej Lazar
2015-08-11Add support for hint generationTimotej Lazar
2015-08-11Pickle frequent edits when calling monkey.editsTimotej Lazar
Resulting file contains a 4-tuple with edit, line, submission and query frequencies. Each element of the tuple is a dictionary of the form <pid>: dictionary of frequencies The data in this file will be loaded by the tutor app and used for generating hints.
2015-08-11Move testing code from monkey.py to test.pyTimotej Lazar
Drop monkey/db.py and use Django models instead.
2015-08-11Add prolog.engine.testTimotej Lazar
Runs tests for the specified predicate on the given code and returns True if all tests succeed. Stop at first failure.
2015-08-11Rename monkey.prolog.engine.test to test_allTimotej Lazar
2015-08-11Rewrite monkey.action test code to use Django dbTimotej Lazar
2015-08-11Use relative imports in monkey modulesTimotej 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
2015-08-11Improve testing procedureTimotej Lazar
For each query: - generate a single solution - incorrect solution / timeout / other error → FAIL - generate (up to) ten solutions - more than one distinct solution found → FAIL - timeout is OK (a correct solution was found above) - if reached this point → PASS
2015-08-11Term.__iter__: create new Terms on each iterationTimotej Lazar
2015-08-11Mark solution predicates as static after loadingTimotej Lazar
This prevents incorrect student solutions from overwriting or adding to predicates in solution<n> modules.
2015-08-11Reorder functions in PrologEngineTimotej Lazar
Place functions for internal use at the end.
2015-08-11Use abolish/1 instead of erase/1 to remove clausesTimotej Lazar
Using erase/1 keeps the dynamic property for all defined predicates in the testing module. This overrides the clauses in solution modules. For example, if the user defines conc/3 in the solution for the dup/2 problem, the correct conc/3 would not get used even after unloading all user's clauses. This commit also plugs a couple of memory leaks by opening (and later discarding) a new Prolog frame in functions test, load_solution and mark_solved.
2015-08-11Improve handling of Prolog exceptionsTimotej Lazar
2015-08-11PrologEngine: disable autoloadTimotej Lazar
Turns out unix:dup/2 exists and is autoloaded if the student solution for dup/2 does not contain the predicate with this name; this can mess up subsequent tests.
2015-08-11Load prolog/lib.pl during PrologEngine initTimotej Lazar
This is always required for the safe_goal/1 predicate.