Bigraphs and (Reactive) XML an XML-Centric Model of Computation

Bigraphs and (Reactive) XML an XML-Centric Model of Computation

Bigraphs and (Reactive) XML an XML-centric model of computation Thomas Hildebrandt Dept. of Theoretical Computer Science, ITU February 8, 2005 (ITU Technical report: TR-2005-56) COPLAS Seminar -February 8, 2005- DIKU Background and context of the presented work: Bigraphical Reactive Systems: Robin Milner and Ole H. Jensen • Theoretical meta-model for reactive systems with semi structured state See tech reports: UCAM-CL-TR-580 and UCAM-CL-TR-581, 2004 Reactive XML: MSc. thesis by Jacob W. Winther, nov, 2004. • 1. Develop an XML meta-model for process calculi and their reaction semantics, inspired by the theory of bigraphical reactive systems. 2. Implement a prototype tool allowing to rewrite XML processes. The Bigraphical Programming Languages (BPL) project at ITU • COPLAS Seminar -February 8, 2005- DIKU 1 Road Map Bigraphical reactive systems - briefly • Ground bigraphs and XML • – Signatures – A process calculus for (open) ground bigraphs – From bigraphs to XML and back Contexts and reactions • Reactive XML implementation - evaluation contexts and matching • Future work • COPLAS Seminar -February 8, 2005- DIKU 2 Bigraphical reactive systems - briefly Bigraph: Topo graph + Link graph. • Topo graph: Tuple of finite unordered trees. • Each node is typed with a control and has a number of ports Link graph: Hyper-edges between ports and names in interface(s). • Graphical notation for a (ground) bigraph Rooms with two regions: hilde office hniss jww Room PDA PDA Room Room COPLAS Seminar -February 8, 2005- DIKU 3 Bigraph contexts A bigraph may have an ordered set of holes among leaves of topo graph. • Names in inner- and outer-face used to connect links in composition • Graphical notation for a bigraph (context) Building with two holes: hniss hilde office jww Floor PDA hole1 hole2 Lift Room Floor hniss hilde office jww COPLAS Seminar -February 8, 2005- DIKU 4 Bigraph composition Bigraphs with matching inner and outer-faces can be composed: • PDA hniss hilde office jww Floor hniss hilde office PDA jww hole1 hole2 Lift Floor Room Floor PDA PDA PDA hniss hilde office jww = Room Lift Room Room Floor hilde office hniss jww Room PDA PDA Room Room COPLAS Seminar -February 8, 2005- DIKU 5 Bigraph reactions A bigraph reaction rule is essentially a pair (L, R) of contexts: • Floor Floor hole3 hole3 hole1 hole2 hole1 hole2 Lift Lift Floor Floor Reaction: G E R P if G E L P and E an evaluation context • → ◦ ◦ ≡ ◦ ◦ In general parameters may contain extra links, be copied and discarded. • COPLAS Seminar -February 8, 2005- DIKU 6 Bigraph theory [Milner, Jensen] Closed links and ”structural congruence as graph isomorphism” • Labelled transition systems from RPO’s and bisimulation congruence • Axiomatisations (DNF and CNF) • Binding bigraphs and π-calculus • Local bigraphs and lambda calculus • COPLAS Seminar -February 8, 2005- DIKU 7 Road Map Bigraphical reactive systems - briefly • Ground bigraphs and XML → – Signatures – A process calculus for (open) ground bigraphs – From bigraphs to XML and back Contexts and reactions • Reactive XML implementation - evaluation contexts and matching • Future work • COPLAS Seminar -February 8, 2005- DIKU 8 Signatures A signature is a tuple (Σ, Att, ar), where • – Σ is a set of element names – Att is a set of finite sets (of attribute names) – ar : Σ Att assign a finite attribute set to each element. → Bigraph signatures have Att = ω • (where ω is the set 0, . , n 1 n 0 of finite ordinals.) { − } | ≥ Bigraphs generalise !trivially to named ports." COPLAS Seminar -February 8, 2005- DIKU 9 Process calculus for bigraphs We use a process calculus notation for bigraphs inspired by Milner’s CNF: Assume an infinite set N of names • For a signature Σ = (Σ, Att, ar) define for any finite set of names • X N respectively the ⊂ t ::= κ i : xi i ar(κ).p Tree Σ-process expressions { } ∈ p ::= t p p 1 Prime Σ-process expressions | | | r ::= r r p 0 Wide Σ-process expressions ' | | with names X, for κ Σ and x X. ∈ i ∈ COPLAS Seminar -February 8, 2005- DIKU 10 Structural congruence and interfaces Structural congruence is the least congruence such that ≡ p (p p ) (p p ) p p 1 p 1 p p p q q p 1| 2| 3 ≡ 1| 2 | 3 | ≡ | ≡ | ≡ | and r (r r ) (r r ) r r 0 r 0 r r 1 ' 2 ' 3 ≡ 1 ' 2 ' 3 ' ≡ ' ≡ We say that r ΠΠi n pi has width n, and • ≡ ∈ explicit type processes with the interface r : n, X for fn(r) X • ) * ⊆ COPLAS Seminar -February 8, 2005- DIKU 11 Denotation The denotation of process expressions is straightforward: [[r r"]] = [[r]] [[r"]] ' ' [[κ i : ni i ar(κ).p]] = (κ i:ni i ar(κ) idfn(p)) [[p]] { } ∈ { } ∈ | ◦ [[p p"]] = [[p]] [[p"]] | | [[0]] = 0 [[1]] = 1 where 0 is the empty bigraph, 1 is the barren region bigraph, and κ i:n { i}i ar(κ) is the ion bigraph. ∈ COPLAS Seminar -February 8, 2005- DIKU 12 Bigraph XML documents A Σ-XML document D with interface n, x1, . , xk is a valid document of the form ) { }* D := < root x1 = ”id1 ” . xk = ”idk ” > R1 . Rn < /root > R := < region > P < /region > P := T1 . Th T := < κ a1 = ”v1 ” . aj = ”vj ” >P < /κ > where root, region Σ, xi are ID attributes and ai are IDREF attributes, κ Σ and ar(κ) =,∈ a , . , a . ∈ { 1 j} COPLAS Seminar -February 8, 2005- DIKU 13 Bigraph process expressions as XML Define [[r : n, x , . , x ]] = <root x = ”$x ” . x = ”$x ”> [[r]]</root> X ) { 1 k}* 1 1 k k X [[p r]] = <region> [[p]]</region> [[r]] X ' X X [[p q]] = [[p]] [[q]] X | X X [[κ ai : xi" a ar(κ).p]] = <κ a1 = ”$x1" ” . aj = ”$xj"”> [[p]]</κ> X { } i∈ X [[0]] = [[1]] = $ X X where $ is the empty document. COPLAS Seminar -February 8, 2005- DIKU 14 From XML to process calculi expressions [[<root ¯x = ¯v> R1 . Rn </root>]] = ΠΠi n [[Ri]]σ : n, x¯ P ∈ P ) * [[<region>P </region>]] = [[P ]] P σ P σ [[T1 . Tm]] = Πi m [[Ti]]σ P ∈ P [[<κ a¯ = w¯> P < /κ >]]σ = κ ai : σ(wi) a ar(κ). [[P ]]σ P { } i∈ P for σ(vi) = xi. Proposition: [[ [[r : n, X ]]]] r : n, X • P X ) * ≡ ) * COPLAS Seminar -February 8, 2005- DIKU 15 Examples <root office="$roomtype1" hilde="$n1" jww="$n2" hniss="$n3" > <region> <room type="$roomtype1" name="$n1"> <person name="$n1"/> <person name="$n3"/> </room> </region> <region> <room type="$roomtype1" name="$n3"/> </region> </root> room type : office, name : hilde . { } (person name : hilde person name : hniss ) { }| { } ' room type : office, name : hniss : 2, office, hilde, jww, hniss { } ) { }* COPLAS Seminar -February 8, 2005- DIKU 16 Examples the CCS-like process expression act ch : a .act ch : b coact ch : a : a, b { } { } | { } { } is represented by the XML document <root a="$a" b="$b"> <region> <act ch="$a"> <act ch="$b"/> </act> <coact ch="$a"/> </region> </root> COPLAS Seminar -February 8, 2005- DIKU 17 Road Map Bigraphical reactive systems - briefly • Ground bigraphs and XML • – Signatures – A process calculus for (open) ground bigraphs – From bigraphs to XML and back Contexts and reactions → Reactive XML implementation - evaluation contexts and matching • Future work • COPLAS Seminar -February 8, 2005- DIKU 18 Contexts For X, Y N and n, m 0 define • ⊆ ≥ P ::= κ i : xi i ar(κ).P P P [ ]j 1 { } ∈ | | | | R ::= R R P 0 ' | | W ::= σ R ' where κ Σ, x X and j m and σ : Y X is a map from Y to X. ∈ i ∈ ∈ → W : m, Y n, X is linear if every index j m appears exactly once • ) * → ) * ∈ Write W for the wide contexts over signature Σ. • Σ COPLAS Seminar -February 8, 2005- DIKU 19 Compositions For W : m, Y n, X and W " : n, X n", X" define ) * → ) * ) * → ) * W " W : m, Y n", X" = σ" σ R"[j : Pjσ"]j n, if ◦ ) * → ) * ◦ ' ∈ W = σ ΠΠj n Pj, • ' ∈ W " = σ" R" • ' P σ" denotes substitution of x X in P with σ"(x) X" and • j ∈ j ∈ R"[j : Pjσ"]j n denotes insertion of Pjσ" in all holes of R" with index j. • ∈ Positive (monotone) web service: W (D) = [[W [[D]]]]. X ◦ P COPLAS Seminar -February 8, 2005- DIKU 20 Reactions Parametric reaction rule: (R : m, X n, X , R" : m, X n, X ) • for R linear. ) * → ) * ) * → ) * For a set S of parametric reaction rules and Ξ Σ of active prefixes define ⊆ React = L, E (id R") r L E (id R) r, S,Ξ ◦ Y ' ◦ | ≡ ◦ Y ' ◦ (R, R" : n, X m, X ) S, !# $ ) * → ) * ∈ E : m, Y m", Z WΞ and r : )n, Y *fo→r X) Y * ∈ ) * ⊆ " and D D", if ( [[D]], R") React and [[R"]] = D". → P ∈ S,Ξ X ReactS,Ξ is typically infinite...not very operational...! COPLAS Seminar -February 8, 2005- DIKU 21 Road Map Bigraphical reactive systems - briefly • Ground bigraphs and XML • – Signatures – A process calculus for (open) ground bigraphs – From bigraphs to XML and back Contexts and reactions • Reactive XML implementation - evaluation contexts and matching → Future work • COPLAS Seminar -February 8, 2005- DIKU 22 Reactive XML Implementation To compute a reaction we must 1. Find (R, R" : n, X 1, X ) S, ) * → ) * ∈ 2. an evaluation context σ R : 1, Y m, Z W and ' E ) * → ) * ∈ Ξ 3. a wide process expression r = ΠΠj n pj such that ∈ [[D]] = RE[R[j : pj]j nσ] P ∈ 4. compute the document D" = [[RE[R"[j : pj]j nσ]]]. X ∈ COPLAS Seminar -February 8, 2005- DIKU 23 Computing the match RE[R[j : pj]j nσ] = RE[Rσ[j : pjσ]j n] = RE Rσ rσ • ∈ ∈ ◦ ◦ ”Find sub process: Rσ rσ in active (evaluation) context” • ◦ Evaluation contexts R W are identified by the XPath expression • E ∈ Ξ //*[not(ancestor-or-self::*[name()=’X_1’ .

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    34 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us