conjunctive grammars generate non regular unary languages
play

Conjunctive grammars generate non-regular unary languages Artur Je - PowerPoint PPT Presentation

Conjunctive grammars generate non-regular unary languages Artur Je z August 21, 2007 Artur Je z Conjunctive grammars generate non-regular unary languages August 21, 2007 1 / 21 History Conjunctive grammars introduced in 2001 by A.


  1. Conjunctive grammars generate non-regular unary languages Artur Je˙ z August 21, 2007 Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 1 / 21

  2. History Conjunctive grammars introduced in 2001 by A. Okhotin. Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 2 / 21

  3. History Conjunctive grammars introduced in 2001 by A. Okhotin. Extension of Context-free grammars by an intersection in a rule body. Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 2 / 21

  4. History Conjunctive grammars introduced in 2001 by A. Okhotin. Extension of Context-free grammars by an intersection in a rule body. Productions of the form for α i ∈ ( Σ ∪ N ) ∗ . A → α 1 & α 2 & . . . & α k , Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 2 / 21

  5. History Conjunctive grammars introduced in 2001 by A. Okhotin. Extension of Context-free grammars by an intersection in a rule body. Productions of the form for α i ∈ ( Σ ∪ N ) ∗ . A → α 1 & α 2 & . . . & α k , Intuition of the semantics: Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 2 / 21

  6. History Conjunctive grammars introduced in 2001 by A. Okhotin. Extension of Context-free grammars by an intersection in a rule body. Productions of the form for α i ∈ ( Σ ∪ N ) ∗ . A → α 1 & α 2 & . . . & α k , Intuition of the semantics: ◮ w is derived such production iff it is derived by each α i Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 2 / 21

  7. History Conjunctive grammars introduced in 2001 by A. Okhotin. Extension of Context-free grammars by an intersection in a rule body. Productions of the form for α i ∈ ( Σ ∪ N ) ∗ . A → α 1 & α 2 & . . . & α k , Intuition of the semantics: ◮ w is derived such production iff it is derived by each α i ◮ w is derived from α i = N 1 · N 2 · . . . · N k iff w = w 1 w 2 . . . w k and w j is derived from N j for each j Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 2 / 21

  8. Example Example = { a , b , c } , Σ N = { S , B , C , E , A } S → ( AE )&( BC ) A → aA | ǫ B → aBb | ǫ C → cC | ǫ E → bEc | ǫ Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 3 / 21

  9. Example Example = { a , b , c } , Σ N = { S , B , C , E , A } { a n b n c n : n ∈ N } S → ( AE )&( BC ) a ∗ A → aA | ǫ { a n b n : n ∈ N } B → aBb | ǫ c ∗ C → cC | ǫ { b n c n : n ∈ N } E → bEc | ǫ Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 3 / 21

  10. Motivation natural extension of CFG Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 4 / 21

  11. Motivation natural extension of CFG very close connection to language equations Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 4 / 21

  12. Motivation natural extension of CFG very close connection to language equations from possible extensions of CFG this keeps the meaning of language equations Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 4 / 21

  13. Motivation natural extension of CFG very close connection to language equations from possible extensions of CFG this keeps the meaning of language equations good parsing properties Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 4 / 21

  14. Formal syntax Definition A conjunctive grammar is a � Σ, N , S , P � where Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 5 / 21

  15. Formal syntax Definition A conjunctive grammar is a � Σ, N , S , P � where Σ is a finite alphabet Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 5 / 21

  16. Formal syntax Definition A conjunctive grammar is a � Σ, N , S , P � where Σ is a finite alphabet N —set of non-terminal symbols Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 5 / 21

  17. Formal syntax Definition A conjunctive grammar is a � Σ, N , S , P � where Σ is a finite alphabet N —set of non-terminal symbols S —starting symbol Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 5 / 21

  18. Formal syntax Definition A conjunctive grammar is a � Σ, N , S , P � where Σ is a finite alphabet N —set of non-terminal symbols S —starting symbol P —set of productions of a form α i ∈ ( Σ ∪ N ) ∗ A → α 1 & α 2 & . . . & α k , Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 5 / 21

  19. Rewriting Semantics By term rewriting. Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 6 / 21

  20. Rewriting Semantics By term rewriting. Generalizes the Chomsky rewriting. Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 6 / 21

  21. Rewriting Semantics By term rewriting. Generalizes the Chomsky rewriting. Drawbacks Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 6 / 21

  22. Rewriting Semantics By term rewriting. Generalizes the Chomsky rewriting. Drawbacks There are more generalizations. Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 6 / 21

  23. Rewriting Semantics By term rewriting. Generalizes the Chomsky rewriting. Drawbacks There are more generalizations. Slightly problematic to handle. Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 6 / 21

  24. Language equations Semantics With each nonterminal A we associate a language L A . Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 7 / 21

  25. Language equations Semantics With each nonterminal A we associate a language L A . The rule A → B & CD | a is replaced by L A = ( L B ∩ L A · L D ) ∪ { a } Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 7 / 21

  26. Language equations Semantics With each nonterminal A we associate a language L A . The rule A → B & CD | a is replaced by L A = ( L B ∩ L A · L D ) ∪ { a } The language corresponding to the component L S in the least solution of the system is a language of the grammar. Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 7 / 21

  27. Language equations Semantics With each nonterminal A we associate a language L A . The rule A → B & CD | a is replaced by L A = ( L B ∩ L A · L D ) ∪ { a } The language corresponding to the component L S in the least solution of the system is a language of the grammar. Remark In the CFG case the only allowed operations are ∪ and · . Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 7 / 21

  28. Example revisited Example = { a , b , c } , Σ N = { S , B , C , E , A } S → ( AE )&( BC ) A → aA | ǫ B → aBb | ǫ C → cC | ǫ E → bEc | ǫ Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 8 / 21

  29. Example revisited Example = { a , b , c } , Σ N = { S , B , C , E , A } S → ( AE )&( BC ) L S = ( L A · L E ) ∩ ( L B · L C ) A → aA | ǫ L A = { a } · L A ∪ { ǫ } B → aBb | ǫ L B = { a } · L B · { b } ∪ { ǫ } C → cC | ǫ L C = { c } · L C ∪ { ǫ } E → bEc | ǫ L E = { b } · L E · { c } ∪ { ǫ } Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 8 / 21

  30. Example revisited Example = { a , b , c } , Σ N = { S , B , C , E , A } { a n b n c n : n ∈ N } S → ( AE )&( BC ) L S = ( L A · L E ) ∩ ( L B · L C ) a ∗ A → aA | ǫ L A = { a } · L A ∪ { ǫ } { a n b n : n ∈ N } B → aBb | ǫ L B = { a } · L B · { b } ∪ { ǫ } c ∗ C → cC | ǫ L C = { c } · L C ∪ { ǫ } { b n c n : n ∈ N } E → bEc | ǫ L E = { b } · L E · { c } ∪ { ǫ } Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 8 / 21

  31. Basic results Positive results Resolved language equations with ∪ , ∩ and · Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 9 / 21

  32. Basic results Positive results Resolved language equations with ∪ , ∩ and · Chomsky’s normal form Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 9 / 21

  33. Basic results Positive results Resolved language equations with ∪ , ∩ and · Chomsky’s normal form Efficient parsing by CYK Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 9 / 21

  34. Basic results Positive results Resolved language equations with ∪ , ∩ and · Chomsky’s normal form Efficient parsing by CYK High expressive power Example { wcw : w ∈ { a , b } ∗ } Artur Je˙ z Conjunctive grammars generate non-regular unary languages August 21, 2007 9 / 21

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