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
|
<HTML>
<HEAD>
<!-- This HTML file has been created by texi2html 1.29
from ../tnf/pp.tnf on 12 Febuary 2003 -->
<TITLE>Products and Parameters Reference - Testing a Generated Processor</TITLE>
</HEAD>
<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000EE" VLINK="#551A8B" ALINK="#FF0000" BACKGROUND="gifs/bg.gif">
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0" VALIGN=BOTTOM>
<TR VALIGN=BOTTOM>
<TD WIDTH="160" VALIGN=BOTTOM><IMG SRC="gifs/elilogo.gif" BORDER=0> </TD>
<TD WIDTH="25" VALIGN=BOTTOM><img src="gifs/empty.gif" WIDTH=25 HEIGHT=25></TD>
<TD ALIGN=LEFT WIDTH="600" VALIGN=BOTTOM><IMG SRC="gifs/title.gif"></TD>
</TR>
</TABLE>
<HR size=1 noshade width=785 align=left>
<TABLE BORDER=0 CELLSPACING=2 CELLPADDING=0>
<TR>
<TD VALIGN=TOP WIDTH="160">
<h4>General Information</h4>
<table BORDER=0 CELLSPACING=0 CELLPADDING=0>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="index.html">Eli: Translator Construction Made Easy</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="gindex_toc.html">Global Index</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="faq_toc.html" >Frequently Asked Questions</a> </td></tr>
</table>
<h4>Tutorials</h4>
<table BORDER=0 CELLSPACING=0 CELLPADDING=0>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="EliRefCard_toc.html">Quick Reference Card</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="novice_toc.html">Guide For new Eli Users</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="news_toc.html">Release Notes of Eli</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="nametutorial_toc.html">Tutorial on Name Analysis</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="typetutorial_toc.html">Tutorial on Type Analysis</a></td></tr>
</table>
<h4>Reference Manuals</h4>
<table BORDER=0 CELLSPACING=0 CELLPADDING=0>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="ui_toc.html">User Interface</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="pp_toc.html">Eli products and parameters</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="lidoref_toc.html">LIDO Reference Manual</a></td></tr>
</table>
<h4>Libraries</h4>
<table BORDER=0 CELLSPACING=0 CELLPADDING=0>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="lib_toc.html">Eli library routines</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="modlib_toc.html">Specification Module Library</a></td></tr>
</table>
<h4>Translation Tasks</h4>
<table BORDER=0 CELLSPACING=0 CELLPADDING=0>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="lex_toc.html">Lexical analysis specification</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="syntax_toc.html">Syntactic Analysis Manual</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="comptrees_toc.html">Computation in Trees</a></td></tr>
</table>
<h4>Tools</h4>
<table BORDER=0 CELLSPACING=0 CELLPADDING=0>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="lcl_toc.html">LIGA Control Language</a> </td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="show_toc.html">Debugging Information for LIDO</a> </td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="gorto_toc.html">Graphical ORder TOol</a> </td></tr>
</table>
<p>
<table BORDER=0 CELLSPACING=0 CELLPADDING=0>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="fw_toc.html">FunnelWeb User's Manual</a> </td></tr>
</table>
<p>
<table BORDER=0 CELLSPACING=0 CELLPADDING=0>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="ptg_toc.html">Pattern-based Text Generator</a> </td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="deftbl_toc.html">Property Definition Language</a> </td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="oil_toc.html">Operator Identification Language</a> </td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="tp_toc.html">Tree Grammar Specification Language</a> </td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="clp_toc.html">Command Line Processing</a> </td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="cola_toc.html">COLA Options Reference Manual</a> </td></tr>
</table>
<p>
<table BORDER=0 CELLSPACING=0 CELLPADDING=0>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="idem_toc.html">Generating Unparsing Code</a> </td></tr>
</table>
<p>
<table BORDER=0 CELLSPACING=0 CELLPADDING=0>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="mon_toc.html">Monitoring a Processor's Execution</a> </td></tr>
</table>
<h4>Administration</h4>
<table BORDER=0 CELLSPACING=0 CELLPADDING=0>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="sysadmin_toc.html">System Administration Guide</a> </td></tr>
</table>
<HR WIDTH="100%">
<CENTER> <A HREF="mailto:elibugs@cs.colorado.edu"><IMG SRC="gifs/button_mail.gif" NOSAVE BORDER=0 HEIGHT=32 WIDTH=32></A><A HREF="mailto:elibugs@cs.colorado.edu">Questions, Comments, ....</A></CENTER>
</TD>
<TD VALIGN=TOP WIDTH="25"><img src="gifs/empty.gif" WIDTH=25 HEIGHT=25></TD>
<TD VALIGN=TOP WIDTH="600">
<H1>Products and Parameters Reference</H1>
<P>
<IMG SRC="gifs/empty.gif" WIDTH=25 HEIGHT=25 ALT=""><A HREF="pp_3.html"><IMG SRC="gifs/prev.gif" ALT="Previous Chapter" BORDER="0"></A>
<IMG SRC="gifs/empty.gif" WIDTH=25 HEIGHT=25 ALT=""><A HREF="pp_5.html"><IMG SRC="gifs/next.gif" ALT="Next Chapter" BORDER="0"></A>
<IMG SRC="gifs/empty.gif" WIDTH=25 HEIGHT=25 ALT=""><A HREF="pp_toc.html"><IMG SRC="gifs/up.gif" ALT="Table of Contents" BORDER="0"></A>
<IMG SRC="gifs/empty.gif" WIDTH=25 HEIGHT=25 ALT="">
<HR size=1 noshade width=600 align=left>
<H1><A NAME="SEC29" HREF="pp_toc.html#SEC29">Testing a Generated Processor</A></H1>
<P>
After all of the inconsistencies detected by Eli have been removed from a set of
specifications, the generated processor must be run with typical input data
<A NAME="IDX83"></A>
to verify that the specifications actually describe the desired behavior.
Since improper processor behavior is always due to a specification error,
the specifications must be altered whenever such behavior occurs.
This means that a new processor must be generated and testing continued.
The products and parameters described in this section allow the user to remain
within the Eli system during this entire process.
<P>
<H2><A NAME="SEC30" HREF="pp_toc.html#SEC30">cmd -- Command Line to be Executed</A></H2>
<P>
<A NAME="IDX84"></A>
<PRE>
+cmd
</PRE>
<P>
A specification of a command line to be executed by the host machine.
This parameter is a list of the words of the command line.
Each word is specified by an odin-expression, and may be either a string or
a file.
Files are specified by parenthesized odin-expressions; strings are not
parenthesized:
<P>
<PRE>
+cmd=(sets.specs :exe)
+cmd=diff (result) (expected)
+cmd=sort -u
</PRE>
<P>
<H2><A NAME="SEC31" HREF="pp_toc.html#SEC31">stdout -- Standard Output from Processor Execution</A></H2>
<P>
<A NAME="IDX85"></A>
<PRE>
:stdout
</PRE>
<P>
A file containing the result of applying a filter to another file.
The filter is specified by the <CODE>+cmd</CODE> parameter attached to the
filtered file.
If no <CODE>+cmd</CODE> parameter is attached to the filtered file then the
result is simply the filtered file itself.
<P>
A typical situation is to use the generated processor to filter a data
file:
<P>
<PRE>
data +cmd=(sets.specs :exe) :stdout
</PRE>
<P>
<H2><A NAME="SEC32" HREF="pp_toc.html#SEC32">output -- Files Resulting from Processor Execution</A></H2>
<P>
<A NAME="IDX86"></A>
<PRE>
:output
</PRE>
<P>
The execution directory after applying a filter to a file.
The filter is specified by the <CODE>+cmd</CODE> parameter attached to the
filtered file.
If no <CODE>+cmd</CODE> parameter is attached to the filtered file then the
result will be an empty directory.
<P>
A typical situation is to use the generated processor to filter a data
file.
If the generated processor creates files as a side effect of processing the
data, these files will be in the derived directory:
<P>
<PRE>
data +cmd=(sets.specs :exe) :output
</PRE>
<P>
<H2><A NAME="SEC33" HREF="pp_toc.html#SEC33">run -- Execute the Processor in the Current Directory</A></H2>
<P>
<A NAME="IDX87"></A>
<PRE>
:run
</PRE>
<P>
Execution of a specified command line in a specified directory.
This derivation must be applied to a directory object, and requires a
<CODE>+cmd</CODE> parameter (see <A HREF="pp_4.html#SEC30">cmd -- Command Line to be Executed</A>).
<P>
<PRE>
. +cmd=(sets.specs :exe) (input) :run
testdir +cmd=myprog -u (input (sets.specs :exe) :stdout) :run
</PRE>
<P>
Every request for <CODE>run</CODE> re-executes the command,
regardless of whether anything on which the execution depends has changed.
No other products can be derived from <CODE>run</CODE>.
In particular, it is not possible to obtain warning messages or error
reports by appending <CODE>:warning</CODE> or <CODE>:error</CODE> (see <A HREF="pp_3.html#SEC24">warning -- Warning Messages and Error Reports</A>)
to this derivation.
If a warning message or error report is generated, Eli will specify
the derivation step for which warning or abort status was set.
The target of the derivation should be changed to this step,
followed by <CODE>:warning</CODE> or <CODE>:error</CODE>,
and the modified request submitted to Eli.
<P>
<H2><A NAME="SEC34" HREF="pp_toc.html#SEC34">Debugging -- Debug a Program Interactively at the Source Level</A></H2>
<P>
<A NAME="IDX88"></A>
<A NAME="IDX89"></A>
<A NAME="IDX90"></A>
<PRE>
:dbx
+core=( <VAR>file</VAR> ) :dbx
:gdb
+core=( <VAR>file</VAR> ) :gdb
</PRE>
<A NAME="IDX91"></A>
<A NAME="IDX92"></A>
<P>
<CODE>dbx</CODE> starts an interactive
<A NAME="IDX93"></A>
session with the source-level debugger
<A NAME="IDX94"></A>
of the machine on which Eli is running.
This session allows controlled execution
<A NAME="IDX95"></A>
of the generated processor.
Execution takes place in the current working directory, and
all of the source files of the generated compiler are made available.
<CODE>dbx</CODE> must be used with the <CODE>debug</CODE> parameter
(see <A HREF="pp_4.html#SEC38">debug -- Request debugging information in object files</A>).
<P>
Alternatively, <CODE>gdb</CODE> can be used to use the GNU debugger
<A NAME="IDX96"></A>
<CODE>gdb</CODE>
<A NAME="IDX97"></A>
instead of <CODE>dbx</CODE>.
Both <CODE>dbx</CODE> and <CODE>gdb</CODE> check the environment variable
<CODE>ELI_DEBUGGER</CODE>.
<A NAME="IDX98"></A>
If <CODE>ELI_DEBUGGER</CODE> is set, then its value is taken as the name of the
debugger to be used.
The debugger whose name is the value of <CODE>ELI_DEBUGGER</CODE> must accept the
same parameters as either the Berkeley debugger dbx or the GNU debugger
gdb.
After setting <CODE>ELI_DEBUGGER</CODE>, use either <CODE>dbx</CODE> or <CODE>gdb</CODE> to
activate your program, depending upon which set of parameters is
appropriate.
<P>
An existing core file can be supplied by specifying the <CODE>core</CODE>
parameter.
<P>
Every request for <CODE>dbx</CODE> or <CODE>gdb</CODE> re-executes the generated processor,
regardless of whether anything on which the execution depends has changed.
No other products can be derived from <CODE>dbx</CODE> or <CODE>gdb</CODE>.
In particular, it is not possible to obtain warning messages or error
reports by appending <CODE>:warning</CODE> or <CODE>:error</CODE> (see <A HREF="pp_3.html#SEC24">warning -- Warning Messages and Error Reports</A>)
to this derivation.
If a warning message or error report is generated, Eli will specify
the derivation step for which warning or abort status was set.
The target of the derivation should be changed to this step,
followed by <CODE>:warning</CODE> or <CODE>:error</CODE>,
and the modified request submitted to Eli.
<P>
<H2><A NAME="SEC35" HREF="pp_toc.html#SEC35">Monitoring -- Monitor a program at the specification level</A></H2>
<P>
<A NAME="IDX99"></A>
<PRE>
:mon
<A NAME="IDX100"></A>:mongdb
</PRE>
<A NAME="IDX101"></A>
<P>
<CODE>mon</CODE> starts an interactive session with the Noosa
<A NAME="IDX102"></A>
monitoring
<A NAME="IDX103"></A>
system (see <A HREF="mon_toc.html">Monitoring Reference Manual</A>). This session
allows execution monitoring
<A NAME="IDX104"></A>
of the generated processor at the level of the specifications used to
generate it. This concentration on the specification level contrasts
with the use of debuggers to monitor the processor's execution in terms
of its source code (see <A HREF="pp_4.html#SEC34">Debugging -- Debug a Program Interactively at the Source Level</A>).
<A NAME="IDX105"></A>
<P>
<CODE>mongdb</CODE> allows specification-level monitoring to be mixed with
source-level debugging using gdb
(see <A HREF="pp_4.html#SEC34">Debugging -- Debug a Program Interactively at the Source Level</A>). When using this mode of monitoring, the
source-level debugger has control of the executing program and runs as a
child of the monitoring system. Consequently, the monitoring system is
inactive whenever the debugger is at its prompt level.
These derivations can be affected by the setting of the
<A NAME="IDX106"></A>
<CODE>ELI_DEBUGGER</CODE> environment variable. If this variable is set, it
is assumed to be a gdb-compatible debugger. Thus you can use other
debuggers that support the same command-line options. For example,
graphical debuggers such as ddd can be used.
<P>
<CODE>monitor</CODE> (see <A HREF="pp_4.html#SEC36">monitor -- Request monitoring support</A>) must appear as a parameter in any of
these derivations in order to obtain a processor that includes the
monitoring code. For the <CODE>mon</CODE> and <CODE>mongdb</CODE> derivations, the
<CODE>arg</CODE> parameter (see <A HREF="pp_4.html#SEC37">arg -- Supply Command Line Parameters</A>) can be used to specify command-line
arguments to the program being monitored.
<P>
<PRE>
sets.specs +monitor +arg=(input) :mon
</PRE>
<P>
<H2><A NAME="SEC36" HREF="pp_toc.html#SEC36">monitor -- Request monitoring support</A></H2>
<P>
<A NAME="IDX107"></A>
<PRE>
+monitor
</PRE>
<P>
If the <CODE>monitor</CODE> parameter is used, Eli includes monitoring support
in the generated processor. Processors containing monitoring support
can be monitored at the specification level using the Noosa
<A NAME="IDX108"></A>
monitoring
<A NAME="IDX109"></A>
environment (see <A HREF="mon_toc.html">Execution Monitoring Reference</A>) via the
<CODE>mon</CODE>,
<A NAME="IDX110"></A>
or <CODE>mongdb</CODE>
<A NAME="IDX111"></A>
products (see <A HREF="pp_4.html#SEC35">Monitoring -- Monitor a program at the specification level</A>). For <CODE>mongdb</CODE> to be useful, the
<CODE>debug</CODE> parameter must also be used (see <A HREF="pp_4.html#SEC38">debug -- Request debugging information in object files</A>).
<A NAME="IDX112"></A>
<P>
<H2><A NAME="SEC37" HREF="pp_toc.html#SEC37">arg -- Supply Command Line Parameters</A></H2>
<P>
<A NAME="IDX113"></A>
<PRE>
+arg='<VAR>item</VAR> …'
+arg=(<VAR>file</VAR>)
</PRE>
<P>
The specified items are supplied as command line parameters
<A NAME="IDX115"></A>
<A NAME="IDX114"></A>
to the generated processor when it is executed by <CODE>mon</CODE>
or <CODE>mongdb</CODE>.
An item is any sequence of non-white-space characters other than
apostrophes.
Items are separated by white space.
Any number of items may be specified.
<P>
<H2><A NAME="SEC38" HREF="pp_toc.html#SEC38">debug -- Request debugging information in object files</A></H2>
<P>
<A NAME="IDX116"></A>
<PRE>
+debug
</PRE>
<P>
If the <CODE>debug</CODE> parameter is used, all compilations are given the
<CODE>-g</CODE> flag.
<A NAME="IDX117"></A>
This causes the compilers to provide additional information for the
source-level debuggers <CODE>dbx(1)</CODE> and <CODE>gdb</CODE>.
See <A HREF="pp_4.html#SEC34">Debugging -- Debug a Program Interactively at the Source Level</A>. In conjunction with the <CODE>monitor</CODE> parameter
(see <A HREF="pp_4.html#SEC36">monitor -- Request monitoring support</A>), <CODE>debug</CODE> enables the use of <CODE>mongdb</CODE>.
See <A HREF="pp_4.html#SEC35">Monitoring -- Monitor a program at the specification level</A>.
<P>
<H2><A NAME="SEC39" HREF="pp_toc.html#SEC39">printtokens -- Request Token Printing Code</A></H2>
<P>
<A NAME="IDX118"></A>
<PRE>
+printtokens
</PRE>
<P>
If <CODE>printtokens</CODE> is specified, the generated processor will print the
source text coordinates,
<A NAME="IDX119"></A>
internal code
<A NAME="IDX120"></A>
and intrinsic value
<A NAME="IDX121"></A>
for each basic symbol
<A NAME="IDX122"></A>
as it is read.
This listing is useful to verify that the lexical analysis specification is
correct, and also to obtain a frequency distribution of the kinds of basic
symbols appearing in a program.
<P>
<HR size=1 noshade width=600 align=left>
<P>
<IMG SRC="gifs/empty.gif" WIDTH=25 HEIGHT=25 ALT=""><A HREF="pp_3.html"><IMG SRC="gifs/prev.gif" ALT="Previous Chapter" BORDER="0"></A>
<IMG SRC="gifs/empty.gif" WIDTH=25 HEIGHT=25 ALT=""><A HREF="pp_5.html"><IMG SRC="gifs/next.gif" ALT="Next Chapter" BORDER="0"></A>
<IMG SRC="gifs/empty.gif" WIDTH=25 HEIGHT=25 ALT=""><A HREF="pp_toc.html"><IMG SRC="gifs/up.gif" ALT="Table of Contents" BORDER="0"></A>
<IMG SRC="gifs/empty.gif" WIDTH=25 HEIGHT=25 ALT="">
<HR size=1 noshade width=600 align=left>
</TD>
</TR>
</TABLE>
</BODY></HTML>
|