[erlang-questions] Re: Extracting detailed information from TypEr/Dialyzer

Gianfranco Alongi gianfranco.alongi@REDACTED
Tue Oct 19 20:44:29 CEST 2010


Hi,

I've been doing something _very_ similar through a direct parse_transform lib, 
but unfortunately came to the conclusion that the much repetitive pattern

  state_function/[2/3]
   code....
  next_state_tuple/stop-tuple

is very dependent the coding style, just like Vance says. The analyzer often
outputs loopback nodes where the outoing arc goes to the next state NextState 
or another hidden state in a Variable :\

To remedy this, you can enchance your analyzer with runtime logging to a file,
the logging could then contain which function was entered and which state the
next state was. Then you could analyze that file with an external tool.

At the moment, I'm working on this, with some extra bells and whistles, as
data-generator by gen_fsm function head argument analysis, such that it will 
force the gen_fsm to cover as much as possible.

Cheers
/G

----- Original Message -----
From: "Vance Shipley" <vances@REDACTED>
To: "Torben Hoffmann" <torben.lehoff@REDACTED>
Cc: "erlang-questions" <erlang-questions@REDACTED>
Sent: Tuesday, October 19, 2010 6:51:44 PM GMT +00:00 GMT Britain, Ireland, Portugal
Subject: [erlang-questions] Re: Extracting detailed information from TypEr/Dialyzer

Torben,

I went down this road ten years ago.  At the time I was constantly
diagraming my FSMs to reason about them and diagnose problems.  I
decided I needed to automate that process.  The result:

   http://www.erlang.org/pipermail/erlang-questions/2001-October/003716.html

Unfortunately the links to attachments in the above don't seem to work.  
I have attached the code I used for this however I haven't used it in
many year so your mileage may vary.  It was also fairly dependent on
coding style.

On Tue, Oct 12, 2010 at 09:00:00AM +0200, Torben Hoffmann wrote:
}  I want to extract the following information from a gen_fsm:
}  
}     - all the states
}     - the incoming events
}     - possible next states
[...]
}  Has anybody been down this road before me? If so, do you have some insights
}  to share?

-- 
	-Vance


________________________________________________________________
erlang-questions (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED


More information about the erlang-questions mailing list