An integrated modeling debugging visualization environment for g12
This presentation is the property of its rightful owner.
Sponsored Links
1 / 53

An integrated modeling, debugging & visualization environment for g12 PowerPoint PPT Presentation


  • 62 Views
  • Uploaded on
  • Presentation posted in: General

An integrated modeling, debugging & visualization environment for g12. Andreas Bauer, Viorica Botea, Mark Brown, Matt Gray, Daniel Harabor & John Slaney CP 2010, 522—536. Presented by Heath Roehr. Outline. The G12 Platform Zinc: Constraint Modeling Language The G12 IDE

Download Presentation

An integrated modeling, debugging & visualization environment for g12

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


An integrated modeling debugging visualization environment for g12

An integrated modeling, debugging & visualization environment for g12

Andreas Bauer, Viorica Botea, Mark Brown,

Matt Gray, Daniel Harabor & John Slaney

CP 2010, 522—536

Presented by Heath Roehr


Outline

Outline

  • The G12 Platform

    • Zinc: Constraint Modeling Language

  • The G12 IDE

    • Modeling Layer: Meet-Pass Scenario

    • Solving Layer

    • Visualization Layer

  • Debugging with the G12 IDE

  • Conclusion & Questions

HEATH ROEHR


G12 platform

G12 Platform

  • Software platform for solving large-scale combinatorial optimization problems

  • Supports

    • Linear & mixed integer programming

    • Constraint propagation & inference

    • A variety of other search & inference techniques for solving complex problems

HEATH ROEHR


Zinc modeling language of g12

Zinc: Modeling Language of G12

  • Zinc is a first-order functional language with simple, declarative semantics

  • Modeling languages separate the constraint model from the constraint program

  • It provides

    • Mathematical notation-like syntax

    • Expressive constraints (finite domain and integer, set and linear arithmetic)

    • Separation of data from model

    • High-level data structures and data encapsulation including constrained types

    • User defined functions and constraints

HEATH ROEHR


An integrated modeling debugging visualization environment for g12

http://g12.research.nicta.com.au/zinc_current/index_home.php

HEATH ROEHR


Outline1

Outline

  • The G12 Platform

    • Zinc: Constraint Modeling Language

  • The G12 IDE

    • Modeling Layer: Meet-Pass Scenario

    • Solving Layer

    • Visualization Layer

  • Debugging with the G12 IDE

  • Conclusion & Questions

HEATH ROEHR


Cp challenges

CP: Challenges

  • Solving

  • The problems are computationally challenging

  • Debugging?

  • Remember your homework...

  • Conceptualizing & improving search

  • Staring at code is not really the smartest strategy

HEATH ROEHR


G12 ide

G12 IDE

Debugging: Redefined

Results: Visualized

  • Solving: Handled

  • Search

  • Constraint propagation

Breakpoints: Controllable

HEATH ROEHR


G12 ide architecture

G12 IDE Architecture

HEATH ROEHR


Modeling layer

MODELING LAYER

  • Vector-oriented drawing tool

  • Associated script editor to

  • build custom animations

Write constraint models in the input languages of G12 (Zinc & MiniZinc)

HEATH ROEHR


An integrated modeling debugging visualization environment for g12

MEET-PASS SCENARIO

  • Five sectors of railway track, S1, . . . S5, are linearly connected

  • There is a siding accessible from S3 big enough to hold one train

S1

S2

S3

S4

S5

  • Initially, there are trains in sectors S1, S2 and S4

Siding

  • The safety rules are that

    • No two trains may be in the same sector at the same time

    • No train may enter a sector occupied by another train, even if that other train is about to move on

    • Trains may only move to adjacent sectors, of course

Constraints

HEATH ROEHR


An integrated modeling debugging visualization environment for g12

MEET-PASS SCENARIO

  • Find the shortest plan that moves the train on S1 to S5 and returns the other two trains to their starting positions.

Initial

Goal

HEATH ROEHR


An integrated modeling debugging visualization environment for g12

Meet-Pass Scenario:

A possible Solution

Step 0

HEATH ROEHR


An integrated modeling debugging visualization environment for g12

Meet-Pass Scenario:

A possible Solution

Step 1

HEATH ROEHR


An integrated modeling debugging visualization environment for g12

Meet-Pass Scenario:

A possible Solution

Step 2

HEATH ROEHR


An integrated modeling debugging visualization environment for g12

Meet-Pass Scenario:

A possible Solution

Step 3

HEATH ROEHR


An integrated modeling debugging visualization environment for g12

Meet-Pass Scenario:

A possible Solution

Step 4

HEATH ROEHR


An integrated modeling debugging visualization environment for g12

Meet-Pass Scenario:

A possible Solution

Step 5

HEATH ROEHR


An integrated modeling debugging visualization environment for g12

Meet-Pass Scenario:

A possible Solution

Step 6

HEATH ROEHR


An integrated modeling debugging visualization environment for g12

Meet-Pass Scenario:

A possible Solution

Step 7

HEATH ROEHR


An integrated modeling debugging visualization environment for g12

Meet-Pass Scenario:

A possible Solution

Step 8

HEATH ROEHR


An integrated modeling debugging visualization environment for g12

Meet-Pass Scenario:

A possible Solution

Step 9

HEATH ROEHR


An integrated modeling debugging visualization environment for g12

Meet-Pass Scenario:

A possible Solution

Step 10

HEATH ROEHR


An integrated modeling debugging visualization environment for g12

Meet-Pass Scenario:

A possible Solution

Step 11

HEATH ROEHR


An integrated modeling debugging visualization environment for g12

Meet-Pass Scenario:

A possible Solution

Step 12

HEATH ROEHR


An integrated modeling debugging visualization environment for g12

Meet-Pass Scenario:

A possible Solution

Step 13

HEATH ROEHR


An integrated modeling debugging visualization environment for g12

Meet-Pass Scenario:

A possible Solution

Step 14

HEATH ROEHR


An integrated modeling debugging visualization environment for g12

Meet-Pass Scenario:

A possible Solution

Step 15

HEATH ROEHR


An integrated modeling debugging visualization environment for g12

Meet-Pass Scenario:

A possible Solution

Step 16

HEATH ROEHR


An integrated modeling debugging visualization environment for g12

Meet-Pass Scenario:

A possible Solution

Step 17

HEATH ROEHR


An integrated modeling debugging visualization environment for g12

Meet-Pass Scenario:

A possible Solution

Step 18: Solution Found

HEATH ROEHR


An integrated modeling debugging visualization environment for g12

ZINC EDITOR: MEET-PASS IMPLEMENTATION

  • Five sectors of railway track, S1, . . . S5, are linearly connected

  • There is a siding accessible from S3 big enough to hold one train

  • Initially, there are trains in sectors S1, S2 and S4

  • Move the train on S1 to S5 and return the other two trains to their starting positions.

HEATH ROEHR


An integrated modeling debugging visualization environment for g12

ZINC EDITOR: MEET-PASS IMPLEMENTATION

  • Safety rules

    • Specific implementation is outside the scope of this talk

    • Assume they are accurate and valid

  • Execute the search

HEATH ROEHR


An integrated modeling debugging visualization environment for g12

ZINC EDITOR: MEET-PASS IMPLEMENTATION

Variable Declaration

Constraints

Variable Definition

HEATH ROEHR


An integrated modeling debugging visualization environment for g12

ZINC EDITOR: SCREENSHOT

Syntax highlighting

Outline views

Project-based code management

HEATH ROEHR


An integrated modeling debugging visualization environment for g12

VISUALIZATION EDITOR

  • Define arbitrary visualizations

    • Vector-based graphics editor

    • Script editor

  • Scripting language

    • Any language that supports java integration

      • Python

      • Lisp

    • Default language is Lua

      • Lightweight

      • Portable

      • Suited for animation: used in video games

HEATH ROEHR


An integrated modeling debugging visualization environment for g12

VISUALIZATION EDITOR

Vector-based graphics editor

Graphics properties editor

Project-based code management

HEATH ROEHR


An integrated modeling debugging visualization environment for g12

VISUALIZATION EDITOR

  • g12GetFromData(var)

    • This method fetches the current contents of the decision variable var and makes its value available to the script.

  • g12Draw(obj, props)

    • This method sets a list of properties, props, for object obj, where props may contain items such as the object’s positions on the canvas, color, opacity, scaling factor, etc.

Written in Java

Written in Lua

HEATH ROEHR


Solving layer

SOLVING LAYER

Control the starting & stopping of the solving process

Collect detailed information about the solving process

The actual solver

HEATH ROEHR


Solving layer1

SOLVING LAYER

XML-based messaging

Separate Processes

HEATH ROEHR


Visualization layer

VISUALIZATION LAYER

Build & display a constraint graph

Pre-defined visualizations

Build & display a search tree

Render visualization based on custom animation script

HEATH ROEHR


An integrated modeling debugging visualization environment for g12

Sample Pre-Defined Visualizations

Constraint Graph

Search Tree

Collapsed sub tree

Domain split

HEATH ROEHR


Outline2

Outline

  • The G12 Platform

    • Zinc: Constraint Modeling Language

  • The G12 IDE

    • Modeling Layer: Meet-Pass Scenario

    • Solving Layer

    • Visualization Layer

  • Debugging with the G12 IDE

  • Conclusion & Questions

HEATH ROEHR


An integrated modeling debugging visualization environment for g12

DEBUGGING WITH THE VISUALIZATION EDITOR

Pre-defined visualizations & custom animations

drawn in real-time,

as the program executes

HEATH ROEHR


An integrated modeling debugging visualization environment for g12

HOW IS DEBUGGING DIFFERENT IN THE G12 IDE?

  • Debugging tools are by default associated with code at the native level

    • Example: set a breakpoint at line 59 in function “Y”

  • Instead, abstract away the native code & debug at a conceptual level

    • Example: set a breakpoint when the domain of variable “X” is empty

    • Operates on the constraint model, not the constraint program

HEATH ROEHR


An integrated modeling debugging visualization environment for g12

USER DEFINED BREAKPOINT VIEW

User defined breakpoints

“Search Events”

(Events that induce the breakpoint)

The breakpoint “subscribes” to these search events

Enable/disable breakpoints

HEATH ROEHR


An integrated modeling debugging visualization environment for g12

Take it to the next level:

Domain-specific animated debugging

HEATH ROEHR


An integrated modeling debugging visualization environment for g12

CUSTOM VISUALIZATION AND ANIMATION

  • Accomplished by

    • drawing objects

    • binding their animation to events that fire during program execution

  • Debugging is happening

    • At the conceptual level

    • Graphically: Domain-specific

HEATH ROEHR


An integrated modeling debugging visualization environment for g12

“MEET-PASS” EXAMPLE

Propagation should deduce the position of the train…

Original formulation failed to deduce correctly, identifying an incorrect constraint model…

HEATH ROEHR


An integrated modeling debugging visualization environment for g12

RELATED WORK

  • IDEs tailored to CSP solving

    • ECLiPSE CLP

      • Draw charts and graphs for solver output

    • ILOG OPL Studio

      • Offers a search-tree view similar to that of the G12 IDE

    • Choco

      • Java based visualizations from scratch

  • Vector-based graphics processing programs

    • Most are more advanced than G12’s graphics processor

  • Using a custom visualization tool that is tightly integrated with debugging facilities is novel

HEATH ROEHR


An integrated modeling debugging visualization environment for g12

Incidentally…

Imagine how much simpler our assignments would have been if we were able to graphically monitor the execution & break at critical moments in search…

HEATH ROEHR


An integrated modeling debugging visualization environment for g12

IN CONCLUSION

  • G12 IDE redefines the way users can interact with their solving CSPs

  • Users

    • Can not only view classic CSP visualizations (such as search tress)

    • They can also customize animations straight from the IDE

  • G12 IDE Allows users to

    • Update their constraint definitions & solver logic on the fly

    • Based on feedback from the event-driven debugger & real-time visualizations

HEATH ROEHR


An integrated modeling debugging visualization environment for g12

?

HEATH ROEHR


  • Login