
=== 1. graphs that cannot exist ===
int + float                                    UOpError: ADD: needs two srcs of the same dtype
ADD of two bools                               UOpError: ADD: ADD is not defined on bool (CMPNE is xor)
WHERE with an int condition                    UOpError: WHERE: needs a bool condition and two values
WHERE with branches of different dtype         UOpError: WHERE: both branches must have the same dtype
RECIP of an int                                UOpError: RECIP: needs one float
FLOORDIV of floats                             UOpError: FLOORDIV: needs ints
CONST 2**31 as int32                           UOpError: CONST: 2147483648 does not fit in int32
CAST to a pointer type                         UOpError: CAST: needs one src and a value dtype as arg
CALL with a missing argument                   UOpError: CALL: PARAM slot 1 has no argument
CALL with an argument of the wrong dtype       UOpError: CALL: argument 1 has dtype i32, the body wants f32
a CALL inside a CALL                           UOpError: CALL: a body may not contain a CALL or a BUFFER (global buffers come in as params)
a well typed CALL                              built

=== 2. a deep graph (python's recursion limit is 1000) ===
chain of 200,000 adds: 400,001 nodes; build 4.09s, toposort 0.62s, evaluate 0.64s, simplify 14.19s
evaluate gives -1,474,736,480, the sum 1..200,000 is 20,000,100,000 wrapped to int32: -1,474,736,480
simplify merged all 200,000 constants into one: the result has 3 nodes, an ADD of x and the constant -1,474,736,480

=== 3. text format errors ===
missing header                                 ParseError: the first line must be '; uop v1' (a title may follow), got '%0 = param : dtype=f32 slot=0'
use before definition                          ParseError: line 2: '%1' is not defined above this line
unknown op                                     ParseError: line 2: unknown op 'frobnicate'
a bad number in a source list                  ParseError: line 3: '%x' is not defined above this line
wrong dtype in a line                          ParseError: line 4: ADD: needs two srcs of the same dtype
a good file                                    built

=== 4. address spaces and shapes ===
ADD of a pointer and a number                  UOpError: ADD: every src must be a value in ALU space, got PARAM in MEM
INDEX with a float index                       UOpError: INDEX: the index must be a scalar i32
LOAD straight from a buffer (no INDEX)         UOpError: LOAD: needs one INDEX
STORE of an int into a float buffer            UOpError: STORE: the stored value must be a scalar of the element dtype
a CALL that passes a size 8 buffer for size 4  UOpError: CALL: argument 0 has dtype ptr<f32,8>, the body wants ptr<f32,4>
SINK of a value that is not a STORE            UOpError: SINK: needs one or more STOREs
a node: [('INDEX', 'ptr<f32,4>', (4,), 'MEM'), ('CONST', 'f32', (), 'ALU'), ('STORE', 'void', (), None)]
