Visualising and profiling CP models: is the Holy Grail in sight? - - PowerPoint PPT Presentation

visualising and profiling cp models is the holy grail in
SMART_READER_LITE
LIVE PREVIEW

Visualising and profiling CP models: is the Holy Grail in sight? - - PowerPoint PPT Presentation

Visualising and profiling CP models: is the Holy Grail in sight? Maria Garcia de la Banda - PTGH 2017 Evolution in profiling/visualistion for constraint programming We are here? 2 A bit of history (definitely NOT exhaustive)


slide-1
SLIDE 1

Visualising and profiling CP models: is the Holy Grail in sight?

Maria Garcia de la Banda - PTGH 2017

slide-2
SLIDE 2

2

We are…

Evolution in profiling/visualistion for constraint programming

here?

slide-3
SLIDE 3

A bit of history (definitely NOT exhaustive) Early days…

slide-4
SLIDE 4

4 Grace: 1995 for ECLiPSe – interactive and variable focused

2D variable matrix Variables being explored Selected terms/expressions Execu<on/display control Compares execu<ons Control menu Var domain

slide-5
SLIDE 5

5 Explorer: 1997 for Oz – practical, interactive and search tree focused

Basic stats Collapsed trees Scale the tree Double-click to explore node Textual or user-defined visualisa<on for node info User-defined display procedures

slide-6
SLIDE 6

DiSCiPl project: 1996-1999 Debugging Systems for Constraint Programming (an explosion of tools)

slide-7
SLIDE 7

7 For CHIP – interactive, variable and constraint focused

Tree view (Oz inspired) Variable update view Domain state view Phase line display Constraint incidence matrix

slide-8
SLIDE 8

8 For CHIP – dedicated support for global constraints

Different views of a diffn constraint Cumula<ve constraint Cycle constraint

slide-9
SLIDE 9

9 APT for CLP – interactive, decoupled & execution focused

And-Or execu<on tree Variable update view Source code Parallel execu<on trees focusing on <me or events

slide-10
SLIDE 10

10 VIFID/TRIFID for CLP – domain and constraint focused

Detailed domain evolu<on Domain comparison for a given constraint Constraint graph Domain size evolu<on

slide-11
SLIDE 11

OADymPPaC project: 2000-2004 Tools for dynamic analysis and debugging of CP (the value of generic protocols)

slide-12
SLIDE 12

12 GenTra4CP: a generic tracer format for finite domain solvers

slide-13
SLIDE 13

13 CLP(FD) visualiser via on-the-fly analysis of low-level trace events

Programmable views including tree (dot) , 3D variable (C+VRML) and search (ILOG Esieve)

slide-14
SLIDE 14

14 CLPGUI: generic for CLP FD via annotation predicates

Incremental tree 3D tree Dual tree Solu<on view 3D domain

slide-15
SLIDE 15

15 OPL Studio: 2001 for ILOG – interactive tree, domain & propagation focused

Choice stack Tree view (can collapse) Propaga<on spy Xmas tree Results Code

slide-16
SLIDE 16

Similar tools being developed for SAT and Local Search (different purpose/insights)

slide-17
SLIDE 17

17 SATGraf for SAT: visualisation of the incidence-graph structure and evolution

Two different problems Two different <me points

slide-18
SLIDE 18

18 DPVis for SAT – visualising the constraint graph, its evolution & search tree

Constraint graph Search trees for several problems Stats comparison

slide-19
SLIDE 19

19 For CBLS: constraint violations, conflicts and evolution focused

Evolu<on of the objec<ve Constraint & variable viola<ons Evolu<on

  • f knapsack

Variable evolu<on

slide-20
SLIDE 20

Towards lightweight, practical, generic tools

slide-21
SLIDE 21

21 CP-VIZ: 2010 for ECliPSe & SICStus: generic, lightweight and versatile

Customised globals Different search tree views Invariant checking

slide-22
SLIDE 22

What had we learned?

slide-23
SLIDE 23

23

§ Generic: not tightly coupled to any solver § Lightweight: only require small changes to any solver § Versatile: provide interface to other visualisation tools § Intuitive: clearly visualise what you mean to § Built-in: not everything must be user-defined § Efficient § Open source CP-VIZ is most of these, so why is not shipped with every solver?

Lessons learned: it is good to be ….

slide-24
SLIDE 24

24 The following is not just my work! It is mostly the work of…

slide-25
SLIDE 25

25

§ Since:

– Most tools work well for small problems (many developed for education) – Visual insight is hard for Ks of variables, constraints, and Ms of search nodes

§ Need:

– Visualisations that can be meaningful with scale – Focus the user’s attention to on the interesting parts – Automatically find these interesting parts (statistical markers)

What are we missing? Programming in the large

slide-26
SLIDE 26

26 Example: pixel-trees – they scale on time and easily show solution density

Solu<ons (light green) found aYer lots of search Other <me-related info can be shown together Visual paZerns might indicate some property

slide-27
SLIDE 27

27 Example: shape analysis to automatically focus attention

Histogram of “similar shape analysis” by size Loca<on of shapes within search tree

slide-28
SLIDE 28

28 Example: statistical markers to automatically focus attention

Effec<ve versus ineffec<ve backjumping

slide-29
SLIDE 29

29

§ Since:

– Most tools focus on a single execution – This does not help the iterative development process

§ Need:

– Visualisations that can meaningfully compare several executions – Focus the user’s attention to on the modified parts

What are we missing? Comparing the execution after model changes

slide-30
SLIDE 30

30 Example: comparing two executions of the same model via tree merging

Merged trees and stats on divergence

slide-31
SLIDE 31

31 Example: replaying a model’s search with a different solver

Learning solver: ~2K failures Non-learning solver: ~18K failures

slide-32
SLIDE 32

32 Comparing needs linking “same” vars and constraints across executions

Same paths for variables named differently by the compiler

slide-33
SLIDE 33

33

§ Since:

– Most tools focus on one kind of search (mostly depth-first) – Nowadays we have parallel search, restarts, learning solvers, local search, LNS, SAT, MIP

§ Need:

– Visualisations that can support all these searches and paradigms – And they can help compare them – Focus the user’s attention to on the modified parts

What are we missing? Supporting different searches and paradigms

slide-34
SLIDE 34

34 Example: parallel searches, restarts and learning solvers

Parallel search Restart search

slide-35
SLIDE 35

35

§ Since:

– Most tools are designed by solver developers – Application users might require different kinds of information

§ Need:

– Understand what application users need – Develop possible solutions – Test the solutions to see if they work for the users

What are we missing? User testing

slide-36
SLIDE 36

36 Example: user-centred design process for visual profiling tools in CP

slide-37
SLIDE 37

37 Example: Many visualisation alternatives, many findings, but more needed

slide-38
SLIDE 38

38

§ Since:

– The ultimate goal is to figure out how to modify the model to improve it – In CP the execution is quite far from the original model:

§ Different variables, constraints, expressions..

§ Need:

– Connect the findings made during the execution to the model variables and constraints – Again: connect variables and constraints across executions

What are we missing? Connecting back to the model

slide-39
SLIDE 39

39

We are…

Evolution in profiling/visualistion for constraint programming

here?

slide-40
SLIDE 40

Thanks for listening!