Example #1
0
 //string[] localvar,
 public Transition(Event e, ParallelDefinition[] selects, Expression Guard, Expression assignment, State from, State to)
 {
     Event = e;
     Selects = selects;
     ProgramBlock = assignment;
     //LocalVariables = localvar;
     GuardCondition = Guard;
     FromState = from;
     ToState = to;
 }
Example #2
0
        public SymbolicLTS(string name, List<string> vars, List<State> states)
        {
            Name = name;
            InitialState = states[0];
            States = states;
            if(vars != null)
            {
                Parameters = vars;
            }

            AlphabetsCalculable = true;
            Alphabets = new HashSet<string>();
        }
Example #3
0
        /// <summary>
        /// Remove state from list
        /// Remove its outgoing transition from list
        /// </summary>
        /// <param name="toRemove"></param>
        public void RemoveState(State toRemove)
        {
            States.Remove(toRemove);
            foreach (var trans in toRemove.OutgoingTransitions)
            {
                Transitions.Remove(trans);
            }

            foreach (var trans in toRemove.IncomingTransition)
            {
                Transitions.Remove(trans);
            }
        }
Example #4
0
        public State AddState()
        {
            //make sure new name not conflict with old name
            const string temp = "#-#";
            State toReturn = new State(temp + StateIDCounter.ToString(), temp + StateIDCounter.ToString());

            StateIDCounter++;
            States.Add(toReturn);
            return toReturn;
        }