Beispiel #1
0
        /// <summary>
        /// Handles the AST node visit.
        /// </summary>
        /// <param name="astNode">AST node.</param>
        public override void Visit(AndGdAstNode astNode)
        {
            AndExpression andExpression = new AndExpression();

            astNode.Arguments.ForEach(arg => andExpression.Arguments.Add(MasterExporter.ToExpression(arg)));
            ExpressionData = andExpression;
        }
Beispiel #2
0
        /// <summary>
        /// Handles the AST node visit.
        /// </summary>
        /// <param name="astNode">AST node.</param>
        public override void Visit(OrGdAstNode astNode)
        {
            OrExpression orExpression = new OrExpression();

            astNode.Arguments.ForEach(arg => orExpression.Arguments.Add(MasterExporter.ToExpression(arg)));
            ExpressionData = orExpression;
        }
Beispiel #3
0
        /// <summary>
        /// Handles the AST node visit.
        /// </summary>
        /// <param name="astNode">AST node.</param>
        public override void Visit(DomainDerivedPredAstNode astNode)
        {
            DerivedPredicate newDerivedPredicate = new DerivedPredicate
            {
                Expression = MasterExporter.ToExpression(astNode.Expression),
                Predicate  = new Predicate(astNode.Predicate.Name)
            };

            astNode.Predicate.Arguments.TypedIdentifiers.ForEach(termElem => newDerivedPredicate.Predicate.Terms.Add(new DefinitionTerm(termElem.Item1, termElem.Item2.Split(';'))));
            DomainData.DerivedPredicates.Add(newDerivedPredicate);
        }
Beispiel #4
0
 /// <summary>
 /// Handles the AST node visit.
 /// </summary>
 /// <param name="astNode">AST node.</param>
 public override void Visit(WhenCEffectAstNode astNode)
 {
     EffectsData.Add(new WhenEffect(MasterExporter.ToExpression(astNode.Condition), ToPrimitiveEffects(MasterExporter.ToEffects(astNode.Effect))));
 }
Beispiel #5
0
 /// <summary>
 /// Handles the AST node visit.
 /// </summary>
 /// <param name="astNode">AST node.</param>
 public override void Visit(ForallGdAstNode astNode)
 {
     ExpressionData = new ForallExpression(MasterExporter.ToParameters(astNode.Parameters), MasterExporter.ToExpression(astNode.Expression));
 }
Beispiel #6
0
 /// <summary>
 /// Handles the AST node visit.
 /// </summary>
 /// <param name="astNode">AST node.</param>
 public override void Visit(ExistsGdAstNode astNode)
 {
     ExpressionData = new ExistsExpression(MasterExporter.ToParameters(astNode.Parameters), MasterExporter.ToExpression(astNode.Expression));
 }
Beispiel #7
0
 /// <summary>
 /// Handles the AST node visit.
 /// </summary>
 /// <param name="astNode">AST node.</param>
 public override void Visit(ImplyGdAstNode astNode)
 {
     ExpressionData = new ImplyExpression(MasterExporter.ToExpression(astNode.Argument1), MasterExporter.ToExpression(astNode.Argument2));
 }
Beispiel #8
0
 /// <summary>
 /// Handles the AST node visit.
 /// </summary>
 /// <param name="astNode">AST node.</param>
 public override void Visit(NotGdAstNode astNode)
 {
     ExpressionData = new NotExpression(MasterExporter.ToExpression(astNode.Argument));
 }
Beispiel #9
0
 /// <summary>
 /// Handles the AST node visit.
 /// </summary>
 /// <param name="astNode">AST node.</param>
 public override void Visit(OverTimedDaGdAstNode astNode)
 {
     ExpressionData = new OverTimedExpression(astNode.IntervalSpecifier, MasterExporter.ToExpression(astNode.Argument));
 }
Beispiel #10
0
 /// <summary>
 /// Handles the AST node visit.
 /// </summary>
 /// <param name="astNode">AST node.</param>
 public override void Visit(PreferenceGdAstNode astNode)
 {
     ExpressionData = new PreferenceExpression(astNode.Name, MasterExporter.ToExpression(astNode.Argument));
 }
Beispiel #11
0
 /// <summary>
 /// Handles the AST node visit.
 /// </summary>
 /// <param name="astNode">AST node.</param>
 public override void Visit(AtTimedDaGdAstNode astNode)
 {
     ExpressionData = new AtTimedExpression(astNode.TimeSpecifier, MasterExporter.ToExpression(astNode.Argument));
 }
 /// <summary>
 /// Handles the AST node visit.
 /// </summary>
 /// <param name="astNode">AST node.</param>
 public override void Visit(SometimeBeforeConGdAstNode astNode)
 {
     ConstraintsData.Add(new SometimeBeforeConstraint(MasterExporter.ToExpression(astNode.Expression1), MasterExporter.ToExpression(astNode.Expression2)));
 }
 /// <summary>
 /// Handles the AST node visit.
 /// </summary>
 /// <param name="astNode">AST node.</param>
 public override void Visit(AtMostOnceConGdAstNode astNode)
 {
     ConstraintsData.Add(new AtMostOnceConstraint(MasterExporter.ToExpression(astNode.Expression)));
 }
 /// <summary>
 /// Handles the AST node visit.
 /// </summary>
 /// <param name="astNode">AST node.</param>
 public override void Visit(WithinConGdAstNode astNode)
 {
     ConstraintsData.Add(new WithinConstraint(astNode.Number, MasterExporter.ToExpression(astNode.Expression)));
 }
 /// <summary>
 /// Handles the AST node visit.
 /// </summary>
 /// <param name="astNode">AST node.</param>
 public override void Visit(HoldDuringConGdAstNode astNode)
 {
     ConstraintsData.Add(new HoldDuringConstraint(astNode.Number1, astNode.Number2, MasterExporter.ToExpression(astNode.Expression)));
 }