2024-12-04 04:55 AEDT

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000352mercuryBugpublic2014-09-01 18:14
Reporterwangp 
Assigned Tozs 
PrioritynormalSeverityminorReproducibilityalways
StatusassignedResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary0000352: tabled_for_io with Mercury descendants
DescriptionIn the example, p has attributes may_call_mercury and tabled_for_io. At the end of p, table_io stats prints that the I/O counter = 2. If you retry over p, then at the end, table_io stats prints that counter = 1. Obviously this leads to problems later.

I see that there is an undocumented attribute tabled_for_io_unitize. Perhaps that should be implied if tabled_for_io and may_call_mercury are used together?
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0000762

zs (developer)

The table_for_io attribute was intended for PRIMITIVE I/O operations, which do not call Mercury. Having it misbehave with may_call_mercury is not a surprise.
There should be a check for the conflict.

I don't remember for sure, but I think the table_for_io_unitize attribute wasn't documented because it was not yet ready for prime time. I don't remember whether there was some situation I knew I still had to code to cover, but I do remember that the testing was only superficial; thorough testing still remained to be done.

Once it HAS been done, then yes, turning tabled_for_io into tabled_for_io_unitize in the presence of may_call_mercury would be a good idea.

I won't have much time to look into this for a few days. If this is not urgent, assign the bug to me, and I will have a look at this, probably sometime next week.

~0000777

juliensf (administrator)

There approximately 76 procedures in the standard library that currently have both tabled_for_io and may_call_mercury enabled. The great majority of those seem to make calls back to Mercury in order
to construct some data structure that describes an error condition (or other such return value).
+Notes

-Issue History
Date Modified Username Field Change
2014-08-18 17:41 wangp New Issue
2014-08-18 17:41 wangp File Added: table_io_callback.m
2014-08-18 21:10 zs Note Added: 0000762
2014-08-19 10:49 wangp Assigned To => zs
2014-08-19 10:49 wangp Status new => assigned
2014-09-01 18:14 juliensf Note Added: 0000777
+Issue History