From bc92afa5594ce57a17ea68db14a062207f12c627 Mon Sep 17 00:00:00 2001 From: Tim Vieira Date: Tue, 16 Jul 2013 23:49:50 -0400 Subject: [PATCH] anf file required. --- src/Dyna/Backend/Python/interpreter.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Dyna/Backend/Python/interpreter.py b/src/Dyna/Backend/Python/interpreter.py index b154541..b438f63 100644 --- a/src/Dyna/Backend/Python/interpreter.py +++ b/src/Dyna/Backend/Python/interpreter.py @@ -234,7 +234,8 @@ class Interpreter(object): self.emit(*e) def gbc(self, fn, *args): - # TODO: need to distinguish `unknown` from `null` + # TODO: need to distinguish `unknown` from `null` when we move to mixed + # chaining. head = self.build(fn, *args) @@ -269,10 +270,10 @@ class Interpreter(object): env = imp.load_source('dynamically_loaded_module', filename) anf = {} - if path(filename + '.anf').exists(): # XXX: should have codegen provide this in plan.py - with file(filename + '.anf') as f: - for x in read_anf(f.read()): - anf[x.ruleix] = x + assert path(filename + '.anf').exists() # XXX: codegen should put this is plan.py + with file(filename + '.anf') as f: + for x in read_anf(f.read()): + anf[x.ruleix] = x for k,v in [('chart', self.chart), ('build', self.build), -- 2.50.1