+ All Categories
Home > Documents > Using STPA thinking to help convert natural language into

Using STPA thinking to help convert natural language into

Date post: 03-Feb-2022
Category:
Upload: others
View: 3 times
Download: 0 times
Share this document with a friend
19
School of Reliability and Systems Engineering, Beihang University, China 1/19 2nd annual STAMP/STPA Workshop, U.S Using STPA thinking to help convert natural language into finite automaton Sun, Rui; Zhong, Deming Department of Engineering System and Engineering, BeiHang University, China 2013.03.28
Transcript
Page 1: Using STPA thinking to help convert natural language into

School of Reliability and Systems Engineering, Beihang University, China 1/19

2nd annual STAMP/STPA Workshop, U.S

Using STPA thinking to help convert

natural language into finite

automaton Sun, Rui; Zhong, Deming

Department of Engineering System and Engineering, BeiHang University, China

2013.03.28

Page 2: Using STPA thinking to help convert natural language into

School of Reliability and Systems Engineering, Beihang University, China 2/19

2nd annual STAMP/STPA Workshop, U.S

agenda

Background

Method

Example

Page 3: Using STPA thinking to help convert natural language into

School of Reliability and Systems Engineering, Beihang University, China 3/19

2nd annual STAMP/STPA Workshop, U.S

Background

When the lights are red or yellow,

the traffic must stop

Page 4: Using STPA thinking to help convert natural language into

School of Reliability and Systems Engineering, Beihang University, China 4/19

2nd annual STAMP/STPA Workshop, U.S

Background

0

0

5 ( , , , , ),

1. is a finite set called the states,

2. is a finite set called the alpbabet,

3. : is the transition function

4. ,

5.

A finite automaton is a tuple Q q F where

Q

Q Q

q Q is the start state and

F Q

is the set of accept states

Page 5: Using STPA thinking to help convert natural language into

School of Reliability and Systems Engineering, Beihang University, China 5/19

2nd annual STAMP/STPA Workshop, U.S

Background

When the lights are red or yellow,

the traffic must stop

when drivers see the light are red or yellow,

the traffic must stop

the traffic must stop

when the lights are not green

ex

pre

ss

Close eyes

Four color lights

Page 6: Using STPA thinking to help convert natural language into

School of Reliability and Systems Engineering, Beihang University, China 6/19

2nd annual STAMP/STPA Workshop, U.S

Method

Step 1:Structuring the expression of natural language

Step 2:Identifying potentially situation

Step 3:Constructing a automaton

Page 7: Using STPA thinking to help convert natural language into

School of Reliability and Systems Engineering, Beihang University, China 7/19

2nd annual STAMP/STPA Workshop, U.S

Step 1

Page 8: Using STPA thinking to help convert natural language into

School of Reliability and Systems Engineering, Beihang University, China 8/19

2nd annual STAMP/STPA Workshop, U.S

Step 1

When the lights are red or yellow, the traffic must stop before the stop line

sender constraint context action receiver

Sender: seders of signal or information

Receiver: receivers of signal or information.

Constraint: the signal or information send by sender. It is constrain

the behavior of receiver.

Context: the environmental state which have to obey.

Action: The behavior of receiver.

Page 9: Using STPA thinking to help convert natural language into

School of Reliability and Systems Engineering, Beihang University, China 9/19

2nd annual STAMP/STPA Workshop, U.S

Step 2a:determining the states

5-tuple(Q,∑,δ,q0,F)

variable states

Page 10: Using STPA thinking to help convert natural language into

School of Reliability and Systems Engineering, Beihang University, China 10/19

2nd annual STAMP/STPA Workshop, U.S

Step 2b:detemining the alphabet

5-tuple(Q,∑,δ,q0,F)

Function Position P(t)

True: if the traffic stop before the stop

line

False: if the traffic stop after the stop

line

Page 11: Using STPA thinking to help convert natural language into

School of Reliability and Systems Engineering, Beihang University, China 11/19

2nd annual STAMP/STPA Workshop, U.S

Step 2c:detemining transition function

5-tuple(Q,∑,δ,q0,F)

red yellow green

stop T T F

moving - - -

moving stop

stop - -

moving - red or yellow

Page 12: Using STPA thinking to help convert natural language into

School of Reliability and Systems Engineering, Beihang University, China 12/19

2nd annual STAMP/STPA Workshop, U.S

Step 3:determining start and accepts states, draw an automaton

Page 13: Using STPA thinking to help convert natural language into

School of Reliability and Systems Engineering, Beihang University, China 13/19

2nd annual STAMP/STPA Workshop, U.S

Example: describe

1.A toy train has a crossing with a traffic lights.

2.The train is moving at first.

3.When arrive on the crossing, the traffic light is green, the

train keep moving to the end.

4.When a train arrive on the crossing and the traffic light is

yellow, the train must slow down. If a part of the train pass

the crossing before the light turn to red, the train keep

moving, otherwise the train must stop.

5. the train will move again when the traffic light is green.

Page 14: Using STPA thinking to help convert natural language into

School of Reliability and Systems Engineering, Beihang University, China 14/19

2nd annual STAMP/STPA Workshop, U.S

Example: list all the information

Sender: traffic light.

Receiver: train.

Constraint: red,yellow,green.

Context: the train parts weather pass the crossing.

Action: moving, keep moving, stop, slow down.

Page 15: Using STPA thinking to help convert natural language into

School of Reliability and Systems Engineering, Beihang University, China 15/19

2nd annual STAMP/STPA Workshop, U.S

Example: list process mode and context function

function PASS P(t)

True iff some part of the train have passed the crossing

before red light

False iff none part of the train have passed the crossing before

red light

traffic

state

moving

keep moving

stop

slow down

traffic

light

red

yellow

green

Page 16: Using STPA thinking to help convert natural language into

School of Reliability and Systems Engineering, Beihang University, China 16/19

2nd annual STAMP/STPA Workshop, U.S

Example: table

red yellow green

Stop T !P(t) F

Moving F F T

keep

moving F P(t) T

slow

down F T F

Page 17: Using STPA thinking to help convert natural language into

School of Reliability and Systems Engineering, Beihang University, China 17/19

2nd annual STAMP/STPA Workshop, U.S

Example: table

stop moving keep

moving

slow

down

stop - green - -

moving red - green yellow

keep

moving - - - -

slow

down !P(t) - P(t) -

Page 18: Using STPA thinking to help convert natural language into

School of Reliability and Systems Engineering, Beihang University, China 18/19

2nd annual STAMP/STPA Workshop, U.S

example

Page 19: Using STPA thinking to help convert natural language into

School of Reliability and Systems Engineering, Beihang University, China 19/19

2nd annual STAMP/STPA Workshop, U.S

Thanks

[email protected]


Recommended