SemmleCode

SemmleCode

Infobox_Software

name = SemmleCode
developer = Semmle
latest_release_version = 0.5.0
latest_release_date = April 02, 2008
operating_system = Cross-platform
platform = Java
genre = Software quality
license = Free
website = [http://semmle.com/ semmle.com]

SemmleCode is a tool for improving the quality of computer software. It can be used to find programming bug patterns, to compute software metrics, and to enforce coding conventions. All these tasks can be formulated as queries in an object-oriented query language named .QL.

Research Background

SemmleCode builds on a long tradition of academic research on querying the source of software programs. The first such system was [http://www.eecs.berkeley.edu/Pubs/TechRpts/1983/5296.html Linton's Omega system] , where queries were phrased in QUEL, a derivative of SQL. QUEL did not allow for recursion in queries, making it difficult to inspect hierarchical program structures such as the call graph. The next significant development was therefore the use of logic programming, which does allow such recursive queries, in the [http://portal.acm.org/citation.cfm?id=962229 XL C++ Browser] . The disadvantage of using a full logic programming language is however that it is very difficult to attain acceptable efficiency. The [http://progtools.comlab.ox.ac.uk/projects/codequest CodeQuest system] , developed at the University of Oxford, was the first to exploit the observation that Datalog, a very restrictive version of logic programming, is in the sweet spot between expressive power and efficiency. The .QL query language is an object-oriented version of Datalog.

Industrial Background

The early research works on querying the source of software programs spun off a number of industrial applications. In particular it became the cornerstone of systems for application intelligence (data mining on the source of software systems) and software renovation. In 2007, Paris-based [http://www.castsoftware.com CAST] is one of the market leaders in that area, and other significant players include [http://www.bphx.com BluePhoenix] in Haifa. SemmleCode differs from these systems in its use of an object-oriented query language, which allows programmers to easily formulate new queries that are particular to their own project.

A full account of the academic and industrial developments leading up to the creation of SemmleCode can be found in the paper by Hajiyev cited below.

ample Query in .QL

To illustrate the use of .QL, consider the well-known rule in object-oriented programming that public fields should be declared final. To find violations of that rule, we should search for fields that are public but not final. In .QL, that requirement is expressed as follows: from Field f where f.hasModifier("public") and not(f.hasModifier("static")) select f.getDeclaringType().getPackage(), f.getDeclaringType(), fHere we select not only the offending field f, but also the package and type in which its declaration occurs.

Integration with Development Environment

SemmleCode provides a user interface via the Eclipse IDE to query Java code (both source code and bytecode) as well as XML files, and to edit .QL queries. This is however but one application of the technology that underlies it: .QL can be used to query any other type of complex data.

References

* Mark A. Linton. Implementing relational views of programs. In Peter B. Henderson, editor, Software Development Environments (SDE), pages 132-140, 1984.
* Shahram Javey, Kin’ichi Mitsui, Hiroaki Nakamura, Tsuyoshi Ohira, Kazu Yasuda, Kazushi Kuse, Tsutomu Kamimura, and Richard Helm. Architecture of the XL C++ browser. In CASCON ’92: Proceedings of the 1992 conference of the Centre for Advanced Studies on Collaborative research, pages 369-379. IBM Press, 1992.
* Elnar Hajiyev, Mathieu Verbaere, Oege de Moor. CodeQuest: Scalable Source Code Queries with Datalog. In ECOOP 2006: Proceedings of the 2006 European Conference on Object-Oriented Programming, pages 2-27. Springer, 2006.

External links

* [http://www.eecs.berkeley.edu/Pubs/TechRpts/1983/5296.html Omega] early code querying system.
* [http://portal.acm.org/citation.cfm?id=962229 XL C++ Browser] code querying system using logic programming.
* [http://progtools.comlab.ox.ac.uk/projects/codequest CodeQuest] code querying system using Datalog.
* [http://semmle.com Semmle Limited] creators of SemmleCode.
* [http://semmle.com/documentation/ SemmleCode:] documentation.


Wikimedia Foundation. 2010.

Игры ⚽ Нужна курсовая?

Look at other dictionaries:

  • .QL — infobox programming language name = .QL age = [number] paradigm = multi paradigm,logic paradigm,object oriented paradigm year = 2007 developer = Semmle typing = static, strong implementations = SemmleCode.QL [ˈdotˈkjuˈɛl] is an object oriented… …   Wikipedia

  • Cohesion (computer science) — In computer programming, cohesion is a measure of how strongly related each piece of functionality expressed by the source code of a software module is. Methods of measuring cohesion vary from qualitative measures classifying the source text… …   Wikipedia

  • Software visualization — [(Diehl, 2002; Diehl, 2007; Knight, 2002)] is concerned with the static or animated 2 D or 3 D [(Marcus et al., 2003)] visual representation of information about software systems based on their structure [(Staples Bieman, 1999), size (Lanza,… …   Wikipedia

  • List of tools for static code analysis — This is a list of significant tools for static code analysis.Historical products* Lint the original static code analyzer of C code.Open source or Noncommercial products .NET (C#, VB.NET and all .NET compatible languages) *… …   Wikipedia

  • Metrik (Software) — Dieser Artikel oder Abschnitt besteht hauptsächlich aus Listen, an deren Stelle besser Fließtext stehen sollte. Eine Softwaremetrik, oder kurz Metrik, ist eine (meist mathematische) Funktion, die eine Eigenschaft von Software in einen Zahlenwert …   Deutsch Wikipedia

  • Software-Metrik — Dieser Artikel oder Abschnitt besteht hauptsächlich aus Listen, an deren Stelle besser Fließtext stehen sollte. Eine Softwaremetrik, oder kurz Metrik, ist eine (meist mathematische) Funktion, die eine Eigenschaft von Software in einen Zahlenwert …   Deutsch Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”