<div dir="ltr">Hello Torben, Avinash,<div>Sorry to join into the discussion late, but enthusiastically, nevertheless.</div><div>I actually worked on OPM-to-Erlang transformation some time ago. Unfortunately, it wasn't published, but I included some of the examples in my PhD dissertation. I still got some of the supporting material:</div>
<div>- A Prolog implementation of OPL, that allows writing OPL paragraphs and querying/transforming them directly as Prolog programs. It's very useful for this kind of works. Also generates OPD as Graphvis Dot files.</div>
<div>- An Erlang to Prolog, and vice versa, translator, using the Erlang abstract form. Can be used with the above framework.</div><div>- I should have my notes on transforming OPL to Erlang somewhere - If you're interested, I'll attach it in a direct e-mail.</div>
<div><br></div><div>In any case, I'll be really interesting in contributing to the discussion!</div><div><br></div><div>Best,</div><div> Guy Wiener.</div><div><br><div class="gmail_quote">On Sat, Dec 10, 2011 at 12:42 AM, Torben Hoffmann <span dir="ltr"><<a href="mailto:torben.lehoff@gmail.com">torben.lehoff@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
Hi Avinash!<div class="im"><br>
<br>
On 9/12/11 5:41 , Avinash Dhumane wrote:
<blockquote type="cite">
<div>
<p class="MsoNormal">>>>><u></u> <u></u></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">
<a href="mailto:erlang-questions-bounces@erlang.org" target="_blank">erlang-questions-bounces@erlang.org</a>
[<a href="mailto:erlang-questions-bounces@erlang.org" target="_blank">mailto:erlang-questions-bounces@erlang.org</a>] <b>On Behalf
Of </b>Torben Hoffmann<br>
<br>
</span><u></u><u></u></p>
<p class="MsoNormal">I think that Object Process Methodology
(used lightly) and Message Sequence Charts are better ways of
structuring your high level thoughts.<u></u><u></u></p>
<p class="MsoNormal">>>>><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Hi Torben,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Found a reflection of my voice in you!</p>
</div>
</blockquote></div>
I had a hope that there was life out there... ;-)<div class="im"><br>
<blockquote type="cite">
<div>
<p class="MsoNormal"><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I am contemplating to compile a
specification of what a system is and does as stated using
OPM/OPL, into (and run on) an Erlang AOS (Application
Operating System, as Joe puts it!). <u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">There is some “impedance” mismatch between
the “symbols” (ideas) of OPL and Erlang, though in spirit, I
(want to) believe that Erlang AOS is a perfect (i.e.
isomorphic) vehicle for materializing a “OPL system”. </p>
</div>
</blockquote></div>
I concur - I think OPM/OPL's way of describing systems fits very
with the way Joe refers to Erlang... the most object oriented
language out there!!<br>
<br>
The major hurdle to get past when using OPM as an Erlanger is that
processes in OPM does not map to the Erlang processes as you also
state it.<div class="im"><br>
<blockquote type="cite">
<div>
<p class="MsoNormal">To give some examples:<u></u><u></u></p>
<p class="MsoNormal">1) A “process” of OPM is not an “Erlang
process” – well, yes & no! <u></u><u></u></p>
<p class="MsoNormal">2) Moreover, an “OPM object” needs to find
an expression in “Erlang process” – again, yes & no! <u></u><u></u></p>
<p class="MsoNormal">3) OPM maintains the duality of “objects
and processes”, whereas Erlang wants to see every_thing_ as a
“process”. <u></u><u></u></p>
<p class="MsoNormal">4) For OPM, “objects” are the things that
are shaped and take shape, and “processes” are the things that
shape the objects – i.e. “shape” is both a verb and noun. In
Erlang, what gets shaped is also a process, and what shapes is
obviously a process.<u></u><u></u></p>
<p class="MsoNormal">5) I am not confident enough to say
something on “state” in OPM and “state” in Erlang.<u></u><u></u></p>
</div>
</blockquote></div>
I am not 100% in agreement with the way you map things here.<br>
<br>
Let's start with "OPM object" which I think is best represented as
an Erlang process - I seem to recall that Joe also uses this
"mapping" when refering to Erlang as an object-oriented language.<br>
<br>
"OPM processes" are functions in Erlang - when there are no
side-effects for an argument to a function then the "OPM process"
consumes the object. With side-effects in play the "OPM process"
merely affects the "OPM object".<br>
<br>
It might be that there is a lot of talk about that everything in
Erlang is processes, but the functions are there too and they play a
significant rôle regardless of how you view the language.<br>
<br>
State - in my interpretation - maps almost directly how state of an
Erlang process is handled. <br><div class="im">
<blockquote type="cite">
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">My present view of world is as shown (&
determined) by classic C with Unix-IPC. I don’t know other
worlds. I haven’t made much of progress in Erlang AOS either,
beyond few readings of Joe’s thesis paper. </p>
</div>
</blockquote></div>
Code a few programs and you will begin to see the world with
different eyes... I promise!!<div class="im"><br>
<br>
<blockquote type="cite">
<div>
<p class="MsoNormal"><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I am currently stuck on integrating the
spirit of OPM/OPL and spirit of Erlang AOS. <u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Is there some work going around in OPM and
Erlang that can help me unlock spiritually?</p>
</div>
</blockquote></div>
Not that I am aware of - you could talk to Dov about it. I discussed
a few things with him some years ago, but I did not have enough time
on my hands to explore the topic further.<div class="im"><br>
<blockquote type="cite">
<div>
<p class="MsoNormal"> Or, may I receive some help from you on
how you materialize a OPM-thought system into an Erlang
system? Some directions are good enough – I know otherwise
this is a topic of a full volume.</p>
</div>
</blockquote></div>
If you have a simple OPM example then you can send it to me on- or
off-line and then I will outline how I would map it to Erlang
following the general observations I made above. That exercise will
be interesting.<br>
<br>
At the moment I am using a small subset of OPM to document the
interactions between the entities of the systems I am developing.
Just objects and processes since that is enough to convey the major
points of the architecture - if I had to use UML or similar I would
have to do at least two diagrams in order to get both some static
and dynamic structure conveyed.<br>
<br>
But please fire away and then I will help you get some more Erlang
semantics under your skin - I must guide aspiring Erlangers in order
to keep my ordination as Erlang Priest ;-)<br>
<br>
Cheers,<br>
Torben<br>
<blockquote type="cite"><div class="im">
<div>
<p class="MsoNormal"><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thank you<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Kind regards<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Avinash<u></u><u></u></p>
</div>
<br>
<fieldset></fieldset>
<br>
</div><pre>_______________________________________________
erlang-questions mailing list
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a>
</pre>
</blockquote>
</div>
<br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div></div>