1 deransart, ducassé, ferrand wlpe 20071 observational semantics of the prolog resolution box...

Click here to load reader

Post on 17-Dec-2015

213 views

Category:

Documents

1 download

Embed Size (px)

TRANSCRIPT

  • Slide 1
  • 1 Deransart, Ducass, Ferrand WLPE 20071 Observational Semantics of the Prolog Resolution Box Model Pierre Deransart, Mireille Ducass, Grard Ferrand INRIA-Rocquencourt, IRISA-Rennes, LIFO-Orlans 13 September 2007 WLPE07
  • Slide 2
  • 2 Deransart, Ducass, Ferrand WLPE 20072 Loria Pissaro, 1871 Sophia Antipolis Irisa Rhne-Alpes Futurs Research Centers Rocquencourt, 2007
  • Slide 3
  • 3 Deransart, Ducass, Ferrand WLPE 20073 ICLP 2005, St Malo
  • Slide 4
  • 4 Deransart, Ducass, Ferrand WLPE 20074 JFPLC 97, Orlans
  • Slide 5
  • 5 Deransart, Ducass, Ferrand WLPE 20075 Prolog Box Model by Lawrence Byrd, 1980
  • Slide 6
  • 6 Deransart, Ducass, Ferrand WLPE 20076 Prolog Box Model, latter
  • Slide 7
  • 7 Deransart, Ducass, Ferrand WLPE 20077 CONTEXT, HISTORY From DiSCiPl to OADymPPaC DiSCiPl (1997-2000): enhance constraint debugging: resulted in prototypes, but still ad-hoc tools for correctness and performance analysis, but also showed usefulness of visual traces. Book: P. Deransart and M. Hermenegildo and J. Maluszynski, Analysis and Visualization Tools for Constraint Programming, LNCS 1870, 2000 OADymPPaC (2001-2004) URL: http://contraintes.inria.fr/OADymPPaC participants: A. Aggoun, T. Baudel, P. Deransart, M. Ducass, F.Fages, J.D. Fekete, N. Jussien, C. de Sainte-Marie, http://contraintes.inria.fr/OADymPPaC main solved challenges: Interoperability of tools: splitting: trace and visualization Scaling: possibility to handle hundreds of variables and constraints ----> use of specialized HMI Resulted in powerful analyzers (prototypes and products), but worked on one domain and raised some problems
  • Slide 8
  • 8 Deransart, Ducass, Ferrand WLPE 20078 GENERICITY and INTEROPERABILITY PRINCIPLES
  • Slide 9
  • 9 Deransart, Ducass, Ferrand WLPE 20079 NEW PROBLEMS OADymPPaC identified some bottlenecks: Trace Semantics (related to its genericity): what is the exact nature of the Observational Semantics Modeling of the Interactions between Observed Process and Analysis Tools How to keep the whole system efficient (need to evaluate efficiency) Is the approach generic itself? Can it be applied to new domains: software engineering, data stream analysis, cognition
  • Slide 10
  • 10 Deransart, Ducass, Ferrand WLPE 200710 Ways to ANSWER to the PROBLEMS *Trace Semantics (related to its genericity): what is the exact nature of the Observational Semantics: model of trace for a family of processes Modeling of the Interactions between Observed Process and Analysis Tools: Introduction of Tracer Driver and Analyzer Manager How to keep the whole system efficient (need to evaluate efficiency): Concepts of Virtual full Trace, Actual incremental Trace extraction and rebuilding *Is the approach generic itself? Can it be applied to new domains (not just constraints) in particular in software engineering can the approach (full trace with partial OS, interactive tracer driver) be applied in new domains
  • Slide 11
  • 11 Deransart, Ducass, Ferrand WLPE 200711 ORGANISATION History The meaning of traces Different traces (virtual and actual) Observational semantics of the box model Actual trace extraction Virtual trace rebuilding Conclusions
  • Slide 12
  • 12 Deransart, Ducass, Ferrand WLPE 200712 What does it mean? 1 1 Call goal 2 2 Call p(X) 2 2 Exit p(a) 3 2 Call eq(a,b) 3 2 Fail eq(a,b) 2 2 Redo p(a) 2 2 Exit p(b) 4 2 Call eq(b,b) 4 2 Exit eq(b,b) 1 1 Exit goal
  • Slide 13
  • 13 Deransart, Ducass, Ferrand WLPE 200713 And this? 1 Call 2 Call 2 Exit 3 Call 3 Fail 2 Redo 2 Exit 4 Call 4 Exit 1 Exit ??
  • Slide 14
  • 14 Deransart, Ducass, Ferrand WLPE 200714
  • Slide 15
  • 15 Deransart, Ducass, Ferrand WLPE 200715 Easier? 1 Call 2 Call 2 Exit 3 Call 3 Fail 2 Redo 2 Exit 4 Call 4 Exit 1 Exit ??
  • Slide 16
  • 16 Deransart, Ducass, Ferrand WLPE 200716 A two stages understanding 1.Finding relevant concepts and relations whose evolution is coded in the trace (Trace Interpretation) 2.Relating these concepts with some real or hypothetic process from which the trace is or may be originated.(Observational Semantics)
  • Slide 17
  • 17 Deransart, Ducass, Ferrand WLPE 200717 FULL VIRTUAL TRACE unbounded sequence of trace events of the form e t : (t, a t, S t+1 ) e t : unique identifier of the event t: chrono. Time of the trace a t : kind of event, an identifier characterizing the kind of actions from which the process changed from S t to S t+1. a t belongs to a finite set R. S t = p 1,t..., p n,t : values of parameters at chrono t. S t is the current full virtual state
  • Slide 18
  • 18 Deransart, Ducass, Ferrand WLPE 200718 ACTUAL TRACE unbounded sequence of trace events w t of the form e t : (t, A t ) e t : unique identifier of the event t: chrono. Time of the trace A t = set of attribute values Extraction function: A t = E(S t,S t+1 ). (Trace Schema) Rebuilding function: Q t = C(w t *,Q 0 ). Q 0 restriction of S 0 (Trace interpretation)
  • Slide 19
  • 19 Deransart, Ducass, Ferrand WLPE 200719 Full Virtual Trace: evolution of a full virtual state Full Virtual State Initial State: S 0 { { goal cl-list tr fa fa
  • Slide 20
  • 20 Deransart, Ducass, Ferrand WLPE 200720 Virtual Trace: Observational Semantics
  • Slide 21
  • 21 Deransart, Ducass, Ferrand WLPE 200721
  • Slide 22
  • 22 Deransart, Ducass, Ferrand WLPE 200722
  • Slide 23
  • 23 Deransart, Ducass, Ferrand WLPE 200723 And actual trace extraction:
  • Slide 24
  • 24 Deransart, Ducass, Ferrand WLPE 200724 Example goal:-p(X),eq(X,b). p(a). p(b). eq(X,X). chrono nu(u) lp(u) port pd(u) Reached virtual state 1 1 1 Call goal S2 2 2 2 Call p(X) S3 3 2 2 Exit p(a) S4 4 3 2 Call eq(a,b) S5 5 3 2 Fail eq(a,b) S6 6 2 2 Redo p(a) S7 7 2 2 Exit p(b) S8 8 4 2 Call eq(b,b) S9 9 4 2 Exit eq(b,b) S10 10 1 1 Exit goal S11
  • Slide 25
  • 25 Deransart, Ducass, Ferrand WLPE 200725
  • Slide 26
  • 26 Deransart, Ducass, Ferrand WLPE 200726 Actual state reconstruction Full virtual state: S Actual state Q Initial state: S 0 Initial rebuilt state: Q 0 = S 0 /Q (restriction of S to Q ) { { goal cl-list tr fa fa
  • Slide 27
  • 27 Deransart, Ducass, Ferrand WLPE 200727 Interpretation Schema (rebuilding)
  • Slide 28
  • 28 Deransart, Ducass, Ferrand WLPE 200728 Faithfulness We develop methods to prove faithfulness C is a faithful trace interpretation w.r.t. the OS and E, if for all actual trace T w =, t >=0, Q 0 = S 0 /Q for all i in [0t-1], there exists S i+1 such that A i = E(S i,S i+1 ) and C(w t *,Q 0 )= S i /Q ( A i attributes of w i )
  • Slide 29
  • 29 Deransart, Ducass, Ferrand WLPE 200729 CONCLUSIONS We may see the trace interpretation as the proper semantics of a trace the observational semantics as a semantics of the virtual trace Faithfulness guarantees that both combine well, and that traces are completely understood (interpretation and production) Ongoing work: definition of a virtual trace for CHR About the Prolog trace model: Our semantics allows trace reading at several levels of comprehensibility It is a model of Prolog tracers (not of Prolog, not unique) The Byrds box model is simple, beautiful, but incomplete, unsatisfactory, etcbut this all of you know very well
  • Slide 30
  • 30 Deransart, Ducass, Ferrand WLPE 200730 Thank you! P. Deransart, M. Ducass, G. Ferrand Observational Semantics of the Prolog Resolution Box Model May 2007 (comprehensive version, in French) INRIA, RR 6229 http://hal.inria.fr/inria-00151285