1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<!--
***********************************************************************
FUNNELWEB MANUAL WEB PAGE
=========================
Copyright (c) Ross N. Williams 1992,1999. All rights reserved.
Permission is granted to redistribute and use this manual in
any medium, with or without modification, provided that all
notices (including, without limitation, the copyright
notice, this permission notice, any record of modification,
and all legal notices) are preserved on all copies, that all
modifications are clearly marked, and that modified versions
are not represented as the original version unless all the
modifications since the manual's original release by Ross N.
Williams (www.ross.net) consist of translations or other
transformations that alter only the manual's form, not its
content. THIS MANUAL IS PROVIDED "AS IS" AND WITHOUT ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND
FITNESS FOR A PARTICULAR PURPOSE. TO THE EXTENT PERMITTED BY
LAW THERE IS ABSOLUTELY NO WARRANTY.
***********************************************************************
-->
<HEAD>
<TITLE>5.2 Wish List</TITLE>
<STYLE TYPE="text/css"> <!-- A {text-decoration: none} // --> </STYLE>
</HEAD>
<BODY BACKGROUND="binary/background.gif"
BGCOLOR="#FFFFFF"
TEXT="#000000"
VLINK="#660000"
LINK="#FF0000"
ALINK="#CC0000">
<TABLE WIDTH="490">
<TR>
<TD WIDTH="130" VALIGN="top">
<IMG SRC="binary/d_clear.gif" ALT="" WIDTH="130" HEIGHT="1"><BR>
<FONT SIZE="2">
<BR>
<A HREF="http://www.ross.net/"
TARGET="rosshome"
onClick="window.open('','rosshome','location,status,menubar,scrollbars,resizable',false).focus(); return true;"
>
<IMG SRC="binary/rossnet_logo.gif"
WIDTH="64" HEIGHT="32"
BORDER="0" ALT="RossNet"
HSPACE="0" VSPACE="1"></A><BR>
<BR>
<A HREF="../index.shtml"
TARGET="funnelweb"
onClick="window.open('','funnelweb','location,status,menubar,scrollbars,resizable',false).focus(); return true;"
>
<IMG SRC="binary/linklogo.gif"
WIDTH="64" HEIGHT="32"
BORDER="0" ALT="FunnelWeb"
HSPACE="0" VSPACE="1"></A><BR>
<BR>
<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0><TR><TD BGCOLOR="#000000">
<A HREF="../reference/index.html"
TARGET="funnelwebreference"
onClick="window.open('','funnelwebreference','location,status,menubar,scrollbars,resizable',false).focus(); return true;"
><FONT COLOR="#FFFFFF"><B>Reference</B></FONT></A><BR>
<BR>
<A HREF="../tutorial/index.html"
TARGET="funnelwebtutorial"
onClick="window.open('','funnelwebtutorial','location,status,menubar,scrollbars,resizable',false).focus(); return true;"
><FONT COLOR="#FFFFFF"><B>Tutorial</B></FONT></A><BR>
<BR>
<A HREF="index.html"><FONT COLOR="#FFFFFF"><B>Developer</B></FONT></A><BR>
<A HREF="compile.html"><FONT COLOR="#FFFFFF">1 Compile</FONT></A><BR>
<A HREF="design.html"><FONT COLOR="#FFFFFF">2 Design</FONT></A><BR>
<A HREF="implement.html"><FONT COLOR="#FFFFFF">3 Implement</FONT></A><BR>
<A HREF="modify.html"><FONT COLOR="#FFFFFF">4 Modify</FONT></A><BR>
<A HREF="misc.html"><FONT COLOR="#FFFFFF">5 Misc</FONT></A><BR>
<A HREF="gpl.html"><FONT COLOR="#FFFFFF">6 Licence</FONT></A><BR>
<BR>
<A HREF="search.html"><FONT COLOR="#FFFFFF"><B>SEARCH</B></FONT></A><BR>
</FONT>
</TD></TR></TABLE>
</TD>
<TD WIDTH="360" VALIGN="top">
<FONT SIZE="3">
<A HREF="index.html"><IMG SRC="binary/title.gif"
WIDTH="316" HEIGHT="24"
BORDER="0" ALT="FunnelWeb Developer Manual"
HSPACE="0" VSPACE="0"></A>
<P><FONT SIZE="5">5.2 Wish List</FONT><BR>
<P>This page contains the wish list that was included in
the original 1992 FunnelWeb Hacker's Manual. As hardly any
changes have been made since then, I thought I'd just
include it here verbatim.
<P><BR><FONT SIZE="4"><STRONG>Documentation</STRONG></FONT><BR>
<P><B>An official example:</B> A official example
program written using FunnelWeb should be constructed and
made available.
<P><B>Index program:</B> In order to typeset the
documentation, a portable index sorting program is required.
One should be written and added to the distribution
kit. Perhaps this could be the
official example!
<P><BR><FONT SIZE="4"><STRONG>Command Line Interface</STRONG></FONT><BR>
<P><B>Buffer length:</B> Currently the FunnelWeb
shell uses the <SAMP>COMLINE_MAX</SAMP> constant to size its
internal command line buffers. This is untenable. The
maximum length of a shell command line should not be machine
dependent.
<P><B>Antiquated Features:</B> As the FunnelWeb
language develops, it is likely that some changes will have
to be made that will render one or more language constructs
obsolete. When this happens, it may be necessary to add a
command line option that has the power to turn on and off
warnings or errors flagging antiquated
features.
<P><BR><FONT SIZE="4"><STRONG>Shell Interpreter</STRONG></FONT><BR>
<P><B>SETALL command:</B> When writing FunnelWeb
scripts, it is sometimes desirable to set <I>all</I> of
FunnelWeb's options to some particular value
so that the script is not vulnerable to changes in
FunnelWeb's default values which might occur from time to
time. To this end, it may be worth creating a
"<TT>SETALL</TT>" command that is identical to the
"<TT>SET</TT>" command except that it will generate an error
if the value of an option is not specified
explicitly.
<P><B>Recursion test:</B> A test should be added to
test for recursive invocation in a
shellscript.
<P><B>Diagnostic counting:</B> The code for counting
diagnostics in the script interpreter is rather messy and
perhaps even buggy. It should be cleaned up and
commented.
<P><B>Argument counting:</B> In the
<SAMP>command.c</SAMP> module, there is a variable that counts
the arguments to a command. Currently it takes the value of
the number of parameters including the command verb. This
has turned out to make the code less readable. It should be
changed to be the number of arguments to the command verb.
<P><B>Make facility:</B> It may be worth building
some sort of make facility into the script language so as to
support machines such as the Macintosh that do not already
have this facility.
<P><B>Signature file:</B> One problem with using
FunnelWeb in conjunction with an external <SAMP>Make</SAMP>
facility is that a user might change a FunnelWeb source file
without making changes that will affect the files that it
generates. If FunnelWeb is then run and the "<TT>+D</TT>"
option is on, then the output files will be deleted (to
avoid further <SAMP>Make</SAMP> propagations). If
<SAMP>Make</SAMP> then has a production linking the
<SAMP>.fw</SAMP> file to its output files, then it may conclude
that the output files are still out of date. To solve the
problem, FunnelWeb could be changed to write a
<SAMP>.sig</SAMP> file whenever it processes a <SAMP>.fw</SAMP>
file. The <SAMP>Make</SAMP> production could then be wired up
to link the <SAMP>.fw</SAMP> file to the <SAMP>.sig</SAMP> file
instead of to the output files.
<P><BR><FONT SIZE="4"><STRONG>Language Design</STRONG></FONT><BR>
<P>Some proposed changes to FunnelWeb do not correspond to
any particular component of FunnelWeb and are really to do
with the design of the input language.
<P><B>Output or file?:</B> The "<TT>@O</TT>" special
sequence for defining an output file is somewhat
non-mnemonic and can be confused with zero ("<TT>0</TT>").
Perhaps it should be replaced by the "<TT>@F</TT>"
sequence.
<P><B>Syntax of section names:</B> Currently section
names use the same syntax as macro names. For example
"<TT>@<Sloth@></TT>". It can be argued that angle brackets
should be reserved only for macro names and that some other
syntax should be found for delimiting section names. This is
not a clear issue. It could also be argued that they are
both names, and that because sections can inherit their
names from the macros they contain, that the names are of
the same "type".
<P><B>One macro per section:</B> One particular style
of using FunnelWeb is to have at most one macro definition
per section. It may be worth adding a pragma that instructs
FunnelWeb to enforce this.
<P><B>Should @\{ suppress EOL?:</B> When defining a
macro in FunnelWeb, it seems to be rule rather than the
exception that the "<TT>@\{</TT>" be followed by
"<TT>@-</TT>". This suppresses the EOL on the definition
line, allowing the first line of the macro to be placed
immediately above and in line with the other lines without
introducing an EOL at the start of the macro text. One
option is to introduce a pragma to determine whether to
suppress EOLs following "<TT>@\{</TT>".
<P><B>Pragma syntax:</B> It is not clear how
"loose" the syntax of pragmas should be. Perhaps
they should be case insensitive.
<P><B>Conditionals:</B> Depending on demand, it may
be worth reintroducing some sort of conditional feature into
FunnelWeb. However, it would have to be very simple to
compete with the various ways in which conditionals can
already be fudged within FunnelWeb as it
stands.
<P><B>File markers:</B> It might be worth modifying
the language so that a special syntactical marker is
required at the start and end of files. This will assist in
detecting truncations and other
corruptions.
<P><B>Formal parameter lists:</B> It might be worth
changing over to a syntax for formal parameter lists that
does not require the <SAMP>@(</SAMP> and <SAMP>@)</SAMP>.
However, they could be retained as optional for backward
compatibility.
<P><BR><FONT SIZE="4"><STRONG>Scanner/Mapper</STRONG></FONT><BR>
<P><B>All non-contiguous mappings:</B> Currently
FunnelWeb requires that all input files be mapped into a
contiguous lump of memory. This caused problems for two
reasons. First, to do this, one has to allocate the memory
first, and to do that, you have to know how long the file
is, and it turns out that finding out the length of a file
in a portable manner is very inefficient. Second, although
IBM PC compatibles may have megabytes of memory, it is
segmented into blocks of at most 64K. This means that
FunnelWeb currently cannot read a file longer than 64K on a
PC.
These problems could be avoided if the mapper and scanner
were reorganized to allow input files to be read in and
stored as a linked list of chunks of text rather than a
contiguous block.
<P><B>EOL is unspecifiable:</B> FunnelWeb uses ASCII
character decimal ten (10) internally to represent logical
end-of-line and is currently organized so that if one of
these is inserted into the text by the user using a
"<TT>@^D(10)</TT>", it will be written out as
a logical end of line, rather than as a single ASCII
character 10. This should be
fixed.
<P><B>Allow mnemonics for unprintables:</B> FunnelWeb
allows users to insert unprintable characters into the
output using the "<TT>@^D(ddd)</TT>" special
sequence. Perhaps it would be changed so that it understands
ASCII standard mnemonics such as "<TT>LF</TT>" as well as
ASCII numbers.
<P><B>Version pragma:</B> A "<TT>version</TT>" pragma
should be added that allows the user to specify in the input
file the version of FunnelWeb that was around when the input
file was created. At a later date, such a construct would be
very useful for determining how an input file should be
updated if the FunnelWeb language has changed between
versions.
<P><BR><FONT SIZE="4"><STRONG>Parser</STRONG></FONT><BR>
<P>There are no proposals to change the parser except as a
consequence of other proposals.
<P><BR><FONT SIZE="4"><STRONG>Analyser</STRONG></FONT><BR>
<P><B>Recursion detection:</B> Currently the
FunnelWeb analyser flags, with an error, all macros with an
infinite expansion. This would be best changed to flagging
all macros that are directly or indirectly recursive. To do
this, Tarjan's algorithm<STRONG>[Tarjan72]</STRONG> for the detection of strong components
should be installed.
<P><B>Once only macros:</B> By default FunnelWeb
prevents a macro from being called more than once unless it
has a "<TT>@M</TT>" associated with it. However, FunnelWeb
does allow a macro that calls such a macro to be called more
than once. Perhaps this "loophole" should be plugged
somehow.
<P><BR><FONT SIZE="4"><STRONG>Tangle</STRONG></FONT><BR>
<P>The Tangler is one of the cleanest components of
FunnelWeb, as basically all it has to do is expand some very
well-defined macros.
<P><B>Text indentation:</B> Currently FunnelWeb
supports <I>no indentation</I> and <I>blank
indentation</I> . A third form could be added if it was
considered necessary. <I>Text indentation</I> is the same
as <I>blank indentation</I> except that instead of
indenting with blanks, FunnelWeb would indent with the text
to the left of the called macro. This facility could be
useful for commenting out large bodies of text in languages
that do not have multi-line comments (e.g. Ada). A
discussion of the pros and cons of this form of indentation
appears earlier.
<P><BR><FONT SIZE="4"><STRONG>Weave</STRONG></FONT><BR>
<P>Perhaps FunnelWeb's weakest aspect is its typesetting
facility.
<P><B>Align table of contents:</B> When FunnelWeb
generates a table of contents, the section numbers are not
quite aligned with the start of the controlling heading
above them.
<P><B>Typesetting strength:</B> It should be possible
to specify the level of typesetting strength for headings so
that short documents do not look overdone when typeset. A
new pragma would be good for
this.
<P><B>Typeset a portion:</B> Sometimes it is
desirable to typeset just a portion of a program. A command
line option could be added to do this. The option could
accept as its argument, a string containing a list of
section numbers or heading names.
<P><B>Generic typesetter option:</B> In addition to
building in a number of different versions of Weave, one for
each popular typesetter, it would be possible to add a
special generic format where the typeset output is expressed
in terms of <I>FunnelWeb macros</I> . The user could then
specify macro definitions for a non-supported typesetter and
run the output through FunnelWeb Tangle to get a typeset
file in a format suitable for the unsupported
typesetter.
<P><B>Suppression of include files:</B> It should be
possible to specify in the input file that particular
included files not appear in the typeset output. Currently,
the fact that an inclusion has occurred is not even
represented in the typeset output. Suppression of inclusions
is particularly necessary where a library of macros has been
included at the top of each of a group of source
files.
<P><B>Cross reference of identifiers:</B> WEB
provides a list of identifiers and a list of all the
definitions in which they are used. A similar feature could
be added to FunnelWeb.
<P><B>Support for non-printables:</B> Currently
FunnelWeb does not provide support for typesetting the
special "<TT>@\circumflex(num)</TT>" sequences. This should
be added.
<P><B>Support for @+ sequences:</B> Currently Weave
does not see "<TT>@+</TT>" sequences as such. Instead it
perceives them as ordinary EOLs. However, there are
arguments for typesetting them specially.
<P><B>Typeset text in macro bodies:</B> One of the
much-loved features of WEB is the way that it allows the
user to switch recursively between document and program
formats. FunnelWeb does not allow this, but should. In
FunnelWeb, the delimiters "<TT>@{</TT>" and
"<TT>@}</TT>" are already used consistently to delimit
macro text. The "<TT>@[</TT>" and "<TT>@]</TT>" sequences
have been reserved for the delimitation of documentation
text.
<P><B>Non-tt typesetting:</B> The current version of
FunnelWeb sets all its macro text in <SAMP>tt font</SAMP>. This
is both a blessing and a curse. It is a blessing because it
connects the reader directly to the code, with no
complicated intermediary. It is a curse because it looks
ugly compared to the beautifully typeset programs produced
by other literate programming tools.
<P>The difficulty with adding such beautiful typesetting is
that it is necessarily language-specific. Keywords and
syntax differ from language to language and it would not be
easy to come up with a set of language independent rules.
<P>One approach is to write a set of Weave back-ends, one for
each language. Another approach is to <I>generate</I> back
ends. This is the approach taken in the <I>Spider</I>
system<STRONG>[Ramsey89]</STRONG>. In the
<I>Spider</I> system, the programmer writes production
rules for converting lexical components of the program text
into typesetter instructions. The <I>Spider</I> program
reads these rules and generates a new version of WEB suited
for the target language.
<P>For FunnelWeb a slightly different system is proposed in
which Spider-like rules appear in the input file and are
used directly by Weave to perform the typesetting. An
intermediate abstract typesetting language could be used so
that the productions can be made language specific, but not
typesetter specific.
<P><BR><FONT SIZE="4"><STRONG>Lister</STRONG></FONT><BR>
<P><B>Glue factor:</B> A glue factor could be added
that determines how many lines can be in between two
diagnostics in the listing before the two groups of lines
are joined together in the listing with no intervening
ellipsis.
<P><BR><FONT SIZE="4"><STRONG>Diagnostics</STRONG></FONT><BR>
<P><B>Advisory information:</B> Some of FunnelWeb's
diagnostics provide a detailed explanatory paragraph. While
this information might be useful the first time, it has the
capacity to clog up a listing file if the user has made the
same error many times. To solve this problem, FunnelWeb
could be modified so that such explanations are only
displayed the first time the error occurs.
<P><B>Abort after n errors:</B> A facility could be
added to prevent FunnelWeb's scanning, parsing, and
analysing phases from continuing if a certain number of
errors have already been issued.
<P><BR><FONT SIZE="4"><STRONG>Speed</STRONG></FONT><BR>
<P><B>Measurement of speed:</B> Although FunnelWeb
can generate a breakdown of where it is spending its time,
it does not give a final rating in lines per minute. This
should be added.
<P><B>Find the hot spots:</B> Although FunnelWeb has
been designed to allow high speed, not much effort has so
far been made to make it fast. This should be done.
<P><B>Change some declarations:</B> FunnelWeb is full
of variable declarations where the variables are wider than
they need be. Replacing these might speed it up.
<P><BR><FONT SIZE="4"><STRONG>Correctness</STRONG></FONT><BR>
<P><B>Bounds analysis:</B> Not much effort has gone
into the design of FunnelWeb's input boundaries. An analysis
should be made of FunnelWeb's behaviour when the following
quantities are stretched:
<P>
<UL>
<LI> Input line length.
<LI> Input file size.
<LI> Number of macros.
<LI> Length of macro.
</UL>
<P>In particular, FunnelWeb's behaviour at 32K and 64K
boundaries should be observed.
<P><B>Stack detection:</B> Macintosh THINK-C provides
just 6K of memory for the stack. It might be worth adding
checks to make sure that the stack is not being blown.
<P><BR><FONT SIZE="4"><STRONG>Test Suite</STRONG></FONT><BR>
<P>The following tests should be added to the test suite:
<P>
<PRE>
Lister
------
LR01: Test with a full listing with no diagnostics.
LR02: Test with a full listing with diagnostics.
LR03: Test abbreviated listing with no diagnostics.
LR04: Test abbreviated listing with diagnostics.
LR05: Test error context with nearby diagnostics.
Boundary Cases
--------------
Static analysis might preclude the need for
most of these tests.
BC01: Test what happens when memory runs out.
BC02: File with a single line of a megabyte.
BC03: File of a megabyte of EOLs.
BC04: Output file with an extremely long line.
BC05: Output file with one million lines.
BC06: Test on a file with very many macros.
General
-------
GN01: A large legal input file exercising
as many features as possible.
1. Test listing file.
2. Test output files.
3. Test typeset file.
GN... A selection of ten real-life FunnelWeb files.
</PRE>
<P><BR><FONT SIZE="4"><STRONG>Platform-Specific Changes</STRONG></FONT><BR>
<P><B>Icon for the Macintosh:</B> Currently no icon
is supplied for the Macintosh version of FunnelWeb. An icon
depicting a spider or a funnelled web of some kind would
seem appropriate.
<P>
<TABLE WIDTH="100%">
<TR>
<TD ALIGN="left" VALIGN="bottom"><A HREF="misc_versions.html"><IMG SRC="binary/fw_left.gif" HEIGHT="32" WIDTH="32" BORDER="0" ALT="Prev"></A></TD>
<TD ALIGN="center" VALIGN="bottom"><A HREF="misc.html"><IMG SRC="binary/fw_up.gif" HEIGHT="32" WIDTH="32" BORDER="0" ALT="Up"></A></TD>
<TD ALIGN="right" VALIGN="bottom"><A HREF="misc_suggestions.html"><IMG SRC="binary/fw_right.gif" HEIGHT="32" WIDTH="32" BORDER="0" ALT="Next"></A></TD>
</TR>
</TABLE>
<P>
<HR>
<FONT SIZE="2">
<A HREF="mailto:webmaster@ross.net">Webmaster</A>
<A HREF="copyright.html">Copyright © Ross N. Williams 1992,1999. All rights reserved.</A><BR>
</FONT>
</FONT>
</TD>
</TR>
</TABLE>
</BODY>
<!-- *********************************************************************** -->
<!-- End Of A FunnelWeb Manual Web Page (www.ross.net/funnelweb/) -->
<!-- *********************************************************************** -->
</HTML>
|