def print_progs_e(fn_sort, libSynth, targetSize): synth = SymbolicSynthesizer(libSynth, fn_sort) cnt = 1 ecnt = 1 for prog, unkMap in synth.genProgs(): sz = ASTUtils.getSize2(prog) if sz > targetSize: break res, code = NeuralSynthesizer.is_evaluable(prog, fn_sort) if res: if 'lib.compose(lib.repeat(10, lib.conv_g(lib.nn_relax))' in repr_py( prog): print('.', cnt, sz, repr_py(prog), ecnt) ecnt += 1 else: if 'lib.compose(lib.repeat(10, lib.conv_g(lib.nn_relax))' in repr_py( prog): print("#", cnt, sz, repr_py(prog), code) test = False if test: res, code = NeuralSynthesizer.is_evaluable(prog, fn_sort) # print(cnt, sz, prog) cnt += 1 print(cnt)
def print_progs(fn_sort, libSynth, targetSize): synth = SymbolicSynthesizer(libSynth, fn_sort) cnt = 0 for prog, unkMap in synth.genProgs(): sz = ASTUtils.getSize2(prog) if sz > targetSize: break cnt += 1 print(cnt, sz, repr_py(prog)) # print(cnt, sz, prog) print(cnt)