# Ats-lang libraries licenses

**URL:** <https://discourse.ats-lang.org/t/ats-lang-libraries-licenses/81>\
**Category:** Google Group\
**Created:** [April 18, 2014, 8:27pm UTC](https://discourse.ats-lang.org/t/ats-lang-libraries-licenses/81 "2014-04-18T20:27:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brandon\_Barker](https://sea1.discourse-cdn.com/flex019/user_avatar/discourse.ats-lang.org/brandon_barker/32/61_2.png) [@Brandon\_Barker](https://discourse.ats-lang.org/u/Brandon_Barker)\
**Post date:** [April 18, 2014, 8:27pm UTC](https://discourse.ats-lang.org/t/ats-lang-libraries-licenses/81/1 "2014-04-18T20:27:51Z")

</div>

The answer to 2 should be that it need not be licensed under the GPL  
(I assume this extends to 3):

> > > It means “Any software compiled by ATS should be distributed under GPLv3”?  
> > > If so, it’s big problem also for me.
> > 
> > No, but you’d have a hard time convincing yourself and you clients  
> > exactly what the legal drivel in GPL actually means, and many probably  
> > wouldn’t want to take the risk.
> > 
> > Some say its OK to dynamically link to GPL code because the shared library  
> > can be independently distributed, whereas a statically linked executable can’t be.

You can use ATS in such a way that these issues do not have to show up:

--(compiled-by-ATS)–\>

The can be generated in a way that neither libatslib.a nor  
libatslib.so is needed for the purpose of linking.

Here is a small project showing how to generate target code in C that does  
not need libatslib:

[https://github.com/githwxi/ATS-Postiats/tree/master/doc/PROJECT/SMALL/GameOf24](https://github.com/githwxi/ATS-Postiats/tree/master/doc/PROJECT/SMALL/GameOf24)

Generating this kind of ‘stand-alone’ C code is currently the preferred  
way of developing systems in ATS. It is not just for the purpose of addressing  
potential license issues. It also tries to maximize the portability of  
the developed  
systems.  
Brandon Barker  
brandon…@gmail.comOn Fri, Apr 18, 2014 at 4:18 PM, Shmulik Regev [shmu...@gmail.com](mailto:shmu...@gmail.com) wrote:

> Hi,
> 
> I’m looking for some clarifications regarding the ats-lang license and the  
> licenses for the accompanying libraries.
> 
> If I correctly understand, the sources for the various ats-lang tools are  
> GPLv3 but the target executable isn’t. What about the generated C code?  
> It says that some of the core libraries are GPLv3. As I understand it, any  
> usage of these libraries will imply GPLv3 over the rest of the code, i.e.  
> the code written by myself (for example).  
> What about other libraries like the contrib one?
> 
> Thanks,  
> Shmul
> 
> –  
> You received this message because you are subscribed to the Google Groups  
> “ats-lang-users” group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [ats-lang-user...@googlegroups.com](mailto:ats-lang-user...@googlegroups.com).  
> To post to this group, send email to [ats-lan...@googlegroups.com](mailto:ats-lan...@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/ats-lang-users/74a40bd6-f3be-4ddd-94a0-4865690ad378%40googlegroups.com](https://groups.google.com/d/msgid/ats-lang-users/74a40bd6-f3be-4ddd-94a0-4865690ad378%40googlegroups.com).

---

<div class="post-metadata">

**Author:** ![gmhwxi](https://avatars.discourse-cdn.com/v4/letter/g/67e7ee/32.png) [@gmhwxi](https://discourse.ats-lang.org/u/gmhwxi)\
**Post date:** [April 18, 2014, 8:51pm UTC](https://discourse.ats-lang.org/t/ats-lang-libraries-licenses/81/2 "2014-04-18T20:51:43Z")

</div>

> > If I correctly understand, the sources for the various ats-lang tools  
> > are GPLv3 but the target executable isn’t. What about the generated C code?

ATS2 compiler (ATS/Postiats) is like GCC.

If one uses GCC to generate object code from C source one owns, then I  
assume that  
he/she owns the generated object code.

If you use ATS/Postiats to generate C code from ATS source you owns, then  
you own the  
generated C code.

> > It says that some of the core libraries are GPLv3. As I understand it,  
> > any usage of these libraries will imply GPLv3 over the rest of the code,  
> > i.e. the code written by myself (for example).

ATS library is primarily used to generate C code. See the answer to (1).

> > What about other libraries like the contrib one?

Most of them have a BSD-like license.On Friday, April 18, 2014 4:18:41 PM UTC-4, Shmulik Regev wrote:

> Hi,
> 
> I’m looking for some clarifications regarding the ats-lang license and the  
> licenses for the accompanying libraries.
> 
> 1. If I correctly understand, the sources for the various ats-lang  
> tools are GPLv3 but the target executable isn’t. What about the generated C  
> code?
> 2. It says that some of the core libraries are GPLv3. As I understand  
> it, any usage of these libraries will imply GPLv3 over the rest of the  
> code, i.e. the code written by myself (for example).
> 3. What about other libraries like the contrib one?
> 
> Thanks,  
> Shmul
