Files
mercury/tests/debugger/synth_attr_impure_spec
Zoltan Somogyi ac9be23619 Implement impure functions as attributes of user events.
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.
2007-05-01 06:31:26 +00:00

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)
)