patterns in ocl
play

Patterns in OCL Burkhart Wolff Universit Paris-Sud - PowerPoint PPT Presentation

Patterns in OCL Burkhart Wolff Universit Paris-Sud Pattern-Matching Lambdas Proposal: Hidden second-order combinators, implicitly accepting a lambda buried under first-order notation, are: ->iterate ->exists ->forall


  1. Patterns in OCL Burkhart Wolff Université Paris-Sud

  2. Pattern-Matching Lambdas ● Proposal: Hidden second-order combinators, implicitly accepting a lambda buried ● under first-order notation, are: ->iterate ->exists ->forall ->select ->collect ->any ->isUnique. S->select(PATTERN | P x) for example: S->select(Seq{_, 3, a, …} | a >= 15) or S->select(Tuple{name=‘mueller', sex=male, age= x, …} | x >= 21) System X, Project FSF, Internal Meeting 22.11.13 B.Wolff

  3. Pattern-Matching Lambdas ● Proposal: Hidden second-order combinators, implicitly accepting a lambda buried ● under first-order notation, are: for example S->select(Seq{_, 3, a, …} | a >= 15) or S->select(Tuple{name=‘mueller', sex=male, age= x, …} | x >= 21) or S->select(a in Employee | P a ) for (S->select(a | a.oclIsKindOf(Employee) and P a )) System X, Project FSF, Internal Meeting 22.11.13 B.Wolff

  4. Pattern-Matching Lambdas ● Proposal: Hidden second-order combinators, implicitly accepting a lambda buried ● under first-order notation, are: Possibility: implicit Tuple-notation for Classes: ● class Employee is Person + salary : Integer[0..1] + department_id : Integer [1] end Example: S->select(Employee{salary = x, department_id=5, … } ● | x <> null and x>2000 ) System X, Project FSF, Internal Meeting 22.11.13 B.Wolff

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