samedi 4 août 2018

Why Abstract Syntax tree?

I am working on an academic project related to regression testing , where I m asked to compare Control Flow Graphs of two versions of same program. For CFG comparison it is suggested to use ASTs i.e. generate AST for code of each node of both CFGs. Two nodes are considered identical if their ASTs have same labels and same descendants. Why should I use AST comparison instead of string compare? How can I compare two ASTs any example?

Aucun commentaire:

Enregistrer un commentaire