todo.txt 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. --*- Mode: Indented-text; -*-
  2. Scheme 48: list of bugs and things to do.
  3. Last update by RAK on 26 Feb 2001.
  4. Programming environment:
  5. Fuller on-line documentation.
  6. Error recovery. Can do better than ,proceed. LOAD should set up
  7. restart continuations.
  8. Types in scheme-interface (and elsewhere) aren't as tight as they
  9. could be.
  10. Add LET continuation "pessimization" to retain the environment longer.
  11. Have the disassembler display local variable names.
  12. This ought to be recoverable, but isn't always:
  13. > (let loop ((x '())) (loop (cons 3 x)))
  14. not enough room in heap for stack
  15. ,exit 'not-a-fixnum should not exit
  16. Semicolon comments don't quite work after commands (extra newline
  17. required).
  18. Command (and procedure) to change current directory.
  19. Some procedure in EXEC to take the place of ## in moving values from
  20. one package to another: (transport <from-package> <exp> <to-package>
  21. [<id>]), and/or have eval etc. commands return the value
  22. Batch mode should write error messages to (error-output).
  23. In command preferred mode you have to do
  24. in foo run bar
  25. instead of
  26. in foo bar
  27. if foo is a read-only package
  28. ,reset should flush the input buffer
  29. Export the VM's preview displayer as a procedure for debugging.
  30. Performance:
  31. More compact representation for debugging data?
  32. Leaf procedure compilation (RK's rts/no-leaf-env.scm): if no
  33. continuations or lambdas, skip the make-env and access locals
  34. using stack-ref. Expected to gain about 6% in speed.
  35. Optimize loops somehow (maybe using call-template opcode and/or
  36. opportunistic compilation).
  37. The CAML light implementation has good documentation and patches
  38. for optimizing the interpreter's switch (*pc++); perhaps we
  39. could lift some of it. (Range check isn't necessary.)
  40. Floating point support in VM.
  41. Faster bignum printer (e.g. the one Richard wrote - but it would be
  42. nice if it were an option tied to bignums, not built in to the
  43. initial image).
  44. Ratnum multiplication and division might be made more efficient by
  45. taking cross-GCD's.
  46. Native code compiler...
  47. Compiler bugs / features:
  48. Inliner is buggy: if (lambda (x) (f) x) is in-lined the call to
  49. F fill occur before the argument is evaluated.
  50. It would be nice if macro's and inliner's sources were saved only
  51. if we are going to be doing doing any reificiation.
  52. Big Scheme bugs / features:
  53. It would be nice to be able to simulate control-C interrupts on
  54. a port other than the initial input port - e.g., on a socket.
  55. This would require creating a new thread to act as a front end.
  56. The new thread would read characters eagerly, buffering
  57. everything except control-C's for the thread that is doing the
  58. real work, and converting control-C's into interrupts.
  59. big/pipe.scm uses the old port interface
  60. Tracking output ports are not thread safe.
  61. Module system bugs:
  62. ,untrace should undefine as well if the variable wasn't bound
  63. before.
  64. Compound signatures don't get updated when a component signature
  65. changes. They contain a list of signatures with no reinitialization
  66. thunk a la structures and packages.
  67. Module system features:
  68. Check for name conflicts between opened structures.
  69. Check for cycles in structure inheritance.
  70. Deal with package system state better (for linker). Maybe each
  71. package should point to a data structure containing
  72. *location-uid*, location-name-table, *package-uid*,
  73. package-name-table, and perhaps the compiler-state as well (see
  74. segment.scm).
  75. VM:
  76. Add a test to configure.in that can determine whether ld -A works.
  77. If both it and dlopen() work, then both kinds of dynamic loading
  78. should be made available.
  79. Interrupt while writing out image causes an exit. [Fixed?]
  80. A jump-back instruction? Might be easier to use than call-template.
  81. Scrutinize all VM fatal errors to see if any can be recovered
  82. from. E.g. "out of ports" shouldn't cause a VM halt, it should
  83. just cause open-port to return #f or an error code. [Fixed?]
  84. Get VM interp.scm-without-gc.scm working again.
  85. Documentation:
  86. Describe (optimize auto-integrate).
  87. How to use the static linker.
  88. How initial.image and scheme48.image get built, really.
  89. Techniques for debugging the runtime system (debug/for-debugging.scm).
  90. Cleanup:
  91. VM:
  92. Rename "unassigned" to "uninitialized"? Or phase it out entirely.
  93. In unix.c, use getrusage(), when available, to get run time.
  94. Run-time / features / development environment:
  95. A DIVIDE procedure (maybe an instruction as well) that returns two
  96. values.
  97. Figure out how to merge the two type systems (META-METHODS and
  98. META-TYPES). The generic function system could make use of the
  99. SUBTYPE? and INTERSECT? predicates.
  100. Correct floating point, esp. reading and printing. And
  101. (= 1/3 (/ 1. 3.)) returns #t, but ought to return #f.
  102. Parameterize over file name syntax somehow. Currently
  103. big/filename.scm assumes Unix (cf. DIRECTORY-COMPONENT-SEPARATOR,
  104. FILE-NAME-PREFERRED-CASE). Perhaps there should be VM support for
  105. this.
  106. Make sure that the disassembler and assembler are inverses of one
  107. another.
  108. Disassembler should generate S-expression first, and then print
  109. it independently.
  110. Combine conditions, signals, and handle into a single structure?
  111. Figure out a better way to implement ##.
  112. Be consistent about "filename" versus "file-name".
  113. Compiler / linker / module system:
  114. The fluids $losers and $package-losers in env/pedit.scm are never
  115. bound. Could they be replaced with cells?
  116. The "reflective tower" isn't really a reflective tower, it's a
  117. syntactic tower. Rename it.
  118. The scanner (file loader) should operate on streams, not lists.
  119. This would result in more uniform and flexible internal
  120. protocols for reading files, scanning for DEFINEs, compiling,
  121. and running - passes could be interleaved or separated easily.
  122. Flush link/data.scm. Linker should instead open the VM module
  123. that includes vm/data.scm.
  124. Flush (optimize ...) clause in DEFINE-STRUCTURE in favor of
  125. optimizer argument to SCAN-STRUCTURES.
  126. Vector templates ought to be supported in SYNTAX-RULES.
  127. The DEFINE-INTERFACE forms should contain types for every exported
  128. variable; the code in cprim.scm (and recon.scm?) shouldn't have
  129. to worry about setting up types.
  130. Add ENVIRONMENT-DEFINED? ?
  131. Make USUAL-TRANSFORM return a transform?
  132. make-c-header-file should put definitions for the interrupt
  133. enumeration into scheme48.h, and unix.c et al should use them.
  134. Flatloading and loading are very different operations, so FLATLOAD
  135. shouldn't do SET-PACKAGE-LOADED?!; instead it should maintain its
  136. own list of flatloaded packages (in a global variable, say).
  137. Etc:
  138. Start using a source control system (like rcs or Perforce).
  139. There ought to be a sanity check to ensure that the size of the
  140. area as computed by static.scm agrees with the size as computed
  141. by C's sizeof() operator.
  142. What should (syntax-rules (x) ((foo ?body) (let ((x 1)) ?body))) do?
  143. To: jar@cs.cornell.edu
  144. Subject: Not a bug this time. :-)
  145. Date: Tue, 22 Feb 94 19:13:37 -0500
  146. From: Paul Stodghill <stodghil@cs.cornell.edu>
  147. The result of ,expand can be confusing. In particular, it doesn't
  148. distinguish between different identifiers that have the same name.
  149. For instance, in the example below, it would be more useful if the result
  150. of the ,expand was something like,
  151. '((lambda (.x.1) (set! x (- .x.1))) x)
  152. Welcome to Scheme 48 0.31 (made by jar on Sun Feb 13 18:33:57 EST 1994).
  153. Copyright (c) 1993, 1994 by Richard Kelsey and Jonathan Rees.
  154. Please report bugs to scheme-48-bugs@altdorf.ai.mit.edu.
  155. Type ,? (comma question-mark) for help.
  156. > (define-syntax foo
  157. (syntax-rules ()
  158. ((foo var) ((lambda (x) (set! var (- x))) var))))
  159. > (define x 1)
  160. > ,expand (foo x)
  161. '((lambda (x) (set! x (- x))) x)
  162. >