summaryrefslogtreecommitdiff
path: root/monkey/edits.py
diff options
context:
space:
mode:
Diffstat (limited to 'monkey/edits.py')
-rw-r--r--monkey/edits.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/monkey/edits.py b/monkey/edits.py
index 73f692d..82e5066 100644
--- a/monkey/edits.py
+++ b/monkey/edits.py
@@ -18,7 +18,7 @@ import collections
import math
from .action import expand, parse
-from prolog.util import normalized, parse as prolog_parse, rename_vars, rename_vars_ast, rename_vars_list, interesting_ranges, stringify, tokenize
+from prolog.util import normalized, parse as prolog_parse, rename_vars_ast, rename_vars_list, interesting_ranges, stringify, tokenize
from .util import avg, logistic
def get_edits_from_trace(trace, test, id):
@@ -142,10 +142,10 @@ def get_edits_from_solutions(solutions, test):
# Update submission/query counters (use normalized variables).
for code, correct in trace_submissions:
- code = stringify(rename_vars(tokenize(code)))
+ code = stringify(rename_vars_list(tokenize(code)))
submissions[(code, correct)].add(uid)
for query in trace_queries:
- code = stringify(rename_vars(tokenize(query)))
+ code = stringify(rename_vars_list(tokenize(query)))
queries[code] += 1
# Discard edits that only occur in one trace.
@@ -232,7 +232,7 @@ if __name__ == '__main__':
if p.identifier in used_predicate_identifiers])
# Check for cached results.
- normal_code = stringify(rename_vars(tokenize(code)))
+ normal_code = stringify(rename_vars_list(tokenize(code)))
code_key = (normal_code, tuple(dependencies))
if code_key not in test_results[pid]:
aux_code = '\n' + solutions_for_problems(problem.language, dependencies) + '\n' + facts