comp31212 concurrency
play

COMP31212: Concurrency Topics 2.3: Understanding FSP Topic 2.3: - PowerPoint PPT Presentation

Topic 2.3: Understanding FSP COMP31212: Concurrency Topics 2.3: Understanding FSP Topic 2.3: Understanding FSP Outline Topic 2.3: Understanding FSP About Transition Systems Prefix & Definition Rules Choice Rule Parallel Composition


  1. Topic 2.3: Understanding FSP COMP31212: Concurrency Topics 2.3: Understanding FSP

  2. Topic 2.3: Understanding FSP Outline Topic 2.3: Understanding FSP About Transition Systems Prefix & Definition Rules Choice Rule Parallel Composition Rules Generating an LTS Remaining rules

  3. Topic 2.3: Understanding FSP Outline Topic 2.3: Understanding FSP About Transition Systems Prefix & Definition Rules Choice Rule Parallel Composition Rules Generating an LTS Remaining rules

  4. Topic 2.3: Understanding FSP Transition Relation • An FSP process can make a labelled transition into a new FSP process. • Each FSP process has a corresponding LTS • FSP process transition determines state transition in LTS a 1 → · · · a n a 2 • A transition path E → E 1 → E n . . . determines the nodes and edges traversed in the LTS for E . How to find LTS : define Transition Relation Rules for each FSP construct

  5. Topic 2.3: Understanding FSP Transition Rules Transition Relation : σ ⊆ ( Proc × Act × Proc ) where • Proc is the set of FSP process terms • Act is the set of action labels, together with tau .

  6. Topic 2.3: Understanding FSP Transition Rules Transition Relation : σ ⊆ ( Proc × Act × Proc ) where • Proc is the set of FSP process terms • Act is the set of action labels, together with tau . premisses RuleName General Format of Transition Rule: transition Premisses may be transitions (built via transition rules) or other conditions → P ′ means that ( P , a , P ′ ) ∈ σ a Transition P

  7. Topic 2.3: Understanding FSP Outline Topic 2.3: Understanding FSP About Transition Systems Prefix & Definition Rules Choice Rule Parallel Composition Rules Generating an LTS Remaining rules

  8. Topic 2.3: Understanding FSP Prefix and Definition Rules Prefix Action Rule : Prefix a ( a -> P ) → P

  9. Topic 2.3: Understanding FSP Prefix and Definition Rules Prefix Action Rule : Definition Rule : a → P ′ P Prefix Defn where ( ProcId = P ) a a ( a -> P ) → P ProcId → P ′

  10. Topic 2.3: Understanding FSP Prefix and Definition Rules Prefix Action Rule : Definition Rule : a → P ′ P Prefix Defn where ( ProcId = P ) a a ( a -> P ) → P ProcId → P ′ e.g. SWITCH = (on -> (off -> STOP)).

  11. Topic 2.3: Understanding FSP Prefix and Definition Rules Prefix Action Rule : Definition Rule : a → P ′ P Prefix Defn where ( ProcId = P ) a a ( a -> P ) → P ProcId → P ′ e.g. SWITCH = (on -> (off -> STOP)). ⋆ Calculate Transitions? ⋆

  12. Topic 2.3: Understanding FSP Outline Topic 2.3: Understanding FSP About Transition Systems Prefix & Definition Rules Choice Rule Parallel Composition Rules Generating an LTS Remaining rules

  13. Topic 2.3: Understanding FSP Choice Rule for some i ∈ { 1 , . . . , n } Choice a i ( a 1 -> P 1 | · · · | a n -> P n ) → P i

  14. Topic 2.3: Understanding FSP Choice Rule for some i ∈ { 1 , . . . , n } Choice a i ( a 1 -> P 1 | · · · | a n -> P n ) → P i Example: COIN = ( toss -> HEADS | toss -> TAILS ) , HEADS = ( heads -> COIN ) , TAILS = ( tails -> COIN ) . toss heads Transitions: → HEADS → COIN and COIN toss tails COIN → TAILS → COIN ⋆ Calculate Transition Relation? ⋆

  15. Topic 2.3: Understanding FSP Outline Topic 2.3: Understanding FSP About Transition Systems Prefix & Definition Rules Choice Rule Parallel Composition Rules Generating an LTS Remaining rules

  16. Topic 2.3: Understanding FSP Parallel Rules I: Alphabets First. . . Alphabet : α ( P ) ⊆ L : Define α recursively. . . Prefix: α ( a -> P ) = { a } ∪ α ( P )

  17. Topic 2.3: Understanding FSP Parallel Rules I: Alphabets First. . . Alphabet : α ( P ) ⊆ L : Define α recursively. . . Prefix: α ( a -> P ) = { a } ∪ α ( P ) Choice: α ( P 1 | · · · | P n ) = α ( P 1 ) ∪ · · · ∪ α ( P n )

  18. Topic 2.3: Understanding FSP Parallel Rules I: Alphabets First. . . Alphabet : α ( P ) ⊆ L : Define α recursively. . . Prefix: α ( a -> P ) = { a } ∪ α ( P ) Choice: α ( P 1 | · · · | P n ) = α ( P 1 ) ∪ · · · ∪ α ( P n ) Parallel: α ( P 1 || · · · || P n ) = α ( P 1 ) ∪ · · · ∪ α ( P n )

  19. Topic 2.3: Understanding FSP Parallel Rules I: Alphabets First. . . Alphabet : α ( P ) ⊆ L : Define α recursively. . . Prefix: α ( a -> P ) = { a } ∪ α ( P ) Choice: α ( P 1 | · · · | P n ) = α ( P 1 ) ∪ · · · ∪ α ( P n ) Parallel: α ( P 1 || · · · || P n ) = α ( P 1 ) ∪ · · · ∪ α ( P n ) Definition: α ( ProcId ) = α ( P ) where ( ProcId = P )

  20. Topic 2.3: Understanding FSP Parallel Rules I: Alphabets First. . . Alphabet : α ( P ) ⊆ L : Define α recursively. . . Prefix: α ( a -> P ) = { a } ∪ α ( P ) Choice: α ( P 1 | · · · | P n ) = α ( P 1 ) ∪ · · · ∪ α ( P n ) Parallel: α ( P 1 || · · · || P n ) = α ( P 1 ) ∪ · · · ∪ α ( P n ) Definition: α ( ProcId ) = α ( P ) where ( ProcId = P ) Extension: α ( P + { a 1 , . . . , a n } ) = α ( P ) ∪ { a 1 , . . . , a n }

  21. Topic 2.3: Understanding FSP Parallel Rules I: Alphabets First. . . Alphabet : α ( P ) ⊆ L : Define α recursively. . . Prefix: α ( a -> P ) = { a } ∪ α ( P ) Choice: α ( P 1 | · · · | P n ) = α ( P 1 ) ∪ · · · ∪ α ( P n ) Parallel: α ( P 1 || · · · || P n ) = α ( P 1 ) ∪ · · · ∪ α ( P n ) Definition: α ( ProcId ) = α ( P ) where ( ProcId = P ) Extension: α ( P + { a 1 , . . . , a n } ) = α ( P ) ∪ { a 1 , . . . , a n } Hiding: α ( P \{ a 1 , . . . , a n } ) = α ( P ) − { a 1 , . . . , a n }

  22. Topic 2.3: Understanding FSP Parallel Rules I: Alphabets First. . . Alphabet : α ( P ) ⊆ L : Define α recursively. . . Prefix: α ( a -> P ) = { a } ∪ α ( P ) Choice: α ( P 1 | · · · | P n ) = α ( P 1 ) ∪ · · · ∪ α ( P n ) Parallel: α ( P 1 || · · · || P n ) = α ( P 1 ) ∪ · · · ∪ α ( P n ) Definition: α ( ProcId ) = α ( P ) where ( ProcId = P ) Extension: α ( P + { a 1 , . . . , a n } ) = α ( P ) ∪ { a 1 , . . . , a n } Hiding: α ( P \{ a 1 , . . . , a n } ) = α ( P ) − { a 1 , . . . , a n } Stop: α ( STOP ) = { }

  23. Topic 2.3: Understanding FSP Example LAUGH = (laugh -> STOP). CONVERSE = (think -> TALK), TALK = (talk -> STOP). ||LAUGH_CONVERSE = (LAUGH || CONVERSE).

  24. Topic 2.3: Understanding FSP Example LAUGH = (laugh -> STOP). CONVERSE = (think -> TALK), TALK = (talk -> STOP). ||LAUGH_CONVERSE = (LAUGH || CONVERSE). ⋆ Calculate alphabet: α ( LAUGH CONVERSE ) ? ⋆

  25. Topic 2.3: Understanding FSP Parallel Rules II: Definition a → P ′ P a �∈ α ( Q ) Par1 a → ( P ′ || Q ) ( P || Q )

  26. Topic 2.3: Understanding FSP Parallel Rules II: Definition a → P ′ b P a �∈ α ( Q ) → Q ′ Q b �∈ α ( P ) Par1 Par2 a → ( P ′ || Q ) ( P || Q ) ( P || Q ) b → ( P || Q ′ )

  27. Topic 2.3: Understanding FSP Parallel Rules II: Definition a → P ′ b P a �∈ α ( Q ) → Q ′ Q b �∈ α ( P ) Par1 Par2 a → ( P ′ || Q ) ( P || Q ) ( P || Q ) b → ( P || Q ′ ) a a → P ′ → Q ′ P Q Par3 a → ( P ′ || Q ′ ) ( P || Q )

  28. Topic 2.3: Understanding FSP An Example Transition Derivation Consider the LAUGH CONVERSE process ... Defn LAUGH CONVERSE

  29. Topic 2.3: Understanding FSP An Example Transition Derivation Consider the LAUGH CONVERSE process ... Par1 ( LAUGH || CONVERSE ) Defn LAUGH CONVERSE

  30. Topic 2.3: Understanding FSP An Example Transition Derivation Consider the LAUGH CONVERSE process ... Defn LAUGH Par1 ( LAUGH || CONVERSE ) Defn LAUGH CONVERSE

  31. Topic 2.3: Understanding FSP An Example Transition Derivation Consider the LAUGH CONVERSE process ... Prefix ( laugh -> STOP ) Defn LAUGH Par1 ( LAUGH || CONVERSE ) Defn LAUGH CONVERSE

  32. Topic 2.3: Understanding FSP An Example Transition Derivation Consider the LAUGH CONVERSE process ... Prefix laugh ( laugh -> STOP ) → STOP Defn LAUGH Par1 ( LAUGH || CONVERSE ) Defn LAUGH CONVERSE

  33. Topic 2.3: Understanding FSP An Example Transition Derivation Consider the LAUGH CONVERSE process ... Prefix laugh ( laugh -> STOP ) → STOP Defn laugh LAUGH → STOP Par1 ( LAUGH || CONVERSE ) Defn LAUGH CONVERSE

  34. Topic 2.3: Understanding FSP An Example Transition Derivation Consider the LAUGH CONVERSE process ... Prefix laugh ( laugh -> STOP ) → STOP Defn laugh LAUGH → STOP Par1 laugh ( LAUGH || CONVERSE ) → ( STOP || CONVERSE ) Defn LAUGH CONVERSE

  35. Topic 2.3: Understanding FSP An Example Transition Derivation Consider the LAUGH CONVERSE process ... Prefix laugh ( laugh -> STOP ) → STOP Defn laugh LAUGH → STOP Par1 laugh ( LAUGH || CONVERSE ) → ( STOP || CONVERSE ) Defn laugh → ( STOP || CONVERSE ) LAUGH CONVERSE

  36. Topic 2.3: Understanding FSP For you to consider ... ⋆ Derive the other transitions for LAUGH CONVERSE ? ⋆ laugh LAUGH CONVERSE → ( STOP || CONVERSE )

  37. Topic 2.3: Understanding FSP For you to consider ... ⋆ Derive the other transitions for LAUGH CONVERSE ? ⋆ laugh LAUGH CONVERSE → ( STOP || CONVERSE ) think → ( STOP || TALK )

  38. Topic 2.3: Understanding FSP For you to consider ... ⋆ Derive the other transitions for LAUGH CONVERSE ? ⋆ laugh LAUGH CONVERSE → ( STOP || CONVERSE ) think → ( STOP || TALK ) talk → ( STOP || STOP )

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend