• DocumentCode
    3364052
  • Title

    Fast symbolic evaluation of C/C++ preprocessing using conditional values

  • Author

    Latendresse, Mario

  • Author_Institution
    NGIT/FNMOC, Monterey, CA, USA
  • fYear
    2003
  • fDate
    26-28 March 2003
  • Firstpage
    170
  • Lastpage
    179
  • Abstract
    C/C++ code relying on preprocessing can be quite complex to analyze. This is often due to free preprocessing variables set at compile time. In general, preprocessing selectively compile parts of the source code based on the values of preprocessing variables which may be free. In this case, the relations between these parts can only be represented by conditional expressions using the free variables. Traditional symbolic evaluation can be used to infer these expressions, but its best case time complexity is exponential. We present a new approach for symbolic evaluation that can efficiently compute these conditions by binding variables to conditional values and avoiding the path feasibility analysis of traditional symbolic evaluation. It infers the exact conditional expressions for which the lines of code are compiled and the (conditional) values of preprocessing variables at each point of the source code. Our prototype shows the approach as practical and scaleable to large C/C++ software.
  • Keywords
    C language; C++ language; computational complexity; program compilers; program testing; C preprocessing; C++ preprocessing; compile time; conditional expressions; conditional values; free variables; path feasibility analysis; program testing; prototype; source code; symbolic evaluation; time complexity; Character generation; Data preprocessing; Flow graphs; Information analysis; Programming profession; Software maintenance; Software prototyping;
  • fLanguage
    English
  • Publisher
    ieee
  • Conference_Titel
    Software Maintenance and Reengineering, 2003. Proceedings. Seventh European Conference on
  • ISSN
    1534-5351
  • Print_ISBN
    0-7695-1902-4
  • Type

    conf

  • DOI
    10.1109/CSMR.2003.1192425
  • Filename
    1192425