コード例 #1
0
ファイル: PNConfiguration.cs プロジェクト: nhannhan159/PAT
 /**
  * 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;
 }
コード例 #2
0
ファイル: Assertion.cs プロジェクト: nhannhan159/PAT
        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);
        }
コード例 #3
0
ファイル: PNConfiguration.cs プロジェクト: nhannhan159/PAT
        // 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);
            }
        }
コード例 #4
0
ファイル: Definition.cs プロジェクト: nhannhan159/PAT
        //=========================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>();
        }
コード例 #5
0
 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;
 }
コード例 #6
0
 public PNAssertionDeadLock(PetriNet processDef, bool isNontermination)
     : base(isNontermination)
 {
     Process = processDef;
 }
コード例 #7
0
 public PNAssertionDeadLock(PetriNet processDef)
     : base()
 {
     Process = processDef;
 }
コード例 #8
0
ファイル: Definition.cs プロジェクト: nhannhan159/PAT
 public Definition ClearConstant(Dictionary<string, Expression> constMapping)
 {
     Process = Process.ClearConstant(constMapping);
     return this;
 }