summaryrefslogtreecommitdiff
path: root/server/prolog_session.py
AgeCommit message (Collapse)Author
2016-01-05Factor common code out of PrologSession.{hint,run_for_user}Timotej Lazar
2016-01-05PrologSession: only add definitions of predicates that appear in program ↵Timotej Lazar
when testing
2015-12-23Prolog: pass aux. code to problem's test functionTimotej Lazar
This allows us to simplify individual problem test functions.
2015-12-11Only try monkey.fix if we have edits for this problemTimotej Lazar
2015-12-11Use a more general method for extracting editsTimotej Lazar
This is a large overhaul of monkey code. Before, only edits within individual lines were tracked, which required a Prolog-specific method for splitting a program into a list of lines for every rule. In this version, modifications can be tracked within arbitrary code ranges. Ranges to be tracked are determined by selecting "interesting" subtrees in the AST of the starting code version. The new method is simpler, less language-dependent and easier to extend. The downside is that a program must be syntactically correct before we can attempt to fix it (the previous approach could handle programs with syntax errors in some cases). This commit also integrates a call to monkey.fix in prolog_session.hint, by running it if no other hint is found.
2015-12-10Add copyright infoTimotej Lazar
2015-11-18Handle Prolog engine exceptions in PrologSessionTimotej Lazar
2015-10-16Record solved problems in databaseTimotej Lazar
2015-10-15Store identifiers instead of IDs in Problem modelTimotej Lazar
2015-10-06Test user's program before looking for hintsTimotej Lazar
2015-10-04Unification of language session implementations. Added load_problem and ↵Aleš Smodiš
end_problem actions so handlers get appropriately created and destroyed upon loading and unloading the problem solving screen.
2015-09-22Oops, overzealous copy/pasteTimotej Lazar
2015-09-22Create the hint-list in individual test functionsTimotej Lazar
This will allow us to add more hints, for example "did you know?"-type information when the program is correct.
2015-09-11Pass a list of solved problems to Prolog hint/testTimotej Lazar
This replaces the session parameter that was passed before but not used. Especially in the hint functions it will be useful in some cases to handle user's current code, previous solutions, and the facts library separately.
2015-09-11s/hint_defs/hint_type/gTimotej Lazar
2015-09-10Add Hint classes for normal and sequence hintsTimotej Lazar
2015-09-03Pass the session object to test and hint functionsTimotej Lazar
2015-08-31s/Problem.identifier()/Problem.get_identifier()Timotej Lazar
2015-08-28Handle test results as a static hintTimotej Lazar
2015-08-28Add a hint service for PrologTimotej Lazar
2015-08-28Destroy the Prolog engine when ending a queryTimotej Lazar
2015-08-27Remove unneeded importTimotej Lazar
2015-08-27Add test service to wsgi_serverTimotej Lazar
This calls the test function defined in common.py for the given problem.
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-26Implemented activity service (auto-saving of traces and solutions).Aleš Smodiš
2015-08-25Wait with updating solutions until the code is done.Aleš Smodiš
2015-08-25Work on handling activity trace.Aleš Smodiš
2015-08-25Implemented methods to fetch a list of available problems and the problem ↵Aleš Smodiš
description. JavaScript no longer parses pythonic problem descriptions, instead they are loaded by server and JSONized.
2015-08-24Split the development into daemon and wsgi_server.Aleš Smodiš
Implemented basic infrastructure for daemon (Prolog), and partial support for services in wsgi_server.