def run_file(self, fname, run_untranslated=True): ast = parse_file(fname) env = ToplevelEnv() env.globalconfig.load(ast) def interp_w(): val = interpret_module(ast, env) return val if run_untranslated: interp_w() ast = parse_file(fname) self.meta_interp(interp_w, [], listcomp=True, listops=True, backendopt=True)
def test_earley(self): fname = "earley.sch" ast = parse_file(fname) def interp_w(): val = interpret_one(ast) return val self.meta_interp(interp_w, [], listcomp=True, listops=True, backendopt=True)
def test_pseudoknot(self): fname = "nucleic2.sch" ast = parse_file(fname) def interp_w(): val = interpret([ast]) return val self.meta_interp(interp_w, [], listcomp=True, listops=True, backendopt=True)