Erlang Language Specification

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

Erlang Language Specification

Rickard Green-2
Hi,

In the late 90ies work were being done on an Erlang language
specification. A draft which was produced can be found at
<http://www.erlang.org/download/erl_spec47.ps.gz>. Unfortunately the
work on this document stopped after this.

This document is of course quite outdated, but it contains lots of
valuable information. I think it is about time to continue this work. It
will however require lots of work to finish. We publish the source for
the draft in the hope that we in collaboration with the Erlang community
eventually will be able to produce an official Erlang Language
Specification.

I've created a new repository <https://github.com/erlang/spec> which
contains the source of the document.

Regards,
Rickard Green, Erlang/OTP, Ericsson AB
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Erlang Language Specification

Richard Carlsson-3
Great! I've been trying to prod people over the years to dig up these old original files. (I only ever had a copy of the generated .ps/.pdf myself.) Who's been sitting on them?

Note that in src/es.tex, lines 22-23, it's better for now if you made STYLE 0 be the default, because it described the actual implementation of Erlang at the time ("4.7.3"), while STYLE 1 "Standard Erlang" described an ideal new standard that had some possibly incompatible changes, several of which were never actually implemented.


        /Richard

2017-11-30 12:51 GMT+01:00 Rickard Green <[hidden email]>:
Hi,

In the late 90ies work were being done on an Erlang language specification. A draft which was produced can be found at <http://www.erlang.org/download/erl_spec47.ps.gz>. Unfortunately the work on this document stopped after this.

This document is of course quite outdated, but it contains lots of valuable information. I think it is about time to continue this work. It will however require lots of work to finish. We publish the source for the draft in the hope that we in collaboration with the Erlang community eventually will be able to produce an official Erlang Language Specification.

I've created a new repository <https://github.com/erlang/spec> which contains the source of the document.

Regards,
Rickard Green, Erlang/OTP, Ericsson AB
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Erlang Language Specification

Rickard Green-2
On 11/30/2017 02:40 PM, Richard Carlsson wrote:
> Great! I've been trying to prod people over the years to dig up these old
> original files. (I only ever had a copy of the generated .ps/.pdf myself.)

I've unsuccessfully tried to dig them up a couple of times myself over
the years. I gave up and began reconstructing the source from the
postscript-file, but then all of a sudden the original source landed on
my desk :-)

> Who's been sitting on them?
>

Sorry, that is confidential information :-)

> Note that in src/es.tex, lines 22-23, it's better for now if you made STYLE
> 0 be the default, because it described the actual implementation of Erlang
> at the time ("4.7.3"), while STYLE 1 "Standard Erlang" described an ideal
> new standard that had some possibly incompatible changes, several of which
> were never actually implemented.
>

Yes, I agree.

Regards,
Rickard

>
>          /Richard
>
> 2017-11-30 12:51 GMT+01:00 Rickard Green <[hidden email]>:
>
>> Hi,
>>
>> In the late 90ies work were being done on an Erlang language
>> specification. A draft which was produced can be found at <
>> http://www.erlang.org/download/erl_spec47.ps.gz>. Unfortunately the work
>> on this document stopped after this.
>>
>> This document is of course quite outdated, but it contains lots of
>> valuable information. I think it is about time to continue this work. It
>> will however require lots of work to finish. We publish the source for the
>> draft in the hope that we in collaboration with the Erlang community
>> eventually will be able to produce an official Erlang Language
>> Specification.
>>
>> I've created a new repository <https://github.com/erlang/spec> which
>> contains the source of the document.
>>
>> Regards,
>> Rickard Green, Erlang/OTP, Ericsson AB
>> _______________________________________________
>> erlang-questions mailing list
>> [hidden email]
>> http://erlang.org/mailman/listinfo/erlang-questions
>>
>

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Erlang Language Specification

Steve Vinoski-2
In reply to this post by Rickard Green-2


On Thu, Nov 30, 2017 at 6:51 AM, Rickard Green <[hidden email]> wrote:
Hi,

In the late 90ies work were being done on an Erlang language specification. A draft which was produced can be found at <http://www.erlang.org/download/erl_spec47.ps.gz>. Unfortunately the work on this document stopped after this.

This document is of course quite outdated, but it contains lots of valuable information. I think it is about time to continue this work. It will however require lots of work to finish. We publish the source for the draft in the hope that we in collaboration with the Erlang community eventually will be able to produce an official Erlang Language Specification.

I've created a new repository <https://github.com/erlang/spec> which contains the source of the document.

I see the makefiles produce postscript by default, which was useful in the 90s but IMO isn't anymore. Wouldn't it be better to make pdf the default?

--steve

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Erlang Language Specification

Anthony Ramine-4
In reply to this post by Rickard Green-2
Would be nice to rewrite that in HTML, we are in 2017 after all.

> Le 30 nov. 2017 à 12:51, Rickard Green <[hidden email]> a écrit :
>
> Hi,
>
> In the late 90ies work were being done on an Erlang language specification. A draft which was produced can be found at <http://www.erlang.org/download/erl_spec47.ps.gz>. Unfortunately the work on this document stopped after this.
>
> This document is of course quite outdated, but it contains lots of valuable information. I think it is about time to continue this work. It will however require lots of work to finish. We publish the source for the draft in the hope that we in collaboration with the Erlang community eventually will be able to produce an official Erlang Language Specification.
>
> I've created a new repository <https://github.com/erlang/spec> which contains the source of the document.
>
> Regards,
> Rickard Green, Erlang/OTP, Ericsson AB
> _______________________________________________
> erlang-questions mailing list
> [hidden email]
> http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Erlang Language Specification

Rickard Green-2
In reply to this post by Steve Vinoski-2
On 11/30/2017 04:04 PM, Steve Vinoski wrote:

> On Thu, Nov 30, 2017 at 6:51 AM, Rickard Green <[hidden email]> wrote:
>
>> Hi,
>>
>> In the late 90ies work were being done on an Erlang language
>> specification. A draft which was produced can be found at <
>> http://www.erlang.org/download/erl_spec47.ps.gz>. Unfortunately the work
>> on this document stopped after this.
>>
>> This document is of course quite outdated, but it contains lots of
>> valuable information. I think it is about time to continue this work. It
>> will however require lots of work to finish. We publish the source for the
>> draft in the hope that we in collaboration with the Erlang community
>> eventually will be able to produce an official Erlang Language
>> Specification.
>>
>> I've created a new repository <https://github.com/erlang/spec> which
>> contains the source of the document.
>>
>
> I see the makefiles produce postscript by default, which was useful in the
> 90s but IMO isn't anymore. Wouldn't it be better to make pdf the default?
>
> --steve
>

Yes, I think that would be better too.

The current makefile use pdflatex to produce the pdf. I'm not sure if it
is as available in latex packages as the latex command is. Since I don't
know I went for the ps as default, but this can be changed.

Regards,
Rickard
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Erlang Language Specification

Rickard Green-2
In reply to this post by Anthony Ramine-4
On 11/30/2017 04:08 PM, Anthony Ramine wrote:
> Would be nice to rewrite that in HTML, we are in 2017 after all.
>

No I don't think it would be a good ide to rewrite this in HTML. There
might be other options than latex, but I don't see that HTML would be an
option. This due to the mathematical formulas in the document.

There are tools available to produce html from latex which can be
integrated in the makefiles which of course would be nice.

Regards,
Rickard

>> Le 30 nov. 2017 à 12:51, Rickard Green <[hidden email]> a écrit :
>>
>> Hi,
>>
>> In the late 90ies work were being done on an Erlang language specification. A draft which was produced can be found at <http://www.erlang.org/download/erl_spec47.ps.gz>. Unfortunately the work on this document stopped after this.
>>
>> This document is of course quite outdated, but it contains lots of valuable information. I think it is about time to continue this work. It will however require lots of work to finish. We publish the source for the draft in the hope that we in collaboration with the Erlang community eventually will be able to produce an official Erlang Language Specification.
>>
>> I've created a new repository <https://github.com/erlang/spec> which contains the source of the document.
>>
>> Regards,
>> Rickard Green, Erlang/OTP, Ericsson AB
>> _______________________________________________
>> erlang-questions mailing list
>> [hidden email]
>> http://erlang.org/mailman/listinfo/erlang-questions
>


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Erlang Language Specification

Simon  Thompson

Once it’s stable would be great to transform the document into something executable (e.g. Erlang, Haskell) or even verifiable (Isabelle, Coq, K-framework) so that there’s a “reference implementation” which can be tested and verified.

Simon


On 30 Nov 2017, at 15:29, Rickard Green <[hidden email]> wrote:

On 11/30/2017 04:08 PM, Anthony Ramine wrote:
Would be nice to rewrite that in HTML, we are in 2017 after all.

No I don't think it would be a good ide to rewrite this in HTML. There might be other options than latex, but I don't see that HTML would be an option. This due to the mathematical formulas in the document.

There are tools available to produce html from latex which can be integrated in the makefiles which of course would be nice.

Regards,
Rickard


Simon Thompson | Professor of Logic and Computation 
School of Computing | University of Kent | Canterbury, CT2 7NF, UK
[hidden email] | M +44 7986 085754 | W www.cs.kent.ac.uk/~sjt


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Erlang Language Specification

Jesper Louis Andersen-2
I might be interested in building a Coq/Agda/Twelf model for sure :)

But given that, it is often good to have a interpreted model in a more "normal" programming language as well in my experience. They tend to be more tangible in many cases. Perhaps a Coq extraction will do?


On Thu, Nov 30, 2017 at 4:33 PM Simon Thompson <[hidden email]> wrote:

Once it’s stable would be great to transform the document into something executable (e.g. Erlang, Haskell) or even verifiable (Isabelle, Coq, K-framework) so that there’s a “reference implementation” which can be tested and verified.

Simon


On 30 Nov 2017, at 15:29, Rickard Green <[hidden email]> wrote:

On 11/30/2017 04:08 PM, Anthony Ramine wrote:
Would be nice to rewrite that in HTML, we are in 2017 after all.

No I don't think it would be a good ide to rewrite this in HTML. There might be other options than latex, but I don't see that HTML would be an option. This due to the mathematical formulas in the document.

There are tools available to produce html from latex which can be integrated in the makefiles which of course would be nice.

Regards,
Rickard


Simon Thompson | Professor of Logic and Computation 
School of Computing | University of Kent | Canterbury, CT2 7NF, UK
[hidden email] | M <a href="tel:+44%207986%20085754" value="+447986085754" target="_blank">+44 7986 085754 | W www.cs.kent.ac.uk/~sjt

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Erlang Language Specification

Joe Armstrong-2
In reply to this post by Simon Thompson
On Thu, Nov 30, 2017 at 4:33 PM, Simon  Thompson
<[hidden email]> wrote:
>
> Once it’s stable would be great to transform the document into something
> executable (e.g. Erlang, Haskell) or even verifiable (Isabelle, Coq,
> K-framework) so that there’s a “reference implementation” which can be
> tested and verified.
>
> Simon
>

Great idea - I'd go for an XML input with a custom DTD - this is
pretty easy to transform
into PDF (via LaTeX or Apache FOP) or HTML and subsets can be extracted for
automatic code generation and verification.

I've often used XML for this, generating code, manual pages and PDFs
from a single
input.

/Joe


>
> On 30 Nov 2017, at 15:29, Rickard Green <[hidden email]> wrote:
>
> On 11/30/2017 04:08 PM, Anthony Ramine wrote:
>
> Would be nice to rewrite that in HTML, we are in 2017 after all.
>
>
> No I don't think it would be a good ide to rewrite this in HTML. There might
> be other options than latex, but I don't see that HTML would be an option.
> This due to the mathematical formulas in the document.
>
> There are tools available to produce html from latex which can be integrated
> in the makefiles which of course would be nice.
>
> Regards,
> Rickard
>
>
> Simon Thompson | Professor of Logic and Computation
> School of Computing | University of Kent | Canterbury, CT2 7NF, UK
> [hidden email] | M +44 7986 085754 | W www.cs.kent.ac.uk/~sjt
>
>
> _______________________________________________
> erlang-questions mailing list
> [hidden email]
> http://erlang.org/mailman/listinfo/erlang-questions
>
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Erlang Language Specification

Simon  Thompson
Yes, I’ve done this, but did trip up with some of the escaping conventions for multiple languages … 


On 30 Nov 2017, at 16:56, Joe Armstrong <[hidden email]> wrote:

Great idea - I'd go for an XML input with a custom DTD - this is
pretty easy to transform
into PDF (via LaTeX or Apache FOP) or HTML and subsets can be extracted for
automatic code generation and verification.

I've often used XML for this, generating code, manual pages and PDFs
from a single
input.

/Joe




Simon Thompson | Professor of Logic and Computation 
School of Computing | University of Kent | Canterbury, CT2 7NF, UK
[hidden email] | M +44 7986 085754 | W www.cs.kent.ac.uk/~sjt


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Erlang Language Specification

Anthony Ramine-4
In reply to this post by Rickard Green-2
The most important part of a spec isn't the verbosity of its few mathematical formulas when editing, it's good cross-reference linking, internally in externally. The format that excels at that is HTML. There are various ways to have mathematical formulas in HTML.

> Le 30 nov. 2017 à 16:29, Rickard Green <[hidden email]> a écrit :
>
> On 11/30/2017 04:08 PM, Anthony Ramine wrote:
>> Would be nice to rewrite that in HTML, we are in 2017 after all.
>
> No I don't think it would be a good ide to rewrite this in HTML. There might be other options than latex, but I don't see that HTML would be an option. This due to the mathematical formulas in the document.
>
> There are tools available to produce html from latex which can be integrated in the makefiles which of course would be nice.
>
> Regards,
> Rickard
>
>>> Le 30 nov. 2017 à 12:51, Rickard Green <[hidden email]> a écrit :
>>>
>>> Hi,
>>>
>>> In the late 90ies work were being done on an Erlang language specification. A draft which was produced can be found at <http://www.erlang.org/download/erl_spec47.ps.gz>. Unfortunately the work on this document stopped after this.
>>>
>>> This document is of course quite outdated, but it contains lots of valuable information. I think it is about time to continue this work. It will however require lots of work to finish. We publish the source for the draft in the hope that we in collaboration with the Erlang community eventually will be able to produce an official Erlang Language Specification.
>>>
>>> I've created a new repository <https://github.com/erlang/spec> which contains the source of the document.
>>>
>>> Regards,
>>> Rickard Green, Erlang/OTP, Ericsson AB
>>> _______________________________________________
>>> erlang-questions mailing list
>>> [hidden email]
>>> http://erlang.org/mailman/listinfo/erlang-questions
>
>

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Erlang Language Specification

Kenneth Lundin-5
There is one thing with having the spec available as html, which would be very useful.
But I don't think the source should be html. 
The guiding principle should be 1 source many possible presentations.

/Kenneth Erlang/OTP, Ericsson

Den 30 nov. 2017 18:34 skrev "Anthony Ramine" <[hidden email]>:
The most important part of a spec isn't the verbosity of its few mathematical formulas when editing, it's good cross-reference linking, internally in externally. The format that excels at that is HTML. There are various ways to have mathematical formulas in HTML.

> Le 30 nov. 2017 à 16:29, Rickard Green <[hidden email]> a écrit :
>
> On 11/30/2017 04:08 PM, Anthony Ramine wrote:
>> Would be nice to rewrite that in HTML, we are in 2017 after all.
>
> No I don't think it would be a good ide to rewrite this in HTML. There might be other options than latex, but I don't see that HTML would be an option. This due to the mathematical formulas in the document.
>
> There are tools available to produce html from latex which can be integrated in the makefiles which of course would be nice.
>
> Regards,
> Rickard
>
>>> Le 30 nov. 2017 à 12:51, Rickard Green <[hidden email]> a écrit :
>>>
>>> Hi,
>>>
>>> In the late 90ies work were being done on an Erlang language specification. A draft which was produced can be found at <http://www.erlang.org/download/erl_spec47.ps.gz>. Unfortunately the work on this document stopped after this.
>>>
>>> This document is of course quite outdated, but it contains lots of valuable information. I think it is about time to continue this work. It will however require lots of work to finish. We publish the source for the draft in the hope that we in collaboration with the Erlang community eventually will be able to produce an official Erlang Language Specification.
>>>
>>> I've created a new repository <https://github.com/erlang/spec> which contains the source of the document.
>>>
>>> Regards,
>>> Rickard Green, Erlang/OTP, Ericsson AB
>>> _______________________________________________
>>> erlang-questions mailing list
>>> [hidden email]
>>> http://erlang.org/mailman/listinfo/erlang-questions
>
>

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Erlang Language Specification

Richard A. O'Keefe-2
In reply to this post by Anthony Ramine-4


On 1/12/17 6:33 AM, Anthony Ramine wrote:
> The most important part of a spec isn't the verbosity of its few mathematical formulas when editing, it's good cross-reference linking, internally in externally. The format that excels at that is HTML. There are various ways to have mathematical formulas in HTML.

I agree that good cross-referencing is very important.

The cross-referencing you can get with good literate programming tools
is *awesome*.  Look at the TeXBook for an example, or the book about
lcc
https://www.amazon.com/Retargetable-Compiler-Design-Implementation/dp/0805316701

I've seen four methods used to get mathematical formulas into HTML:
- format using (La)TeX and paste in as an image
   (yuck)
- use MathML
   (I have made repeated attempts to do this myself.
   Much struggle for poor results.)
- use some fancy WYSIWYG tool and have it generate something
   (WYSINWIS : what you see is not what I see)
- use MathJax
   this seems to work pretty well.
   It reminds me of Professor CleverByte's Visit to Heaven...

Given that PDF supports intra- and inter-document links and text
search, I don't see an advantage for HTML here.
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Erlang Language Specification

Richard A. O'Keefe-2
In reply to this post by Simon Thompson


On 1/12/17 5:58 AM, Simon Thompson wrote:
> Yes, I’ve done this, but did trip up with some of the escaping
> conventions for multiple languages …

One approach goes like this.
You have two DTDs.  One includes this:

   <!ELEMENT include EMPTY>
   <!ATTLIST include
      src CDATA #REQUIRED
      in  NMTOKEN #REQUIRED>

So you do things like

   <include src="snippets/flatten.erl" in="Erlang"/>

You have a program that reads the parsed form of the
file in either a SAX-like or DOM-like manner, and
processes the <include/> elements, generating whatever
markup is appropriate, and emits the complete result
as XML, ready for formatting.

*Manual* escaping is tedious and error-prone.
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Erlang Language Specification

Joe Armstrong-2
On Thu, Nov 30, 2017 at 11:17 PM, Richard A. O'Keefe <[hidden email]> wrote:

>
>
> On 1/12/17 5:58 AM, Simon Thompson wrote:
>>
>> Yes, I’ve done this, but did trip up with some of the escaping
>> conventions for multiple languages …
>
>
> One approach goes like this.
> You have two DTDs.  One includes this:
>
>   <!ELEMENT include EMPTY>
>   <!ATTLIST include
>      src CDATA #REQUIRED
>      in  NMTOKEN #REQUIRED>
>
> So you do things like
>
>   <include src="snippets/flatten.erl" in="Erlang"/>
>
> You have a program that reads the parsed form of the
> file in either a SAX-like or DOM-like manner, and
> processes the <include/> elements, generating whatever
> markup is appropriate, and emits the complete result
> as XML, ready for formatting.

This is a great approach - my erlang book is marked up in xml
with code includes, for example, <code file="foo.erl" section="connecting"/>

The the code in foo.erl is tagged like this

    %% START:connecting
     ....
    %% END:connecting

The XML is validated - and a simple program extracts the Erlang
and color codes it and does whatever you want.

Very simple and works beautifully.

I'm very much in favor of making ad hoc tools that do
little things like exactly as you want them, rather than relying
on generic masterpieces (like docbook).

Cheers

/Joe


/Joe


>
> *Manual* escaping is tedious and error-prone.
>
> _______________________________________________
> erlang-questions mailing list
> [hidden email]
> http://erlang.org/mailman/listinfo/erlang-questions
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions