diff --git a/prism/src/explicit/AccumulationTransformation.java b/prism/src/explicit/AccumulationTransformation.java index 4c339e89..9d0c78ae 100644 --- a/prism/src/explicit/AccumulationTransformation.java +++ b/prism/src/explicit/AccumulationTransformation.java @@ -116,11 +116,8 @@ public class AccumulationTransformation implements Mode for (int i=0; i < accexp.getFunctions().size(); i++) { Object rewardIndex = accexp.getFunctions().get(i).getRewardIndex(); - RewardStruct rewStruct = ExpressionReward.getRewardStructByIndexObject(rewardIndex, mc.modulesFile, originalModel.getConstantValues()); - ConstructRewards constructRewards = new ConstructRewards(); - constructRewards.allowNegativeRewards(); - - Rewards reward = constructRewards.buildRewardStructure(originalModel, rewStruct, mc.getConstantValues()); + int rewStructIndex = ExpressionReward.getRewardStructIndexByIndexObject(rewardIndex, mc.modulesFile, originalModel.getConstantValues()); + Rewards reward = ((ProbModelChecker)mc).constructRewards(originalModel, rewStructIndex, true /* allow negative rewards */); rewards.put(rewardIndex,reward); }