Towards an Approach to Semantic-Based Pattern Recognition in Source Code to Support HPC-Cloud Application Portability and HPC-Quantum Integration
摘要
This paper presents a framework for algorithm recognition that automatically constructs an ontology from a System Dependence Graph (SDG). Our methodology begins by leveraging the ROSE compiler to generate a detailed SDG from source code. This structural representation is then systematically transformed into a formal ontology, mapping program entities (e.g., functions, loops) and their interdependencies to a rich vocabulary of ontological classes and properties. Algorithmic patterns are encoded as a set of manually curated SWRL rules and SPARQL queries. An OWL reasoner is then employed to perform inference over the generated ontology, identifying program sections that satisfy these formal algorithmic definitions. This method enables a deep semantic understanding of source code, with a specific focus on identifying opportunities for optimization in cloud environments and recognizing classical kernels suitable for translation to quantum computing paradigms.