Esempio n. 1
0
        /// <summary>
        /// Return the AutomataBDD of the Channel Output
        /// </summary>
        /// <param name="channelName">Channel's name</param>
        /// <param name="channelEventIndex"></param>
        /// <param name="exps">List of output expressions of the channel</param>
        /// <param name="guardOfTick"></param>
        /// <param name="P1"><AutomataBDD of process P1 after the channel input/param>
        /// <param name="model"></param>
        /// <returns></returns>
        public static AutomataBDD SyncChannelOutputPrefixing(int channelEventIndex, List <Expression> exps, Expression guardOfTick, AutomataBDD P1, Model model)
        {
            AutomataBDD result = AutomataBDD.SyncChannelOutputPrefixing(channelEventIndex, exps, P1, model);

            EventPrefixEncodeTick(guardOfTick, P1, model, result);

            //
            return(result);
        }
        public override AutomataBDD EncodeComposition(BDDEncoder encoder)
        {
            AutomataBDD processAutomataBDD = this.Process.Encode(encoder);

            if (encoder.model.mapChannelToSize.ContainsKey(this.ChannelName))
            {
                int channelEventIndex = encoder.GetChannelIndex(this.ChannelName, BDDEncoder.EventChannelInfo.EventType.ASYNC_CHANNEL_OUTPUT);

                return(AutomataBDD.ChannelOutputPrefixing(this.ChannelName, channelEventIndex, new List <Expression>(this.ExpressionList), AssignmentExpr, processAutomataBDD, encoder.model));
            }
            else
            {
                List <Expression> expressionList = (this.ExpressionList != null) ? new List <Expression>(this.ExpressionList) : new List <Expression>();
                int channelEventIndex            = encoder.GetEventIndex(this.ChannelName, expressionList.Count);

                return(AutomataBDD.SyncChannelOutputPrefixing(channelEventIndex, expressionList, processAutomataBDD, encoder.model));
            }
        }