Is there a way to generalize programming language syntax -
i'm hoping develop language independent tool code analyzing. in order need find way generalize programming languages syntax. thought of develop layer between source code , analyzer can understand source code independent of language. need know there special research area problem? suggestions?
it depends on kind of analysis you're going do. if want analyze "intent" of code in manner explainable in context of source language, problem impossible unless restrict particular language family (e.g. java, c#, , c++, limited). can gain more flexibility if you're interested in basic analysis, e.g. building model of defined types , methods/functions.
if you're interested in analyzing low-level behavior, best bet may analyze output of stages of compiler. example, there many useful types of analysis, such data flow analysis, can done on java bytecode, irrespective of language generated it. similar analyses can done on llvm intermediate code or gcc's intermediate language (in fact, these compilers both lot of optimizations on intermediate code or assembly code level , thereby able lot of same optimizations no matter language being compiled).
Comments
Post a Comment