DeFacto: Language-Parametric Fact Extraction from Source Code
نویسندگان
چکیده
Extracting facts from software source code forms the foundation for any software analysis. Experience shows, however, that extracting facts from programs written in a wide range of programming and application languages is labour-intensive and error-prone. We present DeFacto, a new technique for fact extraction. It amounts to annotating the context-free grammar of a language of interest with fact annotations that describe how to extract elementary facts for language elements such as, for instance, a declaration or use of a variable, a procedure or method call, or control flow statements. Once the elementary facts have been extracted, we use relational techniques to further enrich them and to perform the actual software analysis. We motivate and describe our approach, sketch a prototype implementation and assess it using various examples. A comparison with other fact extraction methods indicates that our fact extraction descriptions are considerably smaller than those of competing methods.
منابع مشابه
A language-independent approach to the extraction of dependencies between source code entities
Context. Software networks are directed graphs of static dependencies between source code entities (functions, classes, modules, etc.). These structures can be used to investigate the complexity and evolution of large-scale software systems and to compute metrics associated with software design. The extraction of software networks is also the first step in reverse engineering activities. Object...
متن کاملFormalizing Fact Extraction
Schemas that define the form of facts extracted from source code are usually informal. The informal specifications of these schemas are too often incomplete or inconsistent. This paper takes the position that formal specification of fact extraction is beneficial to the reverse engineering community. A formal specification can serve as an unambiguous and reliable standard for people who use, wri...
متن کاملA General Model for Source Code Analytics in Rascal
The challenges faced by our part of the design, which focuses on source code, are variability, integration, and accuracy. Variability is necessary to support the different languages, including dialects, we support, as well as the different metrics we will compute. Integration is necessary at a semantic level, where metrics are computed across programming language and domain boundaries and are c...
متن کاملExtracting Facts with Columbus from C++ Code
Fact extraction from software systems is the fundamental building block in the process of understanding the relationships among the system’s elements. It is evident that in real life situations manual fact extraction must be supported by software tools which are able to analyze the subject system and provide useful information about it in various forms. These forms are most useful if they adher...
متن کاملExtracting models from IDE’s∗
Systems must co-evolve with their context. Reverse engineering tools are a great help in this process of required adaption. In order for these tools to be flexible, they work with models, abstract representations of the source code. The extraction of such information from source code can be done using a parser. However, it is fairly tedious to build new parsers. And this is made worse by the fa...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2008