Improve lex_error() error messages.
[pspp-builds.git] / TODO
1 Time-stamp: <2005-05-02 23:31:38 blp>
2
3 What Ben's working on now.
4 --------------------------
5
6 Workspace exhaustion heuristics.
7
8 Update q2c input format description.
9
10 Rewrite output subsystem, break into multiple processes.
11
12 CROSSTABS needs to be re-examined.
13
14 RANK, which is needed for the Wilcoxon signed-rank statistic, Mann-Whitney U,
15 Kruskal-Wallis on NPAR TESTS and for Spearman and the Johnkheere trend test (in
16 other procedures).
17
18 TODO
19 ----
20
21 lex_token_representation() should take a buffer to fill.
22
23 Make valgrind --leak-check=yes --show-reachable=yes work.
24
25 Add NOT_REACHED() macro.
26
27 Add compression to casefiles.
28
29 There needs to be another layer onto the lexer, which should probably be
30 entirely rewritten anyway.  The lexer needs to read entire *commands* at a
31 time, not just a *line* at a time.  It also needs to support arbitrary putback,
32 probably by just backing up the "current position" in the command buffer.
33
34 Scratch variables should not be available for use following TEMPORARY.
35
36 Details of N OF CASES, SAMPLE, FILTER, PROCESS IF, TEMPORARY, etc., need to be
37 checked against the documentation.  See notes on these at end of file for a
38 start.
39
40 Check our results against the NIST StRD benchmark results at
41 strd.itl.nist.gov/div898/strd
42
43 In debug mode hash table code should verify that collisions are reasonably low.
44
45 Use AFM files instead of Groff font files, and include AFMs for our default
46 fonts with the distribution.
47
48 Storage of value labels on disk is inefficient.  Invent new data structure.
49
50 Add an output flag which would cause a page break if a table segment could fit
51 vertically on a page but it just happens to be positioned such that it won't.
52
53 Fix spanned joint cells, i.e., EDLEVEL on crosstabs.stat.
54
55 Cell footnotes.
56
57 PostScript driver should emit thin lines, then thick lines, to optimize time
58 and space.
59
60 New functions?  var_name_or_label(), tab_value_or_label()
61
62 Should be able to bottom-justify cells.  It'll be expensive, though, by
63 requiring an extra metrics call.
64
65 Perhaps instead of the current lines we should define the following line types:
66 null, thin, thick, double.  It might look pretty classy.
67
68 Perhaps thick table borders that are cut off by a page break should decay to
69 thin borders.  (i.e., on a thick bordered table that's longer than one page,
70 but narrow, the bottom border would be thin on the first page, and the top and
71 bottom borders on middle pages.)
72
73 Support multi-line titles on tables. (For the first page only, presumably.)
74
75 Rewrite the convert_F() function in data-out.c to be nicer code.
76
77 In addition to searching the source directory, we should search the current
78 directory (for data files).  (Yuck!)
79
80 Fix line-too-long problems in PostScript code, instead of covering them up.
81 setlinecap is *not* a proper solution.
82
83 Fix som_columns().
84
85 Has glob.c been pared down enough?
86
87 Improve interactivity of output by allowing a `commit' function for a page.
88 This will also allow for infinite-length pages.
89
90 Implement thin single lines, should be pretty easy now.
91
92 SELECT IF should be moved before other transformations whenever possible.  It
93 should only be impossible when one of the variables referred to in SELECT IF is
94 created or modified by a previous transformation.
95
96 The manual: add text, add index entries, add examples.
97
98 The inline file should be improved: There should be *real* detection of whether
99 it is used (in dfm.c:cmd_begin_data), not after-the-fact detection.
100
101 Figure out a stylesheet for messages displayed by PSPP: i.e., what quotation
102 marks around filenames, etc.
103
104 New SET subcommand: OUTPUT.  i.e., SET OUTPUT="filename" to send output to that
105 file; SET OUTPUT="filename"(APPEND) to append to that file; SET OUTPUT=DEFAULT
106 to reset everything.  There might be a better approach, though--think about it.
107
108 From Zvi Grauer <z.grauer@csuohio.edu> and <zvi@mail.ohio.net>:
109
110    1. design of experiments software, specifically Factorial, response surface
111    methodology and mixrture design.
112
113    These would be EXTREMELY USEFUL for chemists, engineeris, and anyone
114    involved in the production of chemicals or formulations.
115
116    2. Multidimensional Scaling analysis (for market analysis) -
117
118    3. Preference mapping software for market analysis
119
120    4. Hierarchical clustering (as well as partition clustering)
121
122    5. Conjoint analysis
123
124    6. Categorical data analsys ?
125
126 IDEAS
127 -----
128
129 In addition to an "infinite journal", we should keep a number of
130 individual-session journals, pspp.jnl-1 through pspp.jnl-X, renaming and
131 deleting as needed.  All of the journals should have date/time comments.
132
133 Qualifiers for variables giving type--categorical, ordinal, ...
134
135 Analysis Wizard
136
137 Consider consequences of xmalloc(), fail(), hcf() in interactive
138 use:
139 a. Can we safely just use setjmp()/longjmp()?
140 b. Will that leak memory?
141 i. I don't think so: all procedure-created memory is either
142 garbage-collected or globally-accessible.
143 ii. But you never know... esp. w/o Checker.
144 c. Is this too early to worry? too late?
145
146 Need to implement a shared buffer for funny functions that require relatively
147 large permanent transient buffers (1024 bytes or so), that is, buffers that are
148 permanent in the sense that they probably shouldn't be deallocated but are only
149 used from time to time, buffers that can't be allocated on the stack because
150 they are of variable and unpredictable but usually relatively small (usually
151 line buffers).  There are too many of these lurking around; can save a sizeable
152 amount of space at very little overhead and with very little effort by merging
153 them.
154
155 Clever multiplatform GUI idea (due partly to John Williams): write a GUI in
156 Java where each statistical procedure dialog box could be downloaded from the
157 server independently.  The statistical procedures would run on (the/a) server
158 and results would be reported through HTML tables viewed with the user's choice
159 of web browsers.  Help could be implemented through the browser as well.
160
161 HOWTOs
162 ------
163
164 MORE NOTES/IDEAS/BUGS
165 ---------------------
166
167 Sometimes very wide (or very tall) columns can occur in tables.  What is a good
168 way to truncate them?  It doesn't seem to cause problems for the ascii or
169 postscript drivers, but it's not good in the general case.  Should they be
170 split somehow?  (One way that wide columns can occur is through user request,
171 for instance through a wide PRINT request--try time-date.stat with a narrow
172 ascii page or with the postscript driver on letter size paper.)
173
174 NULs in input files break the products we're replacing: although it will input
175 them properly and display them properly as AHEX format, it truncates them in A
176 format.  Also, string-manipulation functions such as CONCAT truncate their
177 results after the first NUL.  This should simplify the result of PSPP design.
178 Perhaps those ugly a_string, b_string, ..., can all be eliminated.
179
180 From Moshe Braner <mbraner@nessie.vdh.state.vt.us>: An idea regarding MATCH
181 FILES, again getting BEYOND the state of SPSS: it always bothered me that if I
182 have a large data file and I want to match it to a small lookup table, via
183 MATCH FILES FILE= /TABLE= /BY key, I need to SORT the large file on key, do the
184 match, then (usually) re-sort back into the order I really want it.  There is
185 no reason to do this, when the lookup table is small.  Even a dumb sequential
186 search through the table, for every case in the big file, is better, in some
187 cases, than the sort.  So here's my idea: first look at the /TABLE file, if it
188 is "small enough", read it into memory, and create an index (or hash table,
189 whatever) for it.  Then read the /FILE and use the index to match to each case.
190 OTOH, if the /TABLE is too large, then do it the old way, complaining if either
191 file is not sorted on key.
192
193 ----------------------------------------------------------------------
194 Statistical procedures:
195
196 For each case we read from the input program:
197
198 1. Execute permanent transformations.  If these drop the case, stop.
199 2. N OF CASES.  If we have already written N cases, stop.
200 3. Write case to replacement active file.
201 4. Execute temporary transformations.  If these drop the case, stop.
202 5. Post-TEMPORARY N OF CASES.  If we have already analyzed N cases, stop.
203 6. FILTER, PROCESS IF.  If these drop the case, stop.
204 7. Pass case to procedure.
205
206 Ugly cases:
207
208 LAG records cases in step 3.
209
210 AGGREGATE: When output goes to an external file, this is just an ordinary
211 procedure.  When output goes to the active file, step 3 should be skipped,
212 because AGGREGATE creates its own case sink and writes to it in step 7.  Also,
213 TEMPORARY has no effect and we just cancel it.  Regardless of direction of
214 output, we should not implement AGGREGATE through a transformation because that
215 will fail to honor FILTER, PROCESS IF, N OF CASES.
216
217 ADD FILES: Essentially an input program.  It silently cancels unclosed LOOPs
218 and DO IFs.  If the active file is used for input, then runs EXECUTE (if there
219 are any transformations) and then steals vfm_source and encapsulates it.  If
220 the active file is not used for input, then it cancels all the transformations
221 and deletes the original active file.
222
223 CASESTOVARS: ???
224
225 FLIP:
226
227 MATCH FILES: Similar to AGGREGATE.  This is a procedure.  When the active file
228 is used for input, it reads the active file; otherwise, it just cancels all the
229 transformations and deletes the original active file.  Step 3 should be
230 skipped, because MATCH FILES creates its own case sink and writes to it in step
231 7.  TEMPORARY is not allowed.
232
233 MODIFY VARS:
234
235 REPEATING DATA:
236
237 SORT CASES:
238
239 UPDATE: same as ADD FILES.
240
241 VARSTOCASES: ???
242 ----------------------------------------------------------------------
243 N OF CASES
244
245   * Before TEMPORARY, limits number of cases sent to the sink.
246
247   * After TEMPORARY, limits number of cases sent to the procedure.
248
249   * Without TEMPORARY, those are the same cases, so it limits both.
250
251 SAMPLE
252
253   * Sample is just a transformation.  It has no special properties.
254
255 FILTER
256
257   * Always selects cases sent to the procedure.
258
259   * No effect on cases sent to sink.
260
261   * Before TEMPORARY, selection is permanent.  After TEMPORARY,
262     selection stops after a procedure.
263
264 PROCESS IF
265
266   * Always selects cases sent to the procedure.
267
268   * No effect on cases sent to sink.
269
270   * Always stops after a procedure.
271
272 SPLIT FILE
273
274   * Ignored by AGGREGATE.  Used when procedures write matrices.
275
276   * Always applies to the procedure.
277
278   * Before TEMPORARY, splitting is permanent.  After TEMPORARY,
279     splitting stops after a procedure.
280
281 TEMPORARY
282
283   * TEMPORARY has no effect on AGGREGATE when output goes to the active file.
284
285   * SORT CASES, ADD FILES, RENAME VARIABLES, CASESTOVARS, VARSTOCASES,
286     COMPUTE with a lag function cannot be used after TEMPORARY.
287
288   * Cannot be used in DO IF...END IF or LOOP...END LOOP.
289
290   * FLIP ignores TEMPORARY.  All transformations become permanent.
291
292   * MATCH FILES and UPDATE cannot be used after TEMPORARY if active
293     file is an input source.
294
295   * RENAME VARIABLES is invalid after TEMPORARY.
296
297   * WEIGHT, SPLIT FILE, N OF CASES, FILTER, PROCESS IF apply only to
298     the next procedure when used after TEMPORARY.
299
300 WEIGHT
301
302   * Always applies to the procedure.
303
304   * Before TEMPORARY, weighting is permanent.  After TEMPORARY,
305     weighting stops after a procedure.
306
307
308 -------------------------------------------------------------------------------
309 Local Variables:
310 mode: text
311 fill-column: 79
312 End: