{"title":"Fine-grained aspects of automatic refactoring in C2Eiffel","authors":"A. Friedli","doi":"10.3929/ETHZ-A-007313685","DOIUrl":null,"url":null,"abstract":"The C2Eiffel framework [1] translates C source code to Eiffel source code. It aims to generate code that looks natural to a programmer such that it is readable and maintainable. While this is already the case for most parts of common C programs, there are areas for improvements. External C functions are currently wrapped in the generated Eiffel code since the used libraries are not translated. In this thesis I will replace some standard and often used C functions by the corresponding Eiffel equivalents. In the attempt to replace standard C string functions I will also try to replace the current translation of C strings to integer arrays with native Eiffel strings. I will also remove jump statements like break that are often used in C programs but are not available in Eiffel. This will increase the readability of the code compared to the current implementation that emulates the jump mechanism in Eiffel and produces hard to read code.","PeriodicalId":10841,"journal":{"name":"CTIT technical reports series","volume":"25 1","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2011-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"CTIT technical reports series","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.3929/ETHZ-A-007313685","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
Abstract
The C2Eiffel framework [1] translates C source code to Eiffel source code. It aims to generate code that looks natural to a programmer such that it is readable and maintainable. While this is already the case for most parts of common C programs, there are areas for improvements. External C functions are currently wrapped in the generated Eiffel code since the used libraries are not translated. In this thesis I will replace some standard and often used C functions by the corresponding Eiffel equivalents. In the attempt to replace standard C string functions I will also try to replace the current translation of C strings to integer arrays with native Eiffel strings. I will also remove jump statements like break that are often used in C programs but are not available in Eiffel. This will increase the readability of the code compared to the current implementation that emulates the jump mechanism in Eiffel and produces hard to read code.