diff options
author | Timotej Lazar <timotej.lazar@fri.uni-lj.si> | 2015-12-11 15:24:52 +0100 |
---|---|---|
committer | Timotej Lazar <timotej.lazar@fri.uni-lj.si> | 2015-12-11 16:11:15 +0100 |
commit | 3fb4420980af20c7859a5abf8873ae00d4f8612b (patch) | |
tree | 61ac5d5c91104a859b914a64013bb2bf95c943f0 | |
parent | fa39fe7bfedd0b2e615d369adb5b510ceb9b857f (diff) |
Rename a function
-rw-r--r-- | monkey/edits.py | 4 | ||||
-rw-r--r-- | prolog/util.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/monkey/edits.py b/monkey/edits.py index 7744fa2..223e159 100644 --- a/monkey/edits.py +++ b/monkey/edits.py @@ -19,7 +19,7 @@ import math from .action import expand, parse from .graph import Node -from prolog.util import Token, normalized, parse as prolog_parse, rename_vars, rename_vars_ast2, rename_vars_list, interesting_ranges, stringify, tokenize +from prolog.util import Token, normalized, parse as prolog_parse, rename_vars, rename_vars_ast, rename_vars_list, interesting_ranges, stringify, tokenize from .util import get_line, avg, logistic def get_edits_from_trace(trace, test, id): @@ -121,7 +121,7 @@ def get_edits_from_trace(trace, test, id): names = {} start_normal = rename_vars_list(start_tokens, names) end_normal = rename_vars_list(end_tokens, names) - norm_tree = rename_vars_ast2(start_tree, names) + norm_tree = rename_vars_ast(start_tree, names) add_edit(path, tuple(start_normal), tuple(end_normal), norm_tree) return edits, submissions, queries diff --git a/prolog/util.py b/prolog/util.py index 4b316d5..11a6f94 100644 --- a/prolog/util.py +++ b/prolog/util.py @@ -126,7 +126,7 @@ def rename_vars_list(tokens, names=None): # Rename variables in AST rooted at [root] to A0, A1, A2,… in order of # appearance. -def rename_vars_ast2(root, fixed_names=None): +def rename_vars_ast(root, fixed_names=None): if fixed_names is None: fixed_names = {} names = {} |