z-logo
Premium
Identifying syntactic differences between two programs
Author(s) -
Yang Wuu
Publication year - 1991
Publication title -
software: practice and experience
Language(s) - English
Resource type - Journals
SCImago Journal Rank - 0.437
H-Index - 70
eISSN - 1097-024X
pISSN - 0038-0644
DOI - 10.1002/spe.4380210706
Subject(s) - computer science , exploit , grammar , point (geometry) , scheme (mathematics) , artificial intelligence , natural language processing , programming language , face (sociological concept) , dynamic programming , syntactic structure , syntax , algorithm , linguistics , mathematics , mathematical analysis , philosophy , geometry , computer security
Programmers frequently face the need to identify the differences between two programs, usually two different versions of a program. Text‐based tools such as the UNIXr̀ utility diff often produce unsatisfactory comparisons because they cannot accurately pinpoint the differences and because they sometimes produce irrelevant differences. Since programs have a rigid syntactic structure as described by the grammar of the programming language in which they are written, we develop a comparison algorithm that exploits knowledge of the grammar. The algorithm, which is based on a dynamic programming scheme, can point out the differences between two programs more accurately than previous text comparison tools. Finally, the two programs are pretty‐printed ‘synchronously’ with the differences highlighted so that the differences are easily identified.

This content is not available in your region!

Continue researching here.

Having issues? You can contact us here