Esempio n. 1
0
 /**
  * BASE CLASS VARIABLEs
  *
  * public string Event;
  * public string DisplayName;
  * public Valuation GlobalEnv; //-> the global variable
  *
  * public bool IsDeadLock; //-> fire to mark when checking Deadlock Assertion
  * public bool IsAtomic;
  * public bool IsDataOperation;
  * public string[] ParticipatingProcesses;
  */
 /// <summary>
 /// This constructor is called from the assertion to intial a configuration
 /// 
 /// Status: incompleted: How to initial value for globalEnv 
 /// </summary>
 /// <param name="p"></param>
 /// <param name="e"></param>
 /// <param name="displayName"></param>
 /// <param name="globalEnv"></param>
 /// <param name="isDataOperation"></param>
 public PNConfiguration(PetriNet p, string e, string displayName, Valuation globalEnv, bool isDataOperation)
 {
     Process = p;
     Event = e;//base event
     GlobalEnv = globalEnv;
     DisplayName = displayName;
     IsDataOperation = isDataOperation;
 }
Esempio n. 2
0
        public static void Initialize(AssertionBase Assertion, PetriNet Process, SpecificationBase spec)
        {
            Specification Spec = spec as Specification;

            //get the relevant global variables; remove irrelevant variables so as to save memory;
            Valuation GlobalEnv = Spec.SpecValuation.GetClone();

            //Initialize InitialStep
            Assertion.InitialStep = new PNConfiguration(Process, Constants.INITIAL_EVENT, null, GlobalEnv, false, spec);
        }
Esempio n. 3
0
        // added by Tinh
        public PNConfiguration(PetriNet p, string e, string displayName, Valuation globalEnv, bool isDataOperation, SpecificationBase spec)
        {
            Process = p;
            Event = e;//base event
            GlobalEnv = globalEnv;
            DisplayName = displayName;
            IsDataOperation = isDataOperation;

            if (spec != null)
            {
                p.Transitions = new List<PNTransition>(16);
                foreach (KeyValuePair<string, PetriNet> entry in (spec as Specification).PNDefinitionDatabase)
                    p.Transitions.AddRange(entry.Value.Transitions);
            }
        }
Esempio n. 4
0
        //=========================Fileds for Static Analysis================================
        public Definition(string name, string[] vars, PetriNet 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>();
        }
 public PNConfigurationWithChannelData(PetriNet p, string e, string hiddenEvent, Valuation globalEnv, bool isDataOperation, string name, Expression[] expressions)
     : base(p, e, hiddenEvent, globalEnv, isDataOperation, null)
 {
     ChannelName = name;
     Expressions = expressions;
 }
Esempio n. 6
0
 public PNAssertionDeadLock(PetriNet processDef, bool isNontermination)
     : base(isNontermination)
 {
     Process = processDef;
 }
Esempio n. 7
0
 public PNAssertionDeadLock(PetriNet processDef)
     : base()
 {
     Process = processDef;
 }
Esempio n. 8
0
 public Definition ClearConstant(Dictionary<string, Expression> constMapping)
 {
     Process = Process.ClearConstant(constMapping);
     return this;
 }