TY - GEN
T1 - Inferring Attributed Grammars from Parser Implementations
AU - Pointner, Andreas
AU - Pichler, Josef
AU - Prähofer, Herbert
N1 - Publisher Copyright:
© 2025 IEEE.
PY - 2025
Y1 - 2025
N2 - Software systems that process structured inputs often lack complete and up-to-date specifications, which specify the input syntax and the semantics of input processing. While grammar mining techniques have focused on recovering syntactic structures, the semantics of input processing remains largely unexplored. In this work, we introduce a novel approach for inferring attributed grammars from parser implementations. Given an input grammar, our technique dynamically analyzes the implementation of recursive descent parsers to reconstruct the semantic aspects of input handling, resulting in specifications in the form of attributed grammars. By observing program executions and mapping the program's runtime behavior to the grammar, we systematically extract and embed semantic actions into the grammar rules. This enables comprehensive specification recovery. We demonstrate the feasibility of our approach using an initial set of programs, showing that it can accurately reproduce program behavior through the generated attributed grammars.
AB - Software systems that process structured inputs often lack complete and up-to-date specifications, which specify the input syntax and the semantics of input processing. While grammar mining techniques have focused on recovering syntactic structures, the semantics of input processing remains largely unexplored. In this work, we introduce a novel approach for inferring attributed grammars from parser implementations. Given an input grammar, our technique dynamically analyzes the implementation of recursive descent parsers to reconstruct the semantic aspects of input handling, resulting in specifications in the form of attributed grammars. By observing program executions and mapping the program's runtime behavior to the grammar, we systematically extract and embed semantic actions into the grammar rules. This enables comprehensive specification recovery. We demonstrate the feasibility of our approach using an initial set of programs, showing that it can accurately reproduce program behavior through the generated attributed grammars.
KW - Attributed Grammar Mining
KW - Program Analysis
KW - Semantic Action Extraction
KW - Specification Mining
UR - https://www.scopus.com/pages/publications/105022429791
U2 - 10.1109/ICSME64153.2025.00080
DO - 10.1109/ICSME64153.2025.00080
M3 - Conference contribution
AN - SCOPUS:105022429791
T3 - Proceedings - 2025 IEEE International Conference on Software Maintenance and Evolution, ICSME 2025
SP - 785
EP - 790
BT - Proceedings - 2025 IEEE International Conference on Software Maintenance and Evolution, ICSME 2025
PB - Institute of Electrical and Electronics Engineers Inc.
T2 - 41st IEEE International Conference on Software Maintenance and Evolution, ICSME 2025
Y2 - 7 September 2025 through 12 September 2025
ER -