Skip to content

Commit d1a2372

Browse files
committed
new one
add normalization, batch evaluation ......
1 parent 1b0573c commit d1a2372

File tree

120 files changed

+2130
-4107
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+2130
-4107
lines changed

README.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
99
#### Four Test metrics are used:
1010
1. Neuron Coverage (NC),
11-
2. Cell Coverage (CC),
12-
3. Gate Coverage (GC),
13-
4. Sequence Coverage (SQ)
11+
2. Cell Coverage (SC),
12+
3. Gate Coverage (BC),
13+
4. Sequence Coverage (TC)
1414

1515
#### Three models trained by LSTM:
1616
1. Sentiment Analysis,
@@ -43,9 +43,9 @@ We have two commands to run testing procedure and to run result analysis procedu
4343
--TestCaseNum <Num. of Test Cases>
4444
--TargMetri <Terminate Metrics>
4545
--CoverageStop <Terminate Coverage Rate>
46-
--threshold_CC <CC threshold>
47-
--threshold_GC <GC threshold>
48-
--symbols_SQ <Num. of symbols>
46+
--threshold_SC <SC threshold>
47+
--threshold_BC <BC threshold>
48+
--symbols_TC <Num. of symbols>
4949
--seq <seq in cells to test>
5050
[--mode <modeName>]
5151
--minimalTest <if generate minimal test set>
@@ -54,10 +54,10 @@ We have two commands to run testing procedure and to run result analysis procedu
5454
where
5555
1. \<modelName> can be in {sentiment,mnist,lipo}
5656
2. \<Num. of Test Cases> is expected number of test cases
57-
3. \<Termination Metrics> can be in {CC,GC,SQN,SQP}
57+
3. \<Termination Metrics> can be in {SC,BC,TCN,TCP}
5858
4. \<Termination Coverage Rate> is expected coverage rate of Termination Metric
59-
5. \<CC threshold> can be in [3,9]
60-
6. \<GC threshold> can be in [0,1]
59+
5. \<SC threshold> can be in [3,9]
60+
6. \<BC threshold> can be in [0,1]
6161
7. \<Num. of symbols> can be in {2,3}
6262
8. \<seq in cells to test> can be in {mnist:[19,23],sentiment:[480:484],lipo:[70,74]}
6363
8. \<modeName> can be in {train,test} with default value test
@@ -66,9 +66,9 @@ where
6666

6767
For example, we can run the following
6868

69-
python main.py --model mnist --TestCaseNum 2000 --TargMetri CC --CoverageStop 0.9 --threshold_CC 6 --threshold_GC 0.8 --symbols_SQ 2 --seq [19,23] --minimalTest 0 --output log_folder/record.txt
69+
python main.py --model mnist --TestCaseNum 2000 --TargMetri SC --CoverageStop 0.9 --threshold_SC 6 --threshold_BC 0.8 --symbols_TC 2 --seq [19,23] --minimalTest 0 --output log_folder/record.txt
7070

71-
which says that, we are working with MNIST model, and the test case generation will terminate when either the number of test cases is over 2000 or the target metric, Cell Coverage, reaches 0.9 coverage rate. We need to specify other parameters including threshold_CC, threshold_GC, symbols_SQ, seq. Moreover, we do not ask for the generation of miminal test suite, and the log is generated to the file log_folder/record.txt.
71+
which says that, we are working with MNIST model, and the test case generation will terminate when either the number of test cases is over 2000 or the target metric, Cell Coverage, reaches 0.9 coverage rate. We need to specify other parameters including threshold_SC, threshold_BC, symbols_TC, seq. Moreover, we do not ask for the generation of miminal test suite, and the log is generated to the file log_folder/record.txt.
7272

7373
#### to run result analysis procedure
7474
readfile.py can read the log file log_folder\record.txt and .MAT file of test conditions counting. Several figures includes the coverage updating information for all metrics and test conditions statistics plot are generated.

img/mnist_sm_adv.png

-1.1 MB
Binary file not shown.

0 commit comments

Comments
 (0)