[m-rev.] for review: do not generate trace events in private_builtin
Ian MacLarty
maclarty at cs.mu.OZ.AU
Thu Nov 17 23:03:56 AEDT 2005
Define locals copies of some procedures called by private_builtin that
are in modules which could be traced. In decldebug grades the
declarative debugger assumes all calls are traced, unless they are to
builtin predicates. If a builtin predicate then generates events (by
calling a predicate from a module that is traced) the subterm dependency
tracking algorithm gets confused, because it can't match the goals in
the body of the predicate that calls the builtin predicate with the
events generated by the predicate.
library/builtin.m:
Remove unneccesary imports.
library/exception.m:
Export builtin_throw so that it can be called directly from
private_builtin. private_builtin must call builtin_throw directory
to avoid generating trace events. builtin_throw is exported in
such a way that it won't appear in the library reference.
library/private_builtin.m:
library/type_desc.m:
Move the implementation of type_of from type_desc to private_builtin
so that it doesn't generate trace events when called from
private_builtin.
Define duplicate versions of some predicates in the string, std_util
and char modules to avoid generating events in private_builtin.
The duplicate predicates are all simple, and so are unlikely to
require maintenance. Also only the required modes of the predicates
are duplicated in private_builtin.
Replace calls to string.append_list with single strings.
Define a duplicate version of error which does the same thing as
require.error, but doesn't generate any events.
library/std_util.m:
(Secretly) export the definition of the univ type, so that
private_builtin can construct a univ without calling the univ function
and so generating trace events.
tests/debugger/declarative/Mmakefile:
tests/debugger/declarative/typed_unify.exp:
tests/debugger/declarative/typed_unify.inp:
tests/debugger/declarative/typed_unify.m:
Add a regression test that tracks a subterm through type_to_univ
(which calls private_builtin.typed_unify). Previously the
declarative debugger bailed out when tracking the subterm.
The test in only applicable to decldebug grades.
tests/debugger/loopcheck.exp
The event reported by this test case has changed, because the calls
to procedures in private_builtin no longer generate any trace events.
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list