Show simple item record

dc.contributor.advisorDžonsons, Kristapsen_US
dc.contributor.authorŠinkarovs, Artjomsen_US
dc.contributor.otherLatvijas Universitāte. Fizikas un matemātikas fakultāteen_US
dc.date.accessioned2015-03-24T08:43:53Z
dc.date.available2015-03-24T08:43:53Z
dc.date.issued2009en_US
dc.identifier.other26881en_US
dc.identifier.urihttps://dspace.lu.lv/dspace/handle/7/25647
dc.description.abstractIr ļoti daudz sistēmu, kas atļauj veikt C valodas statisko analīzi. Vairākas no tām pieņem, ka pirmkods ir jāanalizē tikai pēc priekšprocesora fāzes, kur visi priekšprocesora makrosi pirmkodā ir pārvērsti par "tīru" C kodu. Šis pieņēmums var novest pie kļūdām, jo priekšprocesora fāze izmet no koda izteiksmju kopu, kura var atšķirties dažādu kompilāciju ietvaros. Šajā darbā mēs piedāvājam instrumentu, kas atļauj ģenerēt abstrakto sintaktisko koku, kur ir iekļauti gan priekšprocesora, gan C valodas priekšraksti. Darbā tiek apskatīts arī parastais pielietojums mūsu instrumentam, lai atrastu kļūdas kodā pirms priekšprocesora fāzes. Izmantojot mūsu instrumentu, ir iespējams iegūt no koda ar priekšprocesora direktīvām visu iespējamu tīru C valodu pirmkodu. Pēc tam, analizējot katru variantu ar kādu statisko C valodas analizatoru, mēs varam pierādīt, ka pirmkods ir absolūti korekts šī analizatora ietvaros.en_US
dc.description.abstractThere exist many well-known systems for the static analysis of C code. Unfortunately, the majority of these tools only operate after full or selective preprocessing, where preprocessor macros embedded in source files are converted into pure C-language code. The implicit assumption, that sources may be fully or partially stripped of preprocessing directives without consequence, is harmful or even outright erroneous: the preprocessing phase collapses to a set of possible macro expressions, which may differ between compilations. In this document, we introduce a tool generating the full abstract syntax tree of both preprocessor and C statements. We then consider a simple application of this tool for discovering syntactic errors in mixed C and CPP code, where the produced combinations of C and collapsed preprocessor statements are analysed by a front-end, C-only static analysis tool.en_US
dc.language.isoN/Aen_US
dc.publisherLatvijas Universitāteen_US
dc.rightsinfo:eu-repo/semantics/openAccessen_US
dc.subjectDatorzinātneen_US
dc.titleC un C priekšprocesora statiskā analīzeen_US
dc.title.alternativeC and C Preprocessor Static Analysisen_US
dc.typeinfo:eu-repo/semantics/masterThesisen_US


Files in this item

Thumbnail

This item appears in the following Collection(s)

Show simple item record