Files
mercury/tests/declarative_debugger/shallow_helper_1.m
Zoltan Somogyi 0e2784323a Use test case numbers according to our conventions ...
... in the first few test case directories.

tests/analysis_external/Mmakefile:
tests/analysis_external/ext_1.m:
tests/analysis_external/ext_1_runtest.sh:
tests/analysis_external/ext_2.m:
tests/analysis_external/ext_2_runtest.sh:
    Rename the ext and ext2 test cases to ext_1 and ext_2 respectively.

tests/benchmarks/Mmakefile:
tests/benchmarks/deriv_1.exp:
tests/benchmarks/deriv_1.m:
tests/benchmarks/deriv_2.exp:
tests/benchmarks/deriv_2.m:
    Rename the deriv and deriv2 test cases to deriv_1 and deriv_2 respectively.

tests/declarative_debugger/Mercury.options:
tests/declarative_debugger/Mmakefile:
tests/declarative_debugger/ho2.exp:
tests/declarative_debugger/ho2.exp2:
tests/declarative_debugger/ho4.exp:
tests/declarative_debugger/ho5.exp2:
tests/declarative_debugger/ho5.exp3:
tests/declarative_debugger/ho_2.exp:
tests/declarative_debugger/ho_2.exp2:
tests/declarative_debugger/ho_2.inp:
tests/declarative_debugger/ho_2.m:
tests/declarative_debugger/ho_3.exp:
tests/declarative_debugger/ho_3.inp:
tests/declarative_debugger/ho_3.m:
tests/declarative_debugger/ho_4.exp:
tests/declarative_debugger/ho_4.inp:
tests/declarative_debugger/ho_4.m:
tests/declarative_debugger/ho_5.exp:
tests/declarative_debugger/ho_5.exp2:
tests/declarative_debugger/ho_5.exp3:
tests/declarative_debugger/ho_5.inp:
tests/declarative_debugger/ho_5.m:
    Rename the ho2/ho3/ho4/ho5 test cases to ho_2/ho_3/ho_4/ho_5 respectively.

tests/declarative_debugger/revise_1.exp:
tests/declarative_debugger/revise_1.inp:
tests/declarative_debugger/revise_1.m:
    Rename the revise test case to revise_1, due to the existence of
    revise_2.

tests/declarative_debugger/shallow.exp:
tests/declarative_debugger/shallow.m:
tests/declarative_debugger/shallow_helper_1.m:
tests/declarative_debugger/shallow_helper_2.m:
    Rename shallow_2/shallow_3 to shallow_helper_1/shallow_helper_2
    respectively, since they are part of the shallow test case.

tests/declarative_debugger/trust.exp:
tests/declarative_debugger/trust.inp:
tests/declarative_debugger/trust.m:
tests/declarative_debugger/trust_helper_1.m:
tests/declarative_debugger/trust_helper_2.m:
    Rename trust_1/trust_2 to trust_helper_1/trust_helper_2
    respectively, since they are part of the shallow test case.
2024-08-04 16:27:11 +02:00

56 lines
1.0 KiB
Mathematica

%---------------------------------------------------------------------------%
% vim: ts=4 sw=4 et ft=mercury
%---------------------------------------------------------------------------%
:- module shallow_helper_1.
:- interface.
:- pred p(string::in, int::in, int::out) is det.
:- pred q(string::in, int::in, int::out) is det.
:- pred r(string::in, int::in, int::out) is det.
:- implementation.
:- import_module shallow_helper_2.
p(S, M, N) :-
( if pp(S, 1, M) then
N = 1
else
N = -11
).
:- pred pp(string::in, int::in, int::out) is multi.
pp(S, M, N) :-
a(S, M, N).
pp(S, M, N) :-
b(S, M, N).
q(S, M, N) :-
( if a(S, M, -1) then
N = 11
else
N = 2
).
r(S, M, N) :-
( if
not a(S, M, -3),
b(S, M, 5)
then
N = 23
else
N = 0
).
% shallow_helper_2 defines:
%
% :- pred a(string::in, int::in, int::out) is multi.
%
% a(_, X, X).
% a(_, _, 0).
%
% :- pred b(string::in, int::in, int::out) is det.
%
% b(_, _, 5).