Fine-grained aspects of automatic refactoring in C2Eiffel

A. Friedli
{"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.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
C2Eiffel中自动重构的细粒度方面
C2Eiffel框架[1]将C源代码转换为Eiffel源代码。它的目标是生成对程序员来说看起来很自然的代码,这样它是可读和可维护的。虽然这已经是大多数普通C程序的情况,但仍有需要改进的地方。外部C函数目前被封装在生成的Eiffel代码中,因为使用的库没有被翻译。在本文中,我将用相应的Eiffel等价函数替换一些标准的和经常使用的C函数。在尝试替换标准的C字符串函数时,我也将尝试用原生Eiffel字符串替换当前C字符串到整数数组的转换。我还将删除跳转语句,如break,它们经常在C程序中使用,但在Eiffel中不可用。这将增加代码的可读性,而当前的实现是模仿Eiffel中的跳转机制,产生难以阅读的代码。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Costs and Benefits of Electric Vehicles and District Cooling Systems: A case study in Singapore Towards a Digital Urban Climate Twin: Simulation-as-a-Service (SaaS) for Model Integration Microscale Assessment of the Anthropogenic Heat Mitigation Strategies Decision Support System: User research, usability analysis and computational build Analysis of climatic variables in different urban sites of Singapore and evaluation of strategies to improve the outdoor thermal environment
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1