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