home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 211.lha / Spiff / paper.ms < prev    next >
Text File  |  1996-02-14  |  25KB  |  820 lines

  1. .ll 6i
  2. .nr PO 1.15i
  3. .nr HM 0i
  4. .nr FM 1.05i
  5. .TL
  6. SPIFF -- A Program for Making Controlled Approximate Comparisons of Files
  7. .AU
  8. Daniel Nachbar
  9. .AI
  10. Software Engineering Research Group
  11. Bell Communications Research
  12. Morristown, New Jersey
  13. .AB
  14. The well known program 
  15. .B
  16. diff
  17. .R
  18. [1]
  19. is inappropriate for some
  20. common tasks such as comparing the output of floating
  21. point calculations where roundoff errors
  22. lead 
  23. .B
  24. diff
  25. .R
  26. astray and comparing program source code
  27. where some differences in the text (such as white space and comments)
  28. have no effect on the operation of the compiled code. A new program,
  29. named 
  30. .B
  31. spiff,
  32. .R
  33. addresses these and other similar cases
  34. by lexical parsing of the input files and then applying
  35. a differencing algorithm to the token sequences.  
  36. .B
  37. Spiff
  38. .R
  39. ignores differences
  40. between floating point numbers that are below a user settable tolerance.
  41. Other features include user settable commenting and literal string
  42. conventions and a choice of differencing algorithm.
  43. There is also an interactive mode wherein the input texts are displayed
  44. with differences highlighted.  The user can change numeric tolerances
  45. "on the fly" and 
  46. .B
  47. spiff
  48. .R
  49. will adjust the highlighting accordingly. 
  50. .AE
  51. .SH
  52. Some Troubles With Diff
  53. .PP
  54. Over the past several years, it has been fairly easy to tell when 
  55. a new type of computer arrived at a nearby computer center.
  56. The best clue was the discordant chorus of
  57. groaning, sighing, gnashing of teeth, pounding of foreheads on desks,
  58. and other sounds of distress.  Tracing these noises to their source, one
  59. would find some poor soul in the process of installing
  60. a numerical analysis package on the new machine.
  61. .PP
  62. One might expect that "moving up" to a new machine
  63. would be a cause for celebration.
  64. After all, new machines are typically bigger, faster,
  65. and better than old machines.
  66. However, the floating point arithmetic on any new machine is frequently
  67. slightly different from any old machine.
  68. As a consequence,
  69. software package test routines produce output that is slightly different,
  70. but still correct, on the new machines.
  71. Serious troubles appear when the person installing the software package
  72. attempts to compare the test output files from two different machines
  73. by using a difference finding program such as
  74. .B
  75. diff.
  76. .R
  77. Programs such as 
  78. .B
  79. diff
  80. .R
  81. do a character by character comparison.
  82. .B
  83. Diff
  84. .R
  85. finds a great many differences,  most of which
  86. are due to roundoff errors in the least significant digits of floating point
  87. numbers.  Others are the result of differences in the way
  88. in which the two test runs
  89. had printed a number (3.4e-1 vs. 0.34).
  90. In one case, the test suite for the S statistical analysis package[2],
  91. over 1700 floating point numbers are produced
  92. (per machine). In the eyes of 
  93. .B
  94. diff,
  95. .R
  96. roughly 1200 of these numbers are different.
  97. However, none of the "differences" are important ones.
  98. Nonetheless, software installers wind up inspecting the output by eye.
  99. .PP
  100. A similar problem arises when one attempts to
  101. look for differences between two versions
  102. of the same C program.
  103. .B
  104. Diff
  105. .R
  106. reports many differences that are not of interest.  In
  107. particular, white space (except inside quotation marks) and
  108. anything inside a comment have no effect on the operation of the compiled
  109. program and are usually not of interest.
  110. .B
  111. Diff
  112. .R
  113. does have a mode of operation where white space
  114. within a line (spaces and tabs) can be ignored.
  115. However, differences in the placement of newlines cannot be ignored.
  116. This is particularly annoying since C programming
  117. styles differ on whether to place a newline character before or after the '{'
  118. characters that start blocks.
  119. .SH
  120. The Problem in General Terms
  121. .PP
  122. As already mentioned, programs such as 
  123. .B
  124. diff
  125. .R
  126. do
  127. a character-by-character comparison of the input files.
  128. However, when it comes to interpreting
  129. the contents of a file (either by a human or by a program)
  130. it is almost never the case that characters
  131. are treated individually. Rather, characters make up tokens such
  132. as words and numbers, or act as separators between these tokens.
  133. When comparing files, one is usually looking for
  134. differences between these tokens, not the characters that make them up
  135. or the characters that separate them.
  136. .PP
  137. What is needed is a program that first parses the input files
  138. into tokens, and then applies a differencing algorithm to the token
  139. sequences. 
  140. In addition to finding differences in terms of tokens,
  141. it is possible to interpret the tokens and
  142. compare different types of tokens in different ways.  Numbers, for example,
  143. can differ by a lot or a little.\**
  144. .FS
  145. Current differencing programs do not have such a notion because
  146. the difference between two characters is a binary function.
  147. Two characters are the same or they are not.
  148. .FE
  149. It is possible to use a tolerance when comparing two number tokens and
  150. report only those differences that exceed the tolerance.
  151. .SH
  152. Design Issues
  153. .PP
  154. A serious design issue for such a program is how
  155. complex to make the parse.  The
  156. .I
  157. deeper
  158. .R
  159. one goes in the parsing the larger
  160. the unit of text that can be manipulated.  For instance, if one is looking
  161. for differences in C code, a complete parse tree can be produced and
  162. the differencing algorithm could examine insertion and deletion of entire
  163. branches of the tree.  However, deep parsing requires much more
  164. complex parsing and slower differencing algorithms.
  165. .PP
  166. Another design issue is deciding how to interpret the tokens.
  167. Closer interpretation may lead to greater flexibility in comparing tokens, but
  168. also results in a more cumbersome and error-prone implementation.
  169. .PP
  170. In the program described here, we attempt to keep both the depth
  171. of the parse and the semantics of the tokens to a minimum.
  172. The parse is a simple
  173. lexical parse with the input files broken up into one dimensional
  174. sequences of numbers, literal strings and white space.
  175. Literal strings and white space are not interpreted. Numbers
  176. are treated as representing points on the real number line.
  177. .SH
  178. Default Operation
  179. .PP
  180. .B
  181. Spiff\**
  182. .R
  183. .FS
  184. We picked the name as a way to pay a small tribute to that famous intergalactic
  185. adventurer Spaceman Spiff[3].
  186. .B
  187. Spiff
  188. .R
  189. is also a contraction of "spiffy diff".
  190. .FE
  191. works very much like 
  192. .B
  193. diff.
  194. .R
  195. It reads two files, looks
  196. for differences, and prints a listing of the
  197. differences in the form of
  198. an edit script.\**
  199. .FS
  200. An edit script is a sequence of insertions and deletions
  201. that will transform the first file into the second.
  202. .FE
  203. As already suggested, 
  204. .B
  205. spiff
  206. .R
  207. parses the files into
  208. literal strings and real numbers.
  209. The definition of these tokens can be altered somewhat by the user
  210. (more on this later).  For now, suffice it
  211. to say that literals are strings like "cow", "sit",
  212. "into", etc.  Real numbers look like "1.3", "1.6e-4" and so on.
  213. All of the common formats for real numbers are recognized.
  214. The only requirements for a string to be
  215. treated as a real number is the presence
  216. of a period and at least one digit.
  217. By default, a string of digits without a decimal point
  218. (such as "1988") is not considered to be a real number,
  219. but rather a literal string.\**
  220. Each non-alphanumeric character (such as #$@^&*)
  221. is parsed into a separate literal token.
  222. .FS 
  223. Integer numbers are often used as indices, labels, and so on.
  224. Under these circumstances, it is more appropriate to treat them as literals.
  225. Our choice of default was driven by a design goal
  226. of having 
  227. .B
  228. spiff
  229. .R
  230. be very conservative
  231. when choosing to ignore differences.
  232. .FE
  233. .PP
  234. Once 
  235. .B
  236. spiff
  237. .R
  238. determines the two sequences of tokens,
  239. it compares members of the first sequence with
  240. members of the second sequence.
  241. If two tokens are of different types,
  242. .B
  243. spiff
  244. .R
  245. deems them to be different, regardless of their content.
  246. If both tokens are literal tokens, 
  247. .B
  248. spiff
  249. .R
  250. will deem them
  251. to be different if any of their characters differ.
  252. When comparing two real numbers,
  253. .B
  254. spiff
  255. .R
  256. will deem them to be different only if
  257. the difference in their values exceeds a user settable tolerance.
  258. .SH
  259. Altering Spiff's Operation 
  260. .PP
  261. To make 
  262. .B
  263. spiff
  264. .R
  265. more generally useful, the user can control:
  266. .IP \(bu
  267. how text strings are parsed into tokens 
  268. .IP \(bu
  269. how tokens of the same type are compared
  270. .IP \(bu
  271. the choice of differencing algorithm used
  272. .IP \(bu
  273. and the granularity of edit considered by the differencing algorithm.
  274. .LP
  275. .PP
  276. These features are described next.
  277. .SH
  278. Altering the Parse
  279. .PP
  280. The operation of the parser can be altered in several ways.
  281. The user can specify that delimited sections of text are to be ignored
  282. completely.  This is useful for selectively ignoring the contents of
  283. comments in programs.  Similarly, the user can specify that
  284. delimited sections of text (including white space)
  285. be treated as a single literal token.  So, literal strings in program
  286. text can be treated appropriately.
  287. Multiple sets of
  288. delimiters may be specified at once (to handle cases such as the
  289. Modula-2 programming language
  290. where there are two ways to specify quoted strings). At present,
  291. the delimiters must be fixed string (possibly restricted to the
  292. beginning of the line) or end of line.
  293. As a consequence of the mechanism for specifying literal strings,
  294. multicharacter operators (such as the += operator in C)
  295. can be parsed into a single token.
  296. .PP
  297. As yet, no provision is made for allowing delimiter
  298. specification in terms of regular expressions.  This omission 
  299. was made for the sake of simplifying the parser.
  300. Nothing prevents the addition of regular expressions in the
  301. future.  However, the simple mechanism
  302. already in place handles the literal string and commenting conventions
  303. for most well known programming languages.\**
  304. .FS
  305. See the manual page in the appendix for examples of handling
  306. C, Bourne Shell, Fortran, Lisp, Pascal, and Modula-2.  The only
  307. cases that are known not to work are comments in BASIC and
  308. Hollerith strings in Fortran.
  309. .FE
  310. .PP
  311. In addition to controlling literal string and comments, the user
  312. may also specify whether to treat white space characters as any other
  313. non-alphanumeric character (in other words, parse each white space
  314. character into its own literal token),
  315. whether to parse sign markers as part
  316. of the number that they precede or as separate tokens, whether
  317. to treat numbers without printed decimal markers (e.g. "1988") 
  318. as real numbers rather than as literal strings, and whether
  319. to parse real numbers into literal tokens.
  320. .SH
  321. Altering the Comparison of Individual Tokens
  322. .PP
  323. As mentioned earlier, the user can set a tolerance below which differences
  324. between real numbers are ignored.  
  325. .B
  326. Spiff
  327. .R
  328. allows two kinds of tolerances:
  329. absolute and relative. 
  330. Specifying an absolute tolerance will cause 
  331. .B
  332. spiff
  333. .R
  334. to ignore differences
  335. that are less than the specified value.
  336. For instance, specifying an absolute tolerance of 0.01 will
  337. cause only those differences greater than or equal to 0.01 to be reported.
  338. Specifying a relative tolerance will cause 
  339. .B
  340. spiff
  341. .R
  342. to ignore differences that are
  343. smaller than some fraction of the number of larger magnitude.
  344. Specifically, the value of the tolerance is interpreted
  345. as a fraction of the larger (in absolute terms) 
  346. of the two floating point numbers being compared.
  347. For example,
  348. specifying a relative tolerance of 0.1
  349. will cause the two floating point numbers 1.0 and 0.91 to be deemed within
  350. tolerance. The numbers 1.0 and 0.9 will be outside the tolerance.
  351. Absolute and relative tolerances can be OR'ed together.  In fact,
  352. the most effective way to ignore differences that are due to roundoff errors
  353. in floating point calculations is to use both
  354. a relative tolerance (to handle limits in precision) as well as an absolute
  355. tolerance (to handle cases when one number is zero and the other number is
  356. almost zero).\**
  357. .FS
  358. All numbers differ from zero by 100% of their magnitude.  Thus, to handle
  359. numbers that are near zero, one would have to specify a relative tolerance
  360. of 100% which would be unreasonably large when both numbers are non-zero.
  361. .FE
  362. In addition, the user can specify an infinite tolerance.  This is useful
  363. for checking the format of output while ignoring the actual numbers
  364. produced.
  365. .SH
  366. Altering the Differencing Algorithm
  367. .PP
  368. By default, 
  369. .B
  370. spiff
  371. .R
  372. produces a minimal edit sequence (using the Miller/Myers differencing algorithm[4])
  373. that will convert the first file into the second.
  374. However, a minimal edit sequences is not always desirable. 
  375. For example, for the following two tables of numbers:
  376. .DS
  377. 0.1   0.2   0.3                0.2   0.3   0.4
  378. 0.4   0.5   0.6                0.5   0.6   0.7
  379. .DE
  380. a minimal edit sequence to convert the table on
  381. the left into the table on the right be to
  382. would delete the first number (0.1) and insert 0.7 at the end.\**
  383. .FS
  384. The problem of having the elements of tables become misaligned when
  385. the differencing algorithm is trying
  386. to find a minimal number of edits can be reduced somewhat
  387. by retaining newlines and not using tolerances.
  388. Unfortunately, it does not go away.
  389. .FE
  390. Such a result, while logically correct, does not provide a good picture
  391. of the differences between the two files.
  392. In general, for text with a very definite structure (such as tables),
  393. we may not want to consider insertions and deletions at all, but
  394. only one-to-one changes.\**
  395. .FS
  396. A "change" can be expressed as one deletion and one insertion at the same
  397. point in the text.
  398. .FE
  399. So, rather than look for a minimal edit script, we
  400. merely want to compare each token in the first file with
  401. the corresponding token in the second file.
  402. .PP
  403. The user can choose which differencing algorithm to use
  404. (the default Miller/Myers or
  405. the alternative one-to-one comparison)
  406. based upon what is known about the input files. In general,
  407. files produced mechanically
  408. (such the output from test suites) have a very regular structure
  409. and the one-to-one comparison works surprisingly well.
  410. For files created by humans, the Miller/Myers
  411. algorithm is more appropriate.
  412. There is nothing in
  413. .B
  414. spiff's
  415. .R
  416. internal design that limits
  417. the number of differencing algorithms that it can run.
  418. Other differencing algorithms,
  419. in particular the one used in
  420. .B
  421. diff,
  422. .R
  423. will probably be added later.
  424. .SH
  425. Altering the Granularity of the Edit Sequence
  426. .PP
  427. By default,
  428. .B
  429. spiff
  430. .R
  431. produces an edit sequence
  432. in terms of insertions and deletions of individual tokens.
  433. At times it may be more useful to
  434. treat the contents of the files as tokens when looking for differences
  435. but
  436. express the edit script in terms of entire lines of the files rather
  437. than individual tokens.\**
  438. .FS
  439. For instance, if one wants to have 
  440. .B
  441. spiff
  442. .R
  443. produce output that can be fed into
  444. the
  445. .B
  446. ed
  447. .R
  448. editor.
  449. .FE
  450. .B
  451. Spiff
  452. .R
  453. provides a facility for restricting the edits to entire lines.
  454. .SH
  455. Treating Parts of the Files Differently
  456. .PP
  457. For complex input files, it is important that different parts of the
  458. file be treated in different ways.  In other words, it may be impossible
  459. to find one set of parsing/differencing rules that work well for the
  460. entire file.
  461. .B
  462. Spiff
  463. .R
  464. can differentiate between parts of the input files on two bases:
  465. within a line and between lines.
  466. Within a line, a different tolerance can be applied to each real number.
  467. The tolerances are specified in terms of the ordinal position of the
  468. numbers on the line (i.e. one tolerance is applied to the first real number
  469. on each line, a different tolerance is applied to the second number on
  470. each line, a third tolerance is applied to the third, and so on).  If more
  471. numbers appear on a line than there are tolerances specified, the last
  472. tolerance is applied to all subsequent numbers on the line (i.e., if the user
  473. specifies three tolerances, the third is applied to the third, fourth
  474. fifth, . . . number on each line).  This feature is useful for applying
  475. different tolerances to the different columns of a table of numbers.
  476. .PP
  477. Between lines, the user can place "embedded commands" in the input files.
  478. These commands
  479. are instructions to parser that can change what tolerances are attached
  480. to real numbers and the commenting and literal string conventions used by the
  481. parser.  Embedded commands are flagged to the parser
  482. by starting the line with a user-specified
  483. escape string.  By combining within line and between line differentiation,
  484. it is possible for the user to specify a different tolerance
  485. for every single real number in the input files.
  486. .SH
  487. Visual Mode
  488. .PP
  489. So far,
  490. .B
  491. spiff's
  492. .R
  493. operation as an intelligent filter has been described.
  494. .B
  495. Spiff
  496. .R
  497. also has an interactive mode.
  498. When operating in interactive mode,
  499. .B
  500. spiff
  501. .R
  502. places corresponding sections of the input files 
  503. side by side on user's screen.\**
  504. .FS
  505. Although the current implementation of
  506. .B
  507. spiff
  508. .R
  509. runs in many environments,
  510. interactive mode works only under the MGR window manager.[5]
  511. Other graphics interfaces will probably be added over time.
  512. .FE
  513. Tokens are compared using a one-to-one ordinal comparison, and any tokens that
  514. are found to be different are highlighted in reverse video.
  515. The user can interactively change the tolerances and 
  516. .B
  517. spiff
  518. .R
  519. will alter the display
  520. to reflect which real numbers exceed the new tolerances.
  521. Other commands allow the user to page through the file and exit.
  522. .SH
  523. Performance
  524. .PP
  525. Two components of 
  526. .B
  527. spiff,
  528. .R
  529. the parser and the differencing algorithm,
  530. account for most of the execution time.  Miller and Myers compare their
  531. algorithm to the one used in the diff program.  To restate their results,
  532. the Miller/Myers algorithm is faster for files
  533. that have relatively few differences but much
  534. slower (quadratic time) for files with a great many differences.
  535. .PP
  536. For cases where the files do not differ greatly,
  537. parsing the input files takes most of the time (around 80% of the total).\**
  538. .FS
  539. No effort has yet been made to make the parser run more quickly.
  540. A faster parser could no doubt be written by generating a special state machine.
  541. .FE
  542. The performance of the parser is roughly similar to programs that do a similar
  543. level of parsing (i.e. programs that must examine each character in the file).
  544. For files where roughly half of the tokens are real numbers, 
  545. .B
  546. spiff
  547. .R
  548. takes about twice as long to parse the input files
  549. as an
  550. .B
  551. awk
  552. .R
  553. program that counts the number of words in a file:\**
  554. .FS
  555. For
  556. .B
  557. awk,
  558. .R
  559. a word is any string separated by white space.
  560. .FE
  561. .B
  562. .DS
  563. awk '{total += NF}' firstfile secondfile
  564. .DE
  565. .R
  566. .PP
  567. The time that it takes 
  568. .B
  569. spiff
  570. .R
  571. to parse a file is substantially
  572. increased if scanning is done for comments
  573. and delimited literal strings.  The precise effect depends upon the length of
  574. the delimiters, whether they are restricted to appear at beginning of line, and
  575. the frequency with which literals and comments appear in the input files.
  576. As an example, adding the 12 literal conventions\**
  577. .FS
  578. One literal convention is for C literal strings.  The rest enumerate multicharacter
  579. operators.
  580. .FE
  581. and 1 commenting convention
  582. required for C code roughly doubles the time required to parse input files.\**
  583. .FS
  584. So in total, it takes 
  585. .B
  586. spiff
  587. .R
  588. about 4 times longer to parse a C program than it takes
  589. .B
  590. awk
  591. .R
  592. to count the number of words in the same file.
  593. .FE
  594. .PP
  595. A more complete approach to evaluating
  596. .B
  597. spiff's
  598. .R
  599. performance must measure the total time that it takes for the user to complete a
  600. differencing task.  For example, consider one of the
  601. test suites for the S statistical
  602. analysis package mentioned at the beginning of this paper.
  603. The output file for each machine is 427 lines long and contains
  604. 1090 floating point numbers.  It takes
  605. .B
  606. diff 
  607. .R
  608. approximately 2 seconds on one of our "6 MIPS"\** computers
  609. .FS
  610. We will not comment on the usefulness of "MIPS" as a measure
  611. of computing speed.  The numbers provided are only intended to
  612. give the reader some vague idea of how fast these programs run. 
  613. .FE
  614. to compare the two files and produce
  615. an edit script that is 548 lines long containing 1003 "differences"
  616. in the floating point numbers.  It takes the average tester
  617. 5 minutes to print out the edit script and roughly 2 hours to examine
  618. the output by hand to determine that the machines are, in fact,
  619. both giving nearly identical answers.  The total time needed is
  620. 2 hours 5 minutes and 2 seconds.
  621. .PP
  622. In contrast, it takes
  623. .B
  624. spiff
  625. .R
  626. approximately 6 seconds on one of our "6 MIPS" computers to
  627. produce an output file that is 4 lines long.\**
  628. .FS
  629. The output would be zero length except that the output of the
  630. .B
  631. time
  632. .R
  633. command is built into the S tests.
  634. The timing information could easily be ignored using
  635. .B
  636. spiff's
  637. .R
  638. embedded commands. But, as we shall see, it hardly seems worth the trouble.
  639. .FE
  640. It takes the average tester 30 seconds to examine
  641. .B
  642. spiff's
  643. .R
  644. output.  The total for
  645. .B
  646. spiff
  647. .R
  648. is 36 seconds.  Therefore for this case, 
  649. .B
  650. spiff
  651. .R
  652. will get the job done roughly 208.88 times faster than
  653. .B
  654. diff.
  655. .R
  656. .PP
  657. In general, it is misleading to compare
  658. .B
  659. spiff's
  660. .R
  661. speed with that of
  662. .B
  663. diff.
  664. .R
  665. While both programs are looking for differences between files,
  666. they operate on very different types of data (tokens vs. bytes).
  667. An analogous comparison could be made between the speed of an assembler
  668. and the speed of a C compiler.  They are both language translators.
  669. One runs much faster than the other.
  670. None the less, most programmers use the slower program
  671. whenever possible.
  672. .SH
  673. Using Spiff For Making Regression Tests Of Software
  674. .PP
  675. We envision 
  676. .B
  677. spiff
  678. .R
  679. to be the first of several tools for aiding in the now
  680. arduous task of making regression tests.\**
  681. .FS
  682. In software engineering parlance, a "regression test" is the process by
  683. which a tester checks to make sure that the new version of a piece of
  684. software still performs the same way as the older versions 
  685. on overlapping tasks.
  686. .FE
  687. Given 
  688. .B
  689. spiff's
  690. .R
  691. current capabilities, the regression test designer can
  692. take the output of an older version of software and through
  693. the use of literal string and commenting conventions,
  694. specify what parts of the output must remain identical and
  695. what sections can change completely.  By specifying tolerances, the test
  696. designer can take into account how much of a difference in floating
  697. point calculations is acceptable.
  698. .PP
  699. The test designer is also free to
  700. edit the output from the older version of the software and add embedded
  701. commands that can instruct 
  702. .B
  703. spiff
  704. .R
  705. to treat various parts of the output
  706. differently.  The newly edited output can then serve as a template for
  707. the output of later versions of the software.
  708. .PP
  709. Obviously, editing output by hand is a very low level mechanism for adding
  710. specification information.  It is our intention that 
  711. .B
  712. spiff
  713. .R
  714. will become
  715. the last element in a pipeline of programs.  Programs (as yet unwritten) located
  716. earlier in the pipeline
  717. can implement a higher level representation of the specification information.
  718. They read in the old and new input files, add the appropriate embedded commands,
  719. and then pass the results to 
  720. .B
  721. spiff
  722. .R
  723. which will do the actual differencing.
  724. .SH
  725. Future Work
  726. .PP
  727. There are many features that could be added to 
  728. .B
  729. spiff
  730. .R
  731. (if there are not
  732. too many already).  Some of these include: 
  733. .IP \(bu
  734. Using separate differencing algorithms on separate sections of the file
  735. and/or limiting the scope of an edit sequence (fencing) 
  736. .IP \(bu
  737. Providing a more general mechanism for specifying comments and literals
  738. (perhaps allowing specification in terms of regular expressions).
  739. As yet, we have not encountered any important cases where regular expressions
  740. have been needed.  Until such a case is encountered, we will leave regular
  741. expressions out in the name of simplicity.
  742. .IP \(bu
  743. Allowing for a more general specification of what lines should look like.
  744. At present, the user can only specify tolerances for numbers as a function
  745. of their ordinal position on a line.  The difficulty in expanding the
  746. specification abilities of 
  747. .B
  748. spiff
  749. .R
  750. is knowing when to stop.  In the extreme,
  751. we might add all of the functionality of a program such as
  752. .B
  753. awk.\**
  754. .R
  755. .FS
  756. Imagine handling the case such as
  757. "apply this tolerance to all numbers that appear
  758. on a line starting with the word `foo' but only if the number is between 1.9
  759. and 3.6 and the word `bar' does not appear on the line".
  760. .FE
  761. We hope to keep 
  762. .B
  763. spiff
  764. .R
  765. as simple as possible.  Our first efforts in
  766. this direction will try to implement higher level specification functions
  767. outside of 
  768. .B
  769. spiff.
  770. .R
  771. .SH
  772. Acknowledgements
  773. .PP
  774. First and foremost, we thank Stu Feldman for his endless patience, constant encouragement
  775. and numerous good ideas. We also extend thanks to Doug McIlroy for bringing the Miller/Myers
  776. algorithm to our attention, Nat Howard for a key insight
  777. and for his editorial comments
  778. and Steve Uhler and Mike Bianchi for their editorial comments.
  779. .SH
  780. References
  781. .IP [1]
  782. Hunt,J.W. and M.D. McIlroy.
  783. .I
  784. An Algorithm For Differential File Comparisons, 
  785. .R
  786. .B
  787. Bell Labs Computer Science Technical Report,
  788. .R
  789. Number 41, 1975.
  790. .IP [2]
  791. Becker,R.A. and J.M. Chambers (1984).
  792. .B
  793. S \- An Interactive Environment For Data Analysis And
  794. Graphics.
  795. .R
  796. Belmont, CA: Wadsworth Inc.
  797. .IP [3]
  798. Watterson, B. (1987).
  799. .B
  800. Calvin and Hobbes.
  801. .R
  802. New York: Andrews, McMeel & Parker.
  803. .IP [4]
  804. Miller, W. and E.W. Myers.
  805. .I
  806. A File Comparison Program,
  807. .R
  808. .B
  809. Software \-
  810. Practice and Experience
  811. .R
  812. 15, 11, 1025-1040, 1985.
  813. .IP [5]
  814. Uhler, S.A.
  815. .I
  816. MGR -- A Window Manager For UNIX,
  817. .R
  818. Sun User's Group Meeting. September 1986.
  819. .LP
  820.