Commit Graph

4 Commits

Author SHA1 Message Date
Julien Fischer
e16f7c581b Fix compilation errors in extras.
extras/morphine/source/coverage_util.m:
extras/morphine/source/generate_call_site_cov.m:
extras/morphine/source/generate_pred_cov.m:
extras/morphine/source/listing.m:
     If we're going to keep these files about, at least make them compile
     successfully against the current version of the standard library.
2015-12-16 16:35:43 +11:00
Erwan Jahier
e1b25b19ee Fix the monitors that were computing coverage rates in Morphine.
Estimated hours taken: 10

Branches: main, release

Fix the monitors that were computing coverage rates in Morphine.  The
problem was the following. In order to check that two successes and
one failure occur for a multi predicate, I was looking at two exits
and one fail; but this is wrong since, of course, the two exits can
be produced by different calls, and since all multi predicates ends
up with a fail event. To get it right, I need to associate the call
number to exit and fail events. To do that, I maintain at exit ports
the list of call numbers; when an exit event occurs, I consider it as
covered iff the current call number is in the list. On the contrary,
I consider a failure as covered at a fail port iff the current call
number is not in the list. This also holds for semidet and nondet
procedures.


extras/morphine/non-regression-tests/queens.exp:
	Update the new expected outputs.

extras/morphine/non-regression-tests/queens.in:
	Update the year of the copyrigth message.

extras/morphine/source/call_site_cov.in:
extras/morphine/source/pred_cov.in:
	Change the code so that it does what it is supposed to do.

	Also use a map instead of a list to store what has to be
	covered for each procedure.

extras/morphine/source/generate_pred_cov.m:
extras/morphine/source/generate_call_site_cov.m:
extras/morphine/source/coverage_util.m:
	Generate an initialize/1 predicate that uses map instead of lists.

extras/morphine/source/coverage.op:
	Coverage monitors now output assoc lists.
2002-03-06 07:36:49 +00:00
Simon Taylor
3d3e5f9411 Add io__input_stream_foldl', io__input_stream_foldl_io'
Estimated hours taken: 1

NEWS:
library/io.m:
	Add `io__input_stream_foldl', `io__input_stream_foldl_io'
	and `io__input_stream_foldl2_io', which apply a predicate
	to each character of an input stream in turn.

	Add a new result type `io__maybe_partial_res' which is
	used for operations which can return a partial result
	like io__input_stream_foldl* and io__read_file.

tests/general/io_regression.m:
extras/xml/xml.cat.m:
extras/xml/xml.parse.m:
extras/xml/tryit.m:
extras/morphine/source/coverage_util.m:
	Fix uses of io__read_file and io__read_file_as_string.

tests/general/Mmakefile:
tests/general/io_foldl.{m,exp}:
	Test case.
2002-01-22 14:21:52 +00:00
Erwan Jahier
5f474304c6 Maybe this code is not mature enough (too much XXXs, not enough
tested), but I would like to commit it before I leave on
holidays. Any objection?

--
Estimated hours taken: 40
branches: main.

Add a scenario which provides commands that perform predicate and
call site coverage.


extras/morphine/source/generate_pred_cov.m:
	(New file) Program that parses Mercury modules to
	generate a monitor that performs predicate coverage.

extras/morphine/source/generate_call_site_cov.m:
	(New file) Program that parses Mercury modules to generate
	a monitor that performs call site coverage.

extras/morphine/source/coverage_util.m:
	(New file) Common stuff to generate_pred_cov.m and
	generate_call_site_cov.m

extras/morphine/source/pred_cov.in:
extras/morphine/source/call_site_cov.in:
	(New files) Used to generate the call_site_cov and pred_cov
	monitors.

extras/morphine/source/coverage.op:
	(New file) New scenario that provides call_site_cov/2 and
	pred_cov/2 commands, which perform the predicate and call
	site coverage of a Mercury module.

extras/morphine/non-regression-tests/queens.in:
extras/morphine/non-regression-tests/queens.exp:
	Add a test case for the pred_cov/2 and call_site_cov/2
	commands.

extras/morphine/INSTALL-MORPHINE:
	compile generate_call_site_cov.m and generate_pred_cov.m
	modules when installing morphine.
2001-08-29 12:17:25 +00:00