C plus plus Metastring Library and Its Applications

被引:0
|
作者
Szugyi, Zalan [1 ]
Sinkovics, Abel [1 ]
Pataki, Norbert [1 ]
Porkolab, Zoltan [1 ]
机构
[1] Eotvos Lorand Univ, Dept Programming Languages & Compilers, H-1117 Budapest, Hungary
关键词
D O I
暂无
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
C++ template metaprogramming is an emerging direction of generative programming: with proper template definitions we can enforce the C++ compiler to execute algorithms at compilation time. Template metaprograms have become essential part of today's C++ programs of industrial size; they provide code adoptions, various optimizations, DSL embedding, etc. Besides the compilation time algorithms, template metaprogram data-structures are particularly important. From simple typelists to more advanced STL-like data types there are a variety of such constructs. Interesting enough, until recently string, as one of the most widely used data type of programming, has not been supported. Although, boost: :mpl: :string is an advance in this area, it still lacks the most fundamental string operations. In this paper, we analysed the possibilities of handling string objects at compilation time with a metastring library. We created a C++ template metaprogram library that provides the common string operations, like creating sub-strings, concatenation, replace, and similar. To provide real-life use-cases we implemented two applications on top of our Metastring library. One use case utilizes compilation time inspection of input in the domain of pattern matching algorithms, thus we are able to select the more optimal search method at compilation time. The other use-case implements safePrint, a type-safe version of printf - a widely investigated problem. We present both the performance improvements and extended functionality we have achieved in the applications of our Metastring library.
引用
收藏
页码:461 / 480
页数:20
相关论文
共 50 条
  • [21] owlcpp: a C plus plus library for working with OWL ontologies
    Levin, Mikhail K.
    Cowell, Lindsay G.
    JOURNAL OF BIOMEDICAL SEMANTICS, 2015, 6
  • [22] Object Model Construction for Inheritance in C plus plus and Its Applications to Program Analysis
    Yang, Jing
    Balakrishnan, Gogul
    Maeda, Naoto
    Ivancic, Franjo
    Gupta, Aarti
    Sinha, Nishant
    Sankaranarayanan, Sriram
    Sharma, Naveen
    COMPILER CONSTRUCTION, CC 2012, 2012, 7210 : 144 - 164
  • [23] Ironclad C plus plus A Library-Augmented Type-Safe Subset of C plus
    DeLozier, Christian
    Eisenberg, Richard
    Nagarakatte, Santosh
    Osera, Peter-Michael
    Martin, Milo M. K.
    Zdancewic, Steve
    ACM SIGPLAN NOTICES, 2013, 48 (10) : 287 - 304
  • [24] The Scythe Statistical Library: An Open Source C plus plus Library for Statistical Computation
    Pemstein, Daniel
    Quinn, Kevin M.
    Martin, Andrew D.
    JOURNAL OF STATISTICAL SOFTWARE, 2011, 42 (12): : 1 - 26
  • [25] VORO plus plus : A three-dimensional Voronoi cell library in C plus
    Rycroft, Chris H.
    CHAOS, 2009, 19 (04)
  • [26] Tracing Error Propagation in C/C plus plus Applications
    Kong, Shiyi
    Lu, Minyan
    Li, Luyi
    2018 IEEE 18TH INTERNATIONAL CONFERENCE ON SOFTWARE QUALITY, RELIABILITY AND SECURITY COMPANION (QRS-C), 2018, : 308 - 315
  • [27] Library Plus INTERNEST Project of the Library Plus
    Injac, Vesna
    BOSNIACA-JOURNAL OF THE NATIONAL AND UNIVERSITY LIBRARY OF BOSNIA AND HERZEGOVINA, 2013, (18): : 50 - 60
  • [28] Functional Programming Library for C plus
    Krasnov, M. M.
    PROGRAMMING AND COMPUTER SOFTWARE, 2020, 46 (05) : 330 - 340
  • [29] RGE plus plus : A C plus plus library to solve renormalisation group equations in quantum field theory
    Deppisch, Thomas
    Herren, Florian
    COMPUTER PHYSICS COMMUNICATIONS, 2022, 270
  • [30] Employing C plus plus Templates in the Design of a Computer Algebra Library
    Brandt, Alexander
    Moir, Robert H. C.
    Maza, Marc Moreno
    MATHEMATICAL SOFTWARE - ICMS 2020, 2020, 12097 : 342 - 352