Help with a little geometric hackery...

Hey LtUers,

i discovered a cool way to visualize terms in reflective calculi. At (http://biosimilarity.blogspot.com/) i posted the core calculation. (Apologies for the layout... i don't know why the use of the table tags are causing so much spacing.) i'll recapitulate them here. i'm wondering if someone familiar with the gfx libs of OCaml or F# or Haskell would be interested in helping me implement the algorithm. It's dirt simple, but i'm pretty rusty on my basic geometry, anymore, and really don't know the gfx libs of these languages. Write me at lgreg.meredith@biosimilarity.com if interested.

Best wishes,

--greg

Last night i discovered a geometric interpretation of the reflective versions of the λ- and π-calculi. It's 'simplicial' in nature. For example, take the reflective version of the asynchronous π-calculus.


P,Q ::= 0 // stop, or nil process
x[|P|] // lift
x(y).P // blocking input
P|Q // parallel composition
*x // drop
x,y ::= ^P^ // quote

Assign a dimension to each term constructor. Thus, we have

0-dim
lift-dim
input-dim
par-dim
drop-dim
quote-dim

or 6 dimensions.

We define a recursive function, G[ - ]: L(P) → R6, assigning to each term a shape in 6 dimensions. After doing some calculations, i'm pretty sure that you want to do scaling and offsets, but i've screwed up the accumulated scaling twice; so, i'm eliminating it and just giving the algorithmic scheme to which you can add your flavor or scaling and offset.



G[0] = (0,0,0,0,0,0)
G[x[|P|]] = { (r0,...,r5) |
let cx = barycenter(G[x]) in
let cp = barycenter(G[P]) in
let ct = vertex equidistant to cx, cp and perpendicular to [cx,cp] in lift-direction in
(r0,...,r5) in [cx,cp,ct] }
G[x(y).P] = { (r0,...,r5) |
let cx = barycenter(G[x]) in
let cy = barycenter(G[y]) in
let cp = barycenter(G[P]) in
let ct = vertex equidistant to cx, cy, cp and perpendicular to [cx,cy,cp] in input-direction in
(r0,...,r5) in [cx,cy,cp,ct] }
G[P|Q] = { (r0,...,r5) |
let cp = barycenter(G[P]) in
let cq = barycenter(G[Q]) in
let ct = vertex equidistant to cp, cq and perpendicular to [cp,cq] in the par-direction in
(r0,...,r5) in [cp,cq,ct] }
G[*x] = { (r0,...,r5) |
let cx = barycenter(G[x]) in
let ct = vertex unit length from cx in drop-direction in
(r0,...,r5) in [cx,ct] }
G[^P^] = { (r0,...,r5) |
let cp = barycenter(G[P]) in
let ct = vertex unit length from cp in quote-direction in
(r0,...,r5) in [cp,ct] }

i believe that this will yield interesting visualizations of the terms of this calculus if we assign 3 dims to x,y,z and 3 dims to pitch, roll and yaw. The dynamics of execution will yield animations.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Bulk of the implementation in place

Check out http://svn.biosimilarity.com/src/rho/trunk .