Metadata invariants: checking and inferring metadata coding conventions

Myoungkyu Song, Eli Tilevich · 2012

Abstract—As the prevailing programming model of enter-prise applications is becoming more declarative, programmers are spending an increasing amount of their time and efforts writing and maintaining metadata, such as XML or annota-tions. Although metadata is a cornerstone of modern software, automatic bug finding tools cannot ensure that metadata main-tains its correctness during refactoring and enhancement. To address this shortcoming, this paper presents metadata invari-ants, a new abstraction that codifies various naming and typing relationships between metadata and the main source code of a program. We reify this abstraction as a domain-specific language. We also introduce algorithms to infer likely metadata invariants and to apply them to check metadata correctness in the presence of program evolution. We demonstrate how metadata invariant checking can help ensure that metadata remains consistent and correct during program evolution; it finds metadata-related inconsistencies and recommends how they should be corrected. Similar to static bug finding tools, a metadata invariant checker identifies metadata-related bugs as a program is being refactored and enhanced. Because metadata is omnipresent in modern software applications, our approach can help ensure the overall consistency and correctness of software as it evolves. Keywords-software maintenance; bug finding; refactoring; enhancement; frameworks; domain-specific languages; meta-data; invariants. I.

Read the paper · More papers on PaperTik