971517 蔡中皓 971547 郭尚豪 971555 紀羽軒 1. outline background motive and purpose method...

14
971517 蔡蔡蔡 971547 蔡蔡蔡 971555 蔡蔡蔡 FORMAL PROPERTY QUALIFICATION 1

Post on 21-Dec-2015

251 views

Category:

Documents


8 download

TRANSCRIPT

Page 1: 971517 蔡中皓 971547 郭尚豪 971555 紀羽軒 1. Outline Background Motive and purpose Method Conclusion 2

1

971517 蔡 中 皓 971547 郭 尚 豪 971555 紀 羽 軒

FORMAL PROPERTY QUALIFICATION

Page 2: 971517 蔡中皓 971547 郭尚豪 971555 紀羽軒 1. Outline Background Motive and purpose Method Conclusion 2

2

Outline

Background

Motive and purpose

Method

Conclusion

Page 3: 971517 蔡中皓 971547 郭尚豪 971555 紀羽軒 1. Outline Background Motive and purpose Method Conclusion 2

3

Background

Design errors are addressed by model checking tools. A model checking tool imports a model and several formal properties.

Those properties represent the essential behaviors which are usually documented by informal specification.

Page 4: 971517 蔡中皓 971547 郭尚豪 971555 紀羽軒 1. Outline Background Motive and purpose Method Conclusion 2

4

Motive and purpose

Mutation analysis measures the quality of the verification environment by running the tests on the mutant to see if the results of the mutant are different from the original one.

If no difference results exist, then the mutant is considered “live”. If one of the tests causes different results, then the mutant is considered “killed”.

Page 5: 971517 蔡中皓 971547 郭尚豪 971555 紀羽軒 1. Outline Background Motive and purpose Method Conclusion 2

5

Motive and purpose

We simplify the process of model checking by using a SAT-solver to solve the concatenation of the design M and a property P[i].

If the solver returns TRUE, we say M satisfies the property P[i]. Otherwise, we say M violates P[i].

Page 6: 971517 蔡中皓 971547 郭尚豪 971555 紀羽軒 1. Outline Background Motive and purpose Method Conclusion 2

6

Method

Step1: 依 序 讀 取 property_file 和mutation_file ,可得知需做組合的檔案名稱。(將讀出的檔名 string轉為 char才可使用 )

Page 7: 971517 蔡中皓 971547 郭尚豪 971555 紀羽軒 1. Outline Background Motive and purpose Method Conclusion 2

7

Method

Step2: 將 mutant 與 property 結合並調整為DIMACS CNF format,如圖二所示。 Literals and clauses may increase due to the concatenation. Append the clauses of P[i] to M.

Page 8: 971517 蔡中皓 971547 郭尚豪 971555 紀羽軒 1. Outline Background Motive and purpose Method Conclusion 2

8

Method

Step3: 將得到之 cnf檔當作 input file,讓外部程式 (SAT-solver)做呼叫使用。 system("./march_dl PM.cnf");

Page 9: 971517 蔡中皓 971547 郭尚豪 971555 紀羽軒 1. Outline Background Motive and purpose Method Conclusion 2

9

Method

Step4: 依據 Solver處理完的結果,將其處理結果寫入另一個檔案。

Step5: 讀取 Step4之結果,判斷此mutant是否為“ live” 。

Page 10: 971517 蔡中皓 971547 郭尚豪 971555 紀羽軒 1. Outline Background Motive and purpose Method Conclusion 2

10

Method

AlgorithmGet the mutant_num and property_num from the

mutantation_file and the property_file, respectively.

For each M[i], i is the quantity of the mutant.

For each P[j], j is the quantity of the property.

Combine the M and P to a file that satisfy the DIMACS CNF format, then put the file to the SAT-

solver “march_dl”.

If march_dl return “UNSATISFIABLE”, then break the loop.

Else return “SATISFIABLE” and display on the report.

Page 11: 971517 蔡中皓 971547 郭尚豪 971555 紀羽軒 1. Outline Background Motive and purpose Method Conclusion 2

11

Method

System flow

讀取 File內的結果並做判斷 File

讀取 property_file 和 mutation_file得到欲組合之檔案名稱

將檔案做組合並調整為DIMACS CNF format

CNF Solver

寫進Report

Discard

.CNF檔

結果

US

Page 12: 971517 蔡中皓 971547 郭尚豪 971555 紀羽軒 1. Outline Background Motive and purpose Method Conclusion 2

12

Conclusion

以官方提供之 Testcase1 為例: 測試檔輸出 (Test Output)

Page 13: 971517 蔡中皓 971547 郭尚豪 971555 紀羽軒 1. Outline Background Motive and purpose Method Conclusion 2

13

Conclusion

以官方提供之 Testcase1 為例: 結果分析 (Data Analysis)

Page 14: 971517 蔡中皓 971547 郭尚豪 971555 紀羽軒 1. Outline Background Motive and purpose Method Conclusion 2

14

Thanks for your listening.