错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Supporting Integrative Code Generation with Traceability Links and Code Fragment Integrity Checks

  • Nenad Todorović,
  • Bojana Dragaš,
  • Gordana Milosavljević

摘要

It is not always desirable or even possible to separate generated from handwritten code. However, trying to have generated and handwritten code intertwined and integrated means that the problem of persisting manual changes has to be solved in another way. This paper proposes a general workflow based on incremental code generation and API-based generators to allow integrative code generation. We combine traceability links with API-based generation to simplify tracking previously generated code elements. Additionally, we automate detecting manually introduced changes with code fragment integrity checks. To facilitate implementing this workflow, we introduce our solution. The solution includes the extension of RoseLib, our library that allows API-based code generation in C# language. The extension includes support for CSPath, a new language for selecting C# code elements that can be used for tracing, and functionalities that allow performing integrity checks. Finally, we showcase an implementation of the workflow with a proof-of-concept example.