mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-16 18:03:36 +00:00
Estimated hours taken: 2
Branches: main
Implement impure functions as attributes of user events.
trace/mercury_event_spec.[ch]:
Allow the representation of such attributes in C code, and add the code
to write out such attributes.
trace/mercury_event_scanner.l:
trace/mercury_event_parser.y:
Implement the scanning and parsing of such attributes.
compiler/prog_event.m:
Modify the type of the terms generated by trace/mercury_event_spec.c
to include a pure/impure indication for function attributes.
Take this into account when generating the types of function
attributes.
Simplify some code by eliminating a redundant lookup in a map.
tests/debugger/synth_attr.{m,exp}:
Convert this line to four-space indentation, and update the expected
output to reflect the vim mode line at the top.
tests/debugger/synth_attr_impure.{m,inp,exp}:
tests/debugger/synth_attr_impure_spec:
New test case (a modified version of the synth_attr test case)
to test the new functionality.
tests/debugger/Mercury.options:
tests/debugger/Mmakefile:
Enable the new test case.
In the Mmakefile, delete some redundant 2>&1 constructs that were
apparantly created by careless cut-and-paste.
21 lines
504 B
Plaintext
21 lines
504 B
Plaintext
event set queens
|
|
|
|
event nodiag_fail(
|
|
/* 0 */ test_failed: string,
|
|
/* 1 */ arg_b: int,
|
|
/* 2 */ arg_d: int,
|
|
/* 3 */ arg_list_len: int synthesized by list_len_func(sorted_list),
|
|
/* 4 */ sorted_list: list(int) synthesized by list_sort_func(arg_list),
|
|
/* 5 */ list_len_func: function,
|
|
/* 6 */ list_sort_func: function,
|
|
/* 7 */ arg_list: list(int)
|
|
)
|
|
|
|
event safe_test(
|
|
test_list: listint,
|
|
f: function,
|
|
excp: int synthesized by f(test_list),
|
|
g: impure function,
|
|
seq: int synthesized by g(test_list)
|
|
)
|