Mercury Bugs - mercury
View Issue Details
0000040mercuryBugpublic2008-02-01 15:152010-02-02 16:23
Reporterjuliensf 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusconfirmedResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000040: RTTI looks for the name of a solver value return repn. type name
Descriptiontype_name(type_of(X)) where X is a solver type returns the name of the representation type
not the solver type itself. This will occurs even if the solver type is imported from another
module.

The attached test case demonstrates this problem.
TagsNo tags attached.
Attached Files? solver_type_name.m (467) 2008-02-01 15:15
https://bugs.mercurylang.org/file_download.php?file_id=34&type=bug

Notes
(0000073)
juliensf   
2008-02-01 17:24   
(Last edited: 2008-02-03 16:45)
I think this is occurring because the implementation of type_of/1 calls MR_collapse_equivalences
and (for some reason) solver types are being treated as equivalences in this respect.

Unfortunately, there is nothing in the current RTTI data structures that would allow us
to distinguish that a type_info is for a solver type and avoid collapsing the equivalences.
(Actually, for solver types and solver type equivalences you would need to collapse equivalences,
but only as far back as the last solver type.)

In order to fix this I think we will need to add something to type_infos that distinguishes solver
types from non-solver types.


Issue History
2008-02-01 15:15juliensfNew Issue
2008-02-01 15:15juliensfFile Added: solver_type_name.m
2008-02-01 17:24juliensfNote Added: 0000073
2008-02-03 16:45juliensfNote Edited: 0000073
2010-02-02 16:23juliensfStatusnew => confirmed