View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0000285 | mercury | Bug | public | 2013-05-22 11:24 | 2013-06-28 15:54 | ||||||||
Reporter | pbone | ||||||||||||
Assigned To | |||||||||||||
Priority | normal | Severity | tweak | Reproducibility | have not tried | ||||||||
Status | new | Resolution | open | ||||||||||
Product Version | |||||||||||||
Target Version | Fixed in Version | ||||||||||||
Summary | 0000285: Mode error is misleading | ||||||||||||
Description | A mode error can be causes when code is multidet when it is declared as det. In these case the error text uses the phrase "multiple clauses with solutions". Even for single clause predicates. | ||||||||||||
Steps To Reproduce | Create a single clause predicate declared as det such as: update_atom_in_map(Atom, SubstsA, Status, OrigHt, !Map) :- ( ( map.search(!.Map, Atom, EntryPrime) -> Entry = EntryPrime ; version_hash_table.search(OrigHt, Atom, EntryPrime) -> Entry = EntryPrime ; false ), # HERE is the error, this should be a -> rather than a , Entry = memo_table_entry(SubstsB, _), Substs = SubstsA `union` SubstsB ; Substs = SubstsA ), set(Atom, memo_table_entry(Substs, Status), !Map). | ||||||||||||
Tags | No tags attached. | ||||||||||||
Attached Files |
|
Notes | |
juliensf (administrator) 2013-05-22 13:15 |
The only such error message I can find is: "Disjunction has multiple clauses with solutions." That seems fairly unambiguous for the example above. |
pbone (administrator) 2013-06-28 15:36 |
I don't like the confusion with clauses. Could it say something like "Disjunction has multiple parts with solutions?" |
juliensf (administrator) 2013-06-28 15:54 |
"clause" is a standard term in predicate logic for describing the "parts" of a disjunction. As I said in my original reply, I don't see that the error message has any ambiguity anyway. |