Master Wishlist for SR
Last updated July 21, 1989

These are all just ideas, some of them controversial; upon closer inspection
we'll undoubtably discard some of them.  Order is not significant.



Language Extensions and Enhancements
   implement a floating point data type
   implement ref parameters
   allow "any" type for declaring external params, also "*" for varargs
   allow [1:*,1:*] (etc.) declaration of formal parameter
   allow array types (let a type declaration include an array spec)
   allow type renaming, e.g. type foo = int
   implement union data type
   implement byte data type
   consider removing "char" type and/or implicit casting
   declare priorities on procs
   arrays of processes
   implement forward invocation primitive
   make colons optional in declarations
   make "create" optional in create statements
   allow "create x() on <string>"
   allow initialization of explicit semaphores, e.g. "sem a := 3"
   input stmt: implement global synch
   input stmt: "await B" as abbr for "in st B -> skip"
   co stmt: make syntax more like "fa" etc. (omit parens)
   co stmt: eliminate restrictions on what goes inside
   add some sort of "assert" statement
   allow alternate radix (e.g. hex) on read/getarg of integer
   allow output formatting a la printf
   implement general preprocessor including  include, define, ifdef, endif
   let C functions (if called from SR) call SR procedures  (See Irv's proposal)
   if f() returns an opcap, let f()() invoke the operation 
   generalize syntax, e.g. allow exprs (not just ids) to be indexed or deref'd

Commands  [note: some changes may also require extensions of srm]
   sr: accept file.c and file.o, and handle correctly
   sr: accept srl options such as -S, and pass them on
   sr: -M option to assist srm?
   sr, srl: add an option to enable runtime profiling
   sr, srl: pass through useful cc options such as -p
   sr, srl: work reasonably even if files are not in current directory
   sr, srl: support library directories holding Interface files & compiled code
   srl: pass on arbitrary commands to ld, e.g. "-static", "-f68881"
   srm: accept *.c arguments (files of externals to compile and link in)

Usability
   diagnose uninitialized caps, null pointers, etc.
   give better diagnostics for unused semaphores
   buffer up all output from a single write
   build collection of external definitions for standard C library
   detect deadlock in a multi-machine program
   detect subscripts out of range
   srl: skip cc of a.out.c if old version is okay (i.e. automatic re-srl)
   sr: Make more errs fatal.  Warn only if we're sure we untangled the intent.
   sr: Add new level of errs for things like `identifier declared but not used'?
   rts: give source file and line number when aborting
   rts: flush buffers, maybe dump some process info, on receiving some signal
   srm: are all of those targets really needed?

Implementation Bugs
   *** SEE THE "Bugs" FILE for the main list of bugs. ***
   new(var-sized-type) creates a descriptor but it's not maintained
   try fact/1<input3 w/ -O100 to get segmentation fault for max oper exceeded
   wrong type declared in C code for external declared as returning "ptr char"

Testing & Reliability
   check coverage of verification suite -- see tcov(1) on Sun
   test command options (e.g. -I, -T)
   test sr, srl in dirs with other bodies and sources present
   vsuite: many of the Compiler.std files are obsolete
   clean up vsuite, consolidate tests, assign meaningful names

Performance
   spend a week tuning things!
   need to free memory after concatenation operations
   check for other possible memory leaks
   why does "sr -C; cc -S; as" add to less than "sr -c" ?
   srl: make CHECK_SP in RTS a link-time option (how?)
   sr: call cc once at EOF, avoid call if errors in second resource
   sr: run cc in parallel -- why wait?
   sr: gen case-stmt-like code if appropriate for if and do (check all guards)
   sr: in co, don't send quantifiers out & back if not used in PPC
   sr: optimize synch/sched in input stmt, as in SuccessoR paper but easier here
   sr: let quantifiers use special increment/decrement that isn't bounds checked
   sr: fold vector constants in make_node
   sr: optimize string concatenations to build result in place, when safe
   sr: reduce the 16K of overhead for booms if NDEBUG is defined
   sr: copy resource params at resource creation and change offsets to pointers
   srx: exec program instead of rsh if explicitly located but on main machine
   fix next, exit, and return to delete local ops properly  (messy!)

Documentation
   selectively copy examples directory somewhere as part of "make install"
   write a real internals guide

Maintainability & Cleanup
   how much of srsys.h is needed by generated code?
   consolidate multiple lex files?
   reduce the number of weird types
   rpat[] defined as one type by a.out from srl, another in rts/global.h
   sr: generate #line in .c files to aid debugging
   sr: allocate named temporaries to make code generation & output simpler?
   sr: redesign intermediate code for C instead of em (e.g. re loops)
   sr: -- is intermediate code needed any more at all? why not just gen C?
   sr: reclaim nodes, symbols, etc. when no longer needed
   sr: elim K_SEMA? inconsistent with K_OP+IM_SEMA. add IS_SEMA macro?
   rts: turn multi-line macros into separate functions when not costly
   rts: RTS_OWN is overloaded (Ron 11/14/88)
   rts: make a library instead of a .o file?
   rts: split process management code from lightweight process implementation
