コード例 #1
0
ファイル: Configuration.cs プロジェクト: nhannhan159/PAT
 public Configuration(Process p, string e, string displayName, Valuation globalEnv, bool isDataOperation)
 {
     Process = p;
     Event = e;
     GlobalEnv = globalEnv;
     DisplayName = displayName;
     IsDataOperation = isDataOperation;
 }
コード例 #2
0
        public DataOperationPrefix(Event e, Expression assignment, Process process, string[] localvar)
        {
            Event = e;
            AssignmentExpr = assignment;
            Process = process;
            LocalVariables = localvar;

            ProcessID = DataStore.DataManager.InitializeProcessID(Event.GetID() + "{" + AssignmentExpr.ExpressionID + "}" + Constants.EVENTPREFIX + Process.ProcessID);
        }
コード例 #3
0
ファイル: ConditionalChoice.cs プロジェクト: nhannhan159/PAT
        public ConditionalChoice(Process firstProcess, Process secondProcess, Expression conditionExpression)
        {
            FirstProcess = firstProcess;
            SecondProcess = secondProcess;
            ConditionalExpression = conditionExpression;

            ProcessID = DataStore.DataManager.InitializeProcessID(FirstProcess.ProcessID + Constants.CONDITIONAL_CHOICE +
                                                                      conditionExpression.ExpressionID + Constants.CONDITIONAL_CHOICE +
                                                                      SecondProcess.ProcessID);
        }
コード例 #4
0
ファイル: Definition.cs プロジェクト: nhannhan159/PAT
        //=========================Fileds for Static Analysis================================
        public Definition(string name, string[] vars, Process process)
        {
            Name = name;
            Process = process;
            LocalVariables = vars;

            SubDefinitions = new List<Definition>();
            SubDefinitionNames = new List<string>();

            Channels = new List<string>();
            GlobalVars = new List<string>();

            AlphabetsCalculable = true;
            Alphabets = new HashSet<string>();
        }
コード例 #5
0
ファイル: ChannelInput.cs プロジェクト: nhannhan159/PAT
        public ChannelInput(string evtName, Expression[] exp, Process process)
        {
            ChannelName = evtName;

            ExpressionList = exp;
            Process = process;

            StringBuilder ID = new StringBuilder();
            ID.Append(ChannelName);
            ID.Append("?");
            ID.Append(Common.Classes.Ultility.Ultility.PPIDListDot(ExpressionList));
            ID.Append(Constants.EVENTPREFIX);
            ID.Append(Process.ProcessID);
            ProcessID = DataStore.DataManager.InitializeProcessID(ID.ToString());
        }
コード例 #6
0
ファイル: Sequence.cs プロジェクト: nhannhan159/PAT
        public Sequence(Process firstProcess, Process secondProcess)
        {
            FirstProcess = firstProcess;
            SecondProcess = secondProcess;

            if (FirstProcess is Skip || (FirstProcess is AtomicProcess && (FirstProcess as AtomicProcess).Process is Skip))
            {
                ProcessID = SecondProcess.ProcessID;
            }
            else if (FirstProcess is Stop || (FirstProcess is AtomicProcess && (FirstProcess as AtomicProcess).Process is Stop))
            {
                ProcessID = Constants.STOP;
            }
            else
            {
                ProcessID = DataStore.DataManager.InitializeProcessID(Constants.SEQUENTIAL + FirstProcess.ProcessID + Constants.SEPARATOR + SecondProcess.ProcessID);
            }
        }
コード例 #7
0
ファイル: CaseProcess.cs プロジェクト: nhannhan159/PAT
        public CaseProcess(Process[] processes, Expression[] conds)
        {
            Processes = processes;
            Conditions = conds;

            //generate the process ID
            StringBuilder IDBuilder = new StringBuilder(Constants.CASE);
            for (int i = 0; i < Processes.Length; i++)
            {
                //IDBuilder.Append(DataStore.DataManager.InitializeProcessID(Conditions[i].GetID()));
                IDBuilder.Append(Conditions[i].ExpressionID);
                IDBuilder.Append(Constants.CASECONDITIONAL);
                IDBuilder.Append(Processes[i].ProcessID);
                IDBuilder.Append(";");
            }

            ProcessID = DataStore.DataManager.InitializeProcessID(IDBuilder.ToString());
        }
コード例 #8
0
ファイル: AtomicProcess.cs プロジェクト: nhannhan159/PAT
        public AtomicProcess(Process process, bool started)
        {
            if (process is AtomicProcess)
            {
                Process = (process as AtomicProcess).Process;
            }
            else
            {
                Process = process;
            }

            Started = started;

            if(started)
            {
                ProcessID = DataStore.DataManager.InitializeProcessID(Constants.ATOMIC_STARTED + Process.ProcessID);
            }
            else
            {
                ProcessID = DataStore.DataManager.InitializeProcessID(Constants.ATOMIC_NOTSTARTED + Process.ProcessID);
            }
        }
コード例 #9
0
ファイル: Hiding.cs プロジェクト: nhannhan159/PAT
        public Hiding(Process process, EventCollection alphabets)
        {
            if (process is Hiding)
            {
                Process = (process as Hiding).Process;
                List<Event> events = new List<Event>((process as Hiding).HidingAlphabets);

                foreach (Event item in alphabets)
                {
                    if (!events.Contains(item))
                    {
                        events.Add(item);
                    }
                }

                HidingAlphabets = new EventCollection(events);
            }
            else {
                Process = process;
                HidingAlphabets = alphabets;
            }

            ProcessID = DataStore.DataManager.InitializeProcessID(Constants.HIDING + Process.ProcessID + Constants.SEPARATOR + HidingAlphabets.ProcessID);
        }
コード例 #10
0
ファイル: Interrupt.cs プロジェクト: nhannhan159/PAT
 public Interrupt(Process firstProcess, Process secondProcess)
 {
     FirstProcess = firstProcess;
     SecondProcess = secondProcess;
     ProcessID = DataStore.DataManager.InitializeProcessID(FirstProcess.ProcessID + Constants.INTERRUPT + SecondProcess.ProcessID);
 }
コード例 #11
0
ファイル: Definition.cs プロジェクト: nhannhan159/PAT
 public Definition ClearConstant(Dictionary<string, Expression> constMapping)
 {
     Process = Process.ClearConstant(constMapping);
     return this;
 }
コード例 #12
0
 public ConfigurationWithChannelData(Process p, string e, string hiddenEvent, Valuation globalEnv, bool isDataOperation, string name, Expression[] expressions)
     : base(p, e, hiddenEvent, globalEnv, isDataOperation)
 {
     ChannelName = name;
     Expressions = expressions;
 }
コード例 #13
0
ファイル: GuardProcess.cs プロジェクト: nhannhan159/PAT
 public GuardProcess(Process process, Expression cond)
 {
     Process = process;
     Condition = cond;
     ProcessID = DataStore.DataManager.InitializeProcessID("[" + cond.ExpressionID + "]" + Process.ProcessID);
 }
コード例 #14
0
ファイル: EventPrefix.cs プロジェクト: nhannhan159/PAT
 public EventPrefix(Event e, Process process)
 {
     Event = e;
     Process = process;
     ProcessID = DataStore.DataManager.InitializeProcessID(Event.GetID() + Constants.EVENTPREFIX + Process.ProcessID);
 }