1 Example application: source code analysis 125 file types; 8029 files; 4689 non-Java; 1112 svn revisions.

Slides:



Advertisements
Similar presentations
Michael Pizzo Software Architect Data Programmability Microsoft Corporation.
Advertisements

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 8 Slide 1 System modeling 2.
Lab#1 (14/3/1431h) Introduction To java programming cs425
Building Enterprise Applications Using Visual Studio ®.NET Enterprise Architect.
Programming Languages Language Design Issues Why study programming languages Language development Software architectures Design goals Attributes of a good.
Unlock Your Data Rich connectivity Robust data integration Enterprise-class manageability Deliver Relevant Information Intuitive design environment.
ASP.NET Programming with C# and SQL Server First Edition
Intro to C# Language Richard Della Tezra IS 373. What Is C#? C# is type-safe object-oriented language Enables developers to build a variety of secure.
Chapter 7 Managing Data Sources. ASP.NET 2.0, Third Edition2.
Creating and Running Your First C# Program Svetlin Nakov Telerik Corporation
Discover, Master, InfluenceSlide 1 SQL Server Compact Edition and the Entity Framework Rob Sanders Readify.
Version Enterprise Architect Redefines Modeling in 2006 An Agile and Scalable modeling solution Provides Full Lifecycle.
Powerful, modern desktops enable next generation applications Hardware acceleration brings real-time lighting, texturing and rendering Visual.
UNIT-V The MVC architecture and Struts Framework.
Your Interactive Guide to the Digital World Discovering Computers 2012.
Chapter 13 Programming Languages and Program Development 1.
New Task Group CRIS Architecture & Development Maximilian Stempfhuber RWTH Aachen University Library
Programming Languages: Telling the Computers What to Do Chapter 16.
Groovy WHAT IS IT? HOW DOES IT WORK? IS IT USEFUL?
Sumant Tambe, et. al LEESA DSPD 2008 An Embedded Declarative Language for Hierarchical Object Structure Traversal Sumant Tambe* Aniruddha Gokhale Vanderbilt.
UML Tools ● UML is a language, not a tool ● UML tools make use of UML possible ● Choice of tools, for individual or group use, has a large affect on acceptance.
Ihr Logo Data Explorer - A data profiling tool. Your Logo Agenda  Introduction  Existing System  Limitations of Existing System  Proposed Solution.
MAVEN-BLUEMARTINI Yannick Robin. What is maven-bluemartini?  maven-bluemartini is Maven archetypes for Blue Martini projects  Open source project on.
DBA Developer. Responsibilities  Designing Relational databases  Developing interface layer Environment Microsoft SQL Server,.NET SQL Layer: Stored.
Creating and Running Your First C# Program Svetlin Nakov Telerik Corporation
Sumant Tambe, et. al LEESA DSPD 2008 An Embedded Declarative Language for Hierarchical Object Structure Traversal Sumant Tambe* Aniruddha Gokhale Vanderbilt.
Color: A Modern Web Development Language Mark J. Stahl Advised By: Dr. Mark Burge Department of Computer Science Undergraduate Project.
Introducing Reporting Services for SQL Server 2005.
CHAPTER 14 USING RELATIONAL DATABASES TO PROVIDE OBJECT PERSISTENCE (ONLINE) © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database.
{ Graphite Grigory Arashkovich, Anuj Khanna, Anirban Gangopadhyay, Michael D’Egidio, Laura Willson.
Entity Framework Overview. Entity Framework A set of technologies in ADO.NET that support the development of data-oriented software applications A component.
Reviewing Recent ICSE Proceedings For:.  Defining and Continuous Checking of Structural Program Dependencies  Automatic Inference of Structural Changes.
Kanban Task Manager helps teams visualize task workflows and makes it easy to cooperate on projects. With the SharePoint version of Kanban Task Manager.
Computer Concepts 2014 Chapter 12 Computer Programming.
Domain-Specific Development Stuart Kent, Senior Program Manager, DSL Tools, Visual Studio Team System, Microsoft.
Object Oriented Analysis and Design 1 Chapter 7 Database Design  UML Specification for Data Modeling  The Relational Data Model and Object Model  Persistence.
PHP Features. Features Clean syntax. Object-oriented fundamentals. An extensible architecture that encourages innovation. Support for both current and.
CERN - IT Department CH-1211 Genève 23 Switzerland t DB Development Tools Benthic SQL Developer Application Express WLCG Service Reliability.
DEV337 Modeling Distributed Enterprise Applications Using UML in Visual Studio.NET David Keogh Program Manager Visual Studio Enterprise Tools.
Oct * Brad Tutterow. VS 2008.NET 3.5LINQ Entity Framework  The ADO.NET Entity Framework is part of Microsoft’s next generation of.NET technologies.
Grid programming with components: an advanced COMPonent platform for an effective invisible grid © 2006 GridCOMP Grids Programming with components. An.
SIMO SIMulation and Optimization ”New generation forest planning system” Antti Mäkinen & Jussi Rasinmäki Dept. of Forest Resource Management.
Eclipse 24-Apr-17.
Presentation Name / 1 Visual C++ Builds and External Dependencies NAME.
With Jeff Gray and Ira Baxter Robert Tairas Visualization of Clone Detection Results Eclipse Technology Exchange Workshop OOPSLA 2006 Portland, Oregon.
COSC617 Project XML Tools Mark Liu Sanjay Srivastava Junping Zhang.
© 2010 by Boeing; made available under the EPL v1.0 | March 23, 2010 | Xtext and GEF deliver editors for the Open System Engineering Environment Ryan Brooks.
Contents : What is Silverlight? Silverlight Overview Silverlight Toolkit Overview Timeline & Packaging Silverlight V1.0 & V1.1 Properties of V1.0 Properties.
Chapter 5 Introduction To Form Builder. Lesson A Objectives  Display Forms Builder forms in a Web browser  Use a data block form to view, insert, update,
ModTransf A Simple Model to Model Transformation Engine Cédric Dumoulin.
® IBM Software Group © 2009 IBM Corporation Essentials of Modeling with the IBM Rational Software Architect, V7.5 Module 15: Traceability and Static Analysis.
7. Data Import Export Lingma Acheson Department of Computer and Information Science IUPUI CSCI N207 Data Analysis Using Spreadsheets 1.
RIA to visualize the health of a project Team #4 Midterm presentation February 28,2008.
aspectj tools new and noteworthy Mik Kersten University of British Columbia Adrian Colyer IBM Hursley OOPSLA, October
Concepts and Realization of a Diagram Editor Generator Based on Hypergraph Transformation Author: Mark Minas Presenter: Song Gu.
1 Java Server Pages A Java Server Page is a file consisting of HTML or XML markup into which special tags and code blocks are inserted When the page is.
Chapter 18 Object Database Management Systems. Outline Motivation for object database management Object-oriented principles Architectures for object database.
EMEA Beat Schwegler Architect Microsoft EMEA HQ Ingo Rammer Principal Consultant thinktecture
Introduction to SQL Server 2000 Reporting Services Jeff Dumas Technical Specialist Microsoft Corporation
Chapter 04 Semantic Web Application Architecture 23 November 2015 A Team 오혜성, 조형헌, 권윤, 신동준, 이인용.
CS 440 Database Management Systems Stored procedures & OR mapping 1.
E.Bertino, L.Matino Object-Oriented Database Systems Chapter 3. Query Language Seoul National University Department of Computer Engineering OOPSLA Lab.
Slide 1 © 2016, Lera Technologies. All Rights Reserved. SAP BO vs SPLUNK vs OBIEE By Lera Technologies.
Submitted by: Moran Mishan. Instructed by: Osnat (Ossi) Mokryn, Dr.
Mechanisms for Requirements Driven Component Selection and Design Automation 최경석.
Your Interactive Guide to the Digital World Discovering Computers 2012 Chapter 13 Computer Programs and Programming Languages.
Building Enterprise Applications Using Visual Studio®
Introduction to SharePoint 2007
Third Party Tools for SQL Server
Developing and testing enterprise Java applications
Presentation transcript:

1 Example application: source code analysis 125 file types; 8029 files; 4689 non-Java; 1112 svn revisions

2 build scripts version history spreadsheets databases config files web pages bug reports software repository parsers query engine analyst dash board IDE plugin excel add-in source code developer manager Querying Software Artefacts

3 The problem design query language and engine for accessing vast repository of different types of source artefact libraries of queries: tailor framework to different types of artefact

4 Tough problem! Difficulties: - does not scale - efficient queries extremely hard to write - specific to one kind of source artefact Dozens of attempts, in industry and academia since 1984: databases, prolog, domain-specific query languages 18 man-years of research at University of Oxford to discover ingredients of solution 15 man-years to implement an industrial product 3 patents pending, several more in pipeline

5 SemmleCode: the power of.QL

6 The query language.QL  Object-oriented, for creating libraries of queries  Recursive queries, as in logic programming  Familiar syntax to Java and SQL developers  On top of any traditional relational database  Syntax-highlighting, error-checking and auto-completion

7 How it works.QL library.QL query RDBMS procedural SQL java / jar bytecode for search XML files template for RDBMS Semmle optimiser

8 Demo  The source we shall explore:  Alfresco: Enterprise Content Management  Spring: Java/JEE Application Framework  Builds on Tomcat, JBoss, … Demo parts: out-of-the-box writing your own queries querying XML config files Vital statistics: Java methods 6647 Java types 516 XML files

9 Using SemmleCode out-of-the-box 115 pre-packaged queries Find common bug patterns: e.g. compareTo/equals, cloning, serialisation, internationalization Compute metrics: 42 different metrics, including Robert Martin’s package metrics Examine dependencies: e.g. cyclic package dependencies Visualization: pie charts, bar charts, tables, graphs, warnings/errors - easy navigation to source - exportable for generating reports

10 Writing queries of your own: select from Method m where m.fromSource() and m.hasName("compareTo") and not m.getDeclaringType(). getAMethod().hasName("equals") select m, "missing equals?" In general: from where select

11 Writing queries of your own: aggregates select sum (CompilationUnit cu | cu.fromSource() | cu.getNumberOfLinesOfCode()) In general: agg( T 1 x 1, …, T n x n | condition | expr )

12 Writing queries of your own: recursion from RefType s, RefType t, RefType it where it.hasName("PasswordInputTag") and it.hasSupertype*(s) and it.hasSupertype*(t) and t.hasSupertype(s) select t,s In general, can write recursive predicate definitions

13 Queries in.QL from-where-select autocompletion, typechecking, emptiness tests aggregates arbitrary nesting, no group-by needed recursion implicit with chaining; or explicit

14 Defining new classes in.QL class ClassAttribute extends XMLAttribute { ClassAttribute() { this.getName()="class" } string getClassName() { this.getValue() = result } RefType getType() { result.getQualifiedName() = this.getClassName() } predicate noType() { not exists(this.getType()) } } from ClassAttribute ca where ca.noType() and ca.getClassName().matches("org.alfresco%") select ca, ca.getClassName() + " not found"

15 Classes in.QL classes are logical properties “constructor” specifies characteristic property methods body is relation between this, result and parameters more than one result allowed predicates methods without a result body is relation between this and parameters

16 The key points of.QL classes are predicates inheritance is implication nondeterministic expressions recursion with super-simple semantics syntax familiar to SQL and Java programmers designed for creating libraries of queries excellent error checking and IDE integration

Concluding remarks

18 Couldn’t you use LINQ instead of.QL?  Different design goals: ORM versus libraries of queries  LINQ does not provide recursion  LINQ cannot do the optimisations across multiple queries that are key to efficiency in.QL “Fortunately, there is light in the darkness. Based on decades of programming language research, the brilliant team at Semmle has created an elegant, industrial strength object-oriented query language called.QL with full support for recursive queries and aggregation….QL has all the requisites to become a runaway success.” (Erik Meijer, Creator of LINQ, Microsoft)

19 Too good to be true? Jeff Ullman, 1991: It is not possible for a query language to be seriously logical and seriously object-oriented at the same time. key breakthroughs are Semmle’s proprietary technology: - design of.QL - optimisations on “bytecode for search”

20 Wrapping up Java is not enough source code analysis tools must process a multitude of artefacts libraries of queries a means to achieve such heterogeneous tools.QL object-oriented queries over trees and graphs made fast and easy