Files
mercury/tests/debugger/declarative/gcf.m
Mark Brown 5db4b3befd Make declarative debugging enabled by default, and add test cases.
Estimated hours taken: 4

Make declarative debugging enabled by default, and add test cases.
The declarative debugger, while not complete, is fairly stable so
users will be able to experiment with it after this change without
having to re-configure the whole system.  However, the main motivation
for this change is so that developers who make changes to the system
will have access to these test cases.

configure.in:
	Turn the decl-debug feature on by default.

tests/debugger/declarative:
	New directory containing tests for the declarative debugger.

tests/debugger/declarative/*.m:
tests/debugger/declarative/*.inp:
tests/debugger/declarative/*.exp:
	Declarative debugger test cases.

tests/debugger/declarative/Mmakefile:
	Mmakefile to do the declarative debugger tests.

tests/debugger/Mmakefile:
	For each target, make the corresponding target in the
	'declarative' subdirectory.

WORK_IN_PROGRESS:
	Document the new (incomplete) feature.
1999-06-02 07:29:00 +00:00

44 lines
496 B
Mathematica

:- module gcf.
:- interface.
:- import_module io.
:- pred main(io__state::di, io__state::uo) is cc_multi.
:- implementation.
:- import_module std_util, int.
main -->
{
a(X),
X > 15
->
R = yes(X)
;
R = no
},
io__write(R),
io__nl.
:- pred a(int::out) is nondet.
:- pred g(int::out) is multi.
:- pred c(int::in, int::out) is nondet.
:- pred f(int::in) is semidet.
a(X) :-
g(Y),
c(Y, X),
f(X).
g(1).
g(2).
g(3).
g(4).
c(2, 10).
c(2, 11).
c(2, 12).
c(3, 20).
f(X) :-
X > 10.