intro semantics pdf -...

25
Introduction to formal semantics 1 / 25 Enrico Leonhardt Introduction to formal semantics - Enrico Leonhardt

Upload: lenguyet

Post on 09-Mar-2018

272 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Intro Semantics pdf - st.inf.tu-dresden.dest.inf.tu-dresden.de/files/teaching/ws06/HS/Leonhardt-Slides... · •Semiotics –syntax –semantics –Pragmatics •Formal semantics

Introduction to formal semantics 1 / 25Enrico Leonhardt

Introduction toformal semantics

-Enrico Leonhardt

Page 2: Intro Semantics pdf - st.inf.tu-dresden.dest.inf.tu-dresden.de/files/teaching/ws06/HS/Leonhardt-Slides... · •Semiotics –syntax –semantics –Pragmatics •Formal semantics

Introduction to formal semantics 2 / 25Enrico Leonhardt

structure• Motivation - Philosophy

– paradox– antinomy– division in object und Meta language

• Semiotics– syntax– semantics– Pragmatics

• Formal semantics in Computer Science

| Motivation | Semiotics | Formal semantics in CS |

Page 3: Intro Semantics pdf - st.inf.tu-dresden.dest.inf.tu-dresden.de/files/teaching/ws06/HS/Leonhardt-Slides... · •Semiotics –syntax –semantics –Pragmatics •Formal semantics

Introduction to formal semantics 3 / 25Enrico Leonhardt

Motivation - Philosophy

• Problem of truth– is sentence or statement true?

– (intuitive) TARSKI scheme: “X is true if and only if p”

– definition of the ‘true’ predicate in S

“I”, “we”, “now”… different meaning in different situations

investigate only statements

name of p statement

colloquial language

| Motivation | Semiotics | Formal semantics in CS |

Page 4: Intro Semantics pdf - st.inf.tu-dresden.dest.inf.tu-dresden.de/files/teaching/ws06/HS/Leonhardt-Slides... · •Semiotics –syntax –semantics –Pragmatics •Formal semantics

Introduction to formal semantics 4 / 25Enrico Leonhardt

paradox

• Paradox definition

• Paradox act commandment

No logical problems

A suicide murderer kills all that do not kill themselves.

Give somebody a shed of paper with“please turn around” on both sites.

| Motivation | Semiotics | Formal semantics in CS |

Page 5: Intro Semantics pdf - st.inf.tu-dresden.dest.inf.tu-dresden.de/files/teaching/ws06/HS/Leonhardt-Slides... · •Semiotics –syntax –semantics –Pragmatics •Formal semantics

Introduction to formal semantics 5 / 25Enrico Leonhardt

antinomy

• Logical paradox or antinomy

if there is a prove that such person exists

• Antinomy by TARSKI (“X is true if and only if p” )

A suicide murderer kills all that do not kill themselves.

This statement is not true.

| Motivation | Semiotics | Formal semantics in CS |

Page 6: Intro Semantics pdf - st.inf.tu-dresden.dest.inf.tu-dresden.de/files/teaching/ws06/HS/Leonhardt-Slides... · •Semiotics –syntax –semantics –Pragmatics •Formal semantics

Introduction to formal semantics 6 / 25Enrico Leonhardt

antinomy

• Conditions to create an antinomy

1. Language is semantically closed– statements in the language can contain

its own ‘true’ predicate

2. Basic laws of logic

| Motivation | Semiotics | Formal semantics in CS |

Page 7: Intro Semantics pdf - st.inf.tu-dresden.dest.inf.tu-dresden.de/files/teaching/ws06/HS/Leonhardt-Slides... · •Semiotics –syntax –semantics –Pragmatics •Formal semantics

Introduction to formal semantics 7 / 25Enrico Leonhardt

division in object und meta language

• To solve antinomies divide natural language

Object language: to describe anything (‘true’, ‘false’,…)

Meta language: Object language + ‘true’, ‘false’…

Order one

Order two…

The sun is shining today.The statement above is true.The second statement here is true.

Order one

Order two

Order three

| Motivation | Semiotics | Formal semantics in CS |

Page 8: Intro Semantics pdf - st.inf.tu-dresden.dest.inf.tu-dresden.de/files/teaching/ws06/HS/Leonhardt-Slides... · •Semiotics –syntax –semantics –Pragmatics •Formal semantics

Introduction to formal semantics 8 / 25Enrico Leonhardt

division in object und meta language

• To solve antinomies divide natural language

The statement on slide 8 is not true.The statement of order one on slide 8 is not true.

There is a statement of order one on slide 8 that is false.

| Motivation | Semiotics | Formal semantics in CS |

The statement of order one on slide 8 is not true.

Page 9: Intro Semantics pdf - st.inf.tu-dresden.dest.inf.tu-dresden.de/files/teaching/ws06/HS/Leonhardt-Slides... · •Semiotics –syntax –semantics –Pragmatics •Formal semantics

Introduction to formal semantics 9 / 25Enrico Leonhardt

structure• Motivation - Philosophy

– paradox– antinomy– division in object und meta language

• Semiotics– syntax– semantics– pragmatics

• Formal semantics in Computer Science

“X is true if and only if p”

| Motivation | Semiotics | Formal semantics in CS |

This statement is not true.The color is late.

Page 10: Intro Semantics pdf - st.inf.tu-dresden.dest.inf.tu-dresden.de/files/teaching/ws06/HS/Leonhardt-Slides... · •Semiotics –syntax –semantics –Pragmatics •Formal semantics

Introduction to formal semantics 10 / 25Enrico Leonhardt

Semiotics

• The study of signs and symbols• Study of how meaning is constructed and understood• Can be empirical or ‘pure’

– syntax– semantics– pragmatics

historical languages artificial languages

| Motivation | Semiotics | Formal semantics in CS |

Page 11: Intro Semantics pdf - st.inf.tu-dresden.dest.inf.tu-dresden.de/files/teaching/ws06/HS/Leonhardt-Slides... · •Semiotics –syntax –semantics –Pragmatics •Formal semantics

Introduction to formal semantics 11 / 25Enrico Leonhardt

syntax

• Study of the rules, or “patterned relations”

historical languages

The color is late.

subject verb adjective

| Motivation | Semiotics | Formal semantics in CS |

Page 12: Intro Semantics pdf - st.inf.tu-dresden.dest.inf.tu-dresden.de/files/teaching/ws06/HS/Leonhardt-Slides... · •Semiotics –syntax –semantics –Pragmatics •Formal semantics

Introduction to formal semantics 12 / 25Enrico Leonhardt

semantics

• Study of the aspects of meaning

• the relation that a sign has to other signs sense

• the relation that a sign has to objects andobjective situations, actual or possible reference

historical languages

| Motivation | Semiotics | Formal semantics in CS |

The color is late.

Page 13: Intro Semantics pdf - st.inf.tu-dresden.dest.inf.tu-dresden.de/files/teaching/ws06/HS/Leonhardt-Slides... · •Semiotics –syntax –semantics –Pragmatics •Formal semantics

Introduction to formal semantics 13 / 25Enrico Leonhardt

semantics

• Semantic levels:– each word (lexical semantics)– relationship between words (structural semantics)– combination of sentences– texts of different persons (dialog)

• Connection between semantic levels:

historical languages

MEANING(the color is late)

= f(MEANING(the), MEANING(color), MEANING(is), MEANING(late))

Frege principle

| Motivation | Semiotics | Formal semantics in CS |

Page 14: Intro Semantics pdf - st.inf.tu-dresden.dest.inf.tu-dresden.de/files/teaching/ws06/HS/Leonhardt-Slides... · •Semiotics –syntax –semantics –Pragmatics •Formal semantics

Introduction to formal semantics 14 / 25Enrico Leonhardt

pragmatics

• Considers the environment

• Sentence meaning speaker's meaning

• Interested in sentences

• Empirical factors:– Psychological activity by speaker– Historical identifiable language habit

historical languages

| Motivation | Semiotics | Formal semantics in CS |

Page 15: Intro Semantics pdf - st.inf.tu-dresden.dest.inf.tu-dresden.de/files/teaching/ws06/HS/Leonhardt-Slides... · •Semiotics –syntax –semantics –Pragmatics •Formal semantics

Introduction to formal semantics 15 / 25Enrico Leonhardt

Semiotics

• The study of signs and symbols• Study of how meaning is constructed and understood• Can be empirical or ‘pure’

– syntax– semantics– pragmatics

historical languages artificial languages

| Motivation | Semiotics | Formal semantics in CS |

– syntax– semantics– pragmatics

Page 16: Intro Semantics pdf - st.inf.tu-dresden.dest.inf.tu-dresden.de/files/teaching/ws06/HS/Leonhardt-Slides... · •Semiotics –syntax –semantics –Pragmatics •Formal semantics

Introduction to formal semantics 16 / 25Enrico Leonhardt

syntax

• defines a formal grammar, or simply grammar

• sets of rules for how strings in a language can begenerated

• rules for how a string can be analyzed to determinewhether it is a member of the language

artificial languages

| Motivation | Semiotics | Formal semantics in CS |

Page 17: Intro Semantics pdf - st.inf.tu-dresden.dest.inf.tu-dresden.de/files/teaching/ws06/HS/Leonhardt-Slides... · •Semiotics –syntax –semantics –Pragmatics •Formal semantics

Introduction to formal semantics 17 / 25Enrico Leonhardt

semantics

• defines a mathematical model

– describes the possible computations

– three major classes:• Denotational semantics• Operational semantics• Axiomatic semantics

artificial languages

| Motivation | Semiotics | Formal semantics in CS |

Page 18: Intro Semantics pdf - st.inf.tu-dresden.dest.inf.tu-dresden.de/files/teaching/ws06/HS/Leonhardt-Slides... · •Semiotics –syntax –semantics –Pragmatics •Formal semantics

Introduction to formal semantics 18 / 25Enrico Leonhardt

pragmatics artificial languages

| Motivation | Semiotics | Formal semantics in CS |

• defines the behavior in environments

• Compiler• OS• Machine

Page 19: Intro Semantics pdf - st.inf.tu-dresden.dest.inf.tu-dresden.de/files/teaching/ws06/HS/Leonhardt-Slides... · •Semiotics –syntax –semantics –Pragmatics •Formal semantics

Introduction to formal semantics 19 / 25Enrico Leonhardt

structure• Motivation - Philosophy

– paradox– antinomy– division in object und meta language

• Semiotics– syntax– semantics– pragmatics

• Formal semantics in Computer Science

“X is true if and only if p”

(empirical + ‘pure’)

| Motivation | Semiotics | Formal semantics in CS |

The color is late.

Page 20: Intro Semantics pdf - st.inf.tu-dresden.dest.inf.tu-dresden.de/files/teaching/ws06/HS/Leonhardt-Slides... · •Semiotics –syntax –semantics –Pragmatics •Formal semantics

Introduction to formal semantics 20 / 25Enrico Leonhardt

Formal semantics in CS

• mathematical model of programming language by

Denotational semantics– each phrase in the language is translated into a denotation,

i.e. a phrase in some other language

| Motivation | Semiotics | Formal semantics in CS |

Page 21: Intro Semantics pdf - st.inf.tu-dresden.dest.inf.tu-dresden.de/files/teaching/ws06/HS/Leonhardt-Slides... · •Semiotics –syntax –semantics –Pragmatics •Formal semantics

Introduction to formal semantics 21 / 25Enrico Leonhardt

Formal semantics in CS

• mathematical model of programming language by

Denotational semantics– each phrase in the language is translated into a denotation,

i.e. a phrase in some other language

Operational semantics– execution of the language is described directly

(rather than by translation)

| Motivation | Semiotics | Formal semantics in CS |

Page 22: Intro Semantics pdf - st.inf.tu-dresden.dest.inf.tu-dresden.de/files/teaching/ws06/HS/Leonhardt-Slides... · •Semiotics –syntax –semantics –Pragmatics •Formal semantics

Introduction to formal semantics 22 / 25Enrico Leonhardt

Formal semantics in CS

• mathematical model of programming language by

Denotational semantics– each phrase in the language is translated into a denotation,

i.e. a phrase in some other language

Operational semantics– execution of the language is described directly

(rather than by translation)

Axiomatic semantics– rules of inferences to reason from meaning of input

to meaning of output

| Motivation | Semiotics | Formal semantics in CS |

Page 23: Intro Semantics pdf - st.inf.tu-dresden.dest.inf.tu-dresden.de/files/teaching/ws06/HS/Leonhardt-Slides... · •Semiotics –syntax –semantics –Pragmatics •Formal semantics

Introduction to formal semantics 23 / 25Enrico Leonhardt

Formal semantics in CS

• mathematical model of programming language by

Static semantics– properties that cannot change during execution

Dynamic semantics– properties that may change

| Motivation | Semiotics | Formal semantics in CS |

Var a : integer;…If a THEN…ELSE…

Var a : boolean;…If a THEN…ELSE…

Page 24: Intro Semantics pdf - st.inf.tu-dresden.dest.inf.tu-dresden.de/files/teaching/ws06/HS/Leonhardt-Slides... · •Semiotics –syntax –semantics –Pragmatics •Formal semantics

Introduction to formal semantics 24 / 25Enrico Leonhardt

Conclusion• Motivation - Philosophy

– paradox– antinomy– division in object und Meta language

• Semiotics– syntax

– semantics– Pragmatics

• Formal semantics in Computer Science

| Motivation | Semiotics | Formal semantics in CS |

“X is true if and only if p”

(empirical + ‘pure’)

The color is late.

Page 25: Intro Semantics pdf - st.inf.tu-dresden.dest.inf.tu-dresden.de/files/teaching/ws06/HS/Leonhardt-Slides... · •Semiotics –syntax –semantics –Pragmatics •Formal semantics

Introduction to formal semantics 25 / 25Enrico Leonhardt

Conclusion| Motivation | Semiotics | Formal semantics in CS |

Questions?