Applications of the Matrix Model of Computation

Post on 06-Jan-2016

59 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

Applications of the Matrix Model of Computation. Sergio Pissanetzky. The MMC consists of two sparse matrices: M = (C, Q) C = Matrix of Services Q = Matrix of Sequences The model has two forms: ● imperative form ● canonical form. - PowerPoint PPT Presentation

Transcript

Applications of theMatrix Model of Computation

Sergio Pissanetzky

The MMC consists of two sparse matrices:

M = (C, Q)

C = Matrix of Services

Q = Matrix of Sequences

The model has two forms:

● imperative form

● canonical form. Matrix Q is the imperative part of the model.

The MMC is universal● Software Engineering

Object-oriented analysis and design.Object-oriented refactoring.Software development.

● PhysicsSCA algorithm, ontologies.From thought experiments to theories.

● BusinessBusiness applications of the MMC.

● UMLMMC applications to UML models.Inheritance, polymorphism.

● Artificial IntelligenceNeural networks, parallelism, training, dynamics.

A

B

C

A Business Problem

M

S

Services: Init, AM, BM, CM, AS, BS, CS, MCost, SCost

b a

actor P a b F 1 init

init M A AM init M B BM init M C CM init S A AS init S B BS init S C CS AM MCost BM MCost CM MCost AS SCost BS SCost CS SCost MCost exit SCost exit

Matrix of Sequences

R

Q =

P a b Finit M A AMinit M B BMinit M C CMinit S A ASinit S B BSinit S C CS

Relation R =

Program in C if(a==M && b==A) AM;if(a==M && b==B) BM;if(a==M && b==C) CM;if(a==S && b==A) AS;if(a==S && b==B) BS;if(a==S && b==C) CS;

Relations are code

Relations are object-oriented

P a b Finit M A AMinit M B BMinit M C CMinit S A ASinit S B BSinit S C CS

Relation R =

MMC OO Model

relation inheritance hierarchy

control variable base class

each allowed value derived class

sub-relation virtual method

P a k b Finit M 1 A AMinit M 1 B BMinit M 1 C CMinit S 2 A ASinit S 2 B BSinit S 2 C CS

R =

Relations support inheritance transformations

P a b Finit M 1init S 21 A AM1 B BM1 C CM2 A AS2 B BS2 C CS

R1

R2

Transformation Relational operationmultiple to single normalization, projectionsingle to multiple join

P a h b Finit M 3 A AMinit M 4 B BMinit M 5 C CMinit S 3 A ASinit S 4 B BSinit S 5 C CS

R =

● Consider control variable b.● Add foreign keys for variable b.● Project on (P, b, h) and (h, a, F).

P a b Finit A 3init B 4init C 53 M AM3 S AS4 M BM4 S BS5 M CM5 S CS

R3

R4

Case b/a

P a b Finit M 1init S 21 A AM1 B BM1 C CM2 A AS2 B BS2 C CS

AM MCost BM MCost CM MCost AS SCost BS SCost CS SCost

MCost exitSCost exit

Document

Cost(a)MListSList

AModel

MList{AM}SList{AS}

BModel

MList{BM}SList{BS}

CModel

MList{CM}SList{CS}

MailMCost(Document d)

SpraySCost(Document d)

R1

R2

Relations support UML models

Caller initializes a.Caller constructs A/B/CModel initialize b.Caller calls Cost, passing aCost selects MList /SList a decision.MList, SList call their override b decision,calculate the list of equipment,construct a Mail or Spray object,and call their M/SCost method to calculate cost.

R2

Documentaccept(Visitor v)

AModelaccept(Visitor v){v.visitA(this)}

BModelaccept(Visitor v){v.visitB(this)}

CModelaccept(Visitor v){v.visitC(this)}

MailvisitA(AModel d){AM}visitB(BModel d){BM}visitC(CModel d){CM}

SprayvisitA(AModel d){AS}visitB(BModel d){BS}visitC(CModel d){CS}

VisitorvisitA(AModel d)visitB(BModel d)visitC(CModel d)

Relations support Patterns

R3

R4

P a b Finit A 3init B 4init C 53 M AM3 S AS4 M BM4 S BS5 M CM5 S CS

AM MCost BM MCost CM MCost AS SCost BS SCost CS SCost

MCost exitSCost exit

R3

R4

Action Traditional method MMC

decide what to refactor

manual automatic

perform the refactoring

manual (tools available for some languages)

automatic

procedure 16 Fowler refactorings 1 normalization

implementation requires use of pattern natural

Refactoring in the MMC

Conclusions

● The MMC is Universal

● Interfaces easily with applications

● Supports Object-Orientation

● Unifying factor for systems

top related