AST creation
rewrites having predicates