Module Import alias Import alias Import alias Import alias ImportFrom alias alias alias If CompareLt AttributeLoad NameLoad attr Str body Assign NameStore NameLoad FunctionDef arguments args defaults body Expr Str Assign NameStore Call AttributeLoad Call NameLoad Str attr Return ListComp Call AttributeLoad NameLoad attr comprehension NameStore NameLoad CompareNotIn Str NameLoad decorator_list FunctionDef arguments args defaults body Expr Str TryExcept body Assign NameStore Call AttributeLoad Call NameLoad Str attr Return ListComp Call AttributeLoad NameLoad attr comprehension NameStore NameLoad CompareNotIn Str NameLoad handlers ExceptHandler body Return Call NameLoad decorator_list Assign NameStore Call NameLoad Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Num FunctionDef arguments args NameParam defaults body FunctionDef arguments args defaults vararg kwarg body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Print BinOpMod Str TupleLoad BinOpSub NameLoad NameLoad AttributeLoad NameLoad attr Return NameLoad decorator_list Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore ListLoad For NameStore Call NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Num Num If CompareEq NameLoad Num body Assign NameStore BinOpMod Str Call AttributeLoad NameLoad attr NameLoad orelse If CompareEq NameLoad Num body Assign NameStore IfExp CompareGt Call AttributeLoad NameLoad attr Num Str Str Assign NameStore Call AttributeLoad NameLoad attr Num Num Assign NameStore BinOpMod Str TupleLoad NameLoad NameLoad orelse If CompareEq NameLoad Num body Assign NameStore Call NameLoad BinOpAdd Num Call AttributeLoad NameLoad attr Num Num Assign NameStore BinOpMod Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Num Num Assign NameStore BinOpMod Str TupleLoad NameLoad NameLoad orelse If CompareEq NameLoad Num body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpMod Str NameLoad orelse If CompareEq NameLoad Num body Assign NameStore IfExp Call AttributeLoad NameLoad attr Str Str Assign NameStore BinOpMod Str TupleLoad Call AttributeLoad NameLoad attr NameLoad NameLoad orelse If CompareEq NameLoad Num body Assign NameStore IfExp Call AttributeLoad NameLoad attr Str Str Assign NameStore Call AttributeLoad NameLoad attr Num Num Assign NameStore BinOpMod Str TupleLoad NameLoad NameLoad Assign NameStore IfExp Call AttributeLoad NameLoad attr Str Str Assign NameStore Call AttributeLoad NameLoad attr Num Num AugAssignAdd NameStore BinOpMod Str TupleLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore ListLoad For NameStore Call NameLoad NameLoad body Assign NameStore ListComp Call AttributeLoad NameLoad attr NameLoad comprehension NameStore Call NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Num Num Assign NameStore IfExp CompareGt Call AttributeLoad NameLoad attr Num NameLoad NameLoad Assign NameStore IfExp CompareGt Call AttributeLoad NameLoad attr Num Str Str Assign NameStore Dict Str Str Str Str Str Str Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return Call NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad Print BinOpMod Str TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Num Num Num body Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad If NameLoad body Print Str For NameStore NameLoad body Print TupleLoad Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Num For NameStore NameLoad body AugAssignAdd NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Print BinOpMod Str TupleLoad NameLoad NameLoad BinOpSub NameLoad NameLoad Print BinOpMod Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Num For NameStore NameLoad body AugAssignAdd NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Print BinOpMod Str TupleLoad NameLoad NameLoad BinOpSub NameLoad NameLoad Print BinOpMod Str NameLoad If CompareNotEq NameLoad NameLoad body Print Str For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareNotEq NameLoad NameLoad body Print TupleLoad Str Call NameLoad NameLoad Print Str For NameStore NameLoad body Print TupleLoad Str AttributeLoad NameLoad attr Print Str For NameStore NameLoad body Print TupleLoad Str AttributeLoad NameLoad attr Print TupleLoad Expr Call AttributeLoad NameLoad attr Num decorator_list If CompareEq NameLoad Str body Expr Call NameLoad
N/A N/A sys N/A time N/A random N/A pickle pypred Predicate PredicateSet OptimizedPredicateSet N/A N/A N/A sys version 3 N/A N/A range xrange get_words N/A N/A N/A N/A N/A Returns a large list of words N/A raw N/A N/A N/A open /usr/share/dict/words readlines N/A N/A N/A N/A r strip N/A r raw N/A ' r N/A get_names N/A N/A N/A N/A N/A Returns a large list of names N/A N/A N/A raw N/A N/A N/A open /usr/share/dict/propernames readlines N/A N/A N/A N/A r strip N/A r raw N/A ' r N/A N/A N/A N/A N/A get_words N/A N/A NAMES N/A get_names N/A WORDS N/A get_words N/A SELECT_NAMES N/A N/A random sample NAMES 1000 N/A SELECT_WORDS N/A N/A random sample WORDS 1000 timed N/A N/A f N/A N/A wrapper N/A N/A N/A args kwargs N/A N/A s N/A N/A time time N/A r N/A f args kwargs N/A e N/A N/A time time N/A N/A Spent %0.3f sec invoking %s N/A N/A e s N/A f __name__ N/A r N/A N/A wrapper N/A gen_predicates N/A N/A num N/A N/A N/A res N/A N/A x N/A range num N/A N/A r N/A N/A random randint 0 5 N/A N/A r 0 N/A N/A p_str N/A name is '%s' and not test N/A N/A random choice SELECT_WORDS N/A N/A N/A r 1 N/A N/A gender N/A N/A N/A N/A random random 0.5 Male Female N/A age N/A N/A random randint 1 100 N/A p_str N/A gender is '%s' and age > %d N/A gender age N/A N/A N/A r 2 N/A N/A city_letter N/A chr N/A 97 N/A N/A random randint 0 25 N/A city_reg N/A ^%s.* city_letter N/A age N/A N/A random randint 1 100 N/A p_str N/A age > %d and city matches '%s' N/A age city_reg N/A N/A N/A r 3 N/A N/A interest N/A N/A random choice SELECT_WORDS N/A p_str N/A interests contains '%s' and test interest N/A N/A N/A r 4 N/A N/A gender N/A N/A N/A random random Male Female N/A p_str N/A name is '%s' or gender is '%s' N/A N/A N/A random choice SELECT_WORDS gender N/A N/A N/A r 5 N/A N/A gender N/A N/A N/A random random Male Female N/A age N/A N/A random randint 1 100 N/A p_str N/A (age > %d and gender is '%s') N/A age gender N/A gender N/A N/A N/A random random Male Female N/A age N/A N/A random randint 1 100 N/A p_str N/A  or (age < %d and gender is '%s') N/A age gender N/A p N/A Predicate p_str N/A N/A N/A res append p N/A res N/A timed gen_docs N/A N/A num N/A N/A N/A res N/A N/A x N/A range num N/A N/A interests N/A N/A N/A random choice SELECT_WORDS N/A x N/A range 3 N/A city N/A N/A random choice WORDS N/A age N/A N/A random randint 1 100 N/A test N/A N/A N/A N/A random random 0.5 True False N/A gender N/A N/A N/A N/A random random 0.5 Male Female N/A d N/A name interests city age gender test N/A N/A random choice SELECT_NAMES interests city age gender test N/A N/A N/A res append d N/A res N/A timed make_set N/A N/A preds N/A N/A N/A N/A PredicateSet preds N/A timed make_set_optimized N/A N/A preds N/A N/A N/A s N/A OptimizedPredicateSet preds N/A N/A N/A s compile_ast N/A s N/A timed size N/A N/A s name N/A N/A N/A l N/A len N/A N/A pickle dumps s N/A N/A Size: %s %d N/A name l N/A main N/A N/A numpreds numdocs printp N/A 100 2000 0 N/A N/A preds N/A gen_predicates numpreds N/A docs N/A gen_docs numdocs N/A s1 N/A make_set preds N/A s2 N/A make_set_optimized preds N/A printp N/A N/A Predicates: N/A p preds N/A N/A N/A N/A p predicate N/A start N/A N/A time time N/A total 0 N/A d docs N/A N/A total N/A len N/A N/A s1 evaluate d N/A end N/A N/A time time N/A N/A (Naive) Evaluated %d docs across %d predicates in %0.3f seconds N/A numdocs numpreds N/A end start N/A N/A (Naive) Total of %d predicates matched total N/A start N/A N/A time time N/A total_o 0 N/A d docs N/A N/A total_o N/A len N/A N/A s2 evaluate d N/A end N/A N/A time time N/A N/A (Opt) Evaluated %d docs across %d predicates in %0.3f seconds N/A numdocs numpreds N/A end start N/A N/A (Opt) Total of %d predicates matched total_o N/A N/A total total_o N/A N/A Mismatch! Differing inputs: N/A d docs N/A N/A r1 N/A N/A s1 evaluate d N/A r2 N/A N/A s2 evaluate d N/A N/A r1 r2 N/A N/A N/A Input: N/A repr d N/A Naive: N/A p r1 N/A N/A N/A N/A p predicate N/A Opt: N/A p r2 N/A N/A N/A N/A p predicate N/A N/A N/A N/A N/A sys exit 1 N/A N/A N/A __name__ __main__ N/A N/A N/A main