ContinuumIO/blaze — pull request #139 by markflorisson88 (2014-02-05 17:08:04+00:00)
Title: Work on AIR debug printing in blaze REPL

```
The Blaze REPL.

blaze:
blaze module

dshape(''):
parse a blaze type

dshapes('', ..., '')
parse a series of blaze types in the same context, so they will
shared type variables of equal name.

typeof(val)
Return a blaze DataShape for a python object

unify(t1, t2):
unify t1 with t2, and return a result type and a list of additional
constraints

promote(t1, t2):
promote two blaze types to a common type general enough to represent
values of either type

normalize_ellipses(ds1, ds2):
normalize_ellipses takes two datashapes for unification (ellipses, broadcasting)

coercion_cost(t1, t2):
Determine a coercion cost for coercing type t1 to type t2

tmap(f, t):
map function `f` over type `t` and its sub-terms post-order

array(obj, dshape=None, storage=None)
Create a blaze array from the given object and data shape

eval(arr, storage=None)
Evaluate a blaze expression

>>> a = array([1, 2, 3])
>>> a
array([1, 2, 3],
dshape='3, int32')
>>> a + a
array([2, 4, 6],
dshape='3, int32')
>>> eval(a + a)
-------------blaze.compute.air.frontend.coercions [ 3, int32 expr(3, int32) ]-------------
--------------- blaze.compute.air.frontend.jit [ 3, int32 expr(3, int32) ] ---------------
-----------blaze.compute.air.frontend.ckernel_impls [ 3, int32 expr(3, int32) ]-----------
function 3, int32 expr(3, int32 %e0) {
entry:
- %.0 = kernel(const(blaze.blaze.add, Bytes), %e0, %e0) -> 3, int32
+ %.0 = ckernel(, [%e0, %e0]) -> 3, int32
%.1 = ret(%.0) -> Void

}
--------------- assemble_py_kernels [ 3, int32 expr(3, int32) ] ---------------
array([2, 4, 6],
dshape='3, int32')
```