Download ECLiPSe: Tutorial - Computer Science & Engineering

Transcript
result/0 Creates results for all files which have been compiled with coverage counters.
result/1 This predicate takes a single argument which is the name of the file to print the
coverage counters for.
result/2 The result predicate has a two argument form, the second argument defining a
number of flags which control (amongst other things)
• The directory in which to create the results file. Default: coverage.
• The format of the results file (html or text). Default: html.
J
See coverage library and pretty printer library for more details
Figure 6.2: Result generating commands
This will create the result file coverage/queens.html which can be viewed using any browser.
It contains a pretty-printed form of the source, annotated with the values of the code coverage
counters as described above. An example is shown in figure 6.1.
For extra convenience the predicate result/0 is provided which will create results for all files
which have been compiled with coverage counters.
Having generated and viewed results for one run, the coverage counters can be reset by calling
?- coverage:reset_counters.
Yes (0.00s cpu)
65