[erlang-questions] OPL on Erlang (Was earlier "RE:Best practices in gen_fsm usage")

Torben Hoffmann torben.lehoff@REDACTED
Fri Dec 9 23:42:39 CET 2011

Hi Avinash!

On 9/12/11 5:41 , Avinash Dhumane wrote:
> >>>>
> *From:*erlang-questions-bounces@REDACTED 
> [mailto:erlang-questions-bounces@REDACTED] *On Behalf Of *Torben 
> Hoffmann
> I think that Object Process Methodology (used lightly) and Message 
> Sequence Charts are better ways of structuring your high level thoughts.
> >>>>
> Hi Torben,
> Found a reflection of my voice in you!
I had a hope that there was life out there... ;-)
> 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!).
> 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".
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 

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.
> To give some examples:
> 1) A "process" of OPM is not an "Erlang process" -- well, yes & no!
> 2) Moreover, an "OPM object" needs to find an expression in "Erlang 
> process" -- again, yes & no!
> 3) OPM maintains the duality of "objects and processes", whereas 
> Erlang wants to see every_thing_ as a "process".
> 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.
> 5) I am not confident enough to say something on "state" in OPM and 
> "state" in Erlang.
I am not 100% in agreement with the way you map things here.

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.

"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".

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.

State - in my interpretation - maps almost directly how state of an 
Erlang process is handled.
> 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.
Code a few programs and you will begin to see the world with different 
eyes... I promise!!

> I am currently stuck on integrating the spirit of OPM/OPL and spirit 
> of Erlang AOS.
> Is there some work going around in OPM and Erlang that can help me 
> unlock spiritually?
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.
> 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.
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.

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.

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 ;-)

> Thank you
> Kind regards
> Avinash
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20111209/e103110e/attachment.htm>

More information about the erlang-questions mailing list