# Ats2-0.2.0

**URL:** <https://discourse.ats-lang.org/t/ats2-0-2-0/840>\
**Category:** Google Group\
**Created:** [June 10, 2015, 2:02am UTC](https://discourse.ats-lang.org/t/ats2-0-2-0/840 "2015-06-10T02:02:34Z")\
**Posts on this page:** 8\
**Page:** 1

<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:** [June 10, 2015, 2:02am UTC](https://discourse.ats-lang.org/t/ats2-0-2-0/840/1 "2015-06-10T02:02:34Z")

</div>

Hi,

I am glad to announce the release of ATS2-0.2.0.

The primary change in this release is the added support for  
externally solving constraints gathered during typechecking.  
Currently, the command [patsolve\_z3] can be generated for this  
purpose. Please see ATS2-contrib/ATS-extsolve-z3 for more details.

The official website for ATS is:

[http://www.ats-lang.org](http://www.ats-lang.org)

The following packages are included in this release:

ATS2-Postiats-0.2.0.tgz  
ATS2-Postiats-contrib-0.2.0.tgz  
ATS2-Postiats-include-0.2.0.tgz

I have included ATS2-Postiats-contrib (instead of  
releasing it separately) as it is truly by now an  
indispensible part of ATS2.

After installing ATS-Postiats-include, one can compile  
the C code generated from ATS source without installing  
the ATS compiler. So a convenient way to distribute software  
written in ATS is to simply release the C code generated  
from the ATS source.

See below for some major additions and changes since the  
last release (ATS2-0.1.13).

Cheers!

–Hongwei

This is the 23rd release of ATS2, the successor of the ATS  
programming language. The compiler for ATS2 is given the name  
ATS/Positats, ATS2/Postiats or simply Postiats.

The official website for ATS is:

[http://www.ats-lang.org](http://www.ats-lang.org)

ATS-Postiats is hosted at github:

> **[githwxi/ATS-Postiats](https://github.com/githwxi/ATS-Postiats)**
>
> ATS2: Unleashing the Potentials of Types and Templates - githwxi/ATS-Postiats

Major releases of ATS2 are available at:

> **[ats2-lang](https://sourceforge.net/projects/ats2-lang/)**
>
> Download ats2-lang for free. ATS2: Unleashing the potentials of types and templates. ATS is a statically typed programming language that unifies implementation with formal specification. It is equipped with a highly expressive type system rooted in...

Major releases of external packages for ATS2 are available at:

> **[ats2-lang-contrib](https://sourceforge.net/projects/ats2-lang-contrib/)**
>
> Download ats2-lang-contrib for free. External Contributions to the ATS2 PL System. This project primarily consists of external contributions made to the ATS2 programming language system in the forms of library packages, tutorials, examples, and all...

Here is a list of major additions and changes since the last release:

1. Re-structuring CATS-parsemit
2. Creating ATS-Postiats-frozen for storing inactive projects
3. Porting Atscc2js based on the newly re-structured CATS-parsemit
4. Porting Atscc2php based on the newly re-structured CATS-parsemit
5. Porting Atscc2py based on the newly re-structured CATS-parsemit
6. Porting Atscc2pl based on the newly re-structured CATS-parsemit
7. Handling of HIPintrep is now supported
8. Porting ATSLIB/libats/funmap\_rbtree to ATS2 from ATS1
9. Modifying jsonization of constraints to support ATS-extsolve
10. ATS-extsolve-z3 (Z3-based ATS-extsolve) can now be put into use
11. Performing occurs-checking before HYPObind(s2v, s2e) can be formed

ats-lang-users mailing list  
ats-lang-users@…  
[https://lists.sourceforge.net/lists/listinfo/ats-lang-users](https://lists.sourceforge.net/lists/listinfo/ats-lang-users)

---

<div class="post-metadata">

**Author:** ![Yannick\_Duchene](https://avatars.discourse-cdn.com/v4/letter/y/b77776/32.png) [@Yannick\_Duchene](https://discourse.ats-lang.org/u/Yannick_Duchene)\
**Post date:** [June 10, 2015, 3:49am UTC](https://discourse.ats-lang.org/t/ats2-0-2-0/840/2 "2015-06-10T03:49:08Z")

</div>

> ###### 
> 
> The official website for ATS is:
> 
> [http://www.ats-lang.org](http://www.ats-lang.org)

Excuse me Sir, the link to Postiat 0.2 on  
[http://www.ats-lang.org/Downloads.html](http://www.ats-lang.org/Downloads.html) , seems broken (error 404). It’s Ok  
from SourceForge directly.

---

<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:** [June 10, 2015, 4:27am UTC](https://discourse.ats-lang.org/t/ats2-0-2-0/840/3 "2015-06-10T04:27:21Z")

</div>

Fixed. Thanks!On Tue, Jun 9, 2015 at 11:49 PM, ‘Yannick Duchêne’ via ats-lang-users \< [ats-lan...@googlegroups.com](mailto:ats-lan...@googlegroups.com)\> wrote:

> Le mercredi 10 juin 2015 04:02:34 UTC+2, gmhwxi a écrit :
> 
> > ###### 
> > 
> > The official website for ATS is:
> > 
> > [http://www.ats-lang.org](http://www.ats-lang.org)
> 
> Excuse me Sir, the link to Postiat 0.2 on  
> [http://www.ats-lang.org/Downloads.html](http://www.ats-lang.org/Downloads.html) , seems broken (error 404). It’s  
> Ok from SourceForge directly.
> 
> –  
> 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).  
> Visit this group at [http://groups.google.com/group/ats-lang-users](http://groups.google.com/group/ats-lang-users).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/ats-lang-users/9ff0bc69-47b4-48e6-9bd8-7afff3c1a5be%40googlegroups.com](https://groups.google.com/d/msgid/ats-lang-users/9ff0bc69-47b4-48e6-9bd8-7afff3c1a5be%40googlegroups.com)  
> [https://groups.google.com/d/msgid/ats-lang-users/9ff0bc69-47b4-48e6-9bd8-7afff3c1a5be%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/ats-lang-users/9ff0bc69-47b4-48e6-9bd8-7afff3c1a5be%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .

---

<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:** [June 10, 2015, 2:53pm UTC](https://discourse.ats-lang.org/t/ats2-0-2-0/840/4 "2015-06-10T14:53:25Z")

</div>

> Seems Ok now.
> 
> Just a few notes:
> 
> - The installaton for dependency to libgmp3-dev may be changed into a  
> dependency to libgmp-dev, which ends to be libgmp10-dev. That’s not the  
> first time I build ATS with it, and I never get an error. GMP3 is now  
> considered obsolete, if I’m not wrong.

Changed. libgmp-dev replaces libgmp3-dev.

> - The installation for dependency to libjson-c-dev is missing.

Added.

> - One should not run this script without carefully reviewing it first  
> (ex. it appends to `.bashrc`, which may not be Ok nor correct for various  
> reasons).

You are right. The script is intended for use on a Cloud9 account.

> I hope to have a look to `patsolve_z3` somewhere in the future ; it built  
> successfully, at least.
> 
> I also wonder since some time, if it’s Ok to use patscc2js (and now  
> patsolve\_z3) without a wrapper script in `bin`. I always created one for  
> patscc2js and moved the binary to `lib/ats2-postiats-0.2.0/bin` like it is  
> automatically done for `patscc` and `patsopt`, but I wonder if it’s really  
> required.

No, it is not required as long as ${PATSHOME}/bin is included in ${PATH}.

---

<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:** [June 10, 2015, 5:40am UTC](https://discourse.ats-lang.org/t/ats2-0-2-0/840/5 "2015-06-10T05:40:48Z")

</div>

I have put a shell script in Gist: ATS2-C9-install.sh  
[https://gist.github.com/githwxi](https://gist.github.com/githwxi)

> <https://gist.github.com/githwxi/7e31f4fd4df92125b73c>

You can find the following lines as line 66 and line 67

(cd ATS2-contrib/projects/MEDIUM/CATS-parsemit && time make all)  
(cd ATS2-contrib/projects/MEDIUM/CATS-atsccomp/CATS-atscc2js && time make  
build && mv -f atscc2js ${PATSHOME}/bin)

Basically, you need to compile CATS-parsemit before you can compile  
CATS-atscc2js.

I am still thinking about a proper way to package and distribute ATS code…On Wed, Jun 10, 2015 at 1:24 AM, ‘Yannick Duchêne’ via ats-lang-users \< [ats-lan...@googlegroups.com](mailto:ats-lan...@googlegroups.com)\> wrote:

> Le mercredi 10 juin 2015 06:27:22 UTC+2, gmhwxi a écrit :
> 
> > Fixed. Thanks!
> 
> That’s me who have to thanks 😛 .
> 
> I hope I’m not to say something wrong, but I feel I’m facing an error  
> trying to rebuild ATSCC2JS. `make pkgreloc` fails. I tried to fix it  
> changing line 61 of the Makfile
> 
> from this…
> 
> ```
> $(CPF) $(CATSPARSEMIT_source)/CATS/catsparse_*_dats.c
> 
> ```
> 
> $(CATSPARSEMIT)/.
> 
> … to this (which may be wrong too):
> 
> ```
> $(CPF) $(CATSPARSEMIT_source)/DATS/catsparse_*.dats
> 
> ```
> 
> $(CATSPARSEMIT)/.
> 
> But I still get this error during `make`:
> 
> ```
> gcc: error: ./.CATS-parsemit/catsparse_mylib_dats.c: Aucun fichier
> 
> ```
> 
> ou dossier de ce type  
> gcc: error: ./.CATS-parsemit/catsparse\_include\_all\_dats.c: Aucun  
> fichier ou dossier de ce type
> 
> “Aucun fichier ou dossier de ce type” means “No such file or directory”.
> 
> Without this attempt to fix as above, I got this during `make pkgreloc`:
> 
> ```
> cp -f […]/MEDIUM/CATS-parsemit/CATS/catsparse_*_dats.c
> 
> ```
> 
> ./.CATS-parsemit/.  
> cp: impossible d’évaluer  
> «[…]/MEDIUM/CATS-parsemit/CATS/catsparse\_\*\_dats.c»: Aucun fichier ou  
> dossier de ce type
> 
> It complains it can’t find the files. Indeed, actually, the designated  
> CATS directory is empty.
> 
> I’m using the `projects` directory from GitHub, as the archive from  
> SourceForge does not contains one
> 
> (not sure if I should post it in the ATSCC2JS thread or here… I’m going  
> with here)
> 
> –  
> 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).  
> Visit this group at [http://groups.google.com/group/ats-lang-users](http://groups.google.com/group/ats-lang-users).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/ats-lang-users/86356207-cd33-44d2-a362-161c2b1e2705%40googlegroups.com](https://groups.google.com/d/msgid/ats-lang-users/86356207-cd33-44d2-a362-161c2b1e2705%40googlegroups.com)  
> [https://groups.google.com/d/msgid/ats-lang-users/86356207-cd33-44d2-a362-161c2b1e2705%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/ats-lang-users/86356207-cd33-44d2-a362-161c2b1e2705%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .

---

<div class="post-metadata">

**Author:** ![Yannick\_Duchene](https://avatars.discourse-cdn.com/v4/letter/y/b77776/32.png) [@Yannick\_Duchene](https://discourse.ats-lang.org/u/Yannick_Duchene)\
**Post date:** [June 10, 2015, 6:45am UTC](https://discourse.ats-lang.org/t/ats2-0-2-0/840/6 "2015-06-10T06:45:07Z")

</div>

Seems Ok now.

Just a few notes:

- The installaton for dependency to libgmp3-dev may be changed into a  
dependency to libgmp-dev, which ends to be libgmp10-dev. That’s not the  
first time I build ATS with it, and I never get an error. GMP3 is now  
considered obsolete, if I’m not wrong.

- The installation for dependency to libjson-c-dev is missing.

- One should not run this script without carefully reviewing it first  
(ex. it appends to `.bashrc`, which may not be Ok nor correct for various  
reasons).

I hope to have a look to `patsolve_z3` somewhere in the future ; it built  
successfully, at least.

I also wonder since some time, if it’s Ok to use patscc2js (and now  
patsolve\_z3) without a wrapper script in `bin`. I always created one for  
patscc2js and moved the binary to `lib/ats2-postiats-0.2.0/bin` like it is  
automatically done for `patscc` and `patsopt`, but I wonder if it’s really  
required.Le mercredi 10 juin 2015 07:40:48 UTC+2, gmhwxi a écrit :

> I have put a shell script in Gist: ATS2-C9-install.sh  
> [githwxi’s gists · GitHub](https://gist.github.com/githwxi)  
> [A shell script for installing ATS2 + ATS2-contrib · GitHub](https://gist.github.com/githwxi/7e31f4fd4df92125b73c)
> 
> You can find the following lines as line 66 and line 67
> 
> (cd ATS2-contrib/projects/MEDIUM/CATS-parsemit && time make all)  
> (cd ATS2-contrib/projects/MEDIUM/CATS-atsccomp/CATS-atscc2js && time make  
> build && mv -f atscc2js ${PATSHOME}/bin)
> 
> Basically, you need to compile CATS-parsemit before you can compile  
> CATS-atscc2js.
> 
> I am still thinking about a proper way to package and distribute ATS  
> code…
> 
> On Wed, Jun 10, 2015 at 1:24 AM, ‘Yannick Duchêne’ via ats-lang-users \< [ats-l...@googlegroups.com](mailto:ats-l...@googlegroups.com) \<javascript:\>\> wrote:
> 
> > Le mercredi 10 juin 2015 06:27:22 UTC+2, gmhwxi a écrit :
> > 
> > > Fixed. Thanks!
> > 
> > That’s me who have to thanks 😛 .
> > 
> > I hope I’m not to say something wrong, but I feel I’m facing an error  
> > trying to rebuild ATSCC2JS. `make pkgreloc` fails. I tried to fix it  
> > changing line 61 of the Makfile
> > 
> > from this…
> > 
> > ```
> > $(CPF) $(CATSPARSEMIT_source)/CATS/catsparse_*_dats.c 
> > 
> > ```
> > 
> > $(CATSPARSEMIT)/.
> > 
> > … to this (which may be wrong too):
> > 
> > ```
> > $(CPF) $(CATSPARSEMIT_source)/DATS/catsparse_*.dats 
> > 
> > ```
> > 
> > $(CATSPARSEMIT)/.
> > 
> > But I still get this error during `make`:
> > 
> > ```
> > gcc: error: ./.CATS-parsemit/catsparse_mylib_dats.c: Aucun 
> > 
> > ```
> > 
> > fichier ou dossier de ce type  
> > gcc: error: ./.CATS-parsemit/catsparse\_include\_all\_dats.c: Aucun  
> > fichier ou dossier de ce type
> > 
> > “Aucun fichier ou dossier de ce type” means “No such file or directory”.
> > 
> > Without this attempt to fix as above, I got this during `make pkgreloc`:
> > 
> > ```
> > cp -f […]/MEDIUM/CATS-parsemit/CATS/catsparse_*_dats.c 
> > 
> > ```
> > 
> > ./.CATS-parsemit/.  
> > cp: impossible d’évaluer  
> > «[…]/MEDIUM/CATS-parsemit/CATS/catsparse\_\*\_dats.c»: Aucun fichier ou  
> > dossier de ce type
> > 
> > It complains it can’t find the files. Indeed, actually, the designated  
> > CATS directory is empty.
> > 
> > I’m using the `projects` directory from GitHub, as the archive from  
> > SourceForge does not contains one
> > 
> > (not sure if I should post it in the ATSCC2JS thread or here… I’m going  
> > with here)
> > 
> > –  
> > 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...@googlegroups.com](mailto:ats-lang...@googlegroups.com) \<javascript:\>.  
> > To post to this group, send email to [ats-l...@googlegroups.com](mailto:ats-l...@googlegroups.com)  
> > \<javascript:\>.  
> > Visit this group at [http://groups.google.com/group/ats-lang-users](http://groups.google.com/group/ats-lang-users).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/ats-lang-users/86356207-cd33-44d2-a362-161c2b1e2705%40googlegroups.com](https://groups.google.com/d/msgid/ats-lang-users/86356207-cd33-44d2-a362-161c2b1e2705%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/ats-lang-users/86356207-cd33-44d2-a362-161c2b1e2705%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/ats-lang-users/86356207-cd33-44d2-a362-161c2b1e2705%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .

---

<div class="post-metadata">

**Author:** ![Yannick\_Duchene](https://avatars.discourse-cdn.com/v4/letter/y/b77776/32.png) [@Yannick\_Duchene](https://discourse.ats-lang.org/u/Yannick_Duchene)\
**Post date:** [June 10, 2015, 5:24am UTC](https://discourse.ats-lang.org/t/ats2-0-2-0/840/7 "2015-06-10T05:24:21Z")

</div>

> Fixed. Thanks!

That’s me who have to thanks 😛 .

I hope I’m not to say something wrong, but I feel I’m facing an error  
trying to rebuild ATSCC2JS. `make pkgreloc` fails. I tried to fix it  
changing line 61 of the Makfile

from this…

```
    $(CPF) $(CATSPARSEMIT_source)/CATS/catsparse_*_dats.c 

```

$(CATSPARSEMIT)/.

… to this (which may be wrong too):

```
    $(CPF) $(CATSPARSEMIT_source)/DATS/catsparse_*.dats 

```

$(CATSPARSEMIT)/.

But I still get this error during `make`:

```
    gcc: error: ./.CATS-parsemit/catsparse_mylib_dats.c: Aucun fichier 

```

ou dossier de ce type  
gcc: error: ./.CATS-parsemit/catsparse\_include\_all\_dats.c: Aucun  
fichier ou dossier de ce type

“Aucun fichier ou dossier de ce type” means “No such file or directory”.

Without this attempt to fix as above, I got this during `make pkgreloc`:

```
    cp -f […]/MEDIUM/CATS-parsemit/CATS/catsparse_*_dats.c 

```

./.CATS-parsemit/.  
cp: impossible d’évaluer  
«[…]/MEDIUM/CATS-parsemit/CATS/catsparse\_\*\_dats.c»: Aucun fichier ou  
dossier de ce type

It complains it can’t find the files. Indeed, actually, the designated CATS  
directory is empty.

I’m using the `projects` directory from GitHub, as the archive from  
SourceForge does not contains one

(not sure if I should post it in the ATSCC2JS thread or here… I’m going  
with here)

---

<div class="post-metadata">

**Author:** ![Yannick\_Duchene](https://avatars.discourse-cdn.com/v4/letter/y/b77776/32.png) [@Yannick\_Duchene](https://discourse.ats-lang.org/u/Yannick_Duchene)\
**Post date:** [June 13, 2015, 8:46am UTC](https://discourse.ats-lang.org/t/ats2-0-2-0/840/8 "2015-06-13T08:46:28Z")

</div>

> I am still thinking about a proper way to package and distribute ATS  
> code…

What about Pkg-config? Could this play the role or what would be missing?

I feel it’s a kind of de-facto standard, it’s not restricted to Linux, as  
it used on Windows and Mac as well.
