asdl/examples/demo_lib.asdl -> (asdl_main) -> _devbuild/gen/demo_lib_asdl.py asdl/examples/typed_demo.asdl -> (asdl_main) -> _devbuild/gen/typed_demo_asdl.py asdl/examples/shared_variant.asdl -> (asdl_main) -> _devbuild/gen/shared_variant_asdl.py asdl/examples/typed_arith.asdl -> (asdl_main) -> _devbuild/gen/typed_arith_asdl.py Success: no issues found in 1 source file ----- typed-arith-asdl ----- Success: no issues found in 3 source files --- 1+2+3 (arith_expr.Binary op: "+" left: (arith_expr.Binary op:"+" left:(arith_expr.Const i:1) right:(arith_expr.Const i:2)) right: (arith_expr.Const i:3) ) (arith_expr.Binary op: "+" left: (arith_expr.Binary op:"+" left:(arith_expr.Const i:1) right:(arith_expr.Const i:2)) right: (arith_expr.Const i:3) ) --- 1+2*3 (arith_expr.Binary op: "+" left: (arith_expr.Const i:1) right: (arith_expr.Binary op:"*" left:(arith_expr.Const i:2) right:(arith_expr.Const i:3)) ) (arith_expr.Binary op: "+" left: (arith_expr.Const i:1) right: (arith_expr.Binary op:"*" left:(arith_expr.Const i:2) right:(arith_expr.Const i:3)) ) --- 4*(2+3) (arith_expr.Binary op: "*" left: (arith_expr.Const i:4) right: (arith_expr.Binary op:"+" left:(arith_expr.Const i:2) right:(arith_expr.Const i:3)) ) (arith_expr.Binary op: "*" left: (arith_expr.Const i:4) right: (arith_expr.Binary op:"+" left:(arith_expr.Const i:2) right:(arith_expr.Const i:3)) ) --- (2+3)*4 (arith_expr.Binary op: "*" left: (arith_expr.Binary op:"+" left:(arith_expr.Const i:2) right:(arith_expr.Const i:3)) right: (arith_expr.Const i:4) ) (arith_expr.Binary op: "*" left: (arith_expr.Binary op:"+" left:(arith_expr.Const i:2) right:(arith_expr.Const i:3)) right: (arith_expr.Const i:4) ) --- 1<2 (arith_expr.Binary op:"<" left:(arith_expr.Const i:1) right:(arith_expr.Const i:2)) (arith_expr.Binary op:"<" left:(arith_expr.Const i:1) right:(arith_expr.Const i:2)) --- x=3 (arith_expr.Binary op:"=" left:(arith_expr.Var name:x) right:(arith_expr.Const i:3)) (arith_expr.Binary op:"=" left:(arith_expr.Var name:x) right:(arith_expr.Const i:3)) --- x = 2*3 (arith_expr.Binary op: "=" left: (arith_expr.Var name:x) right: (arith_expr.Binary op:"*" left:(arith_expr.Const i:2) right:(arith_expr.Const i:3)) ) (arith_expr.Binary op: "=" left: (arith_expr.Var name:x) right: (arith_expr.Binary op:"*" left:(arith_expr.Const i:2) right:(arith_expr.Const i:3)) ) --- x = y (arith_expr.Binary op:"=" left:(arith_expr.Var name:x) right:(arith_expr.Var name:y)) (arith_expr.Binary op:"=" left:(arith_expr.Var name:x) right:(arith_expr.Var name:y)) --- x*y - y*z (arith_expr.Binary op: - left: (arith_expr.Binary op:"*" left:(arith_expr.Var name:x) right:(arith_expr.Var name:y)) right: (arith_expr.Binary op:"*" left:(arith_expr.Var name:y) right:(arith_expr.Var name:z)) ) (arith_expr.Binary op: - left: (arith_expr.Binary op:"*" left:(arith_expr.Var name:x) right:(arith_expr.Var name:y)) right: (arith_expr.Binary op:"*" left:(arith_expr.Var name:y) right:(arith_expr.Var name:z)) ) --- x/y - y%z (arith_expr.Binary op: - left: (arith_expr.Binary op:/ left:(arith_expr.Var name:x) right:(arith_expr.Var name:y)) right: (arith_expr.Binary op:"%" left:(arith_expr.Var name:y) right:(arith_expr.Var name:z)) ) (arith_expr.Binary op: - left: (arith_expr.Binary op:/ left:(arith_expr.Var name:x) right:(arith_expr.Var name:y)) right: (arith_expr.Binary op:"%" left:(arith_expr.Var name:y) right:(arith_expr.Var name:z)) ) --- x = y (arith_expr.Binary op:"=" left:(arith_expr.Var name:x) right:(arith_expr.Var name:y)) (arith_expr.Binary op:"=" left:(arith_expr.Var name:x) right:(arith_expr.Var name:y)) --- 2 ** 3 ** 2 (arith_expr.Binary op: "**" left: (arith_expr.Const i:2) right: (arith_expr.Binary op:"**" left:(arith_expr.Const i:3) right:(arith_expr.Const i:2)) ) (arith_expr.Binary op: "**" left: (arith_expr.Const i:2) right: (arith_expr.Binary op:"**" left:(arith_expr.Const i:3) right:(arith_expr.Const i:2)) ) --- a = b = 10 (arith_expr.Binary op: "=" left: (arith_expr.Var name:a) right: (arith_expr.Binary op:"=" left:(arith_expr.Var name:b) right:(arith_expr.Const i:10)) ) (arith_expr.Binary op: "=" left: (arith_expr.Var name:a) right: (arith_expr.Binary op:"=" left:(arith_expr.Var name:b) right:(arith_expr.Const i:10)) ) --- x = ((y*4)-2) (arith_expr.Binary op: "=" left: (arith_expr.Var name:x) right: (arith_expr.Binary op: - left: (arith_expr.Binary op:"*" left:(arith_expr.Var name:y) right:(arith_expr.Const i:4)) right: (arith_expr.Const i:2) ) ) (arith_expr.Binary op: "=" left: (arith_expr.Var name:x) right: (arith_expr.Binary op: - left: (arith_expr.Binary op:"*" left:(arith_expr.Var name:y) right:(arith_expr.Const i:4)) right: (arith_expr.Const i:2) ) ) --- x - -y (arith_expr.Binary op: - left: (arith_expr.Var name:x) right: (arith_expr.Unary op:- a:(arith_expr.Var name:y)) ) (arith_expr.Binary op: - left: (arith_expr.Var name:x) right: (arith_expr.Unary op:- a:(arith_expr.Var name:y)) ) --- -1 * -2 (arith_expr.Binary op: "*" left: (arith_expr.Unary op:- a:(arith_expr.Const i:1)) right: (arith_expr.Unary op:- a:(arith_expr.Const i:2)) ) (arith_expr.Binary op: "*" left: (arith_expr.Unary op:- a:(arith_expr.Const i:1)) right: (arith_expr.Unary op:- a:(arith_expr.Const i:2)) ) --- -x * -y (arith_expr.Binary op: "*" left: (arith_expr.Unary op:- a:(arith_expr.Var name:x)) right: (arith_expr.Unary op:- a:(arith_expr.Var name:y)) ) (arith_expr.Binary op: "*" left: (arith_expr.Unary op:- a:(arith_expr.Var name:x)) right: (arith_expr.Unary op:- a:(arith_expr.Var name:y)) ) --- x - -234 (arith_expr.Binary op: - left: (arith_expr.Var name:x) right: (arith_expr.Unary op:- a:(arith_expr.Const i:234)) ) (arith_expr.Binary op: - left: (arith_expr.Var name:x) right: (arith_expr.Unary op:- a:(arith_expr.Const i:234)) ) --- x += y += 3 (arith_expr.Binary op: "+=" left: (arith_expr.Var name:x) right: (arith_expr.Binary op:"+=" left:(arith_expr.Var name:y) right:(arith_expr.Const i:3)) ) (arith_expr.Binary op: "+=" left: (arith_expr.Var name:x) right: (arith_expr.Binary op:"+=" left:(arith_expr.Var name:y) right:(arith_expr.Const i:3)) ) --- x[1,2] (arith_expr.Index a: (arith_expr.Var name:x) index: (arith_expr.Binary op:"," left:(arith_expr.Const i:1) right:(arith_expr.Const i:2)) ) (arith_expr.Index a: (arith_expr.Var name:x) index: (arith_expr.Binary op:"," left:(arith_expr.Const i:1) right:(arith_expr.Const i:2)) ) --- +1 - +2 (arith_expr.Binary op: - left: (arith_expr.Unary op:"+" a:(arith_expr.Const i:1)) right: (arith_expr.Unary op:"+" a:(arith_expr.Const i:2)) ) (arith_expr.Binary op: - left: (arith_expr.Unary op:"+" a:(arith_expr.Const i:1)) right: (arith_expr.Unary op:"+" a:(arith_expr.Const i:2)) ) --- f[x] += 1 (arith_expr.Binary op: "+=" left: (arith_expr.Index a:(arith_expr.Var name:f) index:(arith_expr.Var name:x)) right: (arith_expr.Const i:1) ) (arith_expr.Binary op: "+=" left: (arith_expr.Index a:(arith_expr.Var name:f) index:(arith_expr.Var name:x)) right: (arith_expr.Const i:1) ) --- ~1 | ~2 (arith_expr.Binary op: "|" left: (arith_expr.Unary op:"~" a:(arith_expr.Const i:1)) right: (arith_expr.Unary op:"~" a:(arith_expr.Const i:2)) ) (arith_expr.Binary op: "|" left: (arith_expr.Unary op:"~" a:(arith_expr.Const i:1)) right: (arith_expr.Unary op:"~" a:(arith_expr.Const i:2)) ) --- x & y | a & b (arith_expr.Binary op: "|" left: (arith_expr.Binary op:"&" left:(arith_expr.Var name:x) right:(arith_expr.Var name:y)) right: (arith_expr.Binary op:"&" left:(arith_expr.Var name:a) right:(arith_expr.Var name:b)) ) (arith_expr.Binary op: "|" left: (arith_expr.Binary op:"&" left:(arith_expr.Var name:x) right:(arith_expr.Var name:y)) right: (arith_expr.Binary op:"&" left:(arith_expr.Var name:a) right:(arith_expr.Var name:b)) ) --- ~x ^ y (arith_expr.Binary op: "^" left: (arith_expr.Unary op:"~" a:(arith_expr.Var name:x)) right: (arith_expr.Var name:y) ) (arith_expr.Binary op: "^" left: (arith_expr.Unary op:"~" a:(arith_expr.Var name:x)) right: (arith_expr.Var name:y) ) --- x << y | y << z (arith_expr.Binary op: "|" left: (arith_expr.Binary op:"<<" left:(arith_expr.Var name:x) right:(arith_expr.Var name:y)) right: (arith_expr.Binary op:"<<" left:(arith_expr.Var name:y) right:(arith_expr.Var name:z)) ) (arith_expr.Binary op: "|" left: (arith_expr.Binary op:"<<" left:(arith_expr.Var name:x) right:(arith_expr.Var name:y)) right: (arith_expr.Binary op:"<<" left:(arith_expr.Var name:y) right:(arith_expr.Var name:z)) ) --- a ^= b-1 (arith_expr.Binary op: "^=" left: (arith_expr.Var name:a) right: (arith_expr.Binary op:- left:(arith_expr.Var name:b) right:(arith_expr.Const i:1)) ) (arith_expr.Binary op: "^=" left: (arith_expr.Var name:a) right: (arith_expr.Binary op:- left:(arith_expr.Var name:b) right:(arith_expr.Const i:1)) ) --- a && b || c && d (arith_expr.Binary op: "||" left: (arith_expr.Binary op:"&&" left:(arith_expr.Var name:a) right:(arith_expr.Var name:b)) right: (arith_expr.Binary op:"&&" left:(arith_expr.Var name:c) right:(arith_expr.Var name:d)) ) (arith_expr.Binary op: "||" left: (arith_expr.Binary op:"&&" left:(arith_expr.Var name:a) right:(arith_expr.Var name:b)) right: (arith_expr.Binary op:"&&" left:(arith_expr.Var name:c) right:(arith_expr.Var name:d)) ) --- !a && !b (arith_expr.Binary op: "&&" left: (arith_expr.Unary op:"!" a:(arith_expr.Var name:a)) right: (arith_expr.Unary op:"!" a:(arith_expr.Var name:b)) ) (arith_expr.Binary op: "&&" left: (arith_expr.Unary op:"!" a:(arith_expr.Var name:a)) right: (arith_expr.Unary op:"!" a:(arith_expr.Var name:b)) ) --- a != b && c == d (arith_expr.Binary op: "&&" left: (arith_expr.Binary op:"!=" left:(arith_expr.Var name:a) right:(arith_expr.Var name:b)) right: (arith_expr.Binary op:"==" left:(arith_expr.Var name:c) right:(arith_expr.Var name:d)) ) (arith_expr.Binary op: "&&" left: (arith_expr.Binary op:"!=" left:(arith_expr.Var name:a) right:(arith_expr.Var name:b)) right: (arith_expr.Binary op:"==" left:(arith_expr.Var name:c) right:(arith_expr.Var name:d)) ) --- a > b ? 0 : 1 (arith_expr.Ternary cond: (arith_expr.Binary op:">" left:(arith_expr.Var name:a) right:(arith_expr.Var name:b)) true_expr: (arith_expr.Const i:0) false_expr: (arith_expr.Const i:1) ) (arith_expr.Ternary cond: (arith_expr.Binary op:">" left:(arith_expr.Var name:a) right:(arith_expr.Var name:b)) true_expr: (arith_expr.Const i:0) false_expr: (arith_expr.Const i:1) ) --- a > b ? x+1 : y+1 (arith_expr.Ternary cond: (arith_expr.Binary op:">" left:(arith_expr.Var name:a) right:(arith_expr.Var name:b)) true_expr: (arith_expr.Binary op:"+" left:(arith_expr.Var name:x) right:(arith_expr.Const i:1)) false_expr: (arith_expr.Binary op:"+" left:(arith_expr.Var name:y) right:(arith_expr.Const i:1)) ) (arith_expr.Ternary cond: (arith_expr.Binary op:">" left:(arith_expr.Var name:a) right:(arith_expr.Var name:b)) true_expr: (arith_expr.Binary op:"+" left:(arith_expr.Var name:x) right:(arith_expr.Const i:1)) false_expr: (arith_expr.Binary op:"+" left:(arith_expr.Var name:y) right:(arith_expr.Const i:1)) ) --- 1 ? true1 : 2 ? true2 : false (arith_expr.Ternary cond: (arith_expr.Const i:1) true_expr: (arith_expr.Var name:true1) false_expr: (arith_expr.Ternary cond: (arith_expr.Const i:2) true_expr: (arith_expr.Var name:true2) false_expr: (arith_expr.Var name:"false") ) ) (arith_expr.Ternary cond: (arith_expr.Const i:1) true_expr: (arith_expr.Var name:true1) false_expr: (arith_expr.Ternary cond: (arith_expr.Const i:2) true_expr: (arith_expr.Var name:true2) false_expr: (arith_expr.Var name:"false") ) ) --- 1 ? true1 : (2 ? true2 : false) (arith_expr.Ternary cond: (arith_expr.Const i:1) true_expr: (arith_expr.Var name:true1) false_expr: (arith_expr.Ternary cond: (arith_expr.Const i:2) true_expr: (arith_expr.Var name:true2) false_expr: (arith_expr.Var name:"false") ) ) (arith_expr.Ternary cond: (arith_expr.Const i:1) true_expr: (arith_expr.Var name:true1) false_expr: (arith_expr.Ternary cond: (arith_expr.Const i:2) true_expr: (arith_expr.Var name:true2) false_expr: (arith_expr.Var name:"false") ) ) --- 1 ? (2 ? true : false1) : false2 (arith_expr.Ternary cond: (arith_expr.Const i:1) true_expr: (arith_expr.Ternary cond: (arith_expr.Const i:2) true_expr: (arith_expr.Var name:"true") false_expr: (arith_expr.Var name:false1) ) false_expr: (arith_expr.Var name:false2) ) (arith_expr.Ternary cond: (arith_expr.Const i:1) true_expr: (arith_expr.Ternary cond: (arith_expr.Const i:2) true_expr: (arith_expr.Var name:"true") false_expr: (arith_expr.Var name:false1) ) false_expr: (arith_expr.Var name:false2) ) --- 1 ? 2 ? true : false1 : false2 (arith_expr.Ternary cond: (arith_expr.Const i:1) true_expr: (arith_expr.Ternary cond: (arith_expr.Const i:2) true_expr: (arith_expr.Var name:"true") false_expr: (arith_expr.Var name:false1) ) false_expr: (arith_expr.Var name:false2) ) (arith_expr.Ternary cond: (arith_expr.Const i:1) true_expr: (arith_expr.Ternary cond: (arith_expr.Const i:2) true_expr: (arith_expr.Var name:"true") false_expr: (arith_expr.Var name:false1) ) false_expr: (arith_expr.Var name:false2) ) --- x ? 1 : 2, y ? 3 : 4 (arith_expr.Binary op: "," left: (arith_expr.Ternary cond: (arith_expr.Var name:x) true_expr: (arith_expr.Const i:1) false_expr: (arith_expr.Const i:2) ) right: (arith_expr.Ternary cond: (arith_expr.Var name:y) true_expr: (arith_expr.Const i:3) false_expr: (arith_expr.Const i:4) ) ) (arith_expr.Binary op: "," left: (arith_expr.Ternary cond: (arith_expr.Var name:x) true_expr: (arith_expr.Const i:1) false_expr: (arith_expr.Const i:2) ) right: (arith_expr.Ternary cond: (arith_expr.Var name:y) true_expr: (arith_expr.Const i:3) false_expr: (arith_expr.Const i:4) ) ) --- !x (arith_expr.Unary op:"!" a:(arith_expr.Var name:x)) (arith_expr.Unary op:"!" a:(arith_expr.Var name:x)) --- x-- (arith_expr.Unary op:-- a:(arith_expr.Var name:x)) (arith_expr.Unary op:-- a:(arith_expr.Var name:x)) --- x[1]-- (arith_expr.Unary op:-- a:(arith_expr.Index a:(arith_expr.Var name:x) index:(arith_expr.Const i:1))) (arith_expr.Unary op:-- a:(arith_expr.Index a:(arith_expr.Var name:x) index:(arith_expr.Const i:1))) --- --x (arith_expr.Unary op:-- a:(arith_expr.Var name:x)) (arith_expr.Unary op:-- a:(arith_expr.Var name:x)) --- ++x[1] (arith_expr.Unary op:"++" a:(arith_expr.Index a:(arith_expr.Var name:x) index:(arith_expr.Const i:1))) (arith_expr.Unary op:"++" a:(arith_expr.Index a:(arith_expr.Var name:x) index:(arith_expr.Const i:1))) --- !x-- (arith_expr.Unary op:"!" a:(arith_expr.Unary op:-- a:(arith_expr.Var name:x))) (arith_expr.Unary op:"!" a:(arith_expr.Unary op:-- a:(arith_expr.Var name:x))) --- ~x++ (arith_expr.Unary op:"~" a:(arith_expr.Unary op:"++" a:(arith_expr.Var name:x))) (arith_expr.Unary op:"~" a:(arith_expr.Unary op:"++" a:(arith_expr.Var name:x))) --- x++ - y++ (arith_expr.Binary op: - left: (arith_expr.Unary op:"++" a:(arith_expr.Var name:x)) right: (arith_expr.Unary op:"++" a:(arith_expr.Var name:y)) ) (arith_expr.Binary op: - left: (arith_expr.Unary op:"++" a:(arith_expr.Var name:x)) right: (arith_expr.Unary op:"++" a:(arith_expr.Var name:y)) ) --- ++x - ++y (arith_expr.Binary op: - left: (arith_expr.Unary op:"++" a:(arith_expr.Var name:x)) right: (arith_expr.Unary op:"++" a:(arith_expr.Var name:y)) ) (arith_expr.Binary op: - left: (arith_expr.Unary op:"++" a:(arith_expr.Var name:x)) right: (arith_expr.Unary op:"++" a:(arith_expr.Var name:y)) ) --- x[1] (arith_expr.Index a:(arith_expr.Var name:x) index:(arith_expr.Const i:1)) (arith_expr.Index a:(arith_expr.Var name:x) index:(arith_expr.Const i:1)) --- x[a+b] (arith_expr.Index a: (arith_expr.Var name:x) index: (arith_expr.Binary op:"+" left:(arith_expr.Var name:a) right:(arith_expr.Var name:b)) ) (arith_expr.Index a: (arith_expr.Var name:x) index: (arith_expr.Binary op:"+" left:(arith_expr.Var name:a) right:(arith_expr.Var name:b)) ) --- x[1:2] (arith_expr.Slice a:(arith_expr.Var name:x) begin:(arith_expr.Const i:1) end:(arith_expr.Const i:2)) (arith_expr.Slice a:(arith_expr.Var name:x) begin:(arith_expr.Const i:1) end:(arith_expr.Const i:2)) --- x = y(2)*3 + y(4)*5 (arith_expr.Binary op: "=" left: (arith_expr.Var name:x) right: (arith_expr.Binary op: "+" left: (arith_expr.Binary op: "*" left: (arith_expr.FuncCall name:y args:[(arith_expr.Const i:2)]) right: (arith_expr.Const i:3) ) right: (arith_expr.Binary op: "*" left: (arith_expr.FuncCall name:y args:[(arith_expr.Const i:4)]) right: (arith_expr.Const i:5) ) ) ) (arith_expr.Binary op: "=" left: (arith_expr.Var name:x) right: (arith_expr.Binary op: "+" left: (arith_expr.Binary op: "*" left: (arith_expr.FuncCall name:y args:[(arith_expr.Const i:2)]) right: (arith_expr.Const i:3) ) right: (arith_expr.Binary op: "*" left: (arith_expr.FuncCall name:y args:[(arith_expr.Const i:4)]) right: (arith_expr.Const i:5) ) ) ) --- x(1,2)+y(3,4) (arith_expr.Binary op: "+" left: (arith_expr.FuncCall name:x args:[(arith_expr.Const i:1) (arith_expr.Const i:2)]) right: (arith_expr.FuncCall name:y args:[(arith_expr.Const i:3) (arith_expr.Const i:4)]) ) (arith_expr.Binary op: "+" left: (arith_expr.FuncCall name:x args:[(arith_expr.Const i:1) (arith_expr.Const i:2)]) right: (arith_expr.FuncCall name:y args:[(arith_expr.Const i:3) (arith_expr.Const i:4)]) ) --- x(a,b,c[d]) (arith_expr.FuncCall name: x args: [ (arith_expr.Var name:a) (arith_expr.Var name:b) (arith_expr.Index a:(arith_expr.Var name:c) index:(arith_expr.Var name:d)) ] ) (arith_expr.FuncCall name: x args: [ (arith_expr.Var name:a) (arith_expr.Var name:b) (arith_expr.Index a:(arith_expr.Var name:c) index:(arith_expr.Var name:d)) ] ) --- x(1,2)*j+y(3,4)*k+z(5,6)*l (arith_expr.Binary op: "+" left: (arith_expr.Binary op: "+" left: (arith_expr.Binary op: "*" left: (arith_expr.FuncCall name:x args:[(arith_expr.Const i:1) (arith_expr.Const i:2)]) right: (arith_expr.Var name:j) ) right: (arith_expr.Binary op: "*" left: (arith_expr.FuncCall name:y args:[(arith_expr.Const i:3) (arith_expr.Const i:4)]) right: (arith_expr.Var name:k) ) ) right: (arith_expr.Binary op: "*" left: (arith_expr.FuncCall name:z args:[(arith_expr.Const i:5) (arith_expr.Const i:6)]) right: (arith_expr.Var name:l) ) ) (arith_expr.Binary op: "+" left: (arith_expr.Binary op: "+" left: (arith_expr.Binary op: "*" left: (arith_expr.FuncCall name:x args:[(arith_expr.Const i:1) (arith_expr.Const i:2)]) right: (arith_expr.Var name:j) ) right: (arith_expr.Binary op: "*" left: (arith_expr.FuncCall name:y args:[(arith_expr.Const i:3) (arith_expr.Const i:4)]) right: (arith_expr.Var name:k) ) ) right: (arith_expr.Binary op: "*" left: (arith_expr.FuncCall name:z args:[(arith_expr.Const i:5) (arith_expr.Const i:6)]) right: (arith_expr.Var name:l) ) ) --- print(test(2,3)) (arith_expr.FuncCall name: print args: [(arith_expr.FuncCall name:test args:[(arith_expr.Const i:2) (arith_expr.Const i:3)])] ) (arith_expr.FuncCall name: print args: [(arith_expr.FuncCall name:test args:[(arith_expr.Const i:2) (arith_expr.Const i:3)])] ) --- print("x") (arith_expr.FuncCall name:print args:[(arith_expr.Var name:x)]) (arith_expr.FuncCall name:print args:[(arith_expr.Var name:x)]) --- min(255,n*2) (arith_expr.FuncCall name: min args: [ (arith_expr.Const i:255) (arith_expr.Binary op:"*" left:(arith_expr.Var name:n) right:(arith_expr.Const i:2)) ] ) (arith_expr.FuncCall name: min args: [ (arith_expr.Const i:255) (arith_expr.Binary op:"*" left:(arith_expr.Var name:n) right:(arith_expr.Const i:2)) ] ) --- c = pal[i*8] (arith_expr.Binary op: "=" left: (arith_expr.Var name:c) right: (arith_expr.Index a: (arith_expr.Var name:pal) index: (arith_expr.Binary op:"*" left:(arith_expr.Var name:i) right:(arith_expr.Const i:8)) ) ) (arith_expr.Binary op: "=" left: (arith_expr.Var name:c) right: (arith_expr.Index a: (arith_expr.Var name:pal) index: (arith_expr.Binary op:"*" left:(arith_expr.Var name:i) right:(arith_expr.Const i:8)) ) ) --- x=1,y=2,z=3 (arith_expr.Binary op: "," left: (arith_expr.Binary op: "," left: (arith_expr.Binary op:"=" left:(arith_expr.Var name:x) right:(arith_expr.Const i:1)) right: (arith_expr.Binary op:"=" left:(arith_expr.Var name:y) right:(arith_expr.Const i:2)) ) right: (arith_expr.Binary op:"=" left:(arith_expr.Var name:z) right:(arith_expr.Const i:3)) ) (arith_expr.Binary op: "," left: (arith_expr.Binary op: "," left: (arith_expr.Binary op:"=" left:(arith_expr.Var name:x) right:(arith_expr.Const i:1)) right: (arith_expr.Binary op:"=" left:(arith_expr.Var name:y) right:(arith_expr.Const i:2)) ) right: (arith_expr.Binary op:"=" left:(arith_expr.Var name:z) right:(arith_expr.Const i:3)) )got expected error for }: Unexpected end of input got expected error for ]: can't be used in prefix position got expected error for {: Unexpected end of input got expected error for x+1 = y: Can't assign to (arith_expr.Binary op:"+" left:(arith_expr.Var name:x) right:(arith_expr.Const i:1)) got expected error for (x+1)++: Can't assign to (arith_expr.Binary op:"+" left:(arith_expr.Var name:x) right:(arith_expr.Const i:1)) got expected error for foo ? 1 :: Unexpected end of input got expected error for foo ? 1 : expected :, got got expected error for %: can't be used in prefix position got expected error for }: Unexpected end of input got expected error for {: Unexpected end of input got expected error for ]: can't be used in prefix position got expected error for 1 ( 2: (arith_expr.Const i:1) can't be called got expected error for (x+1) ( 2 ): (arith_expr.Binary op:"+" left:(arith_expr.Var name:x) right:(arith_expr.Const i:1)) can't be called got expected error for 1 [ 2 ]: (arith_expr.Const i:1) can't be indexed ----- parse ----- (arith_expr.Binary op:"+" left:(arith_expr.Const i:40) right:(arith_expr.Const i:2)) ----- eval ----- (arith_expr.Binary op: "+" left: (arith_expr.Binary op:"+" left:(arith_expr.Const i:40) right:(arith_expr.Const i:2)) right: (arith_expr.Const i:5) ) => 47 ----- typed-demo-asdl ----- Success: no issues found in 2 source files 1 1 (cflow__Break) (cflow.Return status:-1) (cflow.Return status:42) 1 3 Return = (cflow.Return status:-1) status = -1 3 Return = (cflow.Return status:42) status = 42 (source_location path:foo line:13 col:0 length:2) (bool_expr.Binary left:(word value:w1) right:(word value:e2)) (bool_expr.LogicalNot b:(bool_expr.Binary left:(word value:w1) right:(word value:e2))) (bool_expr.LogicalBinary op: op_id.Star left: (bool_expr.Binary left:(word value:w1) right:(word value:e2)) right: (bool_expr.LogicalNot b:...0x7f6ba5be1e10) ) None None