View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0000352 | mercury | Bug | public | 2014-08-18 17:41 | 2014-09-01 18:14 | ||||||||
Reporter | wangp | ||||||||||||
Assigned To | zs | ||||||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||||||
Status | assigned | Resolution | open | ||||||||||
Product Version | |||||||||||||
Target Version | Fixed in Version | ||||||||||||
Summary | 0000352: tabled_for_io with Mercury descendants | ||||||||||||
Description | In 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? | ||||||||||||
Tags | No tags attached. | ||||||||||||
Attached Files |
|
Notes | |
zs (developer) 2014-08-18 21:10 |
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. |
juliensf (administrator) 2014-09-01 18:14 |
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). |
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 |