summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@fri.uni-lj.si>2015-10-13 15:59:25 +0200
committerTimotej Lazar <timotej.lazar@fri.uni-lj.si>2015-10-13 15:59:25 +0200
commitd90b9e5a0255086dd0147b5d15ec9a854f09170b (patch)
tree001a19773661289887999332b80421e5b64a0141
parentba122f03ee8f591859c8c276e580755615c4c299 (diff)
Update Prolog actions in sqlite_to_pg.py
-rw-r--r--readme.md2
-rw-r--r--scripts/sqlite_to_pg.py8
2 files changed, 5 insertions, 5 deletions
diff --git a/readme.md b/readme.md
index 8a00863..5ae9329 100644
--- a/readme.md
+++ b/readme.md
@@ -147,6 +147,6 @@ Robot:
- robot_stop()
Obsolete actions:
- - slva(query) # "solve all" from tuProlog
+ - slva(qry) # "solve all" from tuProlog
- hnt # hint button press
- tst(tot, pas) # test results (total / passed)
diff --git a/scripts/sqlite_to_pg.py b/scripts/sqlite_to_pg.py
index b148be6..2405f14 100644
--- a/scripts/sqlite_to_pg.py
+++ b/scripts/sqlite_to_pg.py
@@ -64,8 +64,8 @@ def _handle_trace_remove(trace, i):
def _handle_trace_solve(trace, i):
length = (trace[i] << 8) + trace[i+1]
js = {
- 'typ': 'slv',
- 'qry': trace[i+2:i+2+length].decode()
+ 'typ': 'prolog_solve',
+ 'query': trace[i+2:i+2+length].decode()
}
return js, i + 2 + length
@@ -86,10 +86,10 @@ def _handle_trace_test(trace, i):
return js, i + 2
def _handle_trace_next(trace, i):
- return {'typ': 'nxt'}, i
+ return {'typ': 'prolog_next'}, i
def _handle_trace_stop(trace, i):
- return {'typ': 'stp'}, i
+ return {'typ': 'prolog_stop'}, i
def _handle_trace_hint(trace, i):
return {'typ': 'hnt'}, i