OCL/Debugger

From Eclipsepedia

< OCL
Revision as of 19:30, 23 March 2011 by Ed.willink.me.uk (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

The Current Tool

The current OCL Xtext console supports

  • input as a multi-line text edit with a multi-page history
  • output as a scolling console display
  • context selection by select a widget adpatable to an EObject somewhere
  • save and restore of input
  • load of Complete OCL resources

The history uses a slightly unsatisfactory PgUp/Dn

The output scrolls substantially for multi-line output and doesn't identify the input.

There is no debugging.

A proposal

Base a new design around the Debugger rather than the Console. This is substantially inspired by the QVTo debugger. The design should be extensible to languages that extend OCL such as QVT.

The Debugger View

Supports running the selected OCL, with single step by AST node and step into/over ExpressionInOcl calls.

Stack shows AST call trace.

The Variables View

Displays variables applicable to the current AST node, with an ability to tunnel down to see collection/tuple elements.

The Breakpoints View

Just what you'd expect.

Breakpoints can be set on operators in OCL expressions.

The Input View

Provides a display with pull down menus to select the current context. Normally selection of an Object adaptable to EObject anywhere (excluding Debugger, Breakpoints, ... views) will change the current context. There is a Lock facility for the context.

Provides an Essential OCL text editor to allow interactive expression entry. The Outline facilitates setting breakpoints.

A run button, rather than Enter will trigger execution. Optionally Enter will also trigger execution.

The History View

Provides a Tree display of previous executions, one root per execution, with each root identifying its context, expression and result.

The result is a browsable tree as in the Variables View.

The context can clicked to make it the current context again.

The expression can be clicked to make it the current expression again.

Each root has a check box to contribute automatic re-evaluation to the Watch View.

The history can be imported and exported.

The Validations View

Provides a hierarchical view of all invariants applicable to the current context.

Each invariant and hierarchical node has a check box to control automatic re-evaluation to the Watch View.

An invariant may be clicked to make its context the current context and its value the current expression, priming the debugger for a run.

Error/Warning/Ok/Disabled icons show the prevailing state of each invariant.

The stste of all check boxes can be imported and exported to facilitate reuse of subset validations.