首页    期刊浏览 2024年09月29日 星期日
登录注册

文章基本信息

  • 标题:Formal Constraints on Memory Management for Composite Overloaded Operations
  • 本地全文:下载
  • 作者:Damian W.I. Rouson ; Xiaofeng Xu ; Karla Morris
  • 期刊名称:Scientific Programming
  • 印刷版ISSN:1058-9244
  • 出版年度:2006
  • 卷号:14
  • 期号:1
  • 页码:27-40
  • DOI:10.1155/2006/731428
  • 出版社:Hindawi Publishing Corporation
  • 摘要:

    The memory management rules for abstract data type calculus presented by Rouson, Morris & Xu [15] are recast as formal statements in the Object Constraint Language (OCL) and applied to the design of a thermal energy equation solver. One set of constraints eliminates memory leaks observed in composite overloaded expressions with three current Fortran 95/2003 compilers. A second set of constraints ensures economical memory recycling. The constraints are preconditions, postconditions and invariants on overloaded operators and the objects they receive and return. It is demonstrated that systematic run-time assertion checking inspired by the formal constraints facilitated the pinpointing of an exceptionally hard-to-reproduce compiler bug. It is further demonstrated that the interplay between OCL's modeling capabilities and Fortran's programming capabilities led to a conceptual breakthrough that greatly improved the readability of our code by facilitating operator overloading. The advantages and disadvantages of our memory management rules are discussed in light of other published solutions [11,19]. Finally, it is demonstrated that the run-time assertion checking has a negligible impact on performance.

国家哲学社会科学文献中心版权所有