Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Matrix Model of Computation (MMC)

Similar presentations


Presentation on theme: "The Matrix Model of Computation (MMC)"— Presentation transcript:

1 The Matrix Model of Computation (MMC)
I present the Matrix Model of Computation MMC. Sergio Pissanetzky

2 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 The matrix model consists of two sparse matrices: the matrix of services C, and the matrix of sequences Q. In this talk I can only discuss matrix C. The model has two forms: imperative, and canonical. This talk is restricted to the imperative form and to matrix C.

3 * C + A PROGRAM tc tj tf tk tb te tl ta td wz tg wx sx th wy ti sz sy
DATA tc = a * fz tj = b * fx tf = d * vz tk = b * fy tb = a * fy te = d * vy tl = b * fz ta = a * fx td = d * vx wz = vz + tl tg = ta + td wx = vx + tj sx = rx + tg th = tb + te wy = vy + tk ti = tc + tf sz = rz + ti sy = ry + th * C + A a, fz b, fx d, vz b, fy a, fy d, vy b, fz a, fx d, vx vz vx rx vy rz ry Here is an example of matrix C. Matrix C describes a set of relations. Each row is a tuple in one of the relations, called a service. Each column is a variable used in the services. On the left, I have listed a simple program, or perhaps a set of equations. On the top I have listed all the variables. For each row, I have declared the role played by each variable, examples tb, te, th. The conversion can be done by a parser. The matrix contains the same information as the program. If I look at a row, I can see what variables are used by that service, and how they are used. If I look at a column, I can see the entire lifecycle of a variable. The pink extent is the scope of the variable.

4 The MMC is simple, yet very rich in features
Universal Natural ontology Mathematically formal Dynamic mode Turing – equivalent Self – organizing Quantum – equivalent Connectionist Relational database Massively parallel Computer program Data channel Algebra of operations Transformations, refactorings Formal algorithms Training modes The MMC is simple, but very rich in features. Explain the features. In this talk I can address only two or three of the features. In particular, I will argue that there are objects and classes of objects an inheritance hierarchies hidden in matrix C. I will present an algorithm that can reveal this natural ontology: the SCA algorithm.

5 The Scope Constriction Algorithm
(SCA) Matrix C contains the natural ontology of the system. The SCA algorithm finds the natural ontology.

6 Profile of matrix C C A tc tj tf tk tb te tl ta td wz tg wx sx th wy
ti sz sy Profile of matrix C C A Here is one motivation for the SCA. The profile is the union of all scopes. This profile is too big. There is no reason to initialize variables so far ahead of their use.

7 Data channel “Turbulent” flow C A tc tj tf tk tb te tl ta td wz tg wx
sx th wy ti sz sy Data channel C A “Turbulent” flow Here is another motivation for SCA. A different view of the matrix shows a channel where data flows. Data is contained in variables. I flows from the C where the variable is initialized, down the scope, it is intercepted by the A of a service, and conveyed horizontally to another C. At that point, the data is used to initialize another variable, and then discarded. This channel is very wide and disorganized. Data flows are too long and entangled. I call it turbulent flow. The motivation is that I want to make the channel narrower and better organized.

8 Service Commutation C A tc tj tf tk tb te tl ta td wz tg wx sx th wy
sz sy Service Commutation C A Here is how SCA works: service commutation. Two services commute if the order of initialization/use is not reversed. The green services are commutative, the pink services are not. Repeated commutation can be used to reduce the profile. The blue service can be shifted two steps up, first by commuting it with the orange service, then with the yellow service. Profile is reduced in all three columns: tl, ta, td. Some commutations reduce the profile, others can increase it, still others leave the profile unchanged. The algorithm systematically selects commutations that reduce the profile, and stops when no more such commutations are possible. The result is the minimum profile. But as the profile gets smaller, other things happen: the services coalesce together into highly cohesive but weakly coupled clusters, forming objects. Service commutation is a refactoring operation.

9 G “Laminar” flow H G H G H C A PROGRAM td ta tg sx tj wx te tb th sy
tk wy tf tc ti sz tl wz DATA td = d * vx ta = a * fx tg = ta + td sx = rx + tg tj = b * fx wx = vx + tj te = d * vy tb = a * fy th = tb + te sy = ry + th tk = b * fy wy = vy + tk tf = d * vz tc = a * fz ti = tc + tf sz = rz + ti tl = b * fz wz = vz + tl C A d, vx a, fx rx b,fx vx d, vy a, fy ry b, fy vy d, vz a, fz rz b, fz vz G “Laminar” flow H G H Narrow, well-organized channel. The scopes are short, no entanglement  Laminar flow. More important: the matrix is partitioned into diagonal blocks. No flows cross the dotted lines  encapsulation! Both the data and the functions that use it have been encapsulated  objects! There are 6 objects, but only two classes  SCA has revealed the natural ontology! The objects inherit from previously existing objects  SCA has revealed the inheritance hierarchy. The program has also been “refactored”. The objects can be extracted as submodels. Call G the big class and H the small class. G H

10 Where did the objects come from?
The refactored code G gx; sx = gx.go(a, d, fx, rx, vx); H hx; wx = hx.go(b, fx, vx); G gy; sy = gy.go(a, d, fy, ry, vy); H hy; wy = hy.go(b, fy, vy); G gz; sz = gz.go(a, d, fz, rz, vz); H hz; wz = hz.go(b, fz, vz); The original code, not object-oriented, has been refactored into object-oriented code. Class G has a constructor and a method go. Class H has a constructor and a method go. The code can be written in C++, Java, C#. I can now rewrite matrix Q in terms of the new classes and repeat all the procedure. I am going to leave you with a question: Where did the objects come from? I didn’t make them myself. I didn’t tell the algorithm to make objects ... Where did the objects come from?

11 CONCLUSIONS AND OUTLOOK
Objects and inheritance occur naturally in systems. They can be revealed by the SCA algorithm. Impact on Computer Science, Software Engineering, Refactoring, the Semantic Web, Artificial Intelligence, Biology, Neuroscience, Linguistics. Conjecture: Our mind uses the same process to make objects. This is an amazing result, but I conjecture that our mind uses the same process to make objects.


Download ppt "The Matrix Model of Computation (MMC)"

Similar presentations


Ads by Google