Last active
October 15, 2017 19:17
-
-
Save kenwebb/57b999157f1a3aa2b2aacd1e8bd1747e to your computer and use it in GitHub Desktop.
Propagators
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!--Xholon Workbook http://www.primordion.com/Xholon/gwt/ MIT License, Copyright (C) Ken Webb, Sun Oct 15 2017 15:17:03 GMT-0400 (EDT)--> | |
<XholonWorkbook> | |
<Notes><![CDATA[ | |
Xholon | |
------ | |
Title: Propagators | |
Description: | |
Url: http://www.primordion.com/Xholon/gwt/ | |
InternalName: 57b999157f1a3aa2b2aacd1e8bd1747e | |
Keywords: | |
My Notes | |
-------- | |
David Spivak uses Propagators in one of his papers about operads [4]. | |
In this workbook, I explore Propagators. | |
References | |
---------- | |
(1) http://web.mit.edu/~axch/www/art.pdf | |
The Art of the Propagator | |
Alexey Radul and Gerald Jay Sussman | |
December 13, 2008 | |
Abstract | |
We develop a programming model built on the idea that the basic | |
computational elements are autonomous machines interconnected by | |
shared cells through which they communicate. Each machine continuously | |
examines the cells it is interested in, and adds information | |
to some based on deductions it can make from information from the | |
others. This model makes it easy to smoothly combine expressionoriented | |
and constraint-based programming; it also easily accommodates | |
implicit incremental distributed search in ordinary programs. | |
This work builds on the original research of Guy Lewis Steele | |
Jr. [19] and was developed more recently with the help of Chris | |
Hanson. | |
(2) http://groups.csail.mit.edu/mac/users/gjs/propagators/ | |
Revised Report on the Propagator Model | |
Alexey Radul and Gerald Jay Sussman | |
The Propagator Programming Model is built on the idea that the basic computational elements are autonomous machines interconnected by shared cells through which they communicate. | |
Each machine continuously examines the cells it is interested in, and adds information to some based on computations it can make from information from the others. Cells accumulate | |
information from the propagators that produce that information. The key idea here is additivity. New ways to make contributions can be added just by adding new propagators; | |
if an approach to a problem doesn't turn out to work well, it can be identified by its premises and ignored, dynamically and without disruption. | |
Propagator System | |
Although most of this document introduces you to the Scheme-Propagator system that we have developed in MIT Scheme, the Propagator Model is really independent of the language. | |
You should be able to write propagators in any language you choose, and others should be able to write subsystems in their favorite language that cooperate with your subsystems. | |
What is necessary is that all users agree on the protocol by which propagators communicate with the cells that are shared among subsystems. | |
These rules are very simple and we can enumerate them right here: | |
- Cells must support three operations: | |
- add some content | |
- collect the content currently accumulated | |
- register a propagator to be notified when the accumulated content changes | |
- When new content is added to a cell, the cell must merge the addition with the content already present. | |
When a propagator asks for the content of a cell, the cell must deliver a complete summary of the information that has been added to it. | |
- The merging of content must be commutative, associative, and idempotent. The behavior of propagators must be monotonic with respect to the lattice induced by the merge operation. | |
- KSW explore exactly what this means; I think I'm OK | |
(3) http://groups.csail.mit.edu/mac/users/gjs/propagators/propagator.tar | |
I downloaded this, which includes the Scheme software. | |
I untarred it into ~/schemespace/ | |
I installed MIT Scheme. | |
To run it: | |
cd ~/schemespace/propagator | |
scheme | |
(load "load") | |
I ran a first example, which worked: | |
(define-cell a) | |
(define-cell b) | |
(add-content a 3) | |
(add-content b 2) | |
(define-cell answer (e:+ a b)) | |
(run) | |
(content answer) ==> 5 | |
(4) https://arxiv.org/pdf/1307.6894v1.pdf | |
THE OPERAD OF TEMPORAL WIRING DIAGRAMS: FORMALIZING A | |
GRAPHICAL LANGUAGE FOR DISCRETE-TIME PROCESSES | |
DYLAN RUPEL AND DAVID I. SPIVAK | |
Abstract. | |
We investigate the hierarchical structure of processes using the mathematical | |
theory of operads. Information or material enters a given process as a stream of inputs, | |
and the process converts it to a stream of outputs. Output streams can then be supplied to | |
other processes in an organized manner, and the resulting system of interconnected processes | |
can itself be considered a macro process. To model the inherent structure in this kind of | |
system, we define an operad W of black boxes and directed wiring diagrams, and we define a | |
W-algebra P of processes (which we call propagators, after [RS]). Previous operadic models | |
of wiring diagrams (e.g. [Sp2]) use undirected wires without length, useful for modeling | |
static systems of constraints, whereas we use directed wires with length, useful for modeling | |
dynamic flows of information. We give multiple examples throughout to ground the ideas. | |
(5) https://www.infoq.com/presentations/We-Really-Dont-Know-How-To-Compute | |
We Really Don't Know How To Compute!, by Gerald Jay Sussman, on Oct 27, 2011 | |
]]></Notes> | |
<_-.XholonClass> | |
<PhysicalSystem/> | |
<!-- | |
Maybe a Cell should be, or should contain, a Xholon_Set. | |
A Cell might need to handle received async/sync messages. | |
--> | |
<Cell/> | |
<Propagator/> | |
<!-- alternatively, a Propagator could be a Xholon Avatar --> | |
<PropagatorAvtr superClass="Avatar"/> | |
<Example/> | |
</_-.XholonClass> | |
<xholonClassDetails> | |
<Propagator> | |
<port name="a" connector="../Cell[@roleName='a']"/> | |
<port name="b" connector="../Cell[@roleName='b']"/> | |
<port name="answer" connector="../Cell[@roleName='answer']"/> | |
</Propagator> | |
</xholonClassDetails> | |
<PhysicalSystem> | |
<Example roleName="a little propagator example that adds two and three to get five"> | |
<!-- <Cell roleName="a" content="3"/> one way to implement a Cell, but it's not very flexible --> | |
<Cell roleName="a"> | |
<XholonSet> | |
<Attribute_int>3</Attribute_int> | |
</XholonSet> | |
</Cell> | |
<!--<Cell roleName="b" content="2"/> | |
<Cell roleName="answer"/>--> | |
<Cell roleName="b"> | |
<XholonSet> | |
<Attribute_int>2</Attribute_int> | |
</XholonSet> | |
</Cell> | |
<Cell roleName="answer"> | |
<XholonSet/> | |
</Cell> | |
<PropagatorAvtr roleName="e"> | |
where; | |
look; | |
enter a; | |
enter; | |
get attribute_int val; | |
</PropagatorAvtr> | |
<Propagator/> | |
</Example> | |
</PhysicalSystem> | |
<Propagatorbehavior implName="org.primordion.xholon.base.Behavior_gwtjs"><![CDATA[ | |
var me, beh = { | |
postConfigure: function() { | |
me = this.cnode.parent(); | |
}, | |
act: function() { | |
me.println(me.a.name() + " " + me.a.first().first().val()); | |
me.println(me.b.name() + " " + me.b.first().first().val()); | |
me.println(me.answer.name()); | |
var answerSet = me.answer.first(); | |
var answerSetInt = answerSet.first(); | |
if (!answerSetInt) { | |
var answerVal = me.a.first().first().val() + me.b.first().first().val(); | |
answerSet.append("<" + "Attribute_int>" + answerVal + "</" + "Attribute_int>"); | |
} | |
me.println(me.answer.name() + " " + me.answer.first().first().val()); | |
} | |
} | |
]]></Propagatorbehavior> | |
<SvgClient><Attribute_String roleName="svgUri"><![CDATA[data:image/svg+xml, | |
<svg width="100" height="50" xmlns="http://www.w3.org/2000/svg"> | |
<g> | |
<title>Example 1</title> | |
<rect id="PhysicalSystem/Example" fill="#98FB98" height="50" width="50" x="25" y="0"/> | |
<g> | |
<title>Propagator</title> | |
<rect id="PhysicalSystem/Example/Propagator" fill="#6AB06A" height="50" width="10" x="80" y="0"/> | |
</g> | |
</g> | |
</svg> | |
]]></Attribute_String><Attribute_String roleName="setup">${MODELNAME_DEFAULT},${SVGURI_DEFAULT}</Attribute_String></SvgClient> | |
</XholonWorkbook> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment