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

Joseph Wayne Norton norton@REDACTED
Fri Nov 5 15:16:48 CET 2010

With regards to this thread, I'd like to mention a few points.

On Fri, 05 Nov 2010 20:37:30 +0900, French, Mike  
<Mike.French@REDACTED> wrote:
> A good point, nicely put.
> It seems a pity to restrict UBF to external communication
> when we also need specification of internal messsaging.
> Can we go further and say that UBF(B), or close variant,
> could be incorporated into the Erlang type system, as a
> declarative signature for message protocol contracts on processes.

We added the concept of "lpc" (Local Procedure Call) to the UBF  
framework.  This feature is not as built-in as you may expect (or want)  
but it permits one to re-use a UBF(b) contract and to call the contract's  
implementation directly without a tcp/ip socket.

There is an example of it's usage in this module - look for  
"ubf_client:lpc".  "Plugin" is an alias for a UBF(b) contract since it  
implies both a contract and it's corresponding implementation module.


The above module glues an json-rpc http listener to a UBF(b) contract.   
The same UBF(b) contract could be used with a tcp/ip socket as well.

> We already have -type and -spec,
> maybe there are -send and -recv statements to be made
> about what messages can be sent or received by a process.
> Some -spec'ed methods are also process loops,
> with process state as their arguments.
> In some cases, the continuous space of arguments
> could be pattern-matched into a finite set of states,
> which might still be useful even if the mapping is partial
> (rather than the total mapping built in to gen_fsm by design).
> Perhaps there is are -proc statements based on UBF(B)
> that correlate the states and the send/recv specifications.

In the following two modules, there is also a simple prototype that  
demonstrates how to import eep8-style -type definitions into a UBF(b)  


This prototype is incomplete (and not yet fully useful) but it does  
illustrate the possibility to use -type definitions as part of the UBF  


Joe N.

> Mike
> Thales UK Ltd (Wells) DISCLAIMER: The information contained in this  
> e-mail
> is confidential. It may also be legally privileged. It is intended only  
> for
> the stated addressee(s) and access to it by any other person is
> unauthorised. If you are not an addressee, you must not disclose, copy,
> circulate or in any other way use or rely on the information contained in
> this e-mail. Such unauthorised use may be unlawful. We may monitor all
> e-mail communications through our networks. If you have received this  
> e-mail
> in error, please inform us immediately on sender's telephone number above
> and delete it and all copies from your system. We accept no  
> responsibility
> for changes to any e-mail which occur after it has been sent.   
> Attachments
> to this e-mail may contain software viruses which could damage your  
> system.
> We therefore recommend you virus-check all attachments before opening.
> Thales UK Ltd. Registered Office: 2 Dashwood Lang Road, The Bourne  
> Business
> Park, Addlestone, Weybridge, Surrey KT15 2NX Registered in England No.
> 868273
> ________________________________________________________________
> 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