Files
mercury/tests/declarative_debugger/ho_2.exp2
Zoltan Somogyi 89b05266a1 Provide alternatives to can-fail library functions.
library/array.m:
library/assoc_list.m:
library/bimap.m:
library/bitmap.m:
library/construct.m:
library/deconstruct.m:
library/dir.m:
library/hash_table.m:
library/injection.m:
library/io.stream_db.m:
library/kv_list.m:
library/list.m:
library/map.m:
library/robdd.m:
library/stream.string_writer.m:
library/term_conversion.m:
library/term_to_xml.m:
library/tree234.m:
library/type_desc.m:
library/version_hash_table.m:
    For nearly every ordinary function in this directory that can fail in its
    primary mode (all of which were semidet functions),

    - provide a semidet predicate as an alternative, if it did not
      already exist,

    - implement the function in terms of the predicate, instead of vice versa,

    - mark the semidet function as obsolete in favor of the semidet predicate
      version,

    - fix all the resulting warnings, and then

    - comment out the obsolete pragmas (at least for now).

    Note that this diff does not touch the semidet function in the
    enum typeclass, or the functions that implement that method
    in instances.

NEWS.md:
    Announce the new predicates in the (documented) modules of the library.

browser/term_rep.m:
compiler/lp_rational.m:
compiler/mcsolver.m:
compiler/mode_ordering.m:
compiler/mode_robdd.equiv_vars.m:
compiler/mode_robdd.implications.m:
compiler/old_type_constraints.m:
compiler/pickle.m:
compiler/prog_event.m:
compiler/type_ctor_info.m:
compiler/var_table.m:
tests/hard_coded/bitmap_empty.m:
tests/hard_coded/construct_mangle.m:
tests/hard_coded/construct_packed.m:
tests/hard_coded/construct_test.m:
tests/hard_coded/dummy_type_construct.m:
tests/hard_coded/expand.m:
tests/hard_coded/foreign_enum_rtti.m:
tests/hard_coded/subtype_rtti.m:
tests/hard_coded/term_to_univ_test.m:
tests/hard_coded/type_to_term.m:
tests/hard_coded/type_to_term_bug.m:
    Stop calling the semidet functions from the library that were temporarily
    marked obsolete.

    In a few places, add explicit type qualification to avoid warnings
    about unresolved polymorphism.

tests/hard_coded/test_injection.exp:
    Expect an abort message from the predicate version of a semidet function.

tests/declarative_debugger/ho_2.exp2:
    Update this .exp file for a previous commit.
2024-08-09 09:14:46 +02:00

49 lines
1.3 KiB
Plaintext

1: 1 1 CALL pred ho_2.main/2-0 (det) ho_2.m:14
mdb> echo on
Command echo enabled.
mdb> register --quiet
mdb> break p
0: + stop interface pred ho_2.p/3-0 (det)
mdb> continue
2: 2 2 CALL pred ho_2.p/3-0 (det) ho_2.m:27 (ho_2.m:15)
mdb> finish
11: 2 2 EXIT pred ho_2.p/3-0 (det) ho_2.m:27 (ho_2.m:15)
mdb> dd -d 3 -n 7
p(0, 3, 27)
Valid? no
q(lambda_ho_2_m_28(3), 3, 27)
Valid? yes
Found incorrect contour:
q(lambda_ho_2_m_28(3), 3, 27)
p(0, 3, 27)
Is this a bug? yes
11: 2 2 EXIT pred ho_2.p/3-0 (det) ho_2.m:27 (ho_2.m:15)
mdb> continue
12: 7 2 CALL pred ho_2.p/3-0 (det) ho_2.m:27 (ho_2.m:16)
mdb> finish
21: 7 2 EXIT pred ho_2.p/3-0 (det) ho_2.m:27 (ho_2.m:16)
mdb> dd -d 3 -n 7
p(1, 3, 27)
Valid? no
Found incorrect contour:
q(lambda_ho_2_m_28(3), 3, 27)
p(1, 3, 27)
Is this a bug? yes
21: 7 2 EXIT pred ho_2.p/3-0 (det) ho_2.m:27 (ho_2.m:16)
mdb> continue
22: 12 2 CALL pred ho_2.p/3-0 (det) ho_2.m:27 (ho_2.m:17)
mdb> finish
31: 12 2 EXIT pred ho_2.p/3-0 (det) ho_2.m:27 (ho_2.m:17)
mdb> dd -d 3 -n 7
p(2, 4, 64)
Valid? no
q(lambda_ho_2_m_28(4), 4, 64)
Valid? yes
Found incorrect contour:
q(lambda_ho_2_m_28(4), 4, 64)
p(2, 4, 64)
Is this a bug? yes
31: 12 2 EXIT pred ho_2.p/3-0 (det) ho_2.m:27 (ho_2.m:17)
mdb> continue
27, 27, 64