Presentation is loading. Please wait.

Presentation is loading. Please wait.

Prolint: Find Your Bugs Before They Find You Judy Hoffman Green Jurjen Dijkstra BP0890 2003 Exchange PROGRESS.

Similar presentations


Presentation on theme: "Prolint: Find Your Bugs Before They Find You Judy Hoffman Green Jurjen Dijkstra BP0890 2003 Exchange PROGRESS."— Presentation transcript:

1 Prolint: Find Your Bugs Before They Find You Judy Hoffman Green Jurjen Dijkstra BP Exchange PROGRESS

2 2003 Exchange PROGRESS Copyright 2003 Joanju Limited, Jurjen Dijkstra BP0890 Prolint: Find Your Bugs Before They Find You Speakers Jurjen Dijkstra, Van Meijel Automatisering Primary developer and project leader of Prolint Judy Hoffman Green, Joanju Limited One of the developers of Proparse ** This PowerPoint also contains detailed notes - view them by opening it in PowerPoint, not PowerPoint Viewer.

3 2003 Exchange PROGRESS Copyright 2003 Joanju Limited, Jurjen Dijkstra BP0890 Prolint: Find Your Bugs Before They Find You Agenda What Prolint and other Lint tools are Kinds of problems Prolint finds How to use and configure it Part I: Introduction How to write your own rules and why Part II: Advanced

4 2003 Exchange PROGRESS Copyright 2003 Joanju Limited, Jurjen Dijkstra BP0890 Prolint: Find Your Bugs Before They Find You Part I: Introduction

5 2003 Exchange PROGRESS Copyright 2003 Joanju Limited, Jurjen Dijkstra BP0890 Prolint: Find Your Bugs Before They Find You Just What is a Lint, Anyway? Tool to automate code review (“picks bits of fluff out of your code”) Available for many languages (Java, C/C++, VB, Delphi, C#, JavaScript...) Integral part of QA effort Helps catch subtle, hard-to-find errors Different checks than compiler

6 2003 Exchange PROGRESS Copyright 2003 Joanju Limited, Jurjen Dijkstra BP0890 Prolint: Find Your Bugs Before They Find You So Why Should I Care? Save time and money on support Less bugs = happier customers Better adherence to company standards Faster code reviews

7 2003 Exchange PROGRESS Copyright 2003 Joanju Limited, Jurjen Dijkstra BP0890 Prolint: Find Your Bugs Before They Find You Prolint is… Lint for Progress ® code Written in the 4GL Open source Rules-based Customizable and expandable

8 2003 Exchange PROGRESS Copyright 2003 Joanju Limited, Jurjen Dijkstra BP0890 Prolint: Find Your Bugs Before They Find You Rules to Find Portability Problems Missing Keywords Missed Standards Risky Code Bugs

9 2003 Exchange PROGRESS Copyright 2003 Joanju Limited, Jurjen Dijkstra BP0890 Prolint: Find Your Bugs Before They Find You FIND customer WHERE customer.salesrep = "jd" NO-ERROR. IF AVAIL customer AND customer.city = "Boston" THEN ASSIGN customer.salesrep = "rsa" + cVal + "X2". customer.creditlimit = FIND customer WHERE customer.salesrep = "jd" NO-ERROR. IF AVAIL customer AND customer.city = "Boston" THEN ASSIGN customer.salesrep = "rsa" + cVal + "X2". customer.creditlimit = Common Problems Found

10 2003 Exchange PROGRESS Copyright 2003 Joanju Limited, Jurjen Dijkstra BP0890 Prolint: Find Your Bugs Before They Find You FIND customer WHERE customer.salesrep = "jd" NO-ERROR. IF AVAIL customer AND customer.city = "Boston" THEN ASSIGN customer.salesrep = "rsa" + cVal + "X2". customer.creditlimit = FIND customer WHERE customer.salesrep = "jd" NO-ERROR. IF AVAIL customer AND customer.city = "Boston" THEN ASSIGN customer.salesrep = "rsa" + cVal + "X2". customer.creditlimit = Common Problems Found

11 2003 Exchange PROGRESS Copyright 2003 Joanju Limited, Jurjen Dijkstra BP0890 Prolint: Find Your Bugs Before They Find You FIND customer WHERE customer.salesrep = "jd" NO-ERROR. IF AVAIL customer AND customer.city = "Boston" THEN ASSIGN customer.salesrep = "rsa" + cVal + "X2". customer.creditlimit = FIND customer WHERE customer.salesrep = "jd" NO-ERROR. IF AVAIL customer AND customer.city = "Boston" THEN ASSIGN customer.salesrep = "rsa" + cVal + "X2". customer.creditlimit = DEFINE VARIABLE x AS INT INITIAL 5. x EQ 1..DISPLAY x. DEFINE VARIABLE x AS INT INITIAL 5. x EQ 1..DISPLAY x. Common Problems Found

12 2003 Exchange PROGRESS Copyright 2003 Joanju Limited, Jurjen Dijkstra BP0890 Prolint: Find Your Bugs Before They Find You FIND customer WHERE customer.salesrep = "jd" NO-ERROR. IF AVAIL customer AND customer.city = "Boston" THEN ASSIGN customer.salesrep = "rsa" + cVal + "X2". customer.creditlimit = FIND customer WHERE customer.salesrep = "jd" NO-ERROR. IF AVAIL customer AND customer.city = "Boston" THEN ASSIGN customer.salesrep = "rsa" + cVal + "X2". customer.creditlimit = DEFINE VARIABLE x AS INT INITIAL 5. x EQ 1..DISPLAY x. DEFINE VARIABLE x AS INT INITIAL 5. x EQ 1..DISPLAY x. Common Problems Found

13 2003 Exchange PROGRESS Copyright 2003 Joanju Limited, Jurjen Dijkstra BP0890 Prolint: Find Your Bugs Before They Find You IF cond1 AND cond2 THEN IF cond3 THEN DO: /* some stuff */ END. ELSE DO: /* some other stuff */ END. IF cond1 AND cond2 THEN IF cond3 THEN DO: /* some stuff */ END. ELSE DO: /* some other stuff */ END. &GLOB OPEN-QUERIES OPEN QUERY Q1 FOR EACH ~ customer. OPEN QUERY Q2 FOR EACH state. IF cond THEN DO: /* some stuff */ END. ELSE {&OPEN-QUERIES} &GLOB OPEN-QUERIES OPEN QUERY Q1 FOR EACH ~ customer. OPEN QUERY Q2 FOR EACH state. IF cond THEN DO: /* some stuff */ END. ELSE {&OPEN-QUERIES} Common Problems Found

14 2003 Exchange PROGRESS Copyright 2003 Joanju Limited, Jurjen Dijkstra BP0890 Prolint: Find Your Bugs Before They Find You IF cond1 AND cond2 THEN IF cond3 THEN DO: /* some stuff */ END. ELSE DO: /* some other stuff */ END. IF cond1 AND cond2 THEN IF cond3 THEN DO: /* some stuff */ END. ELSE DO: /* some other stuff */ END. &GLOB OPEN-QUERIES OPEN QUERY Q1 FOR EACH ~ customer. OPEN QUERY Q2 FOR EACH state. IF cond THEN DO: /* some stuff */ END. ELSE {&OPEN-QUERIES} &GLOB OPEN-QUERIES OPEN QUERY Q1 FOR EACH ~ customer. OPEN QUERY Q2 FOR EACH state. IF cond THEN DO: /* some stuff */ END. ELSE {&OPEN-QUERIES} Common Problems Found

15 2003 Exchange PROGRESS Copyright 2003 Joanju Limited, Jurjen Dijkstra BP0890 Prolint: Find Your Bugs Before They Find You Demo: Intro to Prolint Prolint Results Window Showing Sports2000 Warnings

16 2003 Exchange PROGRESS Copyright 2003 Joanju Limited, Jurjen Dijkstra BP0890 Prolint: Find Your Bugs Before They Find You Configuration Each rule implements one "standard" or "policy” or “check” Each outputhandler writes warnings to its destination Profiles allow you to choose rules and outputhandlers Prolint Output Handlers Rules Profiles

17 2003 Exchange PROGRESS Copyright 2003 Joanju Limited, Jurjen Dijkstra BP0890 Prolint: Find Your Bugs Before They Find You Rules Profiles Window Showing Rule Configuration

18 2003 Exchange PROGRESS Copyright 2003 Joanju Limited, Jurjen Dijkstra BP0890 Prolint: Find Your Bugs Before They Find You Prolint Tab-delimited file Database ED4Win HTML Results Window Pro4M Your Own Output Handlers

19 2003 Exchange PROGRESS Copyright 2003 Joanju Limited, Jurjen Dijkstra BP0890 Prolint: Find Your Bugs Before They Find You Profiles Profiles Window Showing Profile Combo

20 2003 Exchange PROGRESS Copyright 2003 Joanju Limited, Jurjen Dijkstra BP0890 Prolint: Find Your Bugs Before They Find You Profiles Profiles Window Showing Profile Combo Output Handlers

21 2003 Exchange PROGRESS Copyright 2003 Joanju Limited, Jurjen Dijkstra BP0890 Prolint: Find Your Bugs Before They Find You Profiles Profiles Window Showing Profile Combo Output Handlers Rules

22 2003 Exchange PROGRESS Copyright 2003 Joanju Limited, Jurjen Dijkstra BP0890 Prolint: Find Your Bugs Before They Find You Pro4M Roundtable PRO*Tools ED4Win ADE Prolint Your Own Integrations

23 2003 Exchange PROGRESS Copyright 2003 Joanju Limited, Jurjen Dijkstra BP0890 Prolint: Find Your Bugs Before They Find You Platforms All Progress supported Win32 AIX, Solaris, Linux... GUI, character, batch Some AppServer™ support Progress versions 8.2 and on

24 2003 Exchange PROGRESS Copyright 2003 Joanju Limited, Jurjen Dijkstra BP0890 Prolint: Find Your Bugs Before They Find You COMPILE with XREF Metaschema Proparse 4GL parser Supporting Software

25 2003 Exchange PROGRESS Copyright 2003 Joanju Limited, Jurjen Dijkstra BP0890 Prolint: Find Your Bugs Before They Find You For rules which have to “understand” code syntax and context DLL or Unix shared object, extensive API Parses one compile unit at a time Generates syntax trees (context-sensitive representation of program in memory) Fast Commercial product Proparse 4GL Parser

26 2003 Exchange PROGRESS Copyright 2003 Joanju Limited, Jurjen Dijkstra BP0890 Prolint: Find Your Bugs Before They Find You Part II: Advanced

27 2003 Exchange PROGRESS Copyright 2003 Joanju Limited, Jurjen Dijkstra BP0890 Prolint: Find Your Bugs Before They Find You Structure Rules Proparse DEFINE VARIABLE ID AS INTEGER INITIAL NUMBER PERIOD Prolint (Tokenlister Representation) Syntax Tree Output Handlers

28 2003 Exchange PROGRESS Copyright 2003 Joanju Limited, Jurjen Dijkstra BP0890 Prolint: Find Your Bugs Before They Find You def var i as int init 5. Source Syntax Trees

29 2003 Exchange PROGRESS Copyright 2003 Joanju Limited, Jurjen Dijkstra BP0890 Prolint: Find Your Bugs Before They Find You def var i as int init 5. varasi. init def int5 Proparse Syntax Tree Source Syntax Trees

30 2003 Exchange PROGRESS Copyright 2003 Joanju Limited, Jurjen Dijkstra BP0890 Prolint: Find Your Bugs Before They Find You DEFINE def VARIABLE var ID i AS as INTEGER int INITIAL init NUMBER 5 PERIOD. def var i as int init 5. varasi. init def int5 Proparse Syntax Tree Source Proparse’s “Tokenlister” Syntax Trees

31 2003 Exchange PROGRESS Copyright 2003 Joanju Limited, Jurjen Dijkstra BP0890 Prolint: Find Your Bugs Before They Find You DEFINE def VARIABLE var ID i AS as INTEGER int INITIAL init NUMBER 5 PERIOD. def var i as int init 5. varasi. init def int5 Proparse Syntax Tree Source Proparse’s “Tokenlister” Proparse’s Syntax Tree Specification (grammar) definevariablestate : #( DEFINE (#(NEW (GLOBAL)? SHARED ) | SHARED)? VARIABLE ID (fieldoption)* (triggerphrase)? state_end ) ; Syntax Trees

32 2003 Exchange PROGRESS Copyright 2003 Joanju Limited, Jurjen Dijkstra BP0890 Prolint: Find Your Bugs Before They Find You Writing Your Own Rules Get example of problem Look up syntax tree structure Copy 4GL rule template and edit Add new rule to Prolint See Prolint documentation for details Steps:

33 2003 Exchange PROGRESS Copyright 2003 Joanju Limited, Jurjen Dijkstra BP0890 Prolint: Find Your Bugs Before They Find You Demo: Writing a New Rule …to find all places in the source code where variables are defined without NO-UNDO.

34 2003 Exchange PROGRESS Copyright 2003 Joanju Limited, Jurjen Dijkstra BP0890 Prolint: Find Your Bugs Before They Find You Summary What Prolint and other Lints are The kinds of problem Prolint finds How to use and configure Prolint How to write your own rules We’ve seen:

35 2003 Exchange PROGRESS Copyright 2003 Joanju Limited, Jurjen Dijkstra BP0890 Prolint: Find Your Bugs Before They Find You Questions

36 2003 Exchange PROGRESS Copyright 2003 Joanju Limited, Jurjen Dijkstra BP0890 Prolint: Find Your Bugs Before They Find You Further Information Download Prolint: Download Proparse: PEG list for Prolint & Proparse:


Download ppt "Prolint: Find Your Bugs Before They Find You Judy Hoffman Green Jurjen Dijkstra BP0890 2003 Exchange PROGRESS."

Similar presentations


Ads by Google