public PNTransition ClearConstant(List <PNPlace> newPNPlaces, Dictionary <string, Expression> constMapping, bool checkSelect) { ParallelDefinition[] newSelects = null; if (checkSelect && Selects != null) { newSelects = new ParallelDefinition[Selects.Length]; for (int i = 0; i < Selects.Length; i++) { newSelects[i] = newSelects[i].ClearConstant(constMapping); } } PNPlace newFrom = null, newTo = null; foreach (PNPlace PNPlace in newPNPlaces) { if (PNPlace.Name == FromPNPlace.Name) { newFrom = PNPlace; } if (PNPlace.Name == ToPNPlace.Name) { newTo = PNPlace; } } return(new PNTransition(Event.ClearConstant(constMapping), newSelects, GuardCondition == null ? GuardCondition : GuardCondition.ClearConstant(constMapping), ProgramBlock == null ? ProgramBlock : ProgramBlock.ClearConstant(constMapping), newFrom, newTo)); }
public PNTransition(Event e, ParallelDefinition[] selects, Expression guard, Expression assignment, PNPlace from, PNPlace to) //string[] localvar, { Event = e; Selects = selects; ProgramBlock = assignment; GuardCondition = guard; FromPNPlace = from; ToPNPlace = to; }
//string[] localvar, public PNTransition(Event e, ParallelDefinition[] selects, Expression guard, Expression assignment, PNPlace from, PNPlace to) { Event = e; Selects = selects; ProgramBlock = assignment; GuardCondition = guard; FromPNPlace = from; ToPNPlace = to; }