Hits:
Indexed by:期刊论文
Date of Publication:2012-01-01
Journal:International Journal of Advancements in Computing Technology
Included Journals:Scopus
Volume:4
Issue:21
Page Number:337-345
ISSN No.:20058039
Abstract:Software vulnerabilities that easily occur due to the flexible grammar and loose compile environment of C++ language, have disadvantages to safety of software. An automatic static analysis method based on various rules in safe subset "MISRA C++ 2008" is proposed, with the features that code parsing logic and defect detecting logic are separated. A relational syntax tree and an intermediate XML model are constructed to parse code and store code information such as statements and identifiers in a structured way. XQuery expressions are employed to represent rules in safe subset, and locate code defects by matching corresponding nodes of the intermediate XML model. Experiments show that code defects violating safety rules can be detected effectively by the prototype system based on the method with low false positive rate and low false negative rate.