 branches/purecfg/TODO 2011/04/20 17:21:41 897
+++ branches/purecfg/TODO 2011/05/04 08:15:37 1084
@@ 1,9 +1,15 @@
========================
SHORT TERM ============= (for curvaturebased VR)
========================
+NOTE: GLK's approximate ranking of 5 most important tagged with
+[GLK:1], [GLK:2], ...
vector fields: convolution on vector images
 (image orientation not quite working)
+==============================
+other SHORT TERM ============= (including needed for LIC)
+==============================
+
+[GLK:1] Add sequence types (needed for evals & evecs)
+ syntax
+ types: ty '{' INT '}'
+ value construction: '{' e1 ',' … ',' en '}'
+ indexing: e '{' e '}'
IL support for higherorder tensor values (matrices, etc).
tensor construction [DONE]
@@ 11,47 +17,17 @@
tensor slicing
verify that hessians work correctly [DONE]
Outer products [DONE]

Add M dot v, v dot M, and M dot N [DONE]

Identity matrix [DONE]

Zero tensor [DONE]

trace [DONE]

extend norm (exp) to tensor[3,3] [DONE]

Matrix addition, subtraction, and scaling [DONE]

Use ∇⊗ etc. syntax
syntax [DONE]
typechecking
IL and codegen
Add sequence types
 syntax
 types: ty '{' INT '}'
 value construction: '{' e1 ',' … ',' en '}'
 indexing: e '{' e '}'

Infix dot product and cross product [DONE]

lerp on scalars and vectors [DONE]

Infix "^" operator for pow() [DONE]

Code generation support for 1D image data, such as RGBA transfer functions [DONE]

==============================
other SHORT TERM ============= (including needed for LIC)
==============================
+test/uninit.diderot:
+documents need for better compiler error messages when output variables
+are not initialized; the current messages are very cryptic
determinant ("det") for tensor[3,3]
extend norm (exp) to all tensor types [DONE for vectors and matrices]

expand trace in mid to low translation
valuenumbering optimization
@@ 64,28 +40,63 @@
MEDIUM TERM ================== (including needed for streamlines & tractography)
==============================
ability to emit/track/record variables into dynamically resized
runtime buffer

evals & evecs for symmetric tensor[3,3]

tensor fields: convolution on general tensor images

Use of Teem's "hest" commandline parser for getting
any input variables that are not defined in the source file
+[GLK:1] evals & evecs for symmetric tensor[3,3] (requires sequences)
Save Diderot output to nrrd, instead of "mip.txt"
+[GLK:2] Save Diderot output to nrrd, instead of "mip.txt"
For grid of strands, save to similarlyshaped array
For list of strands, save to long 1D (or 2D for nonscalar output) list
For ragged things (like tractography output), will need to save both
complete list of values, as well as list of start indices and lengths
to index into complete list
+[GLK:3] Use of Teem's "hest" commandline parser for getting
+any input variables that are not defined in the source file
+
+[GLK:4] ability to declare a field in such a way so that probe
+positions are *always* clamped to the support of "inside";
+there are many cases where this is the sensible behavior.
+(could also have "repeat" declaration, to mimic GL_REPEAT texturing)
+
+extend norm (exp) to all tensor types [DONE for vectors and matrices]
+
+ability to emit/track/record variables into dynamically resized
+runtime buffer
+
+Want: allow X *= Y, X /= Y, X += Y, X = Y to mean what they do in C,
+provided that X*Y, X/Y, X+Y, XY are already supported.
+Nearly every Diderot program would be simplified by this.
+
+Want: nontrivial field expressions & functions:
+ image(2)[2] Vimg = load(...);
+ field#0(2)[] Vlen = Vimg ⊛ bspln3;
+to get a scalar field of vector length, or
+ field#2(2)[] F = Fimg ⊛ bspln3;
+ field#0(2)[] Gmag = ∇F;
+to get a scalar field of gradient magnitude, or
+ field#2(2)[] F = Fimg ⊛ bspln3;
+ field#0(2)[] Gmsq = ∇F•∇F;
+to get a scalar field of squared gradient magnitude, which is simpler
+to differentiate. However, there is value in having these, even if
+the differentiation of them is not supported (hence the indication
+of "field#0" for these above)
+
+Want: ability to apply "normalize" to a field itself, e.g.
+ field#0(2)[2] V = normalize(Vimg ⊛ ctmr);
+so that V(x) = normalize((Vimg ⊛ ctmr)(x)).
+Having this would simplify expression of standard LIC method, and
+would also help express other vector field expressions that arise
+in vector field feature exraction.
+
+tensor fields: convolution on general tensor images
+
==============================
other MEDIUM TERM ============ (needed for particles)
==============================
runtime birth and death of strands
+[GLK:5] runtime death of strands; test/iso2d.diderot provides
+great initial test for "die" command.
+
+runtime birth of strands
"initially" supports lists
@@ 100,33 +111,37 @@
(F1 if x else F2)@pos
This will require duplication of the continuation of the conditional (but we should only
duplicate over the liverange of the result of the conditional.
+This will require duplication of the continuation of the conditional
+(but we should only duplicate over the liverange of the result of the
+conditional.
+
+add ":" for tensor dot product (contracts out two indices
+instead of one like •), valid for all pairs of tensors with
+at least two indices
==============================
other MEDIUM TERM ============
==============================
want: warnings when D (and likely I) is declared as a
variable name (now get confusing error messages now)
+want: warnings when "D" (reserved for differentiation) is declared as
+a variable name (get confusing error messages now)
support for Python interop and GUI
+Python/ctypes interface to runtime
+
==============================
LONG TERM ====================
==============================
Better handling of variables that determines the scope of a variable based on its actual use,
instead of where the user defined it. So, for example, we should lift strandinvariant variables
to global scope. Also prune out useless variables, which should include field variables after the
translation to midil.
+Better handling of variables that determines the scope of a variable
+based on its actual use, instead of where the user defined it. So,
+for example, we should lift strandinvariant variables to global
+scope. Also prune out useless variables, which should include field
+variables after the translation to midil.
co vs contra index distinction
add ":" for tensor dot product (contracts out two indices
instead of one like •), valid for all pairs of tensors with
at least two indices

some indication of tensor symmetry
(have to identify the group of index permutations that are symmetries)
@@ 138,28 +153,29 @@
"tensor comprehension" (like list comprehension)
Python/ctypes interface to runtimez

======================
BUGS =================
======================
test/mipcam.diderot:
 // generated C code looks like "(float)p_ui_00.5e0f"
 //real rayU = 2.0*camUmax*(real(ui)  0.5)/real(imgResU)  camUmax;
+test/bugusevar.diderot:
+looks like varialble scoping bug is still present in some cases?
test/vrkcomp.diderot:
 // HEY (scoping BUG): the strand parameters (e.g. ui, vi) ...

test/zslice2.diderot:
// but is this not valid syntax for creating field in one shot?
//field#2(3)[] F = (load("../data/zimg112.nrrd")) ⊛ bspln3;
// It is valid syntax, but there is a bug in the conversion from HighIL to MidIL
+test/bugmatrix.diderot:
+3x3 matrix subtraction is broken
+(and then fix test/vrcurvquad.diderot)
+
+test/fields.diderot:
+Can't assign on field to another.
+
+test/read2vecs.diderot:
+// HEY (BUG?) shouldn't it be a type error to load this 2D array of
+// 2vectors into a 2D *scalar* field? Instead, get:
+// uncaught exception Fail [Fail: Error in compiling lic.diderot]
+// raised at driver/main.sml:31.3931.76
+image(2)[] Vimg = load("../data/vorttest.nrrd");
test/zslice2.diderot:
// HEY (bug) bspln5 leads to problems ...
// uncaught exception Size [size]
// raised at ctarget/ctarget.sml:47.1547.19
//field#4(3)[] F = img ⊛ bspln5;

