[erlang-questions] Erlang shell crashes
Thomas Lindgren
thomasl_erlang@REDACTED
Mon Oct 30 18:15:59 CET 2006
--- Kostis Sagonas <kostis@REDACTED> wrote:
> Although the analysis needed is not trivial, we
> (think we) know exactly
> how to do this, but doing it never made it high on
> our priority list
> partly due to lack of "real" test cases where such
> defect detection is
> needed. We would very much appreciate if Erlang
> users send us code
> which suffers exactly from this type of problem. We
> promise we will not
> use this code for any other purposes.
How about checking the OTP code? A starter case might
be to analyze some variations on gen_server and
gen_fsm.
I believe Sven-Olof Nyström's analyzer derived
"mailbox types". I'm not sure how well this worked in
practice.
http://user.it.uu.se/~svenolof/SA/
Presumably, all you model checking people out there
also have wrestled with the basic problem. (Thomas
Arts or Lars-Ake Fredlund for instance?) Are there any
practical experiences to be told?
> > You should also use a catch all message to remove
> any messages you were not expecting:
> >
> > receive
> > {From, expected_msg, Data} ->
> > do_something(Data);
> > AnyUnexpectedMsg ->
> > log_and_skip_handling(AnyUnexpectedMsg)
> > end.
>
> Doing this, of course solves this problem by
> potentially hiding it under
> the carpet, right?
If one could tell the hypothetical analyzer to flag
messages or interactions that end up in the catch-all
clause, then we would both handle unexpected messages
at runtime (e.g., messages arriving from some other
node running who knows what) AND get warnings at
analysis-time.
Best,
Thomas
____________________________________________________________________________________
Access over 1 million songs - Yahoo! Music Unlimited
(http://music.yahoo.com/unlimited)
More information about the erlang-questions
mailing list