Ejemplo n.º 1
0
 public void PetryNetShouldBePartialNotConsistent(string inFile)
 {
     var net = PetriNet.Parse(inFile);
     var checker = new PropertiesChecker(net);
     checker.GetTinvariants();
     Assert.IsTrue(checker.CheckConsistency() == Consistency.NotConsistent);
 }
Ejemplo n.º 2
0
 public void PetryNetShouldBePartialNotConservative(string inFile)
 {
     var net = PetriNet.Parse(inFile);
     var checker = new PropertiesChecker(net);
     checker.GetSinvariants();
     Assert.IsTrue(checker.CheckConservativeness() == Conservativeness.NotConservative);
 }
Ejemplo n.º 3
0
 private void AnalizeButton_Click(object sender, EventArgs e)
 {
     if(_petriNet!=null)
     {
         ClearAll();
         _propertiesChecker = new PropertiesChecker(_petriNet);
         _propertiesChecker.Analize();
         SetProperties();
         SetInvariants();
         if(_propertiesChecker.CoverageTree!=null)
         {
             DrawTree(_propertiesChecker.CoverageTree, gViewer1);
         }
         if (_propertiesChecker.FullCoverageTree != null)
         {
             DrawTree(_propertiesChecker.FullCoverageTree, gViewer2);
         }
     }
 }
Ejemplo n.º 4
0
        static void Main(string[] args)
        {
            if (args.Length < 1)
            {
                Console.WriteLine("Petri Net file does not set. Please enter file with Petri Net as first command line parameter.");
                return;
            }

            if (!File.Exists(args[0]))
            {
                Console.WriteLine(
                    String.Format("File {0} does not exists. Please enter file with Petri Net as first command line parameter.", args[0]));
                return;
            }

            var net = PNets.Core.PetriNet.Parse(args[0]);
            var checker = new PropertiesChecker(net);
            var isBounded = checker.CheckStructurallyBoundness();
            Console.WriteLine(String.Format("Given PetriNet is {0}", isBounded));
        }
Ejemplo n.º 5
0
 public void PetryNetShouldBeStructuralBounded(string inFile)
 {
     var net = PetriNet.Parse(inFile);
     var checker = new PropertiesChecker(net);
     Assert.IsTrue(checker.CheckStructurallyBoundness() == StructurallyBoundness.StructurallyBounded);
 }
Ejemplo n.º 6
0
 public void PetryNetShouldBeRepetitive(string inFile)
 {
     var net = PetriNet.Parse(inFile);
     var checker = new PropertiesChecker(net);
     Assert.IsTrue(checker.CheckRepetitiveness() == Repetitiveness.Repetitive);
 }