Presentation is loading. Please wait.

Presentation is loading. Please wait.

Checking  -Calculus Structural Congruence is Graph Isomorphism Complete Victor Khomenko 1 and Roland Meyer 2 1 School of Computing Science, Newcastle.

Similar presentations


Presentation on theme: "Checking  -Calculus Structural Congruence is Graph Isomorphism Complete Victor Khomenko 1 and Roland Meyer 2 1 School of Computing Science, Newcastle."— Presentation transcript:

1 Checking  -Calculus Structural Congruence is Graph Isomorphism Complete Victor Khomenko 1 and Roland Meyer 2 1 School of Computing Science, Newcastle University, UK 2 Department of Computing Science, University of Oldenburg, Germany

2 2  -Calculus Syntax P ::= 0  | K ⌊ a 1,…,a n ⌋  | P + P  | P | P  | .P  | a:P  ::= a  | a(x)  |  No replication operator ‘!’ – using recursive definitions of the form K ⌊ a 1,…,a n ⌋ :=P instead Input prefix a(x).P and restriction x:P bind name x in P NOCLASH assumption (can always be enforced by  - conversion): each name is bound at most once the sets of bound and free names are disjoint

3 3 Structural congruence The smallest congruence ≡ defined by the following axioms: α-conversion of bound names is permitted(α) + and | are associative and commutative(AC + ), (AC | ) 0 is a neutral element for + and |(0 + ), (0 | ) x:P ≡ P if x is not a free name of P(P ) x: y:P ≡ y: x:P(C ) x:(P | Q) ≡ P | x:Q if x is not a free name of P(SE | ) Note: ≡ does not expand recursive calls

4 4 SOS rules Not needed!

5 5 Checking structural congruence  SC – the problem of checking structural congruence ≡ of two  -Calculus terms Repeatedly solved by  -Calculus tools (e.g. the states of the system are the equivalence classes w.r.t. ≡)  hence the computational complexity of  SC is of interest  reduction of  SC to Graph Isomorphism (GI) problem allows for an efficient solution in practice, by employing a GI solver

6 6 Graph isomorphism problem (GI) Source: Wikipedia  (a) = 1  (b) = 6  (c) = 8  (d) = 3  (g) = 5  (h) = 2  (i) = 4  (j) = 7 G 1 =(V 1,E 1 ) and G 2 =(V 2,E 2 ) are isomorphic if there is a 1-to- 1 mapping  :V 1  V 2 such that {v,w}  E 1 iff {  (v),  (w)}  E 2

7 7 The complexity of GI Trivially in NP, but not believed to be NP -complete (as Stockmeyer’s polynomial hierarchy PH would then collapse) No polynomial-time algorithm known Can be solved very efficiently in practice Complexity class GI – comprises problems Cook reducible to GI, e.g. Digraph Isomorphism (DGI), Labelled Digraph Isomorphism (LDGI) and many others

8 8 GI  SC reduction (  SC is GI -hard) It is enough to reduce DGI to  SC Given a digraph G(V,E), where V={v 1,…,v n }, build the term The reduction uses a very restricted  -Calculus fragment:  all the restrictions are in the beginning of the term  no +, prefixing operator ‘.’, actions, public channels  | can be replaced by +  calls to process identifiers can be replaced by actions, e.g., L ⌊ v,w ⌋ can be replaced by v.0 Summary:, at least one of | or +, and some means of referring to bound names are enough to make the fragment GI -hard

9 9  SC  GI reduction (  SC is in GI ) Reduce  SC to the Term Equality problem (TE), which is known to be equivalent to GI [Basin’94]: Decide if two terms built using  quantifiers introducing bound names; some of these quantifiers may commute, i.e., θx:θy:t  θy:θx:t  associative, commutative and associative-commutative binary operators  uninterpreted functional symbols and constants  the names bound by the quantifiers are equivalent modulo  associativity, commutativity and associativity- commutativity axioms for the corresponding operators  the commutativity of corresponding quantifiers  α-conversion of bound names

10 10  SC  TE reduction: main ideas Problem 1: the input prefixes are different from quantifiers in TE, and the individual prefixes do not directly correspond to constants or variables in TE Solution: substitute a by s(a,b) and x(y).P by ρy:r(x,y).P, where ρ is a new non-commutative quantifier Problem 2: some axioms in the definition of ≡ have no analogs in TE, viz. (0 + ), (0 | ), (P ), (SE | ) Solution: translate the terms into the following normal form:  enforce the NOCLASH assumption  use (0 + ), (0 | ) and (P ) to simplify the terms until none of these axioms applies  maximise the scope of restrictions using (SE | ) (in the reverse direction) This normal form does not require these axioms to prove structural congruence (long and tedious proof in the paper)

11 11  SC  TE reduction (cont’d) The resulting terms comprise an instance of TE, where: + and | are associative-commutative operators s(_,_), r(_,_), the prefixing operator ‘.’ and the process identifiers are uninterpreted functional symbols is a commutative quantifier and ρ is a non-commutative quantifier public channels,  and 0 are constants (since all the axioms for 0 no longer apply, it can be regarded as uninterpreted) the names introduced by the restriction and input prefixes are the names bound by the quantifiers and ρ

12 12  SC  TE reduction: an example x:a.b(z).z.0 | y:a(p).b.0 | q: .0 | t:0 x:a.b(z).z.0 | y:a(p).b.0 | .0 x: y:(a.b(z).z.0 | a(p).b.0 | .0) x: y:(s(a,x).ρz:r(b,z).s(z,x).0 | ρp:r(a,p).s(b,y).0 | .0) ≡ (SE | ) ≡ (P ), (0 | )  translation

13 13 TE  LDGI reduction [Basin’94] Build the parse tree of the TE term Compound the vertices corresponding to associative and associative-commutative operations into vertices with larger out-degrees Drop the arc labels for commutative operators * G t4 G t3 G t2 G t1 (t 1 *t 2 )*(t 3 *t 4 ) (* is not the top-level operator of t 1 -t 4 )

14 14 TE  LDGI reduction (cont’d) Translating the quantifiers Erase the names of bound variables (to express that they can be changed by α-conversion) Drop the arc labels for commutative quantifiers 1 2 θ GtGt θx 1 :…:θx n :t (θ-quantification is not the top-level operation of t) x1x1 x2x2 x2x2 for n=2

15 15 TE  LDGI reduction: an example x: y:s(a,x).ρz:r(x,z).s(z,y).K(a,x) | .s(a, b).K(a,b) + .0 + .K(a,b) | ρp:r(a,p).s(p,c).ρq:r(c,q).s(q, a).0

16 16 TE  LDGI reduction: optimisation-1 Share sub-terms whose structural congruence is easy to check (e.g. restriction-free or trivial sub-terms only)

17 17 TE  LDGI reduction: optimisation-2 Eliminate ρ-vertices, together with the associated auxiliary vertices (their position can always be recovered)

18 18 TE  LDGI reduction: optimisation-3 After the common sub-terms are shared (and parallel arcs removed), the auxiliary vertices for quantifiers have the in- and out-degree one, and can be contracted Adjacent vertices corresponding to the prefixing operator ‘.’ can be compounded The 0 vertex (unique after sharing common sub-terms) can be eliminated The unlabelled vertices corresponding to the variables can be labelled by either ρ  or  (depending on the type of the binding quantifier)

19 19 The result of these optimisations Reduction from 60/63 down to 26/38 vertices/arcs

20 20 Summary and extensions These results are not affected if either or both of the following axioms are added: x:(P + Q) ≡ P + x:Qif x is not a free name of P(SE + ) x: .P ≡ . x:Pif x does not occur in  (SE  )  -Calculus fragmentComplexity of  SC full  -Calculus GI -complete, at least one of + or |, and some means of referring to restricted channels (i/o prefixes, process identifiers) GI -complete without both + and | in P without in P

21 21 Conclusions Showed that  SC is a GI -complete problem The result is robust:  holds for restricted fragments of  -Calculus  holds for alternative definitions of ≡, viz. with (SE + ) and/or (SE  )  -Calculus fragments for which  SC is in P have been identified Practical algorithm for solving  SC:  reduce to TE  use the optimised TE  LDGI translation  use a GI solver

22 22 Future work Extension to the following axioms looks plausible: x: .P ≡ 0 if  has the form x or x(·)(P  ) x:(P + Q) ≡ x:P + x:Q(D + ) Also generalisation of (P  ) to an axiom replacing any process that has no behaviour in any context by 0 Related work Engelfriet and Gelsema Gadducci Romanel and Priami

23 23 Thank you! Any questions?


Download ppt "Checking  -Calculus Structural Congruence is Graph Isomorphism Complete Victor Khomenko 1 and Roland Meyer 2 1 School of Computing Science, Newcastle."

Similar presentations


Ads by Google