首页> 外文期刊>ACM SIGPLAN Notices: A Monthly Publication of the Special Interest Group on Programming Languages >Modular Code Generation from Synchronous Block Diagrams Modularity vs. Code Size
【24h】

Modular Code Generation from Synchronous Block Diagrams Modularity vs. Code Size

机译:从同步框图生成模块化代码模块化与代码大小

获取原文
获取原文并翻译 | 示例
获取外文期刊封面目录资料

摘要

We study modular, automatic code generation from hierarchicalblock diagrams with synchronous semantics. Such diagrams are thefundamental model behind widespread tools in the embedded soft-ware domain, such as Simulink and SCADE. Code is modular inthe sense that it is generated for a given composite block indepen-dently from context (i.e., without knowing in which diagrams theblock is to be used) and using minimal information about the inter-nals of the block. In previous work, we have shown how modularcode can be generated by computing a set of interface functionsfor each block and a set of dependencies between these functionsthat is exported along with the interface. We have also introduced aquantified notion of modularity in terms of the number of interfacefunctions generated per block, and showed how to minimize thisnumber, which is essential for scalability. Finally, we have exposedthe fundamental trade-off between modularity and reusability (setof diagrams the block can be used in). In this paper we explore another trade-off: modularity vs. codesize. We show that our previous technique, although it achievesmaximal reusability and is optimal in terms of modularity, may re-sult in code replication and therefore large code sizes, somethingoften unacceptable in an embedded system context. We propose toremedy this by generating code with no replication, and show thatthis generally results in some loss of modularity. We show that opti-mizing modularity while maintaining maximal reusability and zeroreplication is an intractable problem (NP-complete). We also showthat this problem can be solved using a simple iterative procedurethat checks satisfiability of a sequence of propositional formulas.We report on a new prototype implementation and experimental re-sults. The latter demonstrate the practical interest in our methods.
机译:我们研究从具有同步语义的层次结构框图中生成模块化的自动代码。这些图是嵌入式软件领域中广泛使用的工具(例如Simulink和SCADE)背后的基础模型。代码是模块化的,从某种意义上说,代码是独立于上下文从给定的复合块生成的(即,不知道要在哪个图中使用该块),并且使用有关该块内部的最少信息。在先前的工作中,我们展示了如何通过为每个块计算一组接口函数以及与接口一起导出的这些函数之间的一组依赖关系来生成模块化代码。我们还根据每个模块生成的接口功能的数量引入了模块化的量化概念,并展示了如何最小化此数量,这对于可伸缩性至关重要。最后,我们展示了模块化和可重用性之间的基本权衡(可以使用该模块的setof图)。在本文中,我们探索了另一个权衡:模块化与代码大小。我们展示了我们先前的技术,尽管它实现了最大的可重用性,并且在模块化方面是最佳的,但它可能会导致代码复制并因此导致大的代码大小,这在嵌入式系统环境中通常是不可接受的。我们建议通过不复制而生成代码来对此进行补救,并表明这通常会导致一些模块性损失。我们表明,在保持最大可重用性和零复制的同时优化模块化是一个棘手的问题(NP完全)。我们还表明,可以使用一个简单的迭代过程来解决此问题,该过程可以检查命题公式序列的可满足性。我们报告了新的原型实现和实验结果。后者证明了对我们方法的实际兴趣。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号