public static List <Tuple <CUDDNode, Tuple <Predicate, bool>[]> > GetCondEffectList(this PlanningParser.EffectContext context, CUDDNode currentConditionNode, IReadOnlyDictionary <string, Predicate> predicateDict, StringDictionary assignment) { var result = new List <Tuple <CUDDNode, Tuple <Predicate, bool>[]> >(); foreach (var cEffectContext in context.cEffect()) { var condEffect = cEffectContext.GetCondEffectList(currentConditionNode, predicateDict, assignment); result.AddRange(condEffect); } return(result); }
private void GenerateEffect(PlanningParser.ActionDefineContext context, IReadOnlyDictionary <string, Predicate> predDict) { PlanningParser.EmptyOrEffectContext emptyOrEffectContext = context.actionDefBody().emptyOrEffect(); if (emptyOrEffectContext != null) { PlanningParser.EffectContext effectContext = emptyOrEffectContext.effect(); if (effectContext != null) { foreach (var cEffectContext in effectContext.cEffect()) { var condEffect = GetCondEffect(cEffectContext); _effect.Add(condEffect); } } } }
public static List <Tuple <CUDDNode, Tuple <Predicate, bool>[]> > GetEffect(this PlanningParser.EmptyOrEffectContext context, IReadOnlyDictionary <string, Predicate> predicateDict, StringDictionary assignment) { var result = new List <Tuple <CUDDNode, Tuple <Predicate, bool>[]> >(); if (context != null) { PlanningParser.EffectContext effectContext = context.effect(); if (effectContext != null) { foreach (var cEffectContext in effectContext.cEffect()) { CUDDNode initialCuddNode = CUDD.ONE; CUDD.Ref(initialCuddNode); var condEffect = cEffectContext.GetCondEffectList(initialCuddNode, predicateDict, assignment); result.AddRange(condEffect); } } } return(result); }