public override void SyncInput(ConfigurationWithChannelData eStep, List <Configuration> list) { //List<Configuration> returnList = new List<Configuration>(); for (int i = 0; i < Processes.Count; i++) { Process process = Processes[i]; List <Configuration> list1 = new List <Configuration>(); process.SyncInput(eStep, list1); if (list1.Count > 0) { List <Dictionary <string, int> > nextProcessCounters = Common.Classes.Ultility.Ultility.ProcessCounterDecrement(Common.Classes.Ultility.Ultility.CutNumber, ProcessesCounter, process.ProcessID, 1); for (int j = 0; j < list1.Count; j++) { Configuration step = list1[j]; foreach (Dictionary <string, int> ints in nextProcessCounters) { List <Process> newProcess = new List <Process>(Processes); Dictionary <string, int> listInstance = new Dictionary <string, int>(ints); AddOneProcess(newProcess, step.Process, listInstance); IndexInterleaveAbstract interleave = new IndexInterleaveAbstract(newProcess, listInstance); step.Process = interleave; list.Add(step); } } } } //return returnList; }
public override void SyncInput(ConfigurationWithChannelData eStep, List <Configuration> list) { //List<Configuration> returnList = new List<Configuration>(); //List<Configuration> list1 = new List<Configuration>(); FirstProcess.SyncInput(eStep, list); for (int i = 0; i < list.Count; i++) { Configuration step = list[i]; if (step.Event != Constants.TERMINATION) { Interrupt inter = new Interrupt(step.Process, SecondProcess); step.Process = inter; } //list.Add(list1[i]); list[i] = step; } SecondProcess.SyncInput(eStep, list); //list1 = //for (int i = 0; i < list1.Count; i++) //{ // list.Add(list1[i]); //} //return returnList; }
public override void SyncInput(ConfigurationWithChannelData eStep, List <Configuration> list) { for (int i = 0; i < Processes.Count; i++) { List <Configuration> list1 = new List <Configuration>(); Processes[i].SyncInput(eStep, list1); list.AddRange(list1); } }
public override void SyncInput(ConfigurationWithChannelData eStep, List <Configuration> list) { Process.SyncInput(eStep, list); for (int i = 0; i < list.Count; i++) { list[i].Process = new Hiding(list[i].Process, HidingAlphabets); } //return list; }
public override void SyncInput(ConfigurationWithChannelData eStep, List <Configuration> list) { ExpressionValue v = EvaluatorDenotational.Evaluate(Condition, eStep.GlobalEnv); if ((v as BoolConstant).Value) { Process.SyncInput(eStep, list); } //return new List<Configuration>(0); }
public override void SyncInput(ConfigurationWithChannelData eStep, List<Configuration> list) { ExpressionValue v = EvaluatorDenotational.Evaluate(Condition, eStep.GlobalEnv); if ((v as BoolConstant).Value) { Process.SyncInput(eStep, list); } //return new List<Configuration>(0); }
public override void SyncInput(ConfigurationWithChannelData eStep, List <Configuration> list) { Process.SyncInput(eStep, list); for (int i = 0; i < list.Count; i++) { list[i].Process = new AtomicProcess(list[i].Process, true); list[i].IsAtomic = Started; } //return returnlist; }
public override void SyncInput(ConfigurationWithChannelData eStep, List <Configuration> list) { if (FirstProcess is Skip || (FirstProcess is AtomicProcess && (FirstProcess as AtomicProcess).Process is Skip)) { SecondProcess.SyncInput(eStep, list); return; } FirstProcess.SyncInput(eStep, list); for (int i = 0; i < list.Count; i++) { list[i].Process = new Sequence(list[i].Process, SecondProcess); } //return list; }
public override void SyncInput(ConfigurationWithChannelData eStep, List <Configuration> list) { //List<Configuration> list = new List<Configuration>(1); if (eStep.ChannelName == ChannelName && eStep.Expressions.Length == ExpressionList.Length) { Dictionary <string, Expression> mapping = new Dictionary <string, Expression>(eStep.Expressions.Length); for (int i = 0; i < ExpressionList.Length; i++) { Expression v = eStep.Expressions[i]; if (ExpressionList[i] is Variable) { mapping.Add(ExpressionList[i].ExpressionID, v); } else { if (v.ExpressionID != ExpressionList[i].ExpressionID) { return; } } } Expression guard = GuardExpression.ClearConstant(mapping); ExpressionValue value = EvaluatorDenotational.Evaluate(guard, eStep.GlobalEnv); if ((value as BoolConstant).Value) { Configuration vm; if (mapping.Count > 0) { vm = new Configuration(Process.ClearConstant(mapping), null, null, eStep.GlobalEnv, false); } else { vm = new Configuration(Process, null, null, eStep.GlobalEnv, false); } list.Add(vm); } } //return list; }
public override void SyncInput(ConfigurationWithChannelData eStep, List <Configuration> list) { //List<Configuration> list = new List<Configuration>(1); if (eStep.ChannelName == ChannelName && eStep.Expressions.Length == ExpressionList.Length) { Dictionary <string, Expression> mapping = new Dictionary <string, Expression>(eStep.Expressions.Length); for (int i = 0; i < ExpressionList.Length; i++) { Expression v = eStep.Expressions[i]; if (ExpressionList[i] is Variable) { mapping.Add(ExpressionList[i].ExpressionID, v); //.GetID() } else { if (v.ExpressionID != ExpressionList[i].ExpressionID) //.GetID() { return; } } } Configuration vm; if (mapping.Count > 0) { vm = new Configuration(Process.ClearConstant(mapping), null, null, eStep.GlobalEnv, false); } else { vm = new Configuration(Process, null, null, eStep.GlobalEnv, false); } list.Add(vm); } //return list; }
public override void SyncOutput(Valuation GlobalEnv, List <ConfigurationWithChannelData> list) { //List<ConfigurationWithChannelData> returnList = new List<ConfigurationWithChannelData>(); for (int i = 0; i < Processes.Count; i++) { Process process = Processes[i]; List <ConfigurationWithChannelData> list1 = new List <ConfigurationWithChannelData>(); process.SyncOutput(GlobalEnv, list1); if (list1.Count > 0) { List <Dictionary <string, int> > nextProcessCounters = Common.Classes.Ultility.Ultility.ProcessCounterDecrement(Common.Classes.Ultility.Ultility.CutNumber, ProcessesCounter, process.ProcessID, 1); for (int j = 0; j < list1.Count; j++) { Configuration step = list1[j]; foreach (Dictionary <string, int> ints in nextProcessCounters) { List <Process> newProcess = new List <Process>(Processes); Dictionary <string, int> listInstance = new Dictionary <string, int>(ints); AddOneProcess(newProcess, step.Process, listInstance); IndexInterleaveAbstract interleave = new IndexInterleaveAbstract(newProcess, listInstance); ConfigurationWithChannelData newStep = new ConfigurationWithChannelData(interleave, step.Event, step.DisplayName, step.GlobalEnv, step.IsDataOperation, list1[j].ChannelName, list1[j].Expressions); newStep.IsAtomic = step.IsAtomic; list.Add(newStep); } } } } //return returnList; }
public override void SyncInput(ConfigurationWithChannelData eStep, List <Configuration> list) { //List<Configuration> returnList = new List<Configuration>(); for (int i = 0; i < Processes.Count; i++) { Process process = Processes[i]; List <Configuration> list1 = new List <Configuration>(); process.SyncInput(eStep, list1); for (int j = 0; j < list1.Count; j++) { Configuration step = list1[j]; List <Process> newProcess = new List <Process>(Processes.Count); newProcess.AddRange(Processes); newProcess[i] = step.Process; step.Process = new IndexInterleave(newProcess); list.Add(step); } } //return returnList; }
public override void SyncInput(ConfigurationWithChannelData eStep, List<Configuration> list) { //List<Configuration> returnList = new List<Configuration>(); //List<Configuration> list1 = new List<Configuration>(); FirstProcess.SyncInput(eStep, list); for (int i = 0; i < list.Count; i++) { Configuration step = list[i]; if (step.Event != Constants.TERMINATION) { Interrupt inter = new Interrupt(step.Process, SecondProcess); step.Process = inter; } //list.Add(list1[i]); list[i] = step; } SecondProcess.SyncInput(eStep, list); //list1 = //for (int i = 0; i < list1.Count; i++) //{ // list.Add(list1[i]); //} //return returnList; }
public override void SyncOutput(Valuation GlobalEnv, List<ConfigurationWithChannelData> list) { //List<ConfigurationWithChannelData> returnList = new List<ConfigurationWithChannelData>(); for (int i = 0; i < Processes.Count; i++) { Process process = Processes[i]; List<ConfigurationWithChannelData> list1 = new List<ConfigurationWithChannelData>(); process.SyncOutput(GlobalEnv, list1); if (list1.Count > 0) { List<Dictionary<string, int>> nextProcessCounters = Common.Classes.Ultility.Ultility.ProcessCounterDecrement(Common.Classes.Ultility.Ultility.CutNumber, ProcessesCounter, process.ProcessID, 1); for (int j = 0; j < list1.Count; j++) { Configuration step = list1[j]; foreach (Dictionary<string, int> ints in nextProcessCounters) { List<Process> newProcess = new List<Process>(Processes); Dictionary<string, int> listInstance = new Dictionary<string, int>(ints); AddOneProcess(newProcess, step.Process, listInstance); IndexInterleaveAbstract interleave = new IndexInterleaveAbstract(newProcess, listInstance); ConfigurationWithChannelData newStep = new ConfigurationWithChannelData(interleave, step.Event, step.DisplayName, step.GlobalEnv, step.IsDataOperation, list1[j].ChannelName, list1[j].Expressions); newStep.IsAtomic = step.IsAtomic; list.Add(newStep); } } } } //return returnList; }
public override void SyncInput(ConfigurationWithChannelData eStep, List<Configuration> list) { //List<Configuration> returnList = new List<Configuration>(); for (int i = 0; i < Processes.Count; i++) { Process process = Processes[i]; List<Configuration> list1 = new List<Configuration>(); process.SyncInput(eStep, list1); if (list1.Count > 0) { List<Dictionary<string, int>> nextProcessCounters = Common.Classes.Ultility.Ultility.ProcessCounterDecrement(Common.Classes.Ultility.Ultility.CutNumber, ProcessesCounter, process.ProcessID, 1); for (int j = 0; j < list1.Count; j++) { Configuration step = list1[j]; foreach (Dictionary<string, int> ints in nextProcessCounters) { List<Process> newProcess = new List<Process>(Processes); Dictionary<string, int> listInstance = new Dictionary<string, int>(ints); AddOneProcess(newProcess, step.Process, listInstance); IndexInterleaveAbstract interleave = new IndexInterleaveAbstract(newProcess, listInstance); step.Process = interleave; list.Add(step); } } } } //return returnList; }
public override void SyncInput(ConfigurationWithChannelData eStep, List<Configuration> list) { GetProcess(eStep.GlobalEnv).SyncInput(eStep, list); }
public override void SyncInput(ConfigurationWithChannelData eStep, List<Configuration> list) { if (FirstProcess is Skip || (FirstProcess is AtomicProcess && (FirstProcess as AtomicProcess).Process is Skip)) { SecondProcess.SyncInput(eStep, list); return; } FirstProcess.SyncInput(eStep, list); for (int i = 0; i < list.Count; i++) { list[i].Process = new Sequence(list[i].Process, SecondProcess); } //return list; }
/// <summary> /// returns all the possible synchoronous input process on the given channel /// </summary> /// <returns></returns> public override void SyncInput(ConfigurationWithChannelData eStep, List <Configuration> list) { }
public override void SyncInput(ConfigurationWithChannelData eStep, List<Configuration> list) { for (int i = 0; i < Processes.Count; i++) { List<Configuration> list1 = new List<Configuration>(); Processes[i].SyncInput(eStep, list1); list.AddRange(list1); } }
/// <summary> /// returns all the possible synchoronous input process on the given channel /// </summary> /// <returns></returns> public override void SyncInput(ConfigurationWithChannelData eStep, List<Configuration> list) { }
public override void SyncInput(ConfigurationWithChannelData eStep, List<Configuration> list) { //List<Configuration> returnList = new List<Configuration>(); for (int i = 0; i < Processes.Count; i++) { Process process = Processes[i]; List<Configuration> list1 = new List<Configuration>(); process.SyncInput(eStep, list1); for (int j = 0; j < list1.Count; j++) { Configuration step = list1[j]; List<Process> newProcess = new List<Process>(Processes.Count); newProcess.AddRange(Processes); newProcess[i] = step.Process; step.Process = new IndexParallel(newProcess, Alphabets); list.Add(step); } } //return returnList; }
public override void SyncInput(ConfigurationWithChannelData eStep, List<Configuration> list) { Process.SyncInput(eStep,list); for (int i = 0; i < list.Count; i++) { list[i].Process = new Hiding(list[i].Process, HidingAlphabets); } //return list; }
/// <summary> /// returns all the possible synchoronous input process on the given channel /// </summary> /// <returns></returns> public virtual void SyncInput(ConfigurationWithChannelData eStep, List<Configuration> list) { }
public override void SyncInput(ConfigurationWithChannelData eStep, List <Configuration> list) { GetProcess(eStep.GlobalEnv).SyncInput(eStep, list); }
public override void SyncInput(ConfigurationWithChannelData eStep, List<Configuration> list) { //List<Configuration> list = new List<Configuration>(1); if (eStep.ChannelName == ChannelName && eStep.Expressions.Length == ExpressionList.Length) { Dictionary<string, Expression> mapping = new Dictionary<string, Expression>(eStep.Expressions.Length); for (int i = 0; i < ExpressionList.Length; i++) { Expression v = eStep.Expressions[i]; if (ExpressionList[i] is Variable) { mapping.Add(ExpressionList[i].ExpressionID, v); //.GetID() } else { if (v.ExpressionID != ExpressionList[i].ExpressionID) //.GetID() { return ; } } } Configuration vm; if (mapping.Count > 0) { vm = new Configuration(Process.ClearConstant(mapping), null, null, eStep.GlobalEnv, false); } else { vm = new Configuration(Process, null, null, eStep.GlobalEnv, false); } list.Add(vm); } //return list; }
public override void SyncInput(ConfigurationWithChannelData eStep, List<Configuration> list) { //List<Configuration> list = new List<Configuration>(1); if (eStep.ChannelName == ChannelName && eStep.Expressions.Length == ExpressionList.Length) { Dictionary<string, Expression> mapping = new Dictionary<string, Expression>(eStep.Expressions.Length); for (int i = 0; i < ExpressionList.Length; i++) { Expression v = eStep.Expressions[i]; if (ExpressionList[i] is Variable) { mapping.Add(ExpressionList[i].ExpressionID, v); } else { if (v.ExpressionID != ExpressionList[i].ExpressionID) { return ; } } } Expression guard = GuardExpression.ClearConstant(mapping); ExpressionValue value = EvaluatorDenotational.Evaluate(guard, eStep.GlobalEnv); if ((value as BoolConstant).Value) { Configuration vm; if (mapping.Count > 0) { vm = new Configuration(Process.ClearConstant(mapping), null, null, eStep.GlobalEnv, false); } else { vm = new Configuration(Process, null, null, eStep.GlobalEnv, false); } list.Add(vm); } } //return list; }
/// <summary> /// returns all the possible synchoronous input process on the given channel /// </summary> /// <returns></returns> public virtual void SyncInput(ConfigurationWithChannelData eStep, List <Configuration> list) { }
public override void SyncInput(ConfigurationWithChannelData eStep, List<Configuration> list) { Process.SyncInput(eStep, list); for (int i = 0; i < list.Count; i++) { list[i].Process = new AtomicProcess(list[i].Process, true); list[i].IsAtomic = Started; } //return returnlist; }