SlideShare uma empresa Scribd logo
1 de 54
Baixar para ler offline
Temporal Engineering
with Delphi
A New Technology Changing the Game
By
Gordon Morrison, Author
Breaking the Time Barrier
Agenda
1. Open Software
2. The Challenge
3. Traditional Approaches
4. The Bread Crumb Problem
5. My Solution
6. Implementation
7. Quantification
8. Why Time is Important
9. Questions
www.vsmerlot.com
2
1. Open Software
• This presentation is based on technology in
my patent
– I have made this patented work freely available
– Anyone can use this technology, go for it!
– The patent is U.S. Patent #6,345,387
• Issued Feb 2002
• Download from the patent office
– This technology is described in my book
• Reads easier and better than my patent
• Title: Breaking the Time Barrier
www.vsmerlot.com
3
www.vsmerlot.com
2. The Challenge
• Using your traditional spatial If-Then-Else
(ITE) approach
– Produce a five-function calculator
– add, subtract, multiply, divide, and percent
• The specification is at: www.vsmerlot.com
• Count the number of ITE and Case/Default
Statements
– Count every logic decision point
– Don’t use my temporal approach
4
The Challenge Test
• Conform to the specification
• Successfully complete the test matrix
• Final Test is:
– Enter ‘-3.14159 - -2.14159=‘
– There are eighteen entries
– How many logic test will your code make?
www.vsmerlot.com
5
3. Traditional Approaches
• Using the traditional state machine
– Expect ninety plus logic tests
• If – then – else
• Switch – case – default
• Case – value
• How well will you do?
www.vsmerlot.com
6
www.vsmerlot.com
Proper State Machine(1)
• In a proper state machine, the state transitions are all
complete and orthogonal.
– Complete Transitions: a transition is defined for every
possible situation.
– Orthogonal Transitions: none of the transitions have
overlapping conditions.
• With a proper state machine
– a next state is defined for every possible condition
– the designated next state is unique
• My comment:
– The proper state machine is spatial using If-Then-Else (ITE)
– The proper state machine doesn’t know where it’s working
(1)- © 2005 Carnegie Mellon University – PSP II Designing and Verifying State Machines- page 41
7
www.vsmerlot.com
Spatial Calculator Statechart
• The author’s
implementation:
– 112 ITE / Case
– 1,000+ LOC
• Arrows are ambiguous
– -> Transitions
– -> Events
– -> States
• Minus is an ambiguous
transition
• Begin to negate1
• subtract
• opEntered to negated2
“Practical Statecharts in C/C++, © CMP Books, Miro Samek, Ph.D.
8
www.vsmerlot.com
Spatial Calculator Call Diagram
• This diagram
has no calls to
trace display
• It’s very
complex
9
www.vsmerlot.com
Spatial With Debugging
• Spatial trace
– Red lines …
• Trace debug
– Each function
– Embedded
– Side effects
10
4. The Bread Crumb Problem
• Edsger Dijkstra once asked, "Why has elegance
found so little following?"
• Imagine a CPU without a program counter (PC)
– The hardware would need to save states continually
• Dropping bread crumbs
– After an interrupt determine where it was executing
• Look for the trail of bread crumbs
– Massive amounts of logic as administrative overhead
• Bread crumb support built in
– This is spatial logic
www.vsmerlot.com
11
PC -> Pointer
• The program counter is a temporal pointer
– Hardware is temporal (mostly)
• Spatial application software does not have
an equivalent PC
• Traditional state machines were created to
treat the symptom of no software PC
– Solution drop bread crumbs
– We call these ‘state machines’
www.vsmerlot.com
12
5. My Solution
• Create an application pointer (temporal)
– One ‘time pointer’ for every Engine/Table
– The time pointer keeps track of application
logic
– The time pointer is always available for
progressive protocol based application
– The time pointer eliminates most bread
crumb logic
www.vsmerlot.com
13
www.vsmerlot.com
Temporal State Machine (TSM)
• Event or non-event driven applications
• States are true or false
– Transitions are next true or next false
• Three fundamental parts
– Engine (time, logic test, trace, and control)
– Logic-Flow / Rule Table (class)
– Data-Flow / Reusable Members
• Logic-flow is orthogonal to data-flow
– No control flow in data manipulation
– No data manipulation in control flow
14
www.vsmerlot.com
TSM Structure
• Engine/Table relationship
– iTime is the pointer into array of rule/step
– Table contains 1 or more rules
– Each rule has a single entry point
• Rules are like basic blocks
• Array of rules consist of steps
– Every step is a binary state
• Each step has a test condition
• Each step has a True Behavior
• Each step has a Next Rule/Step (iTime pointer)
• Each step has a False Behavior
• Each step has a Next Rule/Step (iTime pointer)
• Each step has a Trace (tied to the specification)
15
www.vsmerlot.com
TSM Pattern
Data-Flow
…On…
…Off…
…On…
…Off…
Logic-Flow
Engine
T-Trace
F-Trace
temporal• iTime pointer
• Dynamically
binds
• Tracing
– True Trace
– False Trace
16
Table
www.vsmerlot.com
Temporal vs. Spatial ITE
• Temporal domain
– Time Indexed
• Reduces complexity
– State diagrams
– Call diagrams
– Models
• Reduces code size
• Increases reuse
• Includes trace
• Preemptable
• Spatial domain
– Test bread crumbs
• Increases complexity
– State diagrams
– Call diagrams
– Models
• Increases code size
• Decreases reuse
• Manual trace
• ~Not Preemptable
17
www.vsmerlot.com
Engine / Table Relationship
Engine
• Engine is temporal (iTime)
• Preemption control (while)
– Test condition (if – state)
• Dynamic bind True Behavior
– Next True Rule/Step iTime
– True Trace
• Dynamic bind False Behavior
– Next False Rule/Step iTime
– False Trace
– End if – logic
– End while – control loop
Table
• Each row is a temporal
sequence
– Rule/Step (name)
– Test condition (state)
• True Behavior
– Next True Rule/Step
• False Behavior
– Next False Rule/Step
– Trace (unique to app)
18
www.vsmerlot.com
6. Implementation
procedure TCOSAFrame.Run(intState integer);
begin
bEngineLocal := TRUE;
iState := intState;
while bEngineLocal AND bEngineGlobal do
begin
if iState = rRule[iTime].iState then
begin
rRule[iTime].pTrueRule;
True_Trace(iTime);
iTime := rRule[iTime].iTrueRule;
end else
begin
rRule[iTime].pFalseRule;
False_Trace(iTime);
iTime := rRule[iTime].iFalseRule;
end;
end;
end;
iTime is temporal
Determined by logic
19
Dynamically Bind-True
Dynamically Bind-False
Delphi Structure Setup
// ************** Temporal Rules Definition ******************
pProcedureType = procedure of Object; // Dynamic Bind Definition
TCOSARules = class
public // the logic test can also be defined as a Boolean function
private
iTime : integer;
iState : integer; // logic test // Static State Definition
pTrueRule : pProcedureType; // Dynamic Bind True
iTrueRule : integer;
pFalseRule : pProcedureType; // Dynamic Bind False
iFalseRule : integer;
iTrace : integer;
end;
www.vsmerlot.com
20
Delphi Logic Table Setup
rRule : Array [0..24] of TCOSARules; // logic table allocation
procedure pBRT(iTime : integer; iState : integer;
pTrueRule : pProcedureType; iTrueRule : integer;
pFalseRule : pProcedureType; iFalseRule : integer;
iTrace : integer); // prototype fill logic array
www.vsmerlot.com
21
Implementation Logic
procedure TCOSAcalc.pBRT(iTime : integer; iState : integer;
pTrueRule : pProcedureType; iTrueRule : integer;
pFalseRule : pProcedureType; iFalseRule : integer;
iTrace : integer);
begin
rRule[iTime] := TCOSARules.Create; // create row
rRule[iTime].iTime := iTime; // fill in row
rRule[iTime].iState := iState;
rRule[iTime].pTrueRule := pTrueRule;
rRule[iTime].iTrueRule := iTrueRule;
rRule[iTime].pFalseRule := pFalseRule;
rRule[iTime].iFalseRule := iFalseRule;
rRule[iTime].iTrace := iTrace;
end;
www.vsmerlot.com
22
Dynamic Calls Build Logic
// Next Next
// Rules Static True True False False
// Steps State Behavior Rule Behavior Rule Trace
pBRT(rOpr1, iNeg44, Negate, rOpr1+1,Clr_Buf, rOpr1+1,100);
pBRT(rOpr1+1,iDigit, Any_Number,rOpr1+1,Ignore, rOpr1+2,101);
pBRT(rOpr1+2,iDot59, One_Period,rOpr1+3,Ignore, rOpr1+4,102);
pBRT(rOpr1+3,iDigit, Any_Number,rOpr1+3,Ignore, rOpr1+4,103);
www.vsmerlot.com
23
23-Steps of Calculator Logic
www.vsmerlot.com
24
www.vsmerlot.com
The User Perspective
(tends to be temporal)
• Calculator
– Enter Operand 1 (optional sign)
– Enter Operation ( + - * / )
– Enter Operand 2 (optional sign)
– Select Result Type ( = % ( + - * / ))
• The user perspective is generally temporal
• Let’s look at entering
– ‘-’ ‘3’ ‘.’ ‘1’ ‘4’ ‘1’ ‘5’ ‘9’
– Followed by the Subtract Operation
25
Entered -
temporal
True Behavior
Entered 3
temporal
False BehaviorEntered .
temporal
Entered 1
temporal
Entered 4
temporal
Entered 1
temporal
Entered 5
temporal
Entered 9
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; 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
Trace
temporal
Enter Operation (‘-’)
temporal
Not a
Number
temporal
Not CE or C
temporal
Not
Addition
temporal
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
TraceMatch
Subtraction
temporal
www.vsmerlot.com
Understanding the Time Index
ENTER Rule State True Action Next True False Action Next False
‘-’ rOper1 = <iNeg44>? Negate rOper1+1 Ignore rOper1+1
‘3’ +1 = <iDigit>* Any_Number rOper1+1 Ignore rOper1+2
‘.’ +2 = <iDot59>? One_Period rOper1+3 Ignore rOper1+4
‘14159’ +3 = <iDigit>* Any_Number rOper1+3 Ignore rOper1+4
Time +4
39
• I know where I am
• I know where I came from
• I know where I am going
• At iTime + 4 ‘-’ is “not a number” from iTime+3
Time
www.vsmerlot.com
7. Quantification
T TR DS Behavior Value
1 100 44; Negate; N= -
2 101 1; Any_Number; N= -3
3 101 59; Ignore; N=
4 102 59; One_Period; N= -3.
5 103 1; Any_Number; N= -3.1
6 103 1; Any_Number; N= -3.14
7 103 1; Any_Number; N= -3.141
8 103 1; Any_Number; N= -3.1415
9 103 1; Any_Number; N= -3.14159
10 103 44; Ignore; N=
Compare Temporal Trace
40
To Spatial Trace
www.vsmerlot.com
41
T Behavior e->sig Value
O O O
19, g-negated1, 2, 0
20, negated1
21, g-negated1, 1, -0
22, g-negated1, 1010, -0
O O O
31, int1
32, g-int1, 1, -3
33, g-int1, 1101, -3
34, g-frac1, 0, -3.
O O O
37, g-frac1, 2, -3.
38, frac1
39, g-frac1, 1, -3.
40, g-frac1, 1010, -3.
O O O
45, g-frac1, 1107, -3.14159
46, g-Oper1, 1107, -3.14159
47, g-frac1, 3, -3.14159
48, g-opEntered, 0, -3.14159
49, g-Oper1, 0, -3.14159
50, g-Oper1, 3, -3.14159
51, g-opEntered, 2, -3.14159
52, opEntered
53, g-opEntered, 1, -3.14159
54, g-opEntered, 1107, -3.14159
Temporal-Logic Counts
www.vsmerlot.com
42
• -3.14159 – ten steps to enter nine actions
– 90% efficient
– 10% of cost is overhead
• -3.14159 - - 2.14195 = thirty steps for
eighteen actions
– 60% efficient
– 40% of cost is overhead
Spatial-Logic Counts
• -3.14159 – fifty-four steps for nine actions
– 16.67 % efficient
– 83.34% of cost is overhead
• -3.14159 - - 2.14195 = ninety-six steps for
eighteen actions
– 18.75 % efficient
– 81.25% of cost is overhead
www.vsmerlot.com
43
Spatial Enter “-” Only
Trc= 1, g-calc, sig= 0 ; Operand= ,
Trc= 2, g-calc, sig= 0 ; Operand= ,
Trc= 3, g-calc, sig= 1 ; Operand= ,
Trc= 4, g-clear; Operand= ,
Trc= 5, g-ready, sig= 0 ; Operand= 0,
Trc= 6, g-ready, sig= 2 ; Operand= 0,
Trc= 7, g-ready, sig= 1 ; Operand= 0,
Trc= 8, g-begin, sig= 0 ; Operand= 0,
Trc= 9, g-begin, sig= 2 ; Operand= 0,
Trc= 10, g-begin, sig= 1 ; Operand= 0,
Trc= 11, g-begin, sig= 1107 ; Operand= 0,
Trc= 12, g-negated1, sig= 0 ; Operand= 0,
Trc= 13, g-begin, sig= 0 ; Operand= 0,
Trc= 14, g-calc, sig= 0 ; Operand= 0,
Trc= 15, g-begin, sig= 3 ; Operand= 0,
www.vsmerlot.com
44
Trc= 16, g-ready, sig= 3 ; Operand= 0,
Trc= 17, g-ready, sig= 0 ; Operand= 0,
Trc= 18, g-negated1, sig= 2 ; Operand= 0,
Trc= 19, g-negated1, sig= 1 ; Operand= -0,
Trc= 20, g-negated1, sig= 100 ; Operand= -0,
Trc= 21, g-calc, sig= 100 ; Operand= -0,
Trc= 22, g-negated1, sig= 3 ; Operand= -0,
Trc= 23, g-final, sig= 0 ; Operand= -0,
- End of Analysis
Trc= 24, g-calc, sig= 0 ; Operand= -0,
Trc= 25, g-calc, sig= 3 ; Operand= -0,
Trc= 26, g-final, sig= 2 ; Operand= -0,
Trc= 27, g-final, sig= 1 ; Operand= -0,
- End of Analysis
www.vsmerlot.com
A Temporal State Diagram
• Simple state view
• True Behavior
– One green arrow
• False Behavior
– One red arrow
• Temporal
– Trace
– Specification
• Compliance
45
www.vsmerlot.com
Statechart Comparison
Temporal Spatial
46
www.vsmerlot.com
Call Diagram Complexity
Temporal Spatial
47
Summary
Temporal Actions Logic Steps Efficiency Overhead
‐pi 9 10 90.0% 10.0%
‐pi‐(‐pi‐1) 18 30 60.0% 40.0%
Spatial
‐pi 9 54 16.67% 83.34%
‐pi‐(‐pi‐1) 18 96 18.75% 81.25%
www.vsmerlot.com
48
www.vsmerlot.com
8. Why Time is Important
• Understanding “Time” in software means not having to do
an “if” to test where the program is executing and what
has happened.
– 23 Logic points-Temporal calculator example
– 112 Logic points-Spatial calculator example
– Sampling of spatial logic tests
• 3 tests for IDC_PLUS
• 4 tests IDC_MINUS
• 2 tests IDC_MULT
• 2 tests IDC_DIVIDE
• 9 tests for IDC_0
• 11 tests for IDC_1_9
49
Spatial Software
• Must leave a trail of “bread crumb” states
– This is pure overhead
• Must track down where it was
– This is pure overhead
• Difficult to maintain
– Keeping the overhead straight
• Difficult to modify
– Keeping the overhead straight
www.vsmerlot.com
50
Temporal Software
• Keeps a temporal pointer
• Reduces complexity
• Eliminates much of the overhead
• Easier to maintain
• Easier to modify
– Add new rule
– Change the logic
www.vsmerlot.com
51
Software Quality
• Testing doesn’t improve quality
– Testing fixes quality problems
– Quality is still poor
• Temporal engineering
– Improves quality
– Reduces overhead logic
– Fewer things to go wrong
www.vsmerlot.com
52
Where I’ve Used Temporal
• Disk driver analysis (Symbios Logic)
• Data migration (US West / HP)
• Data filtering
• Lexer/Parser – Data analyzer
• Radar control system
• Robotic arm control
• Embedded applications
• Code generator
www.vsmerlot.com
53
The End – Definitions
• COSA – Coherent Object System Architecture
– U.S. Patent #6,345,387 abandoned by inventor
– Available to the public in book: Breaking the Time Barrier
– NOT associated with www.rebelscience.org
• BNF – Backus-Naur Format
– Diagramming the logic of syntax
– Basis for temporal engineering
• ITE – If-Then-Else logic
– commonly referred to as ‘spaghetti code’
• CMU – Carnegie Mellon University
• SEI – Software Engineering Institute at CMU
• CPU – Central Processing Unit
• UML – Unified Modeling Language
www.vsmerlot.com
54

Mais conteúdo relacionado

Mais procurados

Unit II - 3 - Operating System - Process Synchronization
Unit II - 3 - Operating System - Process SynchronizationUnit II - 3 - Operating System - Process Synchronization
Unit II - 3 - Operating System - Process Synchronizationcscarcas
 
Reference model of real time system
Reference model of real time systemReference model of real time system
Reference model of real time systemKamal Acharya
 
Concurrency: Mutual Exclusion and Synchronization
Concurrency: Mutual Exclusion and SynchronizationConcurrency: Mutual Exclusion and Synchronization
Concurrency: Mutual Exclusion and SynchronizationAnas Ebrahim
 
Realtime systems chapter 1
Realtime systems chapter 1Realtime systems chapter 1
Realtime systems chapter 1Binay Ghimire
 
PID Tuning using Ziegler Nicholas - MATLAB Approach
PID Tuning using Ziegler Nicholas - MATLAB ApproachPID Tuning using Ziegler Nicholas - MATLAB Approach
PID Tuning using Ziegler Nicholas - MATLAB ApproachWaleed El-Badry
 
Ch7 OS
Ch7 OSCh7 OS
Ch7 OSC.U
 
MiL Testing of Highly Configurable Continuous Controllers
MiL Testing of Highly Configurable Continuous ControllersMiL Testing of Highly Configurable Continuous Controllers
MiL Testing of Highly Configurable Continuous ControllersLionel Briand
 
Process synchronization in Operating Systems
Process synchronization in Operating SystemsProcess synchronization in Operating Systems
Process synchronization in Operating SystemsRitu Ranjan Shrivastwa
 
Operating Systems - "Chapter 5 Process Synchronization"
Operating Systems - "Chapter 5 Process Synchronization"Operating Systems - "Chapter 5 Process Synchronization"
Operating Systems - "Chapter 5 Process Synchronization"Ra'Fat Al-Msie'deen
 
Priority driven scheduling of periodic tasks
Priority driven scheduling of periodic tasksPriority driven scheduling of periodic tasks
Priority driven scheduling of periodic tasksKamal Acharya
 

Mais procurados (10)

Unit II - 3 - Operating System - Process Synchronization
Unit II - 3 - Operating System - Process SynchronizationUnit II - 3 - Operating System - Process Synchronization
Unit II - 3 - Operating System - Process Synchronization
 
Reference model of real time system
Reference model of real time systemReference model of real time system
Reference model of real time system
 
Concurrency: Mutual Exclusion and Synchronization
Concurrency: Mutual Exclusion and SynchronizationConcurrency: Mutual Exclusion and Synchronization
Concurrency: Mutual Exclusion and Synchronization
 
Realtime systems chapter 1
Realtime systems chapter 1Realtime systems chapter 1
Realtime systems chapter 1
 
PID Tuning using Ziegler Nicholas - MATLAB Approach
PID Tuning using Ziegler Nicholas - MATLAB ApproachPID Tuning using Ziegler Nicholas - MATLAB Approach
PID Tuning using Ziegler Nicholas - MATLAB Approach
 
Ch7 OS
Ch7 OSCh7 OS
Ch7 OS
 
MiL Testing of Highly Configurable Continuous Controllers
MiL Testing of Highly Configurable Continuous ControllersMiL Testing of Highly Configurable Continuous Controllers
MiL Testing of Highly Configurable Continuous Controllers
 
Process synchronization in Operating Systems
Process synchronization in Operating SystemsProcess synchronization in Operating Systems
Process synchronization in Operating Systems
 
Operating Systems - "Chapter 5 Process Synchronization"
Operating Systems - "Chapter 5 Process Synchronization"Operating Systems - "Chapter 5 Process Synchronization"
Operating Systems - "Chapter 5 Process Synchronization"
 
Priority driven scheduling of periodic tasks
Priority driven scheduling of periodic tasksPriority driven scheduling of periodic tasks
Priority driven scheduling of periodic tasks
 

Destaque

Portfolio di Noemi Carotti
Portfolio di Noemi CarottiPortfolio di Noemi Carotti
Portfolio di Noemi CarottiNoemi Carotti
 
Volantone GameStop+ Luglio 2014
Volantone GameStop+ Luglio 2014Volantone GameStop+ Luglio 2014
Volantone GameStop+ Luglio 2014GameStop Italia
 
Offerte Card Festa della Mamma
Offerte Card Festa della MammaOfferte Card Festa della Mamma
Offerte Card Festa della MammaLimoni Profumerie
 
relazione anterselva
relazione anterselva	relazione anterselva
relazione anterselva DrSAX
 

Destaque (6)

Nuestro Catalogo.
Nuestro Catalogo.Nuestro Catalogo.
Nuestro Catalogo.
 
Portfolio di Noemi Carotti
Portfolio di Noemi CarottiPortfolio di Noemi Carotti
Portfolio di Noemi Carotti
 
00063257
0006325700063257
00063257
 
Volantone GameStop+ Luglio 2014
Volantone GameStop+ Luglio 2014Volantone GameStop+ Luglio 2014
Volantone GameStop+ Luglio 2014
 
Offerte Card Festa della Mamma
Offerte Card Festa della MammaOfferte Card Festa della Mamma
Offerte Card Festa della Mamma
 
relazione anterselva
relazione anterselva	relazione anterselva
relazione anterselva
 

Semelhante a Gordon morrison temporalengineering-delphi-v3

How I failed to build a runbook automation system
How I failed to build a runbook automation systemHow I failed to build a runbook automation system
How I failed to build a runbook automation systemTimothyBonci
 
Ch02 primitive-data-definite-loops
Ch02 primitive-data-definite-loopsCh02 primitive-data-definite-loops
Ch02 primitive-data-definite-loopsJames Brotsos
 
Resource Management in (Embedded) Real-Time Systems
Resource Management in (Embedded) Real-Time SystemsResource Management in (Embedded) Real-Time Systems
Resource Management in (Embedded) Real-Time Systemsjeronimored
 
The Diabolical Developers Guide to Performance Tuning
The Diabolical Developers Guide to Performance TuningThe Diabolical Developers Guide to Performance Tuning
The Diabolical Developers Guide to Performance TuningjClarity
 
Lecture 2 role of algorithms in computing
Lecture 2   role of algorithms in computingLecture 2   role of algorithms in computing
Lecture 2 role of algorithms in computingjayavignesh86
 
Rule Modularity and Execution Control
Rule Modularity and Execution ControlRule Modularity and Execution Control
Rule Modularity and Execution ControlMark Proctor
 
Towards Reactive Planning With Digital Twins and Model-Driven Optimization
Towards Reactive Planning With Digital Twins and Model-Driven OptimizationTowards Reactive Planning With Digital Twins and Model-Driven Optimization
Towards Reactive Planning With Digital Twins and Model-Driven OptimizationDaniel Lehner
 
代码大全(内训)
代码大全(内训)代码大全(内训)
代码大全(内训)Horky Chen
 
Testing Dynamic Behavior in Executable Software Models - Making Cyber-physica...
Testing Dynamic Behavior in Executable Software Models - Making Cyber-physica...Testing Dynamic Behavior in Executable Software Models - Making Cyber-physica...
Testing Dynamic Behavior in Executable Software Models - Making Cyber-physica...Lionel Briand
 
Discrete event simulation
Discrete event simulationDiscrete event simulation
Discrete event simulationssusera970cc
 
The SAM Pattern: State Machines and Computation
The SAM Pattern: State Machines and ComputationThe SAM Pattern: State Machines and Computation
The SAM Pattern: State Machines and ComputationJean-Jacques Dubray
 
How NOT to Write a Microbenchmark
How NOT to Write a MicrobenchmarkHow NOT to Write a Microbenchmark
How NOT to Write a MicrobenchmarkAzul Systems Inc.
 
ch02-primitive-data-definite-loops.ppt
ch02-primitive-data-definite-loops.pptch02-primitive-data-definite-loops.ppt
ch02-primitive-data-definite-loops.pptMahyuddin8
 
ch02-primitive-data-definite-loops.ppt
ch02-primitive-data-definite-loops.pptch02-primitive-data-definite-loops.ppt
ch02-primitive-data-definite-loops.pptghoitsun
 
Monitoring Complex Systems: Keeping Your Head on Straight in a Hard World
Monitoring Complex Systems: Keeping Your Head on Straight in a Hard WorldMonitoring Complex Systems: Keeping Your Head on Straight in a Hard World
Monitoring Complex Systems: Keeping Your Head on Straight in a Hard WorldBrian Troutwine
 

Semelhante a Gordon morrison temporalengineering-delphi-v3 (20)

How I failed to build a runbook automation system
How I failed to build a runbook automation systemHow I failed to build a runbook automation system
How I failed to build a runbook automation system
 
ADS UNIT-1 PPT.ppt
ADS UNIT-1 PPT.pptADS UNIT-1 PPT.ppt
ADS UNIT-1 PPT.ppt
 
DSA 103 Object Oriented Programming :: Week 3
DSA 103 Object Oriented Programming :: Week 3DSA 103 Object Oriented Programming :: Week 3
DSA 103 Object Oriented Programming :: Week 3
 
Ch02 primitive-data-definite-loops
Ch02 primitive-data-definite-loopsCh02 primitive-data-definite-loops
Ch02 primitive-data-definite-loops
 
Resource Management in (Embedded) Real-Time Systems
Resource Management in (Embedded) Real-Time SystemsResource Management in (Embedded) Real-Time Systems
Resource Management in (Embedded) Real-Time Systems
 
The Diabolical Developers Guide to Performance Tuning
The Diabolical Developers Guide to Performance TuningThe Diabolical Developers Guide to Performance Tuning
The Diabolical Developers Guide to Performance Tuning
 
Complex Event Processing
Complex Event ProcessingComplex Event Processing
Complex Event Processing
 
Lecture 2 role of algorithms in computing
Lecture 2   role of algorithms in computingLecture 2   role of algorithms in computing
Lecture 2 role of algorithms in computing
 
Rule Modularity and Execution Control
Rule Modularity and Execution ControlRule Modularity and Execution Control
Rule Modularity and Execution Control
 
Towards Reactive Planning With Digital Twins and Model-Driven Optimization
Towards Reactive Planning With Digital Twins and Model-Driven OptimizationTowards Reactive Planning With Digital Twins and Model-Driven Optimization
Towards Reactive Planning With Digital Twins and Model-Driven Optimization
 
代码大全(内训)
代码大全(内训)代码大全(内训)
代码大全(内训)
 
Compiler Design Unit 4
Compiler Design Unit 4Compiler Design Unit 4
Compiler Design Unit 4
 
Testing Dynamic Behavior in Executable Software Models - Making Cyber-physica...
Testing Dynamic Behavior in Executable Software Models - Making Cyber-physica...Testing Dynamic Behavior in Executable Software Models - Making Cyber-physica...
Testing Dynamic Behavior in Executable Software Models - Making Cyber-physica...
 
Discrete event simulation
Discrete event simulationDiscrete event simulation
Discrete event simulation
 
04 performance
04 performance04 performance
04 performance
 
The SAM Pattern: State Machines and Computation
The SAM Pattern: State Machines and ComputationThe SAM Pattern: State Machines and Computation
The SAM Pattern: State Machines and Computation
 
How NOT to Write a Microbenchmark
How NOT to Write a MicrobenchmarkHow NOT to Write a Microbenchmark
How NOT to Write a Microbenchmark
 
ch02-primitive-data-definite-loops.ppt
ch02-primitive-data-definite-loops.pptch02-primitive-data-definite-loops.ppt
ch02-primitive-data-definite-loops.ppt
 
ch02-primitive-data-definite-loops.ppt
ch02-primitive-data-definite-loops.pptch02-primitive-data-definite-loops.ppt
ch02-primitive-data-definite-loops.ppt
 
Monitoring Complex Systems: Keeping Your Head on Straight in a Hard World
Monitoring Complex Systems: Keeping Your Head on Straight in a Hard WorldMonitoring Complex Systems: Keeping Your Head on Straight in a Hard World
Monitoring Complex Systems: Keeping Your Head on Straight in a Hard World
 

Mais de Gordon Morrison

Processing data using regular expressions
Processing data using regular expressionsProcessing data using regular expressions
Processing data using regular expressionsGordon Morrison
 
Extract Translae Load by-the-numbers
Extract Translae Load by-the-numbersExtract Translae Load by-the-numbers
Extract Translae Load by-the-numbersGordon Morrison
 
Black capped night heron v1
Black capped night heron v1Black capped night heron v1
Black capped night heron v1Gordon Morrison
 
NIST COSA-Foundation Software
NIST COSA-Foundation SoftwareNIST COSA-Foundation Software
NIST COSA-Foundation SoftwareGordon Morrison
 
Meta edit calc execution v3
Meta edit calc execution v3Meta edit calc execution v3
Meta edit calc execution v3Gordon Morrison
 
workflow in temporal state machine v1
workflow in temporal state machine v1workflow in temporal state machine v1
workflow in temporal state machine v1Gordon Morrison
 

Mais de Gordon Morrison (12)

Processing data using regular expressions
Processing data using regular expressionsProcessing data using regular expressions
Processing data using regular expressions
 
Extract Translae Load by-the-numbers
Extract Translae Load by-the-numbersExtract Translae Load by-the-numbers
Extract Translae Load by-the-numbers
 
Nist cosa-foundation v7
Nist cosa-foundation v7Nist cosa-foundation v7
Nist cosa-foundation v7
 
Black capped night heron v1
Black capped night heron v1Black capped night heron v1
Black capped night heron v1
 
NIST COSA-Foundation Software
NIST COSA-Foundation SoftwareNIST COSA-Foundation Software
NIST COSA-Foundation Software
 
Meta edit calc execution v3
Meta edit calc execution v3Meta edit calc execution v3
Meta edit calc execution v3
 
Cosa movie v8 handout
 Cosa movie v8 handout Cosa movie v8 handout
Cosa movie v8 handout
 
It wasn’t the if-
It wasn’t the if-It wasn’t the if-
It wasn’t the if-
 
Cosa top down
Cosa top downCosa top down
Cosa top down
 
workflow in temporal state machine v1
workflow in temporal state machine v1workflow in temporal state machine v1
workflow in temporal state machine v1
 
A true state machine
A true state machineA true state machine
A true state machine
 
New Cosa Movie V8
New Cosa Movie V8New Cosa Movie V8
New Cosa Movie V8
 

Último

TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 

Último (20)

TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 

Gordon morrison temporalengineering-delphi-v3

  • 1. Temporal Engineering with Delphi A New Technology Changing the Game By Gordon Morrison, Author Breaking the Time Barrier
  • 2. Agenda 1. Open Software 2. The Challenge 3. Traditional Approaches 4. The Bread Crumb Problem 5. My Solution 6. Implementation 7. Quantification 8. Why Time is Important 9. Questions www.vsmerlot.com 2
  • 3. 1. Open Software • This presentation is based on technology in my patent – I have made this patented work freely available – Anyone can use this technology, go for it! – The patent is U.S. Patent #6,345,387 • Issued Feb 2002 • Download from the patent office – This technology is described in my book • Reads easier and better than my patent • Title: Breaking the Time Barrier www.vsmerlot.com 3
  • 4. www.vsmerlot.com 2. The Challenge • Using your traditional spatial If-Then-Else (ITE) approach – Produce a five-function calculator – add, subtract, multiply, divide, and percent • The specification is at: www.vsmerlot.com • Count the number of ITE and Case/Default Statements – Count every logic decision point – Don’t use my temporal approach 4
  • 5. The Challenge Test • Conform to the specification • Successfully complete the test matrix • Final Test is: – Enter ‘-3.14159 - -2.14159=‘ – There are eighteen entries – How many logic test will your code make? www.vsmerlot.com 5
  • 6. 3. Traditional Approaches • Using the traditional state machine – Expect ninety plus logic tests • If – then – else • Switch – case – default • Case – value • How well will you do? www.vsmerlot.com 6
  • 7. www.vsmerlot.com Proper State Machine(1) • In a proper state machine, the state transitions are all complete and orthogonal. – Complete Transitions: a transition is defined for every possible situation. – Orthogonal Transitions: none of the transitions have overlapping conditions. • With a proper state machine – a next state is defined for every possible condition – the designated next state is unique • My comment: – The proper state machine is spatial using If-Then-Else (ITE) – The proper state machine doesn’t know where it’s working (1)- © 2005 Carnegie Mellon University – PSP II Designing and Verifying State Machines- page 41 7
  • 8. www.vsmerlot.com Spatial Calculator Statechart • The author’s implementation: – 112 ITE / Case – 1,000+ LOC • Arrows are ambiguous – -> Transitions – -> Events – -> States • Minus is an ambiguous transition • Begin to negate1 • subtract • opEntered to negated2 “Practical Statecharts in C/C++, © CMP Books, Miro Samek, Ph.D. 8
  • 9. www.vsmerlot.com Spatial Calculator Call Diagram • This diagram has no calls to trace display • It’s very complex 9
  • 10. www.vsmerlot.com Spatial With Debugging • Spatial trace – Red lines … • Trace debug – Each function – Embedded – Side effects 10
  • 11. 4. The Bread Crumb Problem • Edsger Dijkstra once asked, "Why has elegance found so little following?" • Imagine a CPU without a program counter (PC) – The hardware would need to save states continually • Dropping bread crumbs – After an interrupt determine where it was executing • Look for the trail of bread crumbs – Massive amounts of logic as administrative overhead • Bread crumb support built in – This is spatial logic www.vsmerlot.com 11
  • 12. PC -> Pointer • The program counter is a temporal pointer – Hardware is temporal (mostly) • Spatial application software does not have an equivalent PC • Traditional state machines were created to treat the symptom of no software PC – Solution drop bread crumbs – We call these ‘state machines’ www.vsmerlot.com 12
  • 13. 5. My Solution • Create an application pointer (temporal) – One ‘time pointer’ for every Engine/Table – The time pointer keeps track of application logic – The time pointer is always available for progressive protocol based application – The time pointer eliminates most bread crumb logic www.vsmerlot.com 13
  • 14. www.vsmerlot.com Temporal State Machine (TSM) • Event or non-event driven applications • States are true or false – Transitions are next true or next false • Three fundamental parts – Engine (time, logic test, trace, and control) – Logic-Flow / Rule Table (class) – Data-Flow / Reusable Members • Logic-flow is orthogonal to data-flow – No control flow in data manipulation – No data manipulation in control flow 14
  • 15. www.vsmerlot.com TSM Structure • Engine/Table relationship – iTime is the pointer into array of rule/step – Table contains 1 or more rules – Each rule has a single entry point • Rules are like basic blocks • Array of rules consist of steps – Every step is a binary state • Each step has a test condition • Each step has a True Behavior • Each step has a Next Rule/Step (iTime pointer) • Each step has a False Behavior • Each step has a Next Rule/Step (iTime pointer) • Each step has a Trace (tied to the specification) 15
  • 16. www.vsmerlot.com TSM Pattern Data-Flow …On… …Off… …On… …Off… Logic-Flow Engine T-Trace F-Trace temporal• iTime pointer • Dynamically binds • Tracing – True Trace – False Trace 16 Table
  • 17. www.vsmerlot.com Temporal vs. Spatial ITE • Temporal domain – Time Indexed • Reduces complexity – State diagrams – Call diagrams – Models • Reduces code size • Increases reuse • Includes trace • Preemptable • Spatial domain – Test bread crumbs • Increases complexity – State diagrams – Call diagrams – Models • Increases code size • Decreases reuse • Manual trace • ~Not Preemptable 17
  • 18. www.vsmerlot.com Engine / Table Relationship Engine • Engine is temporal (iTime) • Preemption control (while) – Test condition (if – state) • Dynamic bind True Behavior – Next True Rule/Step iTime – True Trace • Dynamic bind False Behavior – Next False Rule/Step iTime – False Trace – End if – logic – End while – control loop Table • Each row is a temporal sequence – Rule/Step (name) – Test condition (state) • True Behavior – Next True Rule/Step • False Behavior – Next False Rule/Step – Trace (unique to app) 18
  • 19. www.vsmerlot.com 6. Implementation procedure TCOSAFrame.Run(intState integer); begin bEngineLocal := TRUE; iState := intState; while bEngineLocal AND bEngineGlobal do begin if iState = rRule[iTime].iState then begin rRule[iTime].pTrueRule; True_Trace(iTime); iTime := rRule[iTime].iTrueRule; end else begin rRule[iTime].pFalseRule; False_Trace(iTime); iTime := rRule[iTime].iFalseRule; end; end; end; iTime is temporal Determined by logic 19 Dynamically Bind-True Dynamically Bind-False
  • 20. Delphi Structure Setup // ************** Temporal Rules Definition ****************** pProcedureType = procedure of Object; // Dynamic Bind Definition TCOSARules = class public // the logic test can also be defined as a Boolean function private iTime : integer; iState : integer; // logic test // Static State Definition pTrueRule : pProcedureType; // Dynamic Bind True iTrueRule : integer; pFalseRule : pProcedureType; // Dynamic Bind False iFalseRule : integer; iTrace : integer; end; www.vsmerlot.com 20
  • 21. Delphi Logic Table Setup rRule : Array [0..24] of TCOSARules; // logic table allocation procedure pBRT(iTime : integer; iState : integer; pTrueRule : pProcedureType; iTrueRule : integer; pFalseRule : pProcedureType; iFalseRule : integer; iTrace : integer); // prototype fill logic array www.vsmerlot.com 21
  • 22. Implementation Logic procedure TCOSAcalc.pBRT(iTime : integer; iState : integer; pTrueRule : pProcedureType; iTrueRule : integer; pFalseRule : pProcedureType; iFalseRule : integer; iTrace : integer); begin rRule[iTime] := TCOSARules.Create; // create row rRule[iTime].iTime := iTime; // fill in row rRule[iTime].iState := iState; rRule[iTime].pTrueRule := pTrueRule; rRule[iTime].iTrueRule := iTrueRule; rRule[iTime].pFalseRule := pFalseRule; rRule[iTime].iFalseRule := iFalseRule; rRule[iTime].iTrace := iTrace; end; www.vsmerlot.com 22
  • 23. Dynamic Calls Build Logic // Next Next // Rules Static True True False False // Steps State Behavior Rule Behavior Rule Trace pBRT(rOpr1, iNeg44, Negate, rOpr1+1,Clr_Buf, rOpr1+1,100); pBRT(rOpr1+1,iDigit, Any_Number,rOpr1+1,Ignore, rOpr1+2,101); pBRT(rOpr1+2,iDot59, One_Period,rOpr1+3,Ignore, rOpr1+4,102); pBRT(rOpr1+3,iDigit, Any_Number,rOpr1+3,Ignore, rOpr1+4,103); www.vsmerlot.com 23
  • 24. 23-Steps of Calculator Logic www.vsmerlot.com 24
  • 25. www.vsmerlot.com The User Perspective (tends to be temporal) • Calculator – Enter Operand 1 (optional sign) – Enter Operation ( + - * / ) – Enter Operand 2 (optional sign) – Select Result Type ( = % ( + - * / )) • The user perspective is generally temporal • Let’s look at entering – ‘-’ ‘3’ ‘.’ ‘1’ ‘4’ ‘1’ ‘5’ ‘9’ – Followed by the Subtract Operation 25
  • 33. Entered 9 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; 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 Trace temporal
  • 36. Not CE or C temporal
  • 38. 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 TraceMatch Subtraction temporal
  • 39. www.vsmerlot.com Understanding the Time Index ENTER Rule State True Action Next True False Action Next False ‘-’ rOper1 = <iNeg44>? Negate rOper1+1 Ignore rOper1+1 ‘3’ +1 = <iDigit>* Any_Number rOper1+1 Ignore rOper1+2 ‘.’ +2 = <iDot59>? One_Period rOper1+3 Ignore rOper1+4 ‘14159’ +3 = <iDigit>* Any_Number rOper1+3 Ignore rOper1+4 Time +4 39 • I know where I am • I know where I came from • I know where I am going • At iTime + 4 ‘-’ is “not a number” from iTime+3 Time
  • 40. www.vsmerlot.com 7. Quantification T TR DS Behavior Value 1 100 44; Negate; N= - 2 101 1; Any_Number; N= -3 3 101 59; Ignore; N= 4 102 59; One_Period; N= -3. 5 103 1; Any_Number; N= -3.1 6 103 1; Any_Number; N= -3.14 7 103 1; Any_Number; N= -3.141 8 103 1; Any_Number; N= -3.1415 9 103 1; Any_Number; N= -3.14159 10 103 44; Ignore; N= Compare Temporal Trace 40
  • 41. To Spatial Trace www.vsmerlot.com 41 T Behavior e->sig Value O O O 19, g-negated1, 2, 0 20, negated1 21, g-negated1, 1, -0 22, g-negated1, 1010, -0 O O O 31, int1 32, g-int1, 1, -3 33, g-int1, 1101, -3 34, g-frac1, 0, -3. O O O 37, g-frac1, 2, -3. 38, frac1 39, g-frac1, 1, -3. 40, g-frac1, 1010, -3. O O O 45, g-frac1, 1107, -3.14159 46, g-Oper1, 1107, -3.14159 47, g-frac1, 3, -3.14159 48, g-opEntered, 0, -3.14159 49, g-Oper1, 0, -3.14159 50, g-Oper1, 3, -3.14159 51, g-opEntered, 2, -3.14159 52, opEntered 53, g-opEntered, 1, -3.14159 54, g-opEntered, 1107, -3.14159
  • 42. Temporal-Logic Counts www.vsmerlot.com 42 • -3.14159 – ten steps to enter nine actions – 90% efficient – 10% of cost is overhead • -3.14159 - - 2.14195 = thirty steps for eighteen actions – 60% efficient – 40% of cost is overhead
  • 43. Spatial-Logic Counts • -3.14159 – fifty-four steps for nine actions – 16.67 % efficient – 83.34% of cost is overhead • -3.14159 - - 2.14195 = ninety-six steps for eighteen actions – 18.75 % efficient – 81.25% of cost is overhead www.vsmerlot.com 43
  • 44. Spatial Enter “-” Only Trc= 1, g-calc, sig= 0 ; Operand= , Trc= 2, g-calc, sig= 0 ; Operand= , Trc= 3, g-calc, sig= 1 ; Operand= , Trc= 4, g-clear; Operand= , Trc= 5, g-ready, sig= 0 ; Operand= 0, Trc= 6, g-ready, sig= 2 ; Operand= 0, Trc= 7, g-ready, sig= 1 ; Operand= 0, Trc= 8, g-begin, sig= 0 ; Operand= 0, Trc= 9, g-begin, sig= 2 ; Operand= 0, Trc= 10, g-begin, sig= 1 ; Operand= 0, Trc= 11, g-begin, sig= 1107 ; Operand= 0, Trc= 12, g-negated1, sig= 0 ; Operand= 0, Trc= 13, g-begin, sig= 0 ; Operand= 0, Trc= 14, g-calc, sig= 0 ; Operand= 0, Trc= 15, g-begin, sig= 3 ; Operand= 0, www.vsmerlot.com 44 Trc= 16, g-ready, sig= 3 ; Operand= 0, Trc= 17, g-ready, sig= 0 ; Operand= 0, Trc= 18, g-negated1, sig= 2 ; Operand= 0, Trc= 19, g-negated1, sig= 1 ; Operand= -0, Trc= 20, g-negated1, sig= 100 ; Operand= -0, Trc= 21, g-calc, sig= 100 ; Operand= -0, Trc= 22, g-negated1, sig= 3 ; Operand= -0, Trc= 23, g-final, sig= 0 ; Operand= -0, - End of Analysis Trc= 24, g-calc, sig= 0 ; Operand= -0, Trc= 25, g-calc, sig= 3 ; Operand= -0, Trc= 26, g-final, sig= 2 ; Operand= -0, Trc= 27, g-final, sig= 1 ; Operand= -0, - End of Analysis
  • 45. www.vsmerlot.com A Temporal State Diagram • Simple state view • True Behavior – One green arrow • False Behavior – One red arrow • Temporal – Trace – Specification • Compliance 45
  • 48. Summary Temporal Actions Logic Steps Efficiency Overhead ‐pi 9 10 90.0% 10.0% ‐pi‐(‐pi‐1) 18 30 60.0% 40.0% Spatial ‐pi 9 54 16.67% 83.34% ‐pi‐(‐pi‐1) 18 96 18.75% 81.25% www.vsmerlot.com 48
  • 49. www.vsmerlot.com 8. Why Time is Important • Understanding “Time” in software means not having to do an “if” to test where the program is executing and what has happened. – 23 Logic points-Temporal calculator example – 112 Logic points-Spatial calculator example – Sampling of spatial logic tests • 3 tests for IDC_PLUS • 4 tests IDC_MINUS • 2 tests IDC_MULT • 2 tests IDC_DIVIDE • 9 tests for IDC_0 • 11 tests for IDC_1_9 49
  • 50. Spatial Software • Must leave a trail of “bread crumb” states – This is pure overhead • Must track down where it was – This is pure overhead • Difficult to maintain – Keeping the overhead straight • Difficult to modify – Keeping the overhead straight www.vsmerlot.com 50
  • 51. Temporal Software • Keeps a temporal pointer • Reduces complexity • Eliminates much of the overhead • Easier to maintain • Easier to modify – Add new rule – Change the logic www.vsmerlot.com 51
  • 52. Software Quality • Testing doesn’t improve quality – Testing fixes quality problems – Quality is still poor • Temporal engineering – Improves quality – Reduces overhead logic – Fewer things to go wrong www.vsmerlot.com 52
  • 53. Where I’ve Used Temporal • Disk driver analysis (Symbios Logic) • Data migration (US West / HP) • Data filtering • Lexer/Parser – Data analyzer • Radar control system • Robotic arm control • Embedded applications • Code generator www.vsmerlot.com 53
  • 54. The End – Definitions • COSA – Coherent Object System Architecture – U.S. Patent #6,345,387 abandoned by inventor – Available to the public in book: Breaking the Time Barrier – NOT associated with www.rebelscience.org • BNF – Backus-Naur Format – Diagramming the logic of syntax – Basis for temporal engineering • ITE – If-Then-Else logic – commonly referred to as ‘spaghetti code’ • CMU – Carnegie Mellon University • SEI – Software Engineering Institute at CMU • CPU – Central Processing Unit • UML – Unified Modeling Language www.vsmerlot.com 54