arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2501.04503cs.PLcs.CLcs.DCcs.PF
收藏

开发面向类C语言子集的模块化编译器

Developing a Modular Compiler for a Subset of a C-like Language

Gauhati University(古瓦哈提大学)

Debasish Dutta, Neeharika Sonowal, Irani Hazarika

AI总结:

本文设计并迭代实现了一个面向类C语言子集的模块化编译器,通过可增删子集与增量开发提升可维护性和内存效率,并在资源受限单板机上验证其有效性。

摘要:

本文介绍了一种面向类C语言子集的模块化编译器的开发,旨在应对为高级语言构建编译器时面临的挑战。这种模块化方法允许开发者根据需要通过添加或移除语言子集来修改语言,从而得到一个极简且内存高效的编译器。开发过程被划分为若干小型增量步骤,每一步都会产生一个功能完整的编译器,支持不断扩展的语言子集。本文概述了该编译器的迭代开发阶段,强调其在能力和功能上的渐进增强。通过遵循模块化设计、代码可复用性和文档编写方面的行业最佳实践,最终编译器具备了功能效率、可维护性和可扩展性。事实证明,该编译器不仅能有效管理语言结构,还能开发经过优化的代码,展示了其实用性。研究还通过在一台内存极小、资源匮乏的单板计算机上运行该编译器进行了进一步评估,结果再次表明该编译器在资源受限设备上的效率和适用性。

英文摘要:

The paper introduces the development of a modular compiler for a subset of a C-like language, which addresses the challenges in constructing a compiler for high-level languages. This modular approach will allow developers to modify a language by adding or removing subsets as required, resulting in a minimal and memory-efficient compiler. The development process is divided into small, incremental steps, where each step yields a fully functioning compiler for an expanding subset of the language. The paper outlines the iterative developmental phase of the compiler, emphasizing progressive enhancements in capabilities and functionality. Adherence to industry best practices of modular design, code reusability, and documentation has enabled the resulting compiler's functional efficiency, maintainability, and extensibility. The compiler proved to be effective not only in managing the language structure but also in developing optimized code, which demonstrates its practical usability. This was also further assessed using the compiler on a tiny memory-deficient single-board computer, again showing the compiler's efficiency and suitability for resource-constrained devices.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑