Fixed the calculation of the upper bound for replicators that feature in the background knowledge
This commit is contained in:
parent
0427c00859
commit
ecf4ceee35
|
@ -75,7 +75,7 @@ checkArrayUsage (m,p) = mapM_ (checkIndexes m) $ Map.toList $
|
||||||
-- Turns a replicator into background knowledge about that replicator
|
-- Turns a replicator into background knowledge about that replicator
|
||||||
-- TODO we need to subtract one off (from + for)
|
-- TODO we need to subtract one off (from + for)
|
||||||
makeRepBounds :: A.Replicator -> [BackgroundKnowledge]
|
makeRepBounds :: A.Replicator -> [BackgroundKnowledge]
|
||||||
makeRepBounds (A.For m n from for) = [LessThanOrEqual from ev, LessThanOrEqual ev $ A.Dyadic m A.Add from for]
|
makeRepBounds (A.For m n from for) = [LessThanOrEqual from ev, LessThanOrEqual ev $ A.Dyadic m A.Subtr (A.Dyadic m A.Add from for) (makeConstant m 1)]
|
||||||
where
|
where
|
||||||
ev = A.ExprVariable m (A.Variable m n)
|
ev = A.ExprVariable m (A.Variable m n)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user