From 1effa504a63f579a16425f5c66026f0204733194 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Mon, 9 Feb 2015 16:35:00 +0100 Subject: Clean up monkey.fix.step --- monkey/edits.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'monkey/edits.py') diff --git a/monkey/edits.py b/monkey/edits.py index 480af5f..bf6560d 100644 --- a/monkey/edits.py +++ b/monkey/edits.py @@ -194,6 +194,11 @@ def get_edits_from_traces(traces): start = normalize(path[i-1], var_names) end = normalize(path[i], var_names) + # Disallow edits that insert a whole rule (a → … :- …). + # TODO improve edit_graph to handle this. + if 'FROM' in [t.type for t in end[:-1]]: + continue + # This should always succeed but check anyway. if start != end: edit = (start, end) -- cgit v1.2.1