From 78901dac133b48f973c880a058016734dce71dce Mon Sep 17 00:00:00 2001 From: noah Date: Tue, 29 Mar 2022 14:53:12 -0500 Subject: [PATCH] Path Walking --- tools/path_walk.py | 4 +- tools/path_walk/node_10.dot | 8 +- tools/path_walk/node_11.dot | 18 +-- tools/path_walk/node_12.dot | 20 +-- tools/path_walk/node_13.dot | 18 +-- tools/path_walk/node_14.dot | 25 +--- tools/path_walk/node_5.dot | 7 +- tools/path_walk/node_6.dot | 7 +- tools/path_walk/node_7.dot | 7 +- tools/path_walk/node_8.dot | 8 +- tools/path_walk/node_9.dot | 12 +- tools/temp.dot | 286 ++++++++++++++++++++++++++++++++++-- 12 files changed, 308 insertions(+), 112 deletions(-) diff --git a/tools/path_walk.py b/tools/path_walk.py index ea24299..b4baf51 100644 --- a/tools/path_walk.py +++ b/tools/path_walk.py @@ -14,7 +14,7 @@ parser.add_argument("-m", "--manual", dest = "manual", default = None, help="Man parser.add_argument("-s", "--state_info", dest="state_info", help="State Info File") parser.add_argument("-i", "--input", dest = "input_d", help="Input Dot File") parser.add_argument("-o", "--output", dest = "output_d", help="Output Dot File.") - +parser.add_argument("-q", "--quality", dest = "quality", help="Quality to Search for in Auto Mode") args=parser.parse_args() #if len(argv) != 4: @@ -34,7 +34,7 @@ else: states = len(splits) -1 for i in range(states): - if "is_critical=true" in splits[i]: + if "is_critical=true" in splits[i] or (args.quality !=None and args.quality in splits[i]): crit_nodes.append(str(i-1)) print(str(i-1)) diff --git a/tools/path_walk/node_10.dot b/tools/path_walk/node_10.dot index b875dc3..343141e 100644 --- a/tools/path_walk/node_10.dot +++ b/tools/path_walk/node_10.dot @@ -1,10 +1,10 @@ digraph G { 0; -3; +1; 4; 10; -3->10 [label=1]; -4->10 [label=1]; +1->10 [label=1]; +4->10 [label=0]; 0->4 [label=1]; -0->3 [label=1]; +0->1 [label=0]; } \ No newline at end of file diff --git a/tools/path_walk/node_11.dot b/tools/path_walk/node_11.dot index 6a53076..1e980ae 100644 --- a/tools/path_walk/node_11.dot +++ b/tools/path_walk/node_11.dot @@ -1,22 +1,10 @@ digraph G { 0; 1; -2; -3; 5; -6; -8; 11; -5->11 [label=1]; -6->11 [label=0]; -8->11 [label=0]; -2->8 [label=1]; -3->8 [label=0]; -1->6 [label=1]; -3->6 [label=0]; -1->5 [label=0]; -2->5 [label=0]; -0->3 [label=1]; -0->2 [label=0]; +1->11 [label=2]; +5->11 [label=0]; +0->5 [label=2]; 0->1 [label=0]; } \ No newline at end of file diff --git a/tools/path_walk/node_12.dot b/tools/path_walk/node_12.dot index 06789d3..5735328 100644 --- a/tools/path_walk/node_12.dot +++ b/tools/path_walk/node_12.dot @@ -1,22 +1,10 @@ digraph G { 0; 1; -2; -4; -5; -7; -9; +6; 12; -5->12 [label=1]; -7->12 [label=0]; -9->12 [label=0]; -2->9 [label=1]; -4->9 [label=0]; -1->7 [label=1]; -4->7 [label=0]; -1->5 [label=0]; -2->5 [label=0]; -0->4 [label=1]; -0->2 [label=0]; +1->12 [label=2]; +6->12 [label=0]; +0->6 [label=2]; 0->1 [label=0]; } \ No newline at end of file diff --git a/tools/path_walk/node_13.dot b/tools/path_walk/node_13.dot index e0139a1..b8dbab7 100644 --- a/tools/path_walk/node_13.dot +++ b/tools/path_walk/node_13.dot @@ -1,22 +1,10 @@ digraph G { 0; 1; -3; -4; -6; 7; -10; 13; -6->13 [label=1]; -7->13 [label=1]; -10->13 [label=0]; -3->10 [label=1]; -4->10 [label=1]; -1->7 [label=1]; -4->7 [label=0]; -1->6 [label=1]; -3->6 [label=0]; -0->4 [label=1]; -0->3 [label=1]; +1->13 [label=3]; +7->13 [label=0]; +0->7 [label=3]; 0->1 [label=0]; } \ No newline at end of file diff --git a/tools/path_walk/node_14.dot b/tools/path_walk/node_14.dot index ae20357..f789516 100644 --- a/tools/path_walk/node_14.dot +++ b/tools/path_walk/node_14.dot @@ -1,22 +1,7 @@ digraph G { 0; -2; -3; -4; -8; -9; -10; -14 [fillcolor = "#FF2C2C", style=filled, fontname="times-bold"]; -8->14 [label=1]; -9->14 [label=1]; -10->14 [label=0]; -3->10 [label=1]; -4->10 [label=1]; -2->9 [label=1]; -4->9 [label=0]; -2->8 [label=1]; -3->8 [label=0]; -0->4 [label=1]; -0->3 [label=1]; -0->2 [label=0]; -} +1; +14; +1->14 [label=4]; +0->1 [label=0]; +} \ No newline at end of file diff --git a/tools/path_walk/node_5.dot b/tools/path_walk/node_5.dot index 8398e06..159e24b 100644 --- a/tools/path_walk/node_5.dot +++ b/tools/path_walk/node_5.dot @@ -1,10 +1,5 @@ digraph G { 0; -1; -2; 5; -1->5 [label=0]; -2->5 [label=0]; -0->2 [label=0]; -0->1 [label=0]; +0->5 [label=2]; } \ No newline at end of file diff --git a/tools/path_walk/node_6.dot b/tools/path_walk/node_6.dot index ab119bd..68b2d0e 100644 --- a/tools/path_walk/node_6.dot +++ b/tools/path_walk/node_6.dot @@ -1,10 +1,5 @@ digraph G { 0; -1; -3; 6; -1->6 [label=1]; -3->6 [label=0]; -0->3 [label=1]; -0->1 [label=0]; +0->6 [label=2]; } \ No newline at end of file diff --git a/tools/path_walk/node_7.dot b/tools/path_walk/node_7.dot index 4e0bce9..cf132b3 100644 --- a/tools/path_walk/node_7.dot +++ b/tools/path_walk/node_7.dot @@ -1,10 +1,5 @@ digraph G { 0; -1; -4; 7; -1->7 [label=1]; -4->7 [label=0]; -0->4 [label=1]; -0->1 [label=0]; +0->7 [label=3]; } \ No newline at end of file diff --git a/tools/path_walk/node_8.dot b/tools/path_walk/node_8.dot index 6b2d34f..4f5fe7a 100644 --- a/tools/path_walk/node_8.dot +++ b/tools/path_walk/node_8.dot @@ -1,10 +1,10 @@ digraph G { 0; +1; 2; -3; 8; -2->8 [label=1]; -3->8 [label=0]; -0->3 [label=1]; +1->8 [label=0]; +2->8 [label=0]; 0->2 [label=0]; +0->1 [label=0]; } \ No newline at end of file diff --git a/tools/path_walk/node_9.dot b/tools/path_walk/node_9.dot index 23b8719..f153c48 100644 --- a/tools/path_walk/node_9.dot +++ b/tools/path_walk/node_9.dot @@ -1,10 +1,10 @@ digraph G { 0; -2; -4; +1; +3; 9; -2->9 [label=1]; -4->9 [label=0]; -0->4 [label=1]; -0->2 [label=0]; +1->9 [label=1]; +3->9 [label=0]; +0->3 [label=1]; +0->1 [label=0]; } \ No newline at end of file diff --git a/tools/temp.dot b/tools/temp.dot index 5e15afc..1e29e58 100644 --- a/tools/temp.dot +++ b/tools/temp.dot @@ -15,16 +15,278 @@ digraph G { 13; 14; 15; -8->14 [label=1]; -9->14 [label=1]; -10->14 [label=0]; -3->10 [label=1]; -4->10 [label=1]; -2->9 [label=1]; -4->9 [label=0]; -2->8 [label=1]; -3->8 [label=0]; -0->4 [label=1]; -0->3 [label=1]; -0->2 [label=0]; +16; +17; +18; +19; +20; +21; +22; +23; +24; +25; +26; +27; +28; +29; +30; +31; +32; +33; +34; +35; +36; +37; +38; +39; +40; +41; +42; +43; +44; +45; +46; +47; +48; +49; +50; +51; +52; +53; +54; +55; +56; +57; +58; +59; +60; +61; +62; +63; +64; +65; +66; +67; +68; +69; +70; +71; +72; +73; +74; +75; +76; +77; +78; +79; +80; +81; +82; +83; +84; +85; +86; +87; +88; +89; +90; +91; +92; +93; +94; +95; +96; +97; +98; +99; +100; +101; +102; +103; +104; +105; +106; +107; +108; +109; +110; +111; +112; +113; +114; +115; +116; +117; +118; +119; +120; +121; +122; +123; +124; +125; +126; +127; +128; +129; +130; +131; +132; +133; +134; +135; +136; +137; +138; +139; +140; +141; +142; +143; +144; +145; +146; +147; +148; +149; +150; +151; +152; +153; +154; +155; +156; +157; +158; +159; +160; +161; +162; +163; +164; +165; +166; +167; +168; +169; +170; +171; +172; +173; +174; +175; +176; +177; +178; +179; +180; +181; +182; +183; +184; +185; +186; +187; +188; +189; +190; +191; +192; +193; +194; +195; +196; +197; +198; +199; +200; +201; +202; +203; +204; +205; +206; +207; +208; +209; +210; +211; +212; +213; +214; +215; +216; +217; +218; +219; +220; +221; +222; +223; +224; +225; +226; +227; +228; +229; +230; +231; +232; +233; +234; +235; +236; +237; +238; +239; +240; +241; +242; +243; +244; +245; +246; +247; +248; +249; +250; +251; +252; +253; +254; +255; +256; +257; +258; +259; +260; +261; +262; +263; +264; +265; +266; +267; +268; +269; +270; +271; +272; +273; +274; +275; +276; +277; +278; +279; +280; +281; +282; +283; +284; +285; +286; +287; +1->14 [label=4]; +0->1 [label=0];