Files
mercury/extras/morphine/INSTALL-MORPHINE
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

99 lines
2.5 KiB
Bash
Executable File

#!/bin/sh
# Copyright (C) 1999-2001 INRIA/INSA de Rennes/IFSIC.
# This file may only be copied under the terms of the GNU Library General
# Public License - see the file License in the Morphine distribution.
#
# Author : Erwan Jahier <jahier@irisa.fr>
#
# This script creates the Morphine script.
MERCURY_MORPHINE_DIR=`pwd`
export MERCURY_MORPHINE_DIR
cd scripts
rm -f morphine
# Get the Mercury library path (needed in source scenario)
MmcDefault=../../library
echo "What is the complete path of the Mercury library source files? [default=$MmcDefault]"
read RESPONSE
case $RESPONSE in
'') LIB_MERCURY=$MmcDefault;;
*) LIB_MERCURY=$RESPONSE;;
esac
cat << EOF >> morphine
#!/bin/sh
# Copyright (C) 1999 INRIA/INSA de Rennes.
# This file may only be copied under the terms of the GNU Library General
# Public License - see the file License in the Morphine distribution.
#
# Author : Erwan Jahier <jahier@irisa.fr>
#
# Script generated by INSTALL-MORPHINE.
Help="
Name: morphine
Usage: morphine [--no-banner]
Description:
Runs morphine, the Mercury trace analysis system.
"
#This variable should contain the path where Morphine has been installed
MERCURY_MORPHINE_DIR=$MERCURY_MORPHINE_DIR
export MERCURY_MORPHINE_DIR
#This variable should contain the path of the mercury library source files
#(which is needed in the source scenario)
LIB_MERCURY=$LIB_MERCURY
export LIB_MERCURY
case \$1 in
--no-banner) COMMAND="eclipse -b ${MERCURY_MORPHINE_DIR}/source/load_morphine_without_banner.pl " ;;
*) COMMAND="eclipse -b ${MERCURY_MORPHINE_DIR}/source/load_morphine.pl " ;;
esac
exec \$COMMAND
echo \$COMMAND
EOF
cd ..
echo "Compiling Mercury programs..."
[ -d bin ] || mkdir bin
cd ${MERCURY_MORPHINE_DIR}/source
mmake listing.depend
mmake listing
mv ${MERCURY_MORPHINE_DIR}/source/listing ${MERCURY_MORPHINE_DIR}/bin/
chmod a+x ${MERCURY_MORPHINE_DIR}/bin/listing
mmake listing.realclean
mmake generate_pred_cov.depend
mmake generate_pred_cov
mv ${MERCURY_MORPHINE_DIR}/source/generate_pred_cov ${MERCURY_MORPHINE_DIR}/bin/
chmod a+x ${MERCURY_MORPHINE_DIR}/bin/generate_pred_cov
mmake generate_call_site_cov.depend
mmake generate_call_site_cov
mv ${MERCURY_MORPHINE_DIR}/source/generate_call_site_cov ${MERCURY_MORPHINE_DIR}/bin/
chmod a+x ${MERCURY_MORPHINE_DIR}/bin/generate_call_site_cov
mmake generate_pred_cov.realclean
mmake generate_call_site_cov.realclean
chmod a+x ${MERCURY_MORPHINE_DIR}/scripts/morphine
echo "Compiling Morphine files..."
eclipse -b ${MERCURY_MORPHINE_DIR}/source/make_scenario.pl