Contract Programming Checker : A Study for Making an Automated Test Tool Using a Parser

Thanks to computer software development, the communication industry hasevolved a lot during the last few years. Software and hardware integration made itpossible to exploit the best out of available equipments. One of the important issues in software development process is to avoid bugs ordetect the...

Full description

Bibliographic Details
Main Author: Yazdani Najafabadi, HamidReza
Format: Others
Language:English
Published: Uppsala universitet, Institutionen för informationsteknologi 2009
Online Access:http://urn.kb.se/resolve?urn=urn:nbn:se:uu:diva-108026
id ndltd-UPSALLA1-oai-DiVA.org-uu-108026
record_format oai_dc
spelling ndltd-UPSALLA1-oai-DiVA.org-uu-1080262013-01-08T13:48:30ZContract Programming Checker : A Study for Making an Automated Test Tool Using a ParserengYazdani Najafabadi, HamidRezaUppsala universitet, Institutionen för informationsteknologi2009Thanks to computer software development, the communication industry hasevolved a lot during the last few years. Software and hardware integration made itpossible to exploit the best out of available equipments. One of the important issues in software development process is to avoid bugs ordetect them in the early stage of development phase. Experiments have shown thatmost of the bugs are usually coming from the small fraction of the code. If this part ofthe code can be detected in advance then it is possible to benefit the cost of softwareproduction in great amount of time and money. Development teams have to makesure that they deliver a verified code to next team and that is why they obliged to usea concept called “contract programming”. It means expecting each module which isworking with other modules to respect to some kind of contract. As long as thecontract is respected in all module interactions, valid output will be guaranteed. Several problems will remain in this approach. First issue is to make sure allnecessary contracts have been embedded to the code. On the other hand, contractsare memory and time consuming to check so try doing over protection results inweaker performance. Considering the scalability problem, there is an urgent need for an automatic toolwhich is capable of checking against all possible defects to tell the programmer exactlywhere the contract is needed without performing any under or over protection. This thesis tries to address this problem by generating a parser using UNIX tools,Lex (lexical analyzer) and Yacc (parser generator), to detect or worn about thepossible cause of defects. General built-in functions with different algorithms have alsobeen implemented in C language to perform different level of code analysis. Theoutcome of this thesis is a parser which fulfills three different requirements. Firstly, checking all protected required places to check if they have been protectedby their proper contracts. Secondly, notifying the extra contracts in places where they are not needed. It isdone by parser which analyzes the calling graph of different functions to verify if thecontracts are actually needed. The last but not least requirement is to find the least protection required areas. Itmeans places where protection should be kept even if all internal computations areguaranteed to be correct. This facility will be used when the code wants to bedelivered to other teams and the internal integration of the code is already verified. The tool is also capable of performing statistical analysis to give an exact percentageof protection in each function block and the software unit as a whole. The Developed tool has successfully passed all of the exhaustive tests for furnishingthese requirements. Student thesisinfo:eu-repo/semantics/masterThesistexthttp://urn.kb.se/resolve?urn=urn:nbn:se:uu:diva-108026IT, ; 09 023application/pdfinfo:eu-repo/semantics/openAccess
collection NDLTD
language English
format Others
sources NDLTD
description Thanks to computer software development, the communication industry hasevolved a lot during the last few years. Software and hardware integration made itpossible to exploit the best out of available equipments. One of the important issues in software development process is to avoid bugs ordetect them in the early stage of development phase. Experiments have shown thatmost of the bugs are usually coming from the small fraction of the code. If this part ofthe code can be detected in advance then it is possible to benefit the cost of softwareproduction in great amount of time and money. Development teams have to makesure that they deliver a verified code to next team and that is why they obliged to usea concept called “contract programming”. It means expecting each module which isworking with other modules to respect to some kind of contract. As long as thecontract is respected in all module interactions, valid output will be guaranteed. Several problems will remain in this approach. First issue is to make sure allnecessary contracts have been embedded to the code. On the other hand, contractsare memory and time consuming to check so try doing over protection results inweaker performance. Considering the scalability problem, there is an urgent need for an automatic toolwhich is capable of checking against all possible defects to tell the programmer exactlywhere the contract is needed without performing any under or over protection. This thesis tries to address this problem by generating a parser using UNIX tools,Lex (lexical analyzer) and Yacc (parser generator), to detect or worn about thepossible cause of defects. General built-in functions with different algorithms have alsobeen implemented in C language to perform different level of code analysis. Theoutcome of this thesis is a parser which fulfills three different requirements. Firstly, checking all protected required places to check if they have been protectedby their proper contracts. Secondly, notifying the extra contracts in places where they are not needed. It isdone by parser which analyzes the calling graph of different functions to verify if thecontracts are actually needed. The last but not least requirement is to find the least protection required areas. Itmeans places where protection should be kept even if all internal computations areguaranteed to be correct. This facility will be used when the code wants to bedelivered to other teams and the internal integration of the code is already verified. The tool is also capable of performing statistical analysis to give an exact percentageof protection in each function block and the software unit as a whole. The Developed tool has successfully passed all of the exhaustive tests for furnishingthese requirements.
author Yazdani Najafabadi, HamidReza
spellingShingle Yazdani Najafabadi, HamidReza
Contract Programming Checker : A Study for Making an Automated Test Tool Using a Parser
author_facet Yazdani Najafabadi, HamidReza
author_sort Yazdani Najafabadi, HamidReza
title Contract Programming Checker : A Study for Making an Automated Test Tool Using a Parser
title_short Contract Programming Checker : A Study for Making an Automated Test Tool Using a Parser
title_full Contract Programming Checker : A Study for Making an Automated Test Tool Using a Parser
title_fullStr Contract Programming Checker : A Study for Making an Automated Test Tool Using a Parser
title_full_unstemmed Contract Programming Checker : A Study for Making an Automated Test Tool Using a Parser
title_sort contract programming checker : a study for making an automated test tool using a parser
publisher Uppsala universitet, Institutionen för informationsteknologi
publishDate 2009
url http://urn.kb.se/resolve?urn=urn:nbn:se:uu:diva-108026
work_keys_str_mv AT yazdaninajafabadihamidreza contractprogrammingcheckerastudyformakinganautomatedtesttoolusingaparser
_version_ 1716529565713563648