Macro-Like Instrumentation Grammar for Boolean Expressions

Zhenyu Zhang,Zhongxing Xu,Zhifang Liu,Xiaopeng Gao
DOI: https://doi.org/10.1109/CISE.2010.5676786
2010-01-01
Abstract:Boolean expression is a basic programming element used to evaluate the truth-values of conditions or their combinations. While Boolean expressions may have complicated logical structures, instrumenting them often needs heavyweight transformation to source code or work with low-level program implementation, which results in cumbersome code and great difficulties to maintenance. As a result, previous instrumentation is often conducted using automatic mechanism, left as the last integration step, and needs to be redone once the source code has changes. It is inflexible and not interactivable for collaborative work. In this paper, we compare several existing popular instrumentation methods and propose a friendly approach, which adds least prefix and postfix to Boolean expressions, simply wraps all conditions, and preserves all Boolean operators if any. Our method works at source-code level yet has a macro-like grammar. It is human maintainable so that programmers may manually and cooperatively modify code by instrumenting interested Boolean expressions like operating macros. We elaborate on the grammar of our method and give empirical evaluation to its performance. Our method has been used in some realistic industrial and research projects successfully.
What problem does this paper attempt to address?