View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0000155 | mercury | Bug | public | 2010-07-07 17:51 | 2010-07-07 18:01 | ||||||||
Reporter | pbone | ||||||||||||
Assigned To | |||||||||||||
Priority | normal | Severity | major | Reproducibility | always | ||||||||
Status | new | Resolution | open | ||||||||||
Product Version | |||||||||||||
Target Version | Fixed in Version | ||||||||||||
Summary | 0000155: Mode error with impure code. | ||||||||||||
Description | I'm writing a failure driven loop that uses impurity to implement a branch and bound solver. The mode checker tells me that a value is 'free' when it should be (and is) 'ground'. I will attach two programs that exhibit this error. Note that removing the switch on BestSolutionFinal and changing the type of the predicates output makes the problem go away. | ||||||||||||
Tags | No tags attached. | ||||||||||||
Attached Files |
Notes | |
pbone (administrator) 2010-07-07 17:59 |
Test case one: pbone@taura:/tmp$ mmc --compile-to-c bug155a bug155a.m:060: In clause for `branch_and_bound((pred(in, out) is nondet), bug155a.m:060: (func(in) = out is det), out)': bug155a.m:060: in argument 2 of call to predicate `float.<'/2: bug155a.m:060: mode error: variable `BestObjective' has instantiatedness bug155a.m:060: `free', bug155a.m:060: expected instantiatedness was `ground'. For more information, recompile with `-E'. |
pbone (administrator) 2010-07-07 18:01 |
Test case two: pbone@taura:/tmp$ mmc --compile-to-c bug155b bug155b.m:069: In clause for `branch_and_bound((pred(in, out) is nondet), bug155b.m:069: (func(in) = out is det), out)': bug155b.m:069: in argument 2 of call to predicate `mutvar.set_mutvar'/2: bug155b.m:069: mode error: variable `BestSolutions' has instantiatedness bug155b.m:069: `free', bug155b.m:069: expected instantiatedness was `ground'. For more information, recompile with `-E'. |