slide1 n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
知的インタフェース特論 PowerPoint Presentation
Download Presentation
知的インタフェース特論

Loading in 2 Seconds...

play fullscreen
1 / 30

知的インタフェース特論 - PowerPoint PPT Presentation


  • 112 Views
  • Uploaded on

知的インタフェース特論. Main Topics for 1998. Concurrent Computation Models Formal Abstract Models Concurrent Programming Methodology. Keywords. Concurrency, Communication, Formal Semantics Verification, Distributed Computation, CSP. Textbook and Preferred Reading. Textbook.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about '知的インタフェース特論' - rhian


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
slide1
知的インタフェース特論

Main Topics for 1998

  • Concurrent Computation Models
  • Formal Abstract Models
  • Concurrent Programming Methodology

Keywords

Concurrency, Communication, Formal Semantics

Verification, Distributed Computation, CSP

知的インタフェース特論

textbook and preferred reading
Textbook and Preferred Reading
  • Textbook

Communicating Sequential Processes

C.A.R. Hoare

ISBN 0-13-153271-5

Necessary copies will be distributed at each lecture

  • Preferred Reading

Communication and Concurrency, Milner (ISBN 0-13-115007-3)

The Theory and Practice of Concurrency, Roscoe (ISBN 0-13-674409-5)

Other materials will be shown on the web page.

知的インタフェース特論

communication links
Communication Links
  • The Web Pages

Of Lectures:

Http://www.agusa.nuie.nagoyau.ac.jp/person/yuen/csp.html

Of CSP:

Http://www.comlab.ox.ac.uk/oucl/

  • The Mailing List

Lecture-interface@agusa.nuie.nagoya-u.ac.jp

To attend, write a message with subject “APPEND”

to lecture-interface-control@agusa.nuie.nagoya-u.ac.jp

知的インタフェース特論

a concurrent computation model
A Concurrent Computation Model

communication

Program2

Program1

Different from the sequential computation models

(such as the classical automaton) in that:

  • Distributed controls (Synchronous or Asynchronous)
  • Intermediate observation by communication
  • Reactive behavior

知的インタフェース特論

difficulties in concurrency
Difficulties in Concurrency
  • Non-determinism
  • Synchronization
  • Open Semantics

Caused by the distributed controls

Relative constraints by communication mechanism

Cannot be captured as simple functions

知的インタフェース特論

so what s the matter
So, what’s the matter?

Observation

Programs in a network make a concurrent computation

  • Non-determinism Lack of stability
  • Synchronization Environment Dependency
  • Reactivity History Sensitiveness

Hard to find a bug

Hard to prove the correctness

知的インタフェース特論

slide7

P1

P2

delay

P1

P2

Example (Wired Logic Circuit)

BUT

知的インタフェース特論

slide8

Cf:=0; lf:=1;

Send frame cf and ack lf; cf:=cf; (*)

Loop begin

got ack 0 ==> lf:=0; send frame cf and ack lf; cf:=cf

& timeout ==> resend frame cf and ack lf;

got ack 1 ==> lf:=1; send frame cf and ack lf; cf:=cf

& timeout ==> resend frame cf and ack lf;

Loop end

Channel

Channel

Example (Sliding Windows Protocol)

One bit protocol

Station A

Station B

A station can send the next data without at most one acknowledge.

知的インタフェース特論

slide9

A0

0

1

B0

0

0

A1

1

0

B1

1

1

A2

An

n

0

1

a

Example cnt’d (SW Protocol)

Station A

Station B

Events

A sends frame 0, acks frame 1

B receives frame 0

B sends frame 0, acks frame 0

A receives frame 0

A sends frame 1, acks frame 0

B receives frame 1

B sends frame 1, acks frame 1

A receives frame 1

A sends frame 0, acks frame 1

Typical (intended) trace for the protocol

Last frame # received correctly

Current frame #

知的インタフェース特論

slide10

A0

0

1

B0

0

0

A0

0

1

B0

0

0

A1

1

0

Example cnt’d (SW Protocol)

Station A

Station B

Events

A sends frame 0, acks frame 1

B receives frame 0

B sends frame 0, acks frame 0

Frame get lost

A resends frame 0, acks frame 1

B receives frame 0

B sends frame 0, acks frame 0

A receives frame 0

A sends frame 1, acks frame 0

A trace with time-out

知的インタフェース特論

slide11

A0

0

1

B0

B0

B1

1

0

0

1

0

1

A0

0

0

B1

1

0

A1

A1

1

1

1

0

Example cnt’d (SW Protocol)

Station A

Station B

Events

A and B sends frame 0, acks frame 1

A and B receives frame 0 with ack 1

A and B resend frame 0, ack frame 0

A and B receive frame 0 with ack 0

A and B send frame 1, acks frame 0

A and B receive frame 1 with ack 0

A and B send frame 1, acks frame 1

A and B receive frame 1 with ack 1

Duplicated trace

知的インタフェース特論

then how to tackle them
Then, how to tackle them?

Verification of Programs

  • Test
  • Proof of correctness

A Program is believed to be correct if it passes tests.

Practical, but not complete

A Program is correct if it is proved to be correct.

Often not practical, but complete

知的インタフェース特論

in this lecture
In this Lecture…,

We mainly focus on proofs of correctness

since:

  • Concurrent Programs are difficult to be dealt with.
  • Reliability is often critical.
  • Formal Semantics can be the fundamental design principle.

知的インタフェース特論

objectives
Objectives

For concurrent (network) programming:

  • High reliability
  • Maintenance with less effort
  • Appropriate flexibility

知的インタフェース特論

techniques to be used
Techniques to be used

= Abstract Formal Method

  • Too much details
  • A number of assumptions
  • Too complex semantics

Formal Description

(Computer) Program

Too concrete very often

Especially for concurrent (network) programs

知的インタフェース特論

slide16

A simple example from UNIX

#include <stdio.h>

#include <sys/types.h>

#include <unistd.h>

main(int argc,char **argv) {

if (fork()==0) {

printf(“This is a child process : %d\n”,getpid());

printf(“My parent is : %d\n”,getppid()); }

else {

printf(“This is the parent proess : %d\n”,getpid());

printf(“My parent is : %d\n”,getppid()); }

}

知的インタフェース特論

slide17

Another Simple Example in Unix

知的インタフェース特論

slide18

A simple Example in JAVA

知的インタフェース特論

slide19

A simple Example in JAVA (cnt’d)

Altair-yuen>>51 java ProcessEmu

This is a parent thread : Thread-4

My parent thread is main

This is a child thread : Thread-5

My parent thread is Thread-4

知的インタフェース特論

why so difficult
Why so difficult?

Inappropriate Abstractness in Description

  • Operating System
  • Language Syntax

System Call mechanism

Various Data Structures

Specification Objectives

Semantic Coarseness

Control mechanism

知的インタフェース特論

prospects
Prospects
  • Abstract Description
  • Automated Reasoning

Mathematical Notation

Semantic Clarity

Abstractness Handling

Specific Calculus

Axiomatic Characterization

Proof system

知的インタフェース特論

spectrum
Spectrum
  • Global Synchronousness
  • Communication Mechanism
  • Network dynamism

Assume the global tick or not.

Synchronous or Asynchronous.

Dynamic or Static Networks.

知的インタフェース特論

slide23

Computation Model

communication

Program1

Program2

  • Control over programs
  • Communication Model

Yes : Synchronous

No: Asynchronous

Synchronous / Asynchronous

Implementation

知的インタフェース特論

communicating sequential processes
Communicating Sequential Processes

Hoare, C.A.R. (1978, 1985)

  • Asynchronous over program
  • Synchronous communication
  • Sequential control for each program
  • Static Configuration

Http://www.comlab.ox.ac.uk/oucl/people/tony.hoare.html

知的インタフェース特論

what to be discussed for csp
What to be discussed for CSP

Theoretical Aspect

  • Abstract Operational Model
  • Algebraic Characterization
  • Various Semantics

Software-Model Aspect

  • Modeling
  • Tools
  • Verification Techniques

知的インタフェース特論

communicating process model
Communicating Process Model
  • Agents
  • Ports
  • Links

One-to-one communication

知的インタフェース特論

the operational model

, , )

( S,

S

1

The Operational Model

LTS= Labeled Transition system

Nondeterminism

S

1

Nondeterminism

知的インタフェース特論

a typical example
A Typical Example

Is it the case that P=Q?

知的インタフェース特論

slide29

The Answer is…

  • Yes
  • No

Since complete traces are identical

Deadlock distinguishes them

知的インタフェース特論

slide30

A More subtle Example

知的インタフェース特論