meaningful modeling: what’s the semantics of “semantics ”?

29
Meaningful Modeling: What’s the Semantics of “Semantics”? David Harel, Weizmann Institute of Science Bernhard Rumpe, Technische Universität Braunschweig Presented by: K M Sabidur Rahman Date: Feb 25, 2014 1

Upload: albany

Post on 22-Feb-2016

82 views

Category:

Documents


0 download

DESCRIPTION

Meaningful Modeling: What’s the Semantics of “Semantics ”?. David Harel , Weizmann Institute of Science Bernhard Rumpe , Technische Universität Braunschweig. Presented by: K M Sabidur Rahman Date: Feb 25, 2014. Outline. Elements of language definition Syntax Semantic domain - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Meaningful Modeling: What’s  the Semantics of “Semantics ”?

Meaningful Modeling:What’s the Semanticsof “Semantics”?

David Harel, Weizmann Institute of ScienceBernhard Rumpe, Technische Universität Braunschweig

Presented by: K M Sabidur RahmanDate: Feb 25, 2014

1

Page 2: Meaningful Modeling: What’s  the Semantics of “Semantics ”?

Outline Elements of language definition

Syntax Semantic domain Semantic mapping

Representation Metamodeling in UML Degree of Formality Doodling Phenomenon Accommodating the intended audience Pertinent questions Summary

2

Page 3: Meaningful Modeling: What’s  the Semantics of “Semantics ”?

Why “Semantics”?• Confusion in definition in formal language• Distinction between Syntax and Semantics• Influence of assumptions in definition• Human factors (People gets confused)

This paper tries to clarify some concepts regarding Syntax and Semantics; their differences and other issues focusing on Unified Modeling Language (UML). 3

Page 4: Meaningful Modeling: What’s  the Semantics of “Semantics ”?

Elements of a Language Definition• Formal: Data is used in communication• Informal: Syntactic representation of Data• Mapping: Interpretation which assigns a meaning to each

piece of Data

4

Page 5: Meaningful Modeling: What’s  the Semantics of “Semantics ”?

Example of Confusion• Two pieces of data with same information

-June 20, 2000-The last day of the first spring in the second millennium

5

Page 6: Meaningful Modeling: What’s  the Semantics of “Semantics ”?

Example of Confusion• Single data with multiple meaning

- John’s Birthday

* Depends on John who?

6

Page 7: Meaningful Modeling: What’s  the Semantics of “Semantics ”?

Elements of a Language Definition

Language consists of:• Syntactic notation – infinite set of legal elements• Meaning of these elements – Semantic Domain• Mapping between Syntax and semantic domain

7

Page 8: Meaningful Modeling: What’s  the Semantics of “Semantics ”?

Syntax

Can be -• words• Sentences • Statements• Boxes• Diagrams• Terms• Models• Clauses• Modules

8

Page 9: Meaningful Modeling: What’s  the Semantics of “Semantics ”?

Syntax• Textual Language – linear character sequences

• Diagrammatic language - lines, arrows, curves and boxes- More intuitive/expressive than textual language- Harder to express formally

9

Page 10: Meaningful Modeling: What’s  the Semantics of “Semantics ”?

Syntax

10

Page 11: Meaningful Modeling: What’s  the Semantics of “Semantics ”?

Syntax• What does really “+” means?• Who said that read() is reading something as in English!

*Language must be clear and rigid about it’s rules and their meaning.

11

Page 12: Meaningful Modeling: What’s  the Semantics of “Semantics ”?

Wrong ways to view semantics• Semantics is the metamodel• Semantics is the semantic domain• Semantics is the context conditions• Semantics is dealing with behavior• Semantics is being executable• Semantics is the behavior of a system• Semantics is the meaning of individual constructs• Semantics means looking mathematical• Semantics is ________

* not all languages specify behavior, andnot all those that do so are (or need to be) executable

12

Page 13: Meaningful Modeling: What’s  the Semantics of “Semantics ”?

Semantic Domain• A language’s semantics must provide the meaning of each

expression, and that meaning must be an element in some well-defined and well-understood domain.

• Often confused with behavior• Serves as an abstraction of reality, capturing decisions about

the kinds of things the language should express• Prerequisite to comparing semantic definitions.• Independent of the notation• Description can be from plain English to rigorous mathematics

13

Page 14: Meaningful Modeling: What’s  the Semantics of “Semantics ”?

Semantic mapping• A sound language definition must relate the syntactic

expressions to the semantic domain elements so that each syntactic creature maps to its meaning.

• Can be explained by examples and plain English• Or more formally• Semantics are compositional; the meaning of a composite

creature being fully based on the meanings of its parts

14

Page 15: Meaningful Modeling: What’s  the Semantics of “Semantics ”?

Arithmetic Expressions

Semantic Domain, S : all natural numbers

Semantic mapping, M :

Obvious interpretation:

Agreed on interpretation:

15

Page 16: Meaningful Modeling: What’s  the Semantics of “Semantics ”?

Dataflow Diagrams

16

Page 17: Meaningful Modeling: What’s  the Semantics of “Semantics ”?

Representation

Layers of representation (textual languages):• A set of characters forms an alphabet.• Groups of characters form words.• A third layer groups these words into sentences or expressions• A fourth and final layer constrains the sentences by imposing

context conditions, for example, that variable use be consistent with variable types.

17

Page 18: Meaningful Modeling: What’s  the Semantics of “Semantics ”?

Representation

Layers of representation (visual languages): • create the first layer with two kinds of basic topological

elements: open and closed line segments• specialize these elements geometrically into several kinds of

lines and closed shapes—arrows, straight lines, splines, boxes and circles, and so on—with various line styles and colors

• arrange the geometric shapes into diagrams by first making topologically meaningful combinations using connectivity, insideness, partitioning and intersection, and the like and then laying these out geometrically in a 2D or 3D diagram

• create the fourth layer by imposing context conditions for the set of legal diagrams. 18

Page 19: Meaningful Modeling: What’s  the Semantics of “Semantics ”?

Representation

19

Page 20: Meaningful Modeling: What’s  the Semantics of “Semantics ”?

Metamodeling in UML• Official UML definitions use the class diagram approach in a

recursive, bootstrapping fashion: metamodeling.• Benefit is the user doesn’t need to learn a new external

notation• But, this only deals with syntax, not semantics.

20

Page 21: Meaningful Modeling: What’s  the Semantics of “Semantics ”?

Metamodeling in UML• The class diagram and Object constraint language used in

metamodeling must be defined with Semantics, first.• Currently, OMG doesn’t offer complete definition of UML’s

true semantics, not even semantic domain.• Only discussion on abstract syntax is not enough for

developers or vendors.

21

Page 22: Meaningful Modeling: What’s  the Semantics of “Semantics ”?

Degree of Formality

Misconceptions• - Textual languages are more formal than Visual languages• - Formality means lots of Greek letters and mathematical

symbols

22

Page 23: Meaningful Modeling: What’s  the Semantics of “Semantics ”?

Degree of formality

It’s possible to make imprecise statements with a precise, rigorouslydefined language, but it’s hard to be precise with an imprecise language

23

Page 24: Meaningful Modeling: What’s  the Semantics of “Semantics ”?

Degree of formality

What really matters?• -Well defined language• -Precise statements• - Model’s Detailedness

24

Page 25: Meaningful Modeling: What’s  the Semantics of “Semantics ”?

The Doodling Phenomenon• A mind-set that says diagrams are what an engineer scribbles

on the back of a napkin, but the real work is done with textual languages.

25

Page 26: Meaningful Modeling: What’s  the Semantics of “Semantics ”?

The Intended Audience• If the target audience is users, formulas won’t be suitable• Language developers and methodologists, would be willing to

cope with the notations for semantics. • Developers would gather insights into what would be the best

form for language concepts.• Methodologists would be motivated to use the notation in the

interest of discovering how to advise language users.• Tool vendors should also be exposed to a rigorous semantics,

but they are probably better off with precise descriptions of “how to deal with” instead of the “what” and the “why.”

26

Page 27: Meaningful Modeling: What’s  the Semantics of “Semantics ”?

Pertinent Questions• Does the given formalization capture the intended users’

intuition?• Are the context conditions sufficient to ensure that language

expressions are consistent and meaningful?• Does the notation permit the specification of important

semantic domain properties?• If analysis techniques or transformations for the language

exist, are they sound with respect to the semantics?

27

Page 28: Meaningful Modeling: What’s  the Semantics of “Semantics ”?

Summary Elements of language definition

Syntax Semantic domain Semantic mapping

Representation Metamodeling in UML Degree of Formality Doodling Phenomenon Accommodating the intended audience Pertinent questions

28

Page 29: Meaningful Modeling: What’s  the Semantics of “Semantics ”?

29