[erlang-questions] Erlang and Akka
Thomas Lindgren
thomasl_erlang@REDACTED
Mon Sep 1 10:53:53 CEST 2014
Right, an imprecise type analysis that simply merges all receives that can be reached by the process might still give some information. You will also for correctness have to handle PID aliasing, several possible receiving processes for a send. (There are some further complicating features in the full language if you want to go that far.)
I'm not too optimistic about the practical power of such an analysis, because there's a lot of overapproximation going on and you will probably get a lot of spurious warnings, but it's "the simplest possible" analysis and so might be worth working out its strengths and weaknesses.
I mentioned McErlang previously, here is some more information. I'm not familiar with it, but it seems they made some practical progress while the project lasted. (It doesn't look active anymore, but I'm willing to be corrected!)
http://babel.ls.fi.upm.es/~fred/
https://github.com/fredlund/McErlang
Best,
Thomas
On Sunday, August 31, 2014 11:47 PM, Richard A. O'Keefe <ok@REDACTED> wrote:
>
>
>
>On 30/08/2014, at 12:16 AM, Thomas Lindgren wrote:
>
>>
>> Second, Sven-Olof Nyström's old Erlang type analyzer was, at least in theory, capable of inferring types for erlang messages and processes.
>
>Is there a reference for that?
>
>
>> However, even if we remove a number of language features, an Erlang process can contain many receives connected by arbitrary control flow. Thus, I'd expect that a gen_fsm or suchlike where you essentially implement protocols could potentially yield a very complex type.
>
>Type systems aren't all-or-nothing. For example, Haskell's type
>system seems pretty amazing and as precise as you could wish for,
>until you meet dependent type systems like the one in Idris.
>
>A process type need not be *precise* to be useful. Indeed, when
>you think about the fact that the type of a pid is not going to
>change, while the precise set of messages it is ready to receive
>*will* change from time to time, it's not clear that a precise
>type would be useful at all.
>
>A process type that can tell you "you idiot, you're trying to
>send a message that this process will NEVER accept under any
>conditions" is enough to be useful.
>
>
>
>
>
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140901/87dac7c1/attachment.htm>
More information about the erlang-questions
mailing list