(0000153)
|
zs
|
2008-09-23 18:45
|
|
The body of the affected predicate has two switches followed by an if-then-else. Deforestation pushes the second switch and the if-then-else into each arm of the first switch, and then specializes the if-then-else. The problem is that in the process of specialization, it sets the determinism of the condition to nondet, when it should be semidet. The cause could be fact that, after propagating CoverageAfterKnown0 = CoverageAfterKnown1, it replaces the original test in the condition (CoverageAfterKnown1 = coverage_after_known) with a test on CoverageAfterKnown0, and thus updates the nonlocals set. It may think that this affects the determinism of the disjunction that is the condition, but in this case it doesn't.
The problem part of the HLDS dump is the following.
( % cannot_fail switch on `MaybeDPCoverageInfo'
% MaybeDPCoverageInfo has functor maybe.no/0
% nonlocals: CoverageAfterKnown0, GoalExpr0, CPOptions, IsMDProfInst, CoverageAfterKnown
% determinism: multi
( % conjunction
% nonlocals: GoalTrivial
% determinism: det
GoalTrivial = bug85.goal_is_nontrivial
,
% nonlocals: CoverageAfterKnown0, GoalExpr0, CPOptions, IsMDProfInst, GoalTrivial, CoverageAfterKnown
% determinism: multi
(if
% nonlocals: CoverageAfterKnown0, GoalExpr0, IsMDProfInst, GoalTrivial
% determinism: nondet
( % disjunction
% nonlocals: IsMDProfInst
% determinism: semidet
IsMDProfInst = bug85.goal_is_mdprof_inst
;
% nonlocals: CoverageAfterKnown0
% determinism: semidet
CoverageAfterKnown0 = bug85.coverage_after_known
;
% nonlocals: GoalTrivial
% determinism: semidet
GoalTrivial = bug85.goal_is_trivial
;
% nonlocals: GoalExpr0
% determinism: semidet
( % conjunction
% nonlocals: GoalExpr0, V_42
% determinism: semidet
GoalExpr0 = bug85.conj(V_42, V_25)
,
% nonlocals: V_42
% determinism: semidet
V_42 = bug85.plain_conj
)
) |
|