45
Breaking the Time Barrier: Th T lE i i fS ft The Temporal Engineering of Software a book by Gordon E Morrison

A true state machine

Embed Size (px)

DESCRIPTION

A true state machine reduces complexity and provides an inherent trace capability. Temporal engineering provides reduced complexity and trace.

Citation preview

Page 1: A true state machine

Breaking the Time Barrier:Th T l E i i f S ftThe Temporal Engineering of Software

a book byGordon E Morrison

Page 2: A true state machine

Model-Driven Development

• Calculator example• Keep it simpleKeep it simple• Select one or more views

Page 3: A true state machine

Choose a View

ApplicationDiagram Logic

Model

Page 4: A true state machine

COSA Calc Diagram

Page 5: A true state machine

Calculator Engine

Page 6: A true state machine

The Logic

Page 7: A true state machine

Create Steps / Behaviors in Model

Application

Page 8: A true state machine

Everything in Sync

Dynamic Model

Page 9: A true state machine

Application, Model, Logic

Control-Flow Logic

Page 10: A true state machine

Enter Operand (-3.14159)

Page 11: A true state machine

True BehaviorTrue Behavior

Page 12: A true state machine

False Behavior

One Period

Page 13: A true state machine

F ti lFractional Part

Page 14: A true state machine

Until Not a Number

Page 15: A true state machine
Page 16: A true state machine
Page 17: A true state machine

TraceTrace

Count Step Trace Eng Static Dynamic Behavior Value 1 +T= 0; 100 Off; 44; 44; Negate; N= - 2 +T= 1; 101 Off; 1; 1; Any_Number N= -3 3 ĞF= 1; 101 On; 1; 59; Ignore; N= 4 +T= 2; 102 Off; 59; 59; One_Period; N= -3. 5 +T= 3; 103 Off; 1; 1; Any_Number N= -3.1 6 T 3 103 Off 1 1 A N b N 3 14 6 +T= 3; 103 Off; 1; 1; Any_Number N= -3.14

7 +T= 3; 103 Off; 1; 1; Any_Number N= -3.141 8 +T= 3; 103 Off; 1; 1; Any_Number N= -3.1415 9 +T= 3; 103 Off; 1; 1; Any_Number N= -3.14159

Page 18: A true state machine

Enter Operation (‘-’)

Operators

Page 19: A true state machine
Page 20: A true state machine
Page 21: A true state machine
Page 22: A true state machine

TraceSubtract

10 ĞF= 3; 103 On; 1; 44; Ignore; N= 11 ĞF= 4; 104 On; 12; 44; Ignore; N= 12 ĞF= 5; 105 On; 11; 44; Ignore; N= 13 ĞF= 6; 106 On; 1; 44; Push_Disp; N= 14 ĞF= 7; 500 On; 43; 44; Ignore; N=14 ĞF 7; 500 On; 43; 44; Ignore; N 15 +T= 8; 501 On; 44; 1; Subtraction; N= -3.14159

Page 23: A true state machine

Enter Operand (-2.14159)

Page 24: A true state machine

N tNegate

Page 25: A true state machine
Page 26: A true state machine
Page 27: A true state machine

Loop puntil not number

Page 28: A true state machine
Page 29: A true state machine
Page 30: A true state machine
Page 31: A true state machine

Trace

16 +T= 12; 700 Off; 1; 1; Engine_Off; N= -3.14159 17 +T= 13; 701 Off; 44; 44; Negate; N= - 18 +T= 14; 702 Off; 1; 1; Any_Number N= -2 19 ĞF= 14; 702 Off; 1; 59; Ignore; N= 20 +T= 15; 703 Off; 59; 59; One_Period; N= -2. 21 +T= 16; 704 Off; 1; 1; Any_Number N= -2.122 +T= 16; 704 Off; 1; 1; Any_Number N= -2.14 23 +T= 16; 704 Off; 1; 1; Any_Number N= -2.141 24 +T= 16; 704 Off; 1; 1; Any_Number N= -2.1415 25 +T= 16; 704 Off; 1; 1; Any_Number N= -2.14159

Page 32: A true state machine

Enter ‘=‘

‘ ‘ N t‘=‘ Not a Number

Page 33: A true state machine

Not Clear Entry

Page 34: A true state machine

Not Clear

Page 35: A true state machine

Not Percent

Page 36: A true state machine

Equals

Page 37: A true state machine

Ready for Next Problem

Trace

26 ĞF= 16 705 On; 1; 13; Ignore; N= 27 ĞF= 18 706 On; 12; 13; Ignore; N= 28 ĞF= 17 707 On; 1; 13; Save_Disp; N= 29 ĞF= 19 900 On; 11; 13; Ignore; N= 30 +T= 20; 901 Off; 13; 13; Equals; N= -1

Page 38: A true state machine

Trace - Simple or Robust

• Numbers only

OROR

• Dynamic State

• Static State

• Engine State

• Behavior Name

• Etc.

Page 39: A true state machine

Trace Can be Inherited

• True Trace Definition– Subordinate Call to True

Trace

• False Trace Definition– Subordinate Call to False

TraceTrace• Subordinate Call to True

Trace– Subordinate Call to True

Trace

Trace• Subordinate Call to False

Trace– Subordinate Call to False

TraceTrace Trace

Page 40: A true state machine

Trace Can Be:

• Enabled– Dynamic bind =

• Disabled– Dynamic bind =Dynamic bind

call to TraceDynamic bind call to ignore

Page 41: A true state machine

Trace - All that you wantyCount Step Trace Eng Static Dynamic Behavior Value 1 +T= 0; 100 Off; 44; 44; Negate; N= - 2 +T= 1; 101 Off; 1; 1; Any_Number; N= -3 3 ĞF= 1; 101 On; 1; 59; Ignore; N= 4 +T= 2; 102 Off; 59; 59; One_Perio d; N= -3. 5 T 3 103 Off 1 1 A N b N 3 1 5 +T= 3; 103 Off; 1; 1; Any_Number; N= -3.1

6 +T= 3; 103 Off; 1; 1; Any_Number; N= -3.14 7 +T= 3; 103 Off; 1; 1; Any_Number; N= -3.141 8 +T= 3; 103 Off; 1; 1; Any_Number; N= -3.1415 9 +T= 3; 103 Off; 1; 1; Any_Number; N= -3.14159 10 ĞF= 3; 103 On; 1; 44; Ignore; N=

Ğ11 ĞF= 4; 104 On; 12; 44; Ignore; N= 12 ĞF= 5; 105 On; 11; 44; Ignore; N= 13 ĞF= 6; 106 On; 1; 44; Push_Disp ; N= 14 ĞF= 7; 500 On; 43; 44; Ignore; N= 15 +T= 8; 501 On; 44; 1; Subtraction; N= -3.14159 16 +T= 12; 700 Off; 1; 1; Engine Off; N= -3.14159; ; ; ; g _ ;17 +T= 13; 701 Off; 44; 44; Negate; N= - 18 +T= 14; 702 Off; 1; 1; Any_Number; N= -2 19 ĞF= 14; 702 Off; 1; 59; Ignore; N= 20 +T= 15; 703 Off; 59; 59; One_Perio d; N= -2. 21 +T= 16; 704 Off; 1; 1; Any_Number; N= -2.1 22 +T= 16; 704 Off; 1; 1; Any Number; N= -2 1422 +T 16; 704 Off; 1; 1; Any_Number; N 2.1423 +T= 16; 704 Off; 1; 1; Any_Number; N= -2.141 24 +T= 16; 704 Off; 1; 1; Any_Number; N= -2.1415 25 +T= 16; 704 Off; 1; 1; Any_Number; N= -2.14159 26 ĞF= 16; 705 On; 1; 13; Ignore; N= 27 ĞF= 18; 706 On; 12; 13; Ignore; N= 28 ĞF= 17; 707 On; 1; 13; Save Disp; N=28 ĞF= 17; 707 On; 1; 13; Save_Disp; N= 29 ĞF= 19; 900 On; 11; 13; Ignore; N= 30 +T= 20; 901 Off; 13; 13; Equals; N= -1

Page 42: A true state machine

Compare

Page 43: A true state machine

Now with Trace

Page 44: A true state machine

Was improving the quality of your software products a company goal?

Are you using an object-oriented design methodology because it promotes code reuse and reduces code maintenance and complexity?

Are you happy with the results? Or did you end up with spaghetti objects?

My new book provides a clear step-by-step of how to achieve the promise that object technology alone can’t deliverobject technology alone can t deliver.

But it requires change.

Page 45: A true state machine

The End