sleptsov net computing - persons.iis.nsk.su

71
Sleptsov Net Computing Dmitry Zaitsev http://member.acm.org/~daze International Humanitarian University http://mgu.edu.ua

Upload: others

Post on 08-Jul-2022

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Sleptsov Net Computing - persons.iis.nsk.su

Sleptsov Net Computing

Dmitry Zaitsev http://member.acm.org/~daze

International Humanitarian University

http://mgu.edu.ua

Page 2: Sleptsov Net Computing - persons.iis.nsk.su

Write Programs

Draw Programs?

or

Page 3: Sleptsov Net Computing - persons.iis.nsk.su

Flow charts

• Process Charts, Frank and Lillian Gilbreth, 1921

• ASME Standard: Operation and Flow Process Charts, 1947

• Planning and coding of problems for an electronic computing instrument, Part II, Volume 1, 1947, Herman Goldstine and John von Neumann

Page 4: Sleptsov Net Computing - persons.iis.nsk.su

Frank and Lillian Gilbreth example

Page 5: Sleptsov Net Computing - persons.iis.nsk.su

Program schemata

Martiniuk, 1961

Yanov, 1958

Lavrov, 1961

Functional equivalence and optimization, Lyapunov A.A., Ershov, 1950-1970

Page 6: Sleptsov Net Computing - persons.iis.nsk.su

R-technology of programming

Ukraine, V.M. Glushkov, I.V. Velbitsky, 1970-1990

Page 7: Sleptsov Net Computing - persons.iis.nsk.su

Modern Visual Programming

• DRAKON - the Buran space project

• Microsoft Visual Programming Language, MVPL

• Scratch for Android

• Node-RED

• Ardublock

• DGLux5

• AT&T Flow Designer

• ReactiveBlocks

Page 8: Sleptsov Net Computing - persons.iis.nsk.su

DRAKON

Page 9: Sleptsov Net Computing - persons.iis.nsk.su

UML

Page 10: Sleptsov Net Computing - persons.iis.nsk.su

Programming on Petri nets

Page 11: Sleptsov Net Computing - persons.iis.nsk.su

Path to a uniform concept

• Textual programming

• Graphs loaded by textual language

• Pure graphical programming - nothing save graphs

• Inhibitor Sleptsov net – fast universal language of concurrent programming

• Massively parallel computations

• Fine granulation

• Computing memory implementation

Page 12: Sleptsov Net Computing - persons.iis.nsk.su

Transition firing strategy

• Petri

– a single transition at a step

• Salwicki

– the maximal firing strategy

• Sleptsov

– the multiple firing strategy

Page 13: Sleptsov Net Computing - persons.iis.nsk.su

Sleptsov net vs Petri net

2t1

t1 t1

Page 14: Sleptsov Net Computing - persons.iis.nsk.su

Sleptsov Net – Multiple Firing

Petri net Sleptsov net

Reachability graphs

Page 15: Sleptsov Net Computing - persons.iis.nsk.su

Sleptsov Nets Run Fast

COMPARING TIME COMPLEXITIES OF OPERATIONS (LINEAR SCALE - NUMBER OF STEPS)

Page 16: Sleptsov Net Computing - persons.iis.nsk.su

I. Peculiarities of programming in SNs

A. Reversed control flow (c) B. Using inhibitor arcs to control a transition firing

Page 17: Sleptsov Net Computing - persons.iis.nsk.su

Basic operators

Page 18: Sleptsov Net Computing - persons.iis.nsk.su

Basic subnets (subroutines)

Page 19: Sleptsov Net Computing - persons.iis.nsk.su

Fast multiplication in Sleptsov nets

Page 20: Sleptsov Net Computing - persons.iis.nsk.su

Work with variables

f s

Output variables . . .

Input variables . . .

Operator (procedure)

Operator

Input variables

s

Output variables

COPY x

CLEAN f

MOV

E f

f/s

y

s

Page 21: Sleptsov Net Computing - persons.iis.nsk.su

Expansion of dashed/dotted arcs

Page 22: Sleptsov Net Computing - persons.iis.nsk.su

Subnets (routines) calls

Page 23: Sleptsov Net Computing - persons.iis.nsk.su

Sleptsov Net Paradigm of Computing

Input data

(SN marking)

Processor

of

inhibitor

Sleptsov

nets

Output

data

Loaded

SN

Compiler

of loaded

SNs into

plain SN

Plain

inhibitor

SN

Page 24: Sleptsov Net Computing - persons.iis.nsk.su

Universal Sleptsov Net Concept

Given Sleptsov net

Initial marking

Final marking

Transitions firing sequence

Universal

Sleptsov net

Page 25: Sleptsov Net Computing - persons.iis.nsk.su

Explicitly Constructed Universal Petri/Sleptsov Nets

Year Technique Size (nodes)

Time complexity

2010 Direct simulation of inhibitor PN by inhibitor PN 1000 polynomial

2010 Simulation of a given Turing machine by deterministic inhibitor PN (DIPN)

1000 exponential

2011 Simulation of a given Markov normal algorithm by DIPN 1000 exponential

2013 Simulation of small universal Turing machine by DIPN 56 exponential

2013 Simulation of weak small universal Turing machine by DIPN

43 exponential

2015 Simulation of cellular automaton Rule 110 by infinite PN 21 ∙ 𝑛 polynomial

2015 Simulation of Turing machine that simulates Rule 110 by infinite PN

14 ∙ 𝑛 polynomial

2017 Simulation of weak small universal Turing machine by Sleptsov net

39 polynomial

Page 26: Sleptsov Net Computing - persons.iis.nsk.su

II. Direct simulation of an inhibitor PN by an inhibitor PN

Encoding by 10 scalar variables

=

Places of UIPN

State equation

=

Formal description

of IPN dynamics

Inhibitor Petri Net

(IPN) =

2 integers: m,n; 2 matrices: B,D;

1 vector: Q0

Algorithm AUIPN

of IPN dynamics with respect

to the encoding

in C-like pseudo

language

UIPN

=

Algorithm AUIPN

of IPN dynamics

in IPN

Transitions firing sequence Z, its length k, marking Q

Page 27: Sleptsov Net Computing - persons.iis.nsk.su

Formal Representation of Inhibitor Petri Net behavior

State equation

Page 28: Sleptsov Net Computing - persons.iis.nsk.su

Encodings

𝒔 = 𝝋 𝑸 = 𝒓𝒋 ∙ 𝒒𝒋

𝒎−𝟏

𝒋=𝟎

, 𝒓 = 𝐦𝐚𝐱𝒋𝒒𝒋 + 𝟏

𝒔 = 𝝋 𝑨 = 𝒓(𝒎⋅𝒊+𝒋) ⋅ 𝒂𝒊,𝒋

𝒎−𝟏

𝒋=𝟎

,

𝒏−𝟏

𝒊=𝟎

𝒓 = 𝐦𝐚𝐱𝒊,𝒋𝒂𝒊,𝒋 + 𝟏

𝒔𝒗 = 𝒔𝒗−𝟏 ⋅ 𝒓 + 𝒂𝒊,𝒋, 𝒔𝟎 = 𝒂𝒏−𝟏,𝒎−𝟏

𝒂𝒊,𝒋 = 𝒔𝒏∙𝒎−𝟏−𝒗 𝒎𝒐𝒅 𝒓, 𝒔𝒏∙𝒎−𝟏−(𝒗+𝟏) = 𝒔𝒏∙𝒎−𝟏−𝒗 𝒅𝒊𝒗 𝒓, 𝒔𝒏∙𝒎−𝟏 = 𝒔

Encoding of a vector (marking)

Encoding of a matrix (incidence)

Recursive encoding

Page 29: Sleptsov Net Computing - persons.iis.nsk.su

Composition of data and control flow

n

n

rB

rB

sD

sD

rD

rD

m

m

sB

sB

sQ

sQ

rQ

rQ

sZ

sZ

k

k

start

Variables

Control flow finish

Code of a given Petri net

Page 30: Sleptsov Net Computing - persons.iis.nsk.su

UIPN

Page 31: Sleptsov Net Computing - persons.iis.nsk.su

CheckFire

Page 32: Sleptsov Net Computing - persons.iis.nsk.su

PickFire

Page 33: Sleptsov Net Computing - persons.iis.nsk.su

Fire

Page 34: Sleptsov Net Computing - persons.iis.nsk.su

Examples of nets encoding

Net m n sB rB sD rD

ADD 6 4 21180169496 3 282946 2

MAX 8 8 254813592433189871074065241412 3 293862152152879368 2

MUL 10 9 646549072061101455668889034663481743952654 3 19352259085292454555975681 2

Net Marking 𝑸 sQ rQ

ADD ADDQ0 (2,3,1,0,0,0) 2880 4

ADD ADDQ (0,0,0,5,1,0) 186 6

MAX MAXQ0 (2,3,1,0,0,0,0,0) 46080 4

MAX MAXQ (0,0,0,3,1,0,0,0) 832 4

MUL MULQ0 (2,3,1,0,0,0,0,0,0,0) 737280 4

MUL MULQ (0,0,0,6,1,0,0,0,0,0) 722701 7

Petri net graph

Marking

Transitions firing sequence

Net Q0 Q Z sZ k

ADD ADDQ0 ADDQ t1,t3,t2,t2,t3,t3,t4 2411 7

MAX MAXQ0 MAXQ t1,t2,t2,t6,t7,t8 4983 6

MUL MULQ0 MULQ t1,t2,t4,t4,t5,t6,t6,t7,t2,

t4,t4,t5,t6,t6,t7,t2,t4,t4,

t5,t6,t6,t7,t3,t9,t9,t8

109815712212339723705298 26

Page 35: Sleptsov Net Computing - persons.iis.nsk.su

II. UPN(14,29)

Neary and Woods’s

weakly universal

Turing machine

with

2 states and

4 symbols WUTM(2,4)

Universal

(deterministic

inhibitor)

Petri net

with

14 places and

29 transitions UPN(14,29)

Directly

simulates

Page 36: Sleptsov Net Computing - persons.iis.nsk.su

Chains of translations

UPN(14,29) TM CTS CA DIPN BTS

WUTM(2,4) TM CTS CA

Simulates

Page 37: Sleptsov Net Computing - persons.iis.nsk.su

Encoding of states, symbols, and transition function

Page 38: Sleptsov Net Computing - persons.iis.nsk.su

Tape encoding

1

0

021 )()...(l

i

iill rxsxxxs

x R0

R1

Rk-1

L0

L1

Ll-1

)...( 021 LLLsL ll )...( 021 RRRsR ll )(xsX

L L X X R R

Encoding function:

Page 39: Sleptsov Net Computing - persons.iis.nsk.su

Encoding of blank words

Page 40: Sleptsov Net Computing - persons.iis.nsk.su

General arrangement of UPN(14,29)

t1

t2

Page 41: Sleptsov Net Computing - persons.iis.nsk.su

Simulating TM instruction

an instruction with the left move an instruction with the right move

(2,0,4,left,1) (4,1,2,right,1)

Page 42: Sleptsov Net Computing - persons.iis.nsk.su

Subnet FS simulating WUTM(2,4) transition function

Page 43: Sleptsov Net Computing - persons.iis.nsk.su

Subnet MA5LR

Page 44: Sleptsov Net Computing - persons.iis.nsk.su

Subnet MD5LR

Page 45: Sleptsov Net Computing - persons.iis.nsk.su

UPN(14,29) in graphical form

Page 46: Sleptsov Net Computing - persons.iis.nsk.su

Trace of UPN(14,29) running

Page 47: Sleptsov Net Computing - persons.iis.nsk.su

III. Simulating Linear Cellular Automaton 110

i i+1 i+2 i+3 i+4 i+5 i+6 i+7 i-1 i-2 i-3 i-4 i-5 i-6 i-7

(1)

i i+1 i+2 i+3 i+4 i+5 i+6 i+7 i-1 i-2 i-3 i-4 i-5 i-6 i-7

Rules 110:

Page 48: Sleptsov Net Computing - persons.iis.nsk.su

Minimization of CA110 function

Page 49: Sleptsov Net Computing - persons.iis.nsk.su

Synchronous PN with Inhibitor and Read Arcs

Parametric expression (PE):

Page 50: Sleptsov Net Computing - persons.iis.nsk.su

Expanding Traversals of the Cell Array for CA110 Simulation by Asynchronous Nets

0

m=3 n=2

k=0

k=1

k=2

k=3

k=4

Page 51: Sleptsov Net Computing - persons.iis.nsk.su

DSi – Calculate the State Difference

Page 52: Sleptsov Net Computing - persons.iis.nsk.su

CSi – Change the Cell State

Page 53: Sleptsov Net Computing - persons.iis.nsk.su

Parametric Specification of DSi and CSi

DSi

CSi

Page 54: Sleptsov Net Computing - persons.iis.nsk.su

Boomerang and Barriers of UPN(9,12,Inf)

Page 55: Sleptsov Net Computing - persons.iis.nsk.su

Boomerang and Barriers Net Picture

An example for m = 1, n = 2 The fragment represents 8 cells

Page 56: Sleptsov Net Computing - persons.iis.nsk.su

Boomerang and Barriers Net

Page 57: Sleptsov Net Computing - persons.iis.nsk.su

Visual Simulation of Ether

The left word “0001”, central word “01110”, and right word “111110”; m = 4 and n = 0 interchanges with n = 6

The left word “1001” and the right word “1011111000”; m = 4 and n = 10

Page 58: Sleptsov Net Computing - persons.iis.nsk.su

Simulating TMs which Simulate CA110

Neary & Woods’ weakly universal TM with 2 states and 4 symbols WUTM(2,4)

The left blank word:

The right blank word:

Page 59: Sleptsov Net Computing - persons.iis.nsk.su

Model of WUTM(2,4) Cell

Page 60: Sleptsov Net Computing - persons.iis.nsk.su

Model of WUTM(2,4) – UPN(6,8,inf)

Page 61: Sleptsov Net Computing - persons.iis.nsk.su

IV. Universal Sleptsov Net USN(13,26)

Page 62: Sleptsov Net Computing - persons.iis.nsk.su

Transition function subnet TF

Page 63: Sleptsov Net Computing - persons.iis.nsk.su

Head move subnet HM

Page 64: Sleptsov Net Computing - persons.iis.nsk.su

USN(13,26) Final

Assembly

Page 65: Sleptsov Net Computing - persons.iis.nsk.su

V. Examples of SN programs: RSA encoding/decoding

Page 66: Sleptsov Net Computing - persons.iis.nsk.su

Examples of SN programs:

Solving Laplace equation

Page 67: Sleptsov Net Computing - persons.iis.nsk.su

Examples of SN programs: Computing Fuzzy Logic Function

Page 68: Sleptsov Net Computing - persons.iis.nsk.su

Examples of SN programs: Discrete-Time Linear Control in Two Tacts

Page 69: Sleptsov Net Computing - persons.iis.nsk.su

Conclusions

• Petri nets run exponentially slower with regard to Turing machines while Sleptsov nets run fast

• Universal Sleptsov net is a prototype of a processor in the Sleptsov net paradigm of computing; the smallest contain 39 nodes and run in polynomial time

• Sleptsov net computing offers: graphical concurrent language, formal verification of concurrent programs, fine granulation of parallel processes, massively parallel computations

http://member.acm.org/~daze

Page 70: Sleptsov Net Computing - persons.iis.nsk.su

Basic References • Zaitsev D.A. Universal Sleptsov Net, International Journal of Computer

Mathematics, 2017 • Zaitsev D.A. Simulating Cellular Automata by Infinite Petri Nets, Journal

of Cellular Automata, 2017 • Zaitsev D.A., Jürjens J. Programming in the Sleptsov Net Language for

Systems Control, Advances in Mechanical Engineering, 2016, Vol. 8(4), 1–11.

• Zaitsev D.A. Sleptsov Nets Run Fast, IEEE Transactions on Systems, Man, and Cybernetics: Systems, 2016, Vol. 46(5), 682–693.

• Zaitsev D.A. Paradigm of Computations on the Petri Nets, Automation and Remote Control, 2014, Vol. 75(8), 1369–1383.

• Zaitsev D.A. Toward the Minimal Universal Petri Net, IEEE Transactions on Systems, Man, and Cybernetics: Systems, 2014, Vol. 44(1), 47–58.

• Zaitsev D.A. Inhibitor Petri Net Executing an Arbitrary Given Markov Normal Algorithm, Automatic Control and Computer Sciences, 2012, Vol. 46(7), 345–355.

• Zaitsev D.A. Universal Petri net, Cybernetics and Systems Analysis, 2012, Vol. 48(4), 498–511.

Page 71: Sleptsov Net Computing - persons.iis.nsk.su

#SleptsovNets

#СетиСлепцова