2024-11-24 13:09 AEDT

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000155mercuryBugpublic2010-07-07 18:01
Reporterpbone 
Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
StatusnewResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary0000155: Mode error with impure code.
DescriptionI'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.
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0000275

pbone (administrator)

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'.

~0000276

pbone (administrator)

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'.
+Notes

-Issue History
Date Modified Username Field Change
2010-07-07 17:51 pbone New Issue
2010-07-07 17:58 pbone File Added: bug155a.m
2010-07-07 17:59 pbone Note Added: 0000275
2010-07-07 18:01 pbone File Added: bug155b.m
2010-07-07 18:01 pbone Note Added: 0000276
+Issue History