roles - Database Technology Group
Transcrição
roles - Database Technology Group
Fakultät für Informatik Institut für Software- und Multimediatechnik Ringvorlesung RoSI Beyond Simple Objects From Object Modeling Via Role Modeling To Satellite Modeling Prof. Dr. Uwe Aßmann Institut für Software- und Multimediatechnik (SMT) Fakultät für Informatik, TU Dresden 13-1.1, Nov 4, 2013 Overview of Talks Role-based Software-Infrastructures (RoSI) • Talk 1) From Objects to Roles and their Beneft for Separation of Concerns – The overall goal of the RoSI Graduate School – The Steimann product-lattice factorization of types – Its advantages: Extensibility Variability Parallelism... • Part II) Amoeba Objects, a New RoSI Object Model – Scalability of roles – Parallelism, Distribution, Synchronization, Persistency by Amoeba Objects • Part III) From Roles to Satellites: Three New RoSI Object Models – – – – Metatypes Satellite-based development with Orbit Objects Amoeba Objects revisited Cyber-Physical Objects Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 2 Fakultät für Informatik Institut für Software- und Multimediatechnik Part I) From Objects to Roles - and their Benefit for Separation of Concerns Dijkstra on Separation of Concerns Role-based Software-Infrastructures (RoSI) E. W. Dijkstra “On the Role of Scientifc Thought”, EWD 447 Selected Writings on Computing: A Personal Perspective, pages 60–66, 1982. "Let me try to explain to you, what to my taste is characteristic for all intelligent thinking. It is, that one is willing to study in depth an aspect of one's subject matter in isolation for the sake of its own consistency, all the time knowing that one is occupying oneself only with one of the aspects. We know that a program must be correct and we can study it from that viewpoint only; we also know that it should be effcient and we can study its effciency on another day, so to speak. In another mood we may ask ourselves whether, and if so: why, the program is desirable. But nothing is gained --on the contrary!-- by tackling these various aspects simultaneously. Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 4 Intelligent thinking and scientific thought Role-based Software-Infrastructures (RoSI) It is what I sometimes have called "the separation of concerns", which, even if not perfectly possible, is yet the only available technique for effective ordering of one's thoughts, that I know of. This is what I mean by "focussing one's attention upon some aspect": it does not mean ignoring the other aspects, it is just doing justice to the fact that from this aspect's point of view, the other is irrelevant. It is being one- and multiple-track minded simultaneously. Scientifc thought comprises "intelligent thinking" as described above. A scientifc discipline emerges with the --usually rather slow!-- discovery of which aspects can be meaningfully "studied in isolation for the sake of their own consistency", in other words: with the discovery of useful and helpful concepts. Scientifc thought comprises in addition the conscious search for the useful and helpful concepts. Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 5 Fakultät für Informatik Institut für Software- und Multimediatechnik 1. Problems of the Standard Object Model The Extensibility Problem Role-based Software-Infrastructures (RoSI) • How to extend software? Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 7 The Substitutability Problem Role-based Software-Infrastructures (RoSI) • How to substitute a component? Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 8 The Variability Problem Role-based Software-Infrastructures (RoSI) • How to vary many components, layers, slices, or a subsystem? Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 9 The Alias Problem in Parallel Programming and Verification Role-based Software-Infrastructures (RoSI) • How to be sure that the object is not aliased by another? – To ensure containment Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 10 The Life-Time Problem in Parallel Programming and Verification Role-based Software-Infrastructures (RoSI) • • How to be sure that the object is dead? – that it dies with another object – that it can be coallocated Partitioning life-times, distinguishing correlated life times from uncorrelated ? Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 11 The Wrapping and Synchronization Problem Role-based Software-Infrastructures (RoSI) • How to wrap software with code, e.g., for protection or synchronization, transactions? Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 12 The Synchronization Problem (Inheritance Anomaly) Role-based Software-Infrastructures (RoSI) 1980s: Parallel object-oriented languages (POOL, COOL) 1991: Inheritance Anomaly 1988: Composition Technology (Aksit) 1994: Generic Synchronization Policies (McHale) 1988-94: Composition Filters (Aksit) 1996: Aspect-oriented Programming (AOP) 1996: D+COOL+RIDL (Lopes), 1999: Aspect/J (Kiczales) 2003: Transaction MDA (Löcher) Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 13 Inheritance Anomaly - Why Concerns are Necessary Role-based Software-Infrastructures (RoSI) • In a parallel program or library, where should synchronization code be inserted? – – – – – Stack? Queue? OrderedCollection? Collection? Object? OrderedCollection add() Stack Queue pop() LockedStack enter() PlainStack PriorityQueue s: semaphor; pop() wait(s); super.pop(); free(s); Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 14 The Synchronization Problem (Inheritance Anomaly) Role-based Software-Infrastructures (RoSI) • At the beginning of the 90s, parallel object-oriented languages failed, due to the inheritance anomaly problem –– Inheritance Inheritanceanomaly: anomaly:In Ininheritance inheritancehierarchies, hierarchies,synchronization synchronizationcode codeis is intermingled intermingled with withthe thealgorithm algorithmand andcannot cannotbe beeasily easilyexchanged exchanged –– Synchronization Synchronizationtangling: tangling:Because Becausesynchronization synchronizationcode code braces bracescode, code, itit is is tangling tangling –– Synchronization Synchronizationcrosscut: crosscut:Because Becausesynchronization synchronizationcode code isisreused reused code, code,itit is iscrosscutting crosscutting Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 15 Algorithm and Synchronization are Two Different Concerns (Core and Aspect) Role-based Software-Infrastructures (RoSI) • Composition fxes crosscut between core and aspect LockProtocol OrderedCollection Crosscut add() Stack pop() Semaphor wait() free() Queue enter() PriorityQueue Prof. Dr. U. Aßmann Monitor enter() HoareMonitor Binary Counting Semaphor Semaphor TU Dresden, Institut für Softwareund Multimediatechnik HansenMonitor 16 Problems of Aspect-Orientation Role-based Software-Infrastructures (RoSI) • Not well integrated into the standard OO model • Semantics unclear • Verifcation of aspects unclear Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 17 Ladder of Paradigms Roles – an Alternative Role-based Software-Infrastructures (RoSI) 1995-today Aspect-Oriented Software Development (AOSD), Software Composition Role-oriented development (ROD, Objects with roles) 1967-1995 Prof. Dr. U. Aßmann Object-oriented development (OOA, OOD, OOP, POOL) TU Dresden, Institut für Software- und Multimediatechnik 18 9 Role Modelling – a Hope Role-based Software-Infrastructures (RoSI) • Separate the functional core of an object of its context-based and fluid features Employee Person plays-a • Employer Company plays-a Restrictions so far: – only used in singular fields of Computer Science – no cross-layer correspondance – no formalization Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 19 0 Example: Business Objects Role-based Software-Infrastructures (RoSI) • Extend behavior dynamically by roles (context-based and fluid Typen) Person Prof. Dr. U. Aßmann plays-a Customer Vendor TU Dresden, Institut für Software- und Multimediatechnik plays-a Company 20 1 Example: Business Objects Role-based Software-Infrastructures (RoSI) • Extend behavior dynamically by roles (context-based and fluid types) • Refinement by role inheritance • Person plays-a Customer Vendor plays-a Company is-a Premium Customer Prof. Dr. U. Aßmann is-a Long - Term Customer TU Dresden, Institut für Software- und Multimediatechnik 21 2 The Objective of the Graduate School Role-based Software-Infrastructures (RoSI) • ...is to demonstrate that context-based features of objects and systems can be modeled with roles, cross-cutting – all phases of the life-cycle • requirements, design, implementation, runtime – all levels of modeling • Concept modellng in metalanguages, • Language modelling, and • Application modelling • and show its practical applicability. Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 22 3 Hypothesis: Roles are a Universal Core Concept of Software Development Role-based Software-Infrastructures (RoSI) Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 23 4 TB1 Roles as Universal Core Concept Role-based Software-Infrastructures (RoSI) TB1.1 TB3.4 TB2.1 TB2.3 TB1.2 TB1.5 TB1.6 TB1.7 TB1.3 TB2.2 TB2.4 TB2.5 Rollenbasierte Modellierung adaptver Softwaresysteme Generik in der fachkonzeptuellen Modellierung TB3.2 TB3.3 TB3.5 Formale Semantk von Modellen mit Metaprädikaten Rollen im ontologiebasierten Informaton Retrieval Rollen und weitere Metaprädikate in Metamodellen und Metasprachen Rollen zur Modellierung analytscher Datenbestände Rollen in exogenen Koordinatonssprachen Rollenbasierte Spezifkaton und rollenbasiertes Modultesten Semantk der Rollenkompositon domänenspezifscher Sprachen Rollen in einer privatspähren-orienterten Softwaretechnik Rollen und andere Metaprädikate in der Unternehmensmodellierung Rollen- und Modellsynchronisaton TB1.4 Rollen zur kontextabhängigen Defniton von Konzepten Prof. Dr. U. Aßmann TB3.1 Persistenz rollenbasierter Objektstrukturen Rollenbasierte Ausführung ubiquitärer interaktver Prozesse Monitoring und Adapton lose gekoppelter Systeme TU Dresden, Institut für Software- und Multimediatechnik Dynamische Annotaton biologischer Prozesse 24 TB2 Cross-Cutting Contextuality Role-based Software-Infrastructures (RoSI) TB1.1 TB3.4 TB2.1 TB2.3 TB1.2 TB1.5 TB1.6 TB1.7 TB1.3 TB2.2 TB2.4 TB2.5 Rollenbasierte Modellierung adaptver Softwaresysteme Generik in der fachkonzeptuellen Modellierung TB3.2 TB3.3 TB3.5 Formale Semantk von Modellen mit Metaprädikaten Rollen im ontologiebasierten Informaton Retrieval Rollen und weitere Metaprädikate in Metamodellen und Metasprachen Rollen zur Modellierung analytscher Datenbestände Rollen in exogenen Koordinatonssprachen Rollenbasierte Spezifkaton und rollenbasiertes Modultesten Semantk der Rollenkompositon domänenspezifscher Sprachen Rollen in einer privatspähren-orienterten Softwaretechnik Rollen und andere Metaprädikate in der Unternehmensmodellierung Rollen- und Modellsynchronisaton TB1.4 Rollen zur kontextabhängigen Defniton von Konzepten TB3.1 Persistenz rollenbasierter Objektstrukturen Rollenbasierte Ausführung ubiquitärer interaktver Prozesse Monitoring und Adapton lose gekoppelter Systeme Dynamische Annotaton biologischer Prozesse 25 Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 25 TB3 Context-Based and Fluid Runtime Infrastructures Role-based Software-Infrastructures (RoSI) TB1.1 TB3.4 TB2.1 TB2.3 TB1.2 TB1.5 TB1.6 TB1.7 TB1.3 TB2.2 TB2.4 TB2.5 Rollenbasierte Modellierung adaptver Softwaresysteme Generik in der fachkonzeptuellen Modellierung TB3.2 TB3.3 TB3.5 Formale Semantk von Modellen mit Metaprädikaten Rollen im ontologiebasierten Informaton Retrieval Rollen und weitere Metaprädikate in Metamodellen und Metasprachen Rollen zur Modellierung analytscher Datenbestände Rollen in exogenen Koordinatonssprachen Rollenbasierte Spezifkaton und rollenbasiertes Modultesten Semantk der Rollenkompositon domänenspezifscher Sprachen Rollen in einer privatspähren-orienterten Softwaretechnik Rollen und andere Metaprädikate in der Unternehmensmodellierung Rollen- und Modellsynchronisaton TB1.4 Rollen zur kontextabhängigen Defniton von Konzepten TB3.1 Persistenz rollenbasierter Objektstrukturen Rollenbasierte Ausführung ubiquitärer interaktver Prozesse Monitoring und Adapton lose gekoppelter Systeme Dynamische Annotaton biologischer Prozesse 26 Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 26 Fakultät für Informatik Institut für Software- und Multimediatechnik 1.1. RoSI Research Results RoSI Design Patterns Role-based Software-Infrastructures (RoSI) • A Design Pattern describes a standard solution of a standard problem in different contexts unter certain forces. – Collects standard ways how to do things in practice – End up in languages as constructs • RoSI collects role-based design patterns – which standard solutions do roles offer for certain standard problems? • Standardized structure has been defned (Gamma Book, etc.) Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 28 RoSI Architectural Styles Role-based Software-Infrastructures (RoSI) • An Architectural Style (Architectural Pattern) describes a reference architecture for applications • RoSI collects role-based architectural styles – which reference architectures are enabled by roles? • Standardized structure Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 29 RoSI Development Styles (Process Styles) Role-based Software-Infrastructures (RoSI) • A Development Style (Process Style or Pattern) describes a structured process for applications, often together with a reference architecture • RoSI collects role-based development styles – which processes are enabled by roles? Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 30 RoSI Object Models RoSI Component Models Role-based Software-Infrastructures (RoSI) • An Object Model describes a structure and behavior for all objects in all phases of the life cycle – Forms type systems – Forms specification languages – Forms the parallelism available Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 31 RoSI Composition Systems Role-based Software-Infrastructures (RoSI) • A Component Model describes a structure and behavior for a reuse unit – contract theory or calculus – conditions for substitutability • A Composition System defines – a composition technique to compose components – a composition language to describe the composition in the large Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 32 RoSI Verification Systems Role-based Software-Infrastructures (RoSI) • A Verification System describes a proof system and technology based on an object model, component model, or composition system Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 33 RoSI Terminology Role-based Software-Infrastructures (RoSI) • A Glossary (domain model) should be developed on which we all agree – Finally, this could be an ontology Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 34 RoSI Results Role-based Software-Infrastructures (RoSI) • Technical Science creates technology and methodology for Engineers to work out solutions for problems. • Catalogues of and Papers about – – – – – – – – RoSI Design Patterns RoSI Architectural Styles RoSI Development Patterns RoSI Object Models RoSI Component Models RoSI Composition Systems RoSI Verifcation Systems RoSI Terminology Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 35 Fakultät für Informatik Institut für Software- und Multimediatechnik 2. Beyond Objects Role Modeling and the Steimann Factorization of Types Splitting a type into a tuple of natural and founded parts Roles in the Literatur Role-based Software-Infrastructures (RoSI) • Databases (Bachmann 77) • ER model (Chen 76); though hidden in association ends • OO Modeling (Reenskaug 95) – Design patterns (Riehle 98) – Course “Design patterns and frameworks” at TUD • Product line engineering (Smaragdakis,Batory 02) • Connectors in architectural languages (Garlan, Shaw 95) • Security: Role-based Access Control (RBAC) – ACL lists in operating systems • Ontologies (Brachman, description logic) • ... [Steimann DKE 2000] has many more and tries to unify them • UML has “collaborations” using role types Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 37 Rigid and Founded Types Role-based Software-Infrastructures (RoSI) IfIfan anobject objectthat thathas hasaarigid rigidtype, type,ititcannot cannotstop stopbeing beingofofthe thetype type without withoutloosing loosingits itsidentity identity[Guarini] [Guarini] • Example: Book is a rigid type, Reader is a non-rigid type Reader can stop reading, but Book stays Book – – • Rigid types are tied to the identity of objects A non-rigid type is a dynamic type that is indicating a state of the object – AAfounded foundedtype type(relative (relativetype) type)isisaatype typethat thatexists existsalways alwaysinin collaboration collaboration(association) (association)with withanother anotherclass. class. Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 38 Role and Natural Types Role-based Software-Infrastructures (RoSI) AArole roletype typeisisaafounded foundedand andnon-rigid non-rigidtype. type. Role types are in collaboration and if the object does no longer play the role type, it does not give up identity. AAnatural naturaltype typeisisnon-founded non-foundedand andrigid. rigid. A natural type is independent of a relationship. The objects cannot leave it. Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 39 Roles are Metatypes Role-based Software-Infrastructures (RoSI) • A metatype describes a type (is a type of a type) – Natural Type – Founded Type – Role Type Hypothesis: Hypothesis: The Thedistinction distinctionof ofmetatypes metatypespromotes promotes Separations Separationsof ofConcerns. Concerns. Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 40 Steimann Factorization [Steimann, DKE 2000] Role-based Software-Infrastructures (RoSI) • Splitting a full type into its natural and role-type components – FullType = Natural x (role-type, role-type, ...) – FullMan = Man x (Reader, Husband, Customer, ..) FullBook FullMan Bought Sausage Buyer FullWoman Husband Woman Wife Man Reader FullNewspaper Read Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik Newspaper 41 Full Type is from Inheritance Product Lattice Role-based Software-Infrastructures (RoSI) • What is a reading buying Husband person? Natural (entity) Thing Role 2 Role 3 Role 1 Ancestor Accessor LivingBeing Mammal Person Contractor Father Mother Husband Wife Dinosaurs Chicken ┴ Prof. Dr. U. Aßmann Customer Acquainted Reader Writer ┴ Institut für Software- und Multimediatechnik ┴ TU Dresden, Negotiator Buyer Seller ┴ 42 The Steimann Factorization Role-based Software-Infrastructures (RoSI) • Simpler, multi-dimensional inheritance hierarchies (product lattice) Divide Divide(partition) (partition)aatype typeinto intoaatuple tupletype typeover overaa product productlattice latticeofofaacore coredimension dimensionand andn-1 n-1role roledimensions(Core, dimensions(Core, Role_1, Role_1,..., ...,Role_n) Role_n) Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 43 Simplified Representation of Object Nets Role-based Software-Infrastructures (RoSI) • Collaborations (Role models) are interprocedural slices • Collaboration schemas (connectors) are schemas (types) for interprocedural slices Bought Sausage Buyer Husband Wife Woman Man Reader Read Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik Newspaper 44 Related PhD Topics and Research Questions Role-based Software-Infrastructures (RoSI) • TB 1.1: Formale Semantik von Modellen mit Metaprädikaten (Baader Aßmann) – How does an appropriate type system for roles look like, based on the Steimann Factorization? – What are the algebraic features of the type system? • TB 1.4: Rollen zur kontextabhängigen Defnition von Konzepten (Baader, Schroeder) – How can context-dependent features of concepts and types be distinguished from natural features (in metamodels, in ontologies)? • TB 1.6: Semantik der Rollenkomposition domänenspezifscher Sprachen (Aßmann, Baier) – How does the type decomposition simplify language composition? – Are the other proposed advantages true? Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 45 Fakultät für Informatik Institut für Software- und Multimediatechnik 2.1. Advantages of Roles I: Abstraction of Behavior • The Role-Play Automaton • The Role-Play Petri Net New Aquisition and Loss of Roles Role-based Software-Infrastructures (RoSI) • Aquisition and Loss of Roles creates an Role-Play Automaton abstracting the behavior of a class of objects Woman Man Wife Husband <divorce> Celib Prof. Dr. U. Aßmann <marry> TU Dresden, Institut für Software- und Multimediatechnik Celib 47 A Fancy Hypothesis: Decidability of Role-Play of Sequential Applications Role-based Software-Infrastructures (RoSI) For Forflat flatroles rolesholds: holds: The role-play automaton of a Turing-complete The role-play automaton of a Turing-completeclass classisisfinite. finite. The Thecomposed composedrole-play role-playautomaton automatonofofaaTuring-complete Turing-completeprogram program with withaafinite finitenumber numberofofobjects objectsisisfinite. finite. • “Role behavior” is very nice abstraction of object behavior: – Model checking of “role behavior” – Object composition with automata composition – Component composition with automata composition • Very important for CPS: – with Role-Play-Automata, we can prove many interesting things about their real-life and real-time behavior Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 48 A Fancy Observation Role-based Software-Infrastructures (RoSI) Humans Humansreason reasonmostly mostlyon onfinite finiteRole-Play Role-PlayAutomata. Automata. • • • • “become a father” “become a driver” “cease to be an employee” “cease to be student” Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 49 Parallel Aquisition and Loss of Roles Role-based Software-Infrastructures (RoSI) • Parallel Aquisition and Loss of Roles in a parallel class creates an Role-Play Petrinet Jewelry Shop bottom Man <buy ring> bottom Seller Customer Woman Hus band with Ring Prof. Dr. U. Aßmann <marry> Celib Wife <divorce> TU Dresden, Institut für Software- und Multimediatechnik Celib 50 A Fancy Hypothesis: Decidability of Role-Play of Parallel Applications Role-based Software-Infrastructures (RoSI) The Therole-play role-playpetrinet petrinetofofaaTuring-complete Turing-completeclass classisisk-bounded. k-bounded. The Thecomposed composedrole-play role-playpetrinet petrinetofofaaTuring-complete Turing-completeprogram program with withfinite finitenuber nuberofofobjects objectsisisdecidable. decidable. • Parallel object composition with petrinet and automata composition • Parallel component composition with petrinet and automata composition • Very important for CPS Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 51 Related PhD Topics and Research Questions Role-based Software-Infrastructures (RoSI) • TB 1.1: Formale Semantik von Modellen mit Metaprädikaten (Baader Aßmann) – How does an appropriate contract formalism for the role-play automaton and Role-Play-Petrinet look like? – What about decidable object composition? • TB 2.1: Rollenbasierte Spezifkation und rollenbasiertes Modultesten (Aßmann, Baier) – How can the Role-Play-Automaton simplify Model-based Testing (MBT)? • TB 2.2: Rollenbasierte Modellierung adaptiver Softwaresysteme (Schill, Lehner) – How can the Role-Play-Automaton simplify adaptive software? • TB 1.4: Rollen zur kontextabhängigen Defnition von Konzepten (Baader, Schroeder) – How can dynamic views on ontologies be defned? How is the infuence on the role-play automaton? • TB 1.6: Semantik der Rollenkomposition domänenspezifscher Sprachen (Aßmann, Baier) – How does a Role-Play Automaton constraint the composition of collaborations? Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 52 Advantages of the Steimann Factorization for System Construction Role-based Software-Infrastructures (RoSI) • Separation of Concerns – Natural features – Context-dependent features – Dynamic features • Representation of concerns and aspects as graph slices • Extensibility – Aspect Orientation (behavioral extensibility) • Variability (delayed role embedding decisions) • Substitutability (of roles and role models) Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 53 Fakultät für Informatik Institut für Software- und Multimediatechnik 2. Advantages of Roles 2: Extensibility 2.1 “Relational” Data Extensibility Simplified Extension with Connectors (Role Model, Collaboration) Role-based Software-Infrastructures (RoSI) • Object-role nets can be extended by new role models (connectors, collaborations) Bought Sausage Buyer Husband Wife Woman Man Reader Read Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik Newspaper 55 A Connector is a Relational Module (Collaboration) Role-based Software-Infrastructures (RoSI) • Nets of roles with open ends, open plays-a tentacles, – to be attached to object cores Husband Wife – UML Notation with role-type parameter P: M W Prof. Dr. U. Aßmann Husband Marriage Wife TU Dresden, Institut für Software- und Multimediatechnik 56 Newspaper-Reading Marriage Role-based Software-Infrastructures (RoSI) Husband Wife Reader Read M W Prof. Dr. U. Aßmann Husband Wife Reading Marriage Read TU Dresden, Institut für Software- und Multimediatechnik N 57 Newspaper-Reading Buying Marriage Role-based Software-Infrastructures (RoSI) Bought Buyer Husband Wife Reader Read Buying M W Prof. Dr. U. Aßmann Bought S Husband ReadingBuying Marriage Wife Reader Read TU Dresden, Institut für Software- und Multimediatechnik N 58 Connector Superimposition in UML Role-based Software-Infrastructures (RoSI) • Connector superimposition extends designs Bought Customership Sausage Buyer Woman Man Husband Prof. Dr. U. Aßmann Wife Marriage TU Dresden, Institut für Software- und Multimediatechnik 59 Connectors can be Refined Role-based Software-Infrastructures (RoSI) Person Buyer seller outgoing Prof. Dr. U. Aßmann net Shop Person Bought Sausage Buyer incoming TU Dresden, Institut für Software- und Multimediatechnik 60 Extension on the Steimann Product Lattice Role-based Software-Infrastructures (RoSI) • A new role relationship extends the product lattice by another dimension. Natural (entity) Thing Role 3 Role 1 Role 2 Ancestor Accessor LivingBeing Mammal Person Contractor Father Mother Husband Wife Dinosaurs Chicken ┴ Prof. Dr. U. Aßmann Customer Acquainted Reader Writer ┴ Institut für Software- und Multimediatechnik ┴ TU Dresden, Negotiator Buyer Seller ┴ 61 Connector Superimposition extends the Steimann Lattices of all involved Classes Role-based Software-Infrastructures (RoSI) Role 3 Natural (entity) Thing Role 3 Role 1 Role 2 Ancestor Accessor LivingBeing Contractor Father Mammal Customer Mother Acquainted Dinosaurs Customer Thing Contractor LivingBeing Negotiator Chicken Husband Wife Reader Writer Mammal Buyer Seller ┴ ┴ Ancestor Accessor Father Mother Husband Wife Acquainted Chicken Reader Writer Seller ┴ ┴ ┴ ┴ Role 3 Connector Natural (entity) Customer Thing Contractor LivingBeing Negotiator Buyer Prof. Dr. U. Aßmann Role 2 Dinosaurs Person ┴ ┴ Role 1 Negotiator Buyer Person Natural (entity) Seller Mammal Role 2 Ancestor Accessor Father Mother Husband Wife Acquainted Dinosaurs Person ┴ TU Dresden, Institut für Software- und Multimediatechnik Role 1 Chicken ┴ ┴ Reader Writer ┴ 62 Extension in the Steimann Lattice Retains Inheritance Role-based Software-Infrastructures (RoSI) • Stable entity inheritance hierarchies, if concepts are added relationally to a model – – Otherwise: extension of superclasses necessary (role classes become superclasses of entity classes) Adding of new concerns is simple (adding a collaboration) Superimposition Superimpositionof ofconnectors connectorsto toobjects objectsin inSteimann-factored Steimann-factored form formretains retainsall allinheritance inheritancestructures structures Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 63 Fakultät für Informatik Institut für Software- und Multimediatechnik 2.2 Advantages of Roles 2b: “Relational” Behavioral Extensibility “Aspects” Extending Workfow Nets (Petri Nets) Role-based Software-Infrastructures (RoSI) • With an appropriate behavioral specifcation language, classes can be extended also easily with regard to behavior • Example: CPN, Workfow Nets, for behavior of classes: – Extension of AND, OR, XOR split and join open operators • Aspect- and Layer-based extension – Clear semantics to aspects [Kiczales, Lopes, Aksit] – Upper, lower operators to refer to upper and lower layers [Hirschfeld] Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 65 Complex Transition Operators in Workfow Nets: Join and Split Open Operators of YAWL Role-based Software-Infrastructures (RoSI) • All incoming places are ready (conjunctive input, AND-join) AND AND • One out of n incoming places are ready (disjunctive input) XOR • Some out of n incoming places are ready (selective input) OR Prof. Dr. U. Aßmann • All outgoing places are filled (conjunctive output, AND-split) • One out of n outgoing places are flled (disjunctive output, XOR split) XOR • Some out of n outgoing places are flled (selective output, OR-split) OR TU Dresden, Institut für Software- und Multimediatechnik 66 Extension of Behavior Role-based Software-Infrastructures (RoSI) • Behavior can be added in slices to open split and join operators Husband Man XOR Wife AND Reader Read OR Prof. Dr. U. Aßmann Woman TU Dresden, Institut für Software- und Multimediatechnik Newspaper 67 Extension of Behavior Role-based Software-Infrastructures (RoSI) • with AND semantics Sausage Bought Buyer Husband Man XOR Wife AND Reader Read OR Prof. Dr. U. Aßmann Woman TU Dresden, Institut für Software- und Multimediatechnik Newspaper 68 Extension of Behavior Role-based Software-Infrastructures (RoSI) • with OR semantics Sausage Bought Buyer Husband Man XOR Wife AND Reader Read OR Scanner Prof. Dr. U. Aßmann Woman Scanning Newspaper Read TU Dresden, Institut für Software- und Multimediatechnik 69 Related PhD Topics and Research Questions Role-based Software-Infrastructures (RoSI) • TB 1.3: Rollen in exogenen Koordinationssprachen (Baier, Aßmann) – How to extend modern ADL like REO with roles and extensions? – Differenciating open join/split operators to REO connectors – How to modularly model-check collaborations? • TB 1.5: Rollen zur Modellierung analytischer Datenbestände (Lehner, Strahringer) – How to make dimensional modeling extensible? How to master dynamicity of dimensions? • TB 1.6: Semantik der Rollenkomposition domänenspezifscher Sprachen (Aßmann, Baier) – Semantics of composition of collaborations, based on an appropriate semantic parallel formalism (workfow nets, Petrinets, LambdaF-calculus) • TB 1.7: Rollen und andere Metaprädikate in der Unternehmensmodellierung (Strahringer, Baier) – What can be improved for Workfow languages? • TB 2.8 Rollenwechsel und Modularisierung (Schill, Schlegel, Aßmann) – How can an appropriate contract theory be defned for roles? How does SoC helpTUhere? Prof. Dr. U. Aßmann Dresden, Institut für Software- und Multimediatechnik 70 Fakultät für Informatik Institut für Software- und Multimediatechnik 2.3 Advantages of Roles 3: Partitioning Types for Separation of Concerns • Identity preserving in lowerings • Disjoint life-times • Independence of data Separation of Concerns with Roles: Identity is Fixed to Core Facet of Product Lattice Role-based Software-Infrastructures (RoSI) • Role type extensions does not change the name of the core type nor of the full type (polymorphism) Thing Ancestor Accessor LivingBeing Mammal Person Contractor Father Mother Husband Wife Dinosaurs Chicken Prof. Dr. U. Aßmann ┴ Customer Acquainted Reader Writer TU Dresden, ┴ Institut für Software- und Multimediatechnik ┴ Negotiator Buyer Seller ┴ 72 Separation of Concerns with Roles: Simplifies Inheritance Hierarchies Role-based Software-Infrastructures (RoSI) • Role Extension Retains Core Identity • Distinguish role types (NON-RIGID) from natural types (RIGID) Man Man Father Man FatherMixin Man Father Prof. Dr. U. Aßmann Man FatherMixin Reader Father ReaderMixin TU Dresden, Institut für Software- und Multimediatechnik Father ReadingFather 73 Separation of Concerns with Roles: Distinguishing Life-Times Role-based Software-Infrastructures (RoSI) • Roles are contextually dependent (founded), and have a different life-time as the core • Memory allocation must be different • Distinguish core-local, role-local, role-alternative, roleshared memory between core and roles – natural memory (core-private memory) – founded memory (context-dependent memory) • Roles-of-roles (deep roles) are stacked upon roles; – Obstack allocation possible (mark-release heaps) Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 74 Separation of Concerns with Roles: Alias Freedom and Data Independence Role-based Software-Infrastructures (RoSI) • Natural and role-local are alias free • Shared memory is still problematic (competitive writes) Roles Rolescan canimprove improvelife-time life-timeand andindependence independenceknowledge knowledge Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 75 Separation of Concerns with Roles: Role-Based Contracts are Context-Based Role-based Software-Infrastructures (RoSI) • Contracts describe conditions for substitutability • Life-time and Alias Independence enable – Encapsulation – Less dependence between parallel processes • The Role-Play Automaton determines which contracts are active – in which context Roles Rolescan canimprove improvecontract contracttheory theoryfor forsequential sequentialand andparallel parallelclasses classes Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 76 RoSI Architectural Style for the 1-Mega-Problem Role-based Software-Infrastructures (RoSI) • How to fnd parallelism for 1-Mega cores? – Execute all role models and all objects in parallel Collaborations Collaborationsare arenatural naturalparallel parallelunits unitswith with“local” “local”memory memory Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 77 RoSI Architectural Style for the 1-MegaProblem: Parallel Behavior of all Units Role-based Software-Infrastructures (RoSI) • Synchronization? Sausage Bought Buyer Husband Man XOR Wife AND Reader Read OR Scanner Prof. Dr. U. Aßmann Woman Scanning Newspaper Read TU Dresden, Institut für Software- und Multimediatechnik 78 Separation of Concerns Helps in Parallelism Role-based Software-Infrastructures (RoSI) • The distinction of another kind of type (metatype) enables us to identify more natural parallelism – because of SoC Roles Rolescan canimprove improveparallel parallelprogramming. programming. Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 79 Related PhD Topics and Research Questions Role-based Software-Infrastructures (RoSI) • TB 1.1: Formale Semantik von Modellen mit Metaprädikaten (Baader Aßmann) – How does an appropriate context-based contract formalism for roles look like? • TB 1.4: Rollen zur kontextabhängigen Defnition von Konzepten (Baader, Schroeder) – How can context-dependent features of concepts and types be modeled (in metamodels, in ontologies)? – How can views on ontologies be defned and mastered? • TB 1.6: Semantik der Rollenkomposition domänenspezifscher Sprachen (Aßmann, Baier) – How to better master alias analysis and life-time analysis in parallel languages? • TB 2.5: Rollen- und Modellsynchronisation (Aßmann, Lehner) – How do role types improve model synchronization and roundtrip engineering? Use Separation of concerns... Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 80 A Common Vision of the cfAED and RoSI Role-based Software-Infrastructures (RoSI) Orchestration Path Resilience Path • Distribution Tuning • Layout Tuning • Imprecision contracts for Resilience • SMAGs ADL and infrastructure RoSI HAEC • Life times of complex objects with OntoClean metatypes • Quality Contracts • Energy Contracts • MQuAT • Quality predicate dispatching Separation of Concerns Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 81 Dijkstra on Separation of Concerns Role-based Software-Infrastructures (RoSI) Roles Rolesintroduce introduceseparations separationsofofconcerns. concerns. E. W. Dijkstra “On the Role of Scientifc Thought”, EWD 447 Selected Writings on Computing: A Personal Perspective, pages 60–66, 1982. "Let me try to explain to you, what to my taste is characteristic for all intelligent thinking. It is, that one is willing to study in depth an aspect of one's subject matter in isolation for the sake of its own consistency, all the time knowing that one is occupying oneself only with one of the aspects. Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 82 The Next Steps of OO: Three RoSI Object Models Role-based Software-Infrastructures (RoSI) Cyber-Physical Objects with contracts on all qualitites and metatypes 2016 2015 2014 2013 ORBIT Objects with satellites of other metatypes Amoeba Objects Memory-tuned distributed Objects Memory-autotuned distributed Objects 2010 2000 1990 Enterprise Objects Role-based Objects 1980 1970 Prof. Dr. U. Aßmann Record-based Objects TU Dresden, Institut für Software- und Multimediatechnik 83 Important References Role-based Software-Infrastructures (RoSI) T. Reenskaug, P. Wold, and O. Lehne. Working with Objects, The OOram Software Engineering Method. Manning Publications, 1996. • Friedrich Steimann. On the representation of roles in object-oriented and conceptual modelling. Data Knowl. Eng, 35(1):83-106, 2000. • Friedrich Steimann. A radical revision of UML’s role concept”. UML 2000, 3rd International Conference, Springer LNCS, 194–209. – and many more, see his home page at U Hagen • Charles W. Bachman and Manilal Daya. The role concept in data models. In VLDB ’1977: Proceedings of the third int.l conf. on Very large data bases, pages 464–476. VLDB Endowment, 1977. • Giancarlo Guizzardi, Heinrich Herre, and Gerd Wagner. On the general ontological foundations of conceptual modeling. 21st Int. Conf. on Conceptual Modeling (ER 2002), LNCS 2503, pages 65-78, 2002. • Guizzardi, G. (2005). Ontological Foundations for Structural Conceptual Models. PhD thesis, University of Twente. • S. Herrmann. Object teams: Improving modularity for crosscutting collaborations. In Proc. Net Object Days 2002, 2002. • S. Herrmann. A precise model for contextual roles: The programming language objectteams/java. Applied Onthology, (to appear), 2007. a programming lanugage with roles • www.objectteams.org: Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 84 • Important References Role-based Software-Infrastructures (RoSI) • • • • • • • • D. Bäumer, D. Riehle, W. Silberski, and M. Wulf. Role object. In Conf. On Pattern Languages of Programming (PLOP), 1997. Dirk Riehle and Thomas Gross. Role model based framework design and integration. ACM SIGPLAN Notices, 33(10):117-133, October 1998. Dirk Riehle. Framework Design - A Role Modelling Approach. PhD thesis, ETH Zürich, 2000. No. 13509. www.riehle.org. Y. Smaragdakis and D. Batory. Mixin layers: an object-oriented implementation technique for refinements and collaboration-based designs. ACM Transactions on Software Engineering and Methodology, 11(2):215–255, 2002. Paul Lorenzen, Oswald Schwemmer. Konstruktive Logi, Ethik und Wissenschaftstheorie. BI Hochschultaschenbücher, Band 700, 1973. Paul Lorenzen. Lehrbuch der konstruktiven Wissenschaftstheorie, Metzler Reprint, 2000. H. Wedekind, E. Ortner, R. Inhetveen. Informatik als Grundbildung. Informatik Spektrum, Springer, April 2004 H. v. Braun, MSP München; W. Hesse, Univ. Marburg; H.B. Kittlaus, SIZ Bonn; G. Scheschonk, C.I.T. Berlin. Ist die Welt objektorientiert? Von der natürlichsprachlichen Weltsicht zum OO-Modell. Uni Marburg. Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 85 Works at SMT so far Role-based Software-Infrastructures (RoSI) AOSD, MDD: • U. Aßmann. Invasive Software Composition. Springer, 2003. • U. Aßmann, S. Zschaler, and G. Wagner. Ontologies, Meta-Models, and the ModelDriven Paradigm, Handbook on Ontologies and Software Engineering. pages 249– 273. Springer, 2006. • J. Henriksson, J. Johannes, S. Zschaler, U. Aßmann. Reuseware – adding modularity to your language of choice. Proc. of TOOLS EUROPE 2007: Spec Iss Journal of Object Technology, 2007. Roles and aspects in ontologies and metamodeling: • U Aßmann, J Johannes, J Henriksson, and Ilie Savga. Composition of rule sets and ontologies. In F. Bry, editor, Reasoning Web, Second Int. Summer School 2006, number 4126 in LNCS, pages 68-92, Sept 2006. Springer. • M. Pradel, J. Henriksson, and U. Aßmann. A good role model for ontologies: Collaborations. Int. Workshop on Semantic-Based Software Development. at OOPSLA’07, Montreal, Oct 22, 2007. • Matthias Bräuer and Henrik Lochmann. Towards Semantic Integration of Multiple Domain-Specifc Languages Using Ontological Foundations. • Christian Piechnick, Sebastian Richly, Sebastian Götz, Claas Wilke, and Uwe Aßmann. Using Role-Based Composition to Support Unanticipated, Dynamic Adaptation - Smart Application Grids. In Proceedings of ADAPTIVE 2012, The Fourth International Conference on Adaptive and Self-adaptive Systems and Applications, Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 86 Works at SMT so far Role-based Software-Infrastructures (RoSI) • J. Reimann, M. Seifert, U. Aßmann. Role-based generic model refactoring. MODELS Okt. 2010 PhD Theses (all available via www.qucosa.de) • Mirko Seifert. Designing Round-Trip Systems by Model Partitioning and Change Propagation. PhD thesis, Dresden University of Technology, June 2011. – Shows how roles simplify round-trip engineering by partitioning data • Sebastian Richly. Autonom rekonfigurierbare Workflows. PhD thesis, Dresden University of Technology, December 2011. – shows how roles can be used to provide an extensible tool platform • Christian Wende. Language Family Engineering. PhD thesis, Dresden University of Technology, March 2012. – shows how roles can be used to do context-based language composition Prof. Dr. U. Aßmann TU Dresden, Institut für Software- und Multimediatechnik 87 Fakultät für Informatik Institut für Software- und Multimediatechnik The End