Download presentation
Presentation is loading. Please wait.
Published byMartin Fowler Modified over 9 years ago
1
1 Deransart, Ducassé, Ferrand WLPE 20071 Observational Semantics of the Prolog Resolution Box Model Pierre Deransart, Mireille Ducassé, Gérard Ferrand INRIA-Rocquencourt, IRISA-Rennes, LIFO-Orléans 13 September 2007 WLPE’07
2
2 Deransart, Ducassé, Ferrand WLPE 20072 Loria Pissaro, 1871 Sophia Antipolis Irisa Rhône-Alpes Futurs Research Centers Rocquencourt, 2007
3
3 Deransart, Ducassé, Ferrand WLPE 20073 ICLP 2005, St Malo
4
4 Deransart, Ducassé, Ferrand WLPE 20074 JFPLC 97, Orléans
5
5 Deransart, Ducassé, Ferrand WLPE 20075 Prolog Box Model by Lawrence Byrd, 1980
6
6 Deransart, Ducassé, Ferrand WLPE 20076 Prolog Box Model, latter
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
8
8 Deransart, Ducassé, Ferrand WLPE 20078 GENERICITY and INTEROPERABILITY PRINCIPLES
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
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
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
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
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 ??
14
14 Deransart, Ducassé, Ferrand WLPE 200714
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 ??
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)
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
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)
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
20
20 Deransart, Ducassé, Ferrand WLPE 200720 Virtual Trace: Observational Semantics
21
21 Deransart, Ducassé, Ferrand WLPE 200721
22
22 Deransart, Ducassé, Ferrand WLPE 200722
23
23 Deransart, Ducassé, Ferrand WLPE 200723 And actual trace extraction:
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
25
25 Deransart, Ducassé, Ferrand WLPE 200725
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
27
27 Deransart, Ducassé, Ferrand WLPE 200727 Interpretation Schema (rebuilding)
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 [0…t-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 )
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 Byrd’s box model is simple, beautiful, but incomplete, unsatisfactory, etc…but this all of you know very well
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
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.