summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--db/models.py1
-rw-r--r--monkey/__init__.py6
-rw-r--r--monkey/action.py3
-rw-r--r--monkey/edits.py4
-rw-r--r--prolog/engine.py1
5 files changed, 4 insertions, 11 deletions
diff --git a/db/models.py b/db/models.py
index eaf67d7..9edbec4 100644
--- a/db/models.py
+++ b/db/models.py
@@ -15,7 +15,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import collections
-import json
from . import get_connection, return_connection
diff --git a/monkey/__init__.py b/monkey/__init__.py
index db00493..ec09e62 100644
--- a/monkey/__init__.py
+++ b/monkey/__init__.py
@@ -14,12 +14,10 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-import math
import time
-import prolog.engine
-from prolog.util import Token, tokenize, rename_vars, stringify, parse, interesting_ranges, rename_vars_list
-from .util import damerau_levenshtein, PQueue
+from prolog.util import tokenize, rename_vars, stringify, parse, interesting_ranges, rename_vars_list
+from .util import PQueue
# Starting from [code], find a sequence of edits that transforms it into a
# correct predicate for [name]. The [test] function is used to test generated
diff --git a/monkey/action.py b/monkey/action.py
index 8a1e477..2ea311c 100644
--- a/monkey/action.py
+++ b/monkey/action.py
@@ -185,9 +185,6 @@ def expand(actions):
# some sample code
if __name__ == '__main__':
- import sys, os.path
- sys.path.append(os.path.dirname(os.path.realpath(__file__)) + '/..') # the parent directory is the app directory
-
from db.models import Problem, Solution
# print all problem ids
diff --git a/monkey/edits.py b/monkey/edits.py
index c8a645e..4774c9a 100644
--- a/monkey/edits.py
+++ b/monkey/edits.py
@@ -18,8 +18,8 @@ import collections
import math
from .action import expand, parse
-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
+from prolog.util import normalized, parse as prolog_parse, rename_vars, rename_vars_ast, rename_vars_list, interesting_ranges, stringify, tokenize
+from .util import avg, logistic
def get_edits_from_trace(trace, test, id):
submissions = set() # Program versions at 'test' actions.
diff --git a/prolog/engine.py b/prolog/engine.py
index 43991d4..780799e 100644
--- a/prolog/engine.py
+++ b/prolog/engine.py
@@ -16,7 +16,6 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-import collections
import html
import http.client
import json