where do I get atscc2js from?

68 views
Skip to first unread message

Dmitry Kouznetsov

unread,
Nov 6, 2018, 10:42:40 AM11/6/18
to ats-lang-users
Hi, I am learning ATS and want to run examples locally. This one is particularly interesting to me: https://github.com/githwxi/ATS-Postiats/tree/master/doc/EXAMPLE/EFFECTIVATS/FRP-bacon.js. When I 'make all' it tells I am supposed to have atscc2js in my ${PATSHOME}/bin and I don't. How do I get one?

Artyom Shalkhakov

unread,
Nov 6, 2018, 11:01:11 AM11/6/18
to ats-lan...@googlegroups.com
Hi Dmitry,

Welcome!

вт, 6 нояб. 2018 г. в 17:42, Dmitry Kouznetsov <dmitry.k...@gmail.com>:
Hi, I am learning ATS and want to run examples locally. This one is particularly interesting to me: https://github.com/githwxi/ATS-Postiats/tree/master/doc/EXAMPLE/EFFECTIVATS/FRP-bacon.js. When I 'make all' it tells I am supposed to have atscc2js in my ${PATSHOME}/bin and I don't. How do I get one?

You should build it. The translator is built with this Makefile:


I think you'll have to cp the binary to $PATSHOME/bin yourself, though. You can refer to some older scripts:

 

--
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.
To post to this group, send email to ats-lan...@googlegroups.com.
Visit this group at https://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/47e55746-fbe8-4ca1-9847-fcb7da889e18%40googlegroups.com.


--
Cheers,
Artyom Shalkhakov

Dmitry Kouznetsov

unread,
Nov 6, 2018, 11:22:25 AM11/6/18
to ats-lang-users
Aha! But then that contrib dir doesn't come with git clone... Ain't I supposed to have all the stuff from that dir in order to be able to run that make?

Dmitry Kouznetsov

unread,
Nov 6, 2018, 11:25:15 AM11/6/18
to ats-lang-users
I am actually wrong, sorry, it does come with git clone. Missed it, my bad. Let me try it now!

Artyom Shalkhakov

unread,
Nov 6, 2018, 11:25:32 AM11/6/18
to ats-lan...@googlegroups.com
How did you install the compiler? Have you not built from source?

The translators are probably not included in the distribution. Have to check.

Dmitry Kouznetsov

unread,
Nov 6, 2018, 11:28:46 AM11/6/18
to ats-lang-users
So, now I have the following output:

⋊> ~/s/a/A/c/CATS-atscc2js on mastermake all                                                                                                       17:26:14

\

make -C CATS-parsemit all

make[1]: Nothing to be done for `all'.

\

/Users/dmitry/sandbox/ats/ATS2-Postiats//bin/patscc \

  -O2 -DATS_MEMALLOC_GCBDW -o bin/atscc2js \

   DATS/atscc2js_main.dats DATS/atscc2js_emit.dats DATS/atscc2js_emit2.dats  ./CATS-parsemit/SATS/catsparse.sats  ./CATS-parsemit/CATS/catsparse_all_dats.c -lgc

./CATS-parsemit/CATS/catsparse_all_dats.c:68880:51: warning: implicit declaration of function 'S2Ecst' is invalid in C99 [-Wimplicit-function-declaration]

ATSINSmove(tmpret2067, PMVtmpltcstmat[0](cptr_get<S2Ecst(symbol)>)(tmp2068)) ;

                                                  ^

./CATS-parsemit/CATS/catsparse_all_dats.c:68880:58: error: use of undeclared identifier 'symbol'

ATSINSmove(tmpret2067, PMVtmpltcstmat[0](cptr_get<S2Ecst(symbol)>)(tmp2068)) ;

                                                         ^

./CATS-parsemit/CATS/catsparse_all_dats.c:68880:42: error: use of undeclared identifier 'cptr_get'

ATSINSmove(tmpret2067, PMVtmpltcstmat[0](cptr_get<S2Ecst(symbol)>)(tmp2068)) ;

                                         ^

./CATS-parsemit/CATS/catsparse_all_dats.c:68880:66: error: expected expression

ATSINSmove(tmpret2067, PMVtmpltcstmat[0](cptr_get<S2Ecst(symbol)>)(tmp2068)) ;

                                                                 ^

./CATS-parsemit/CATS/catsparse_all_dats.c:68880:24: error: use of undeclared identifier 'PMVtmpltcstmat'

ATSINSmove(tmpret2067, PMVtmpltcstmat[0](cptr_get<S2Ecst(symbol)>)(tmp2068)) ;

                       ^

./CATS-parsemit/CATS/catsparse_all_dats.c:71716:51: warning: implicit declaration of function 'S2Ecst' is invalid in C99 [-Wimplicit-function-declaration]

ATSINSmove(tmpret2190, PMVtmpltcstmat[0](cptr_get<S2Ecst(filename_type)>)(tmp2191)) ;

                                                  ^

./CATS-parsemit/CATS/catsparse_all_dats.c:71716:58: error: use of undeclared identifier 'filename_type'

ATSINSmove(tmpret2190, PMVtmpltcstmat[0](cptr_get<S2Ecst(filename_type)>)(tmp2191)) ;

                                                         ^

./CATS-parsemit/CATS/catsparse_all_dats.c:71716:42: error: use of undeclared identifier 'cptr_get'

ATSINSmove(tmpret2190, PMVtmpltcstmat[0](cptr_get<S2Ecst(filename_type)>)(tmp2191)) ;

                                         ^

./CATS-parsemit/CATS/catsparse_all_dats.c:71716:73: error: expected expression

ATSINSmove(tmpret2190, PMVtmpltcstmat[0](cptr_get<S2Ecst(filename_type)>)(tmp2191)) ;

                                                                        ^

./CATS-parsemit/CATS/catsparse_all_dats.c:71716:24: error: use of undeclared identifier 'PMVtmpltcstmat'

ATSINSmove(tmpret2190, PMVtmpltcstmat[0](cptr_get<S2Ecst(filename_type)>)(tmp2191)) ;

                       ^

./CATS-parsemit/CATS/catsparse_all_dats.c:71781:48: warning: implicit declaration of function 'S2Ecst' is invalid in C99 [-Wimplicit-function-declaration]

ATSINSmove(tmp2197, PMVtmpltcstmat[0](cptr_get<S2Ecst(filename_type)>)(tmp2195)) ;

                                               ^

./CATS-parsemit/CATS/catsparse_all_dats.c:71781:55: error: use of undeclared identifier 'filename_type'

ATSINSmove(tmp2197, PMVtmpltcstmat[0](cptr_get<S2Ecst(filename_type)>)(tmp2195)) ;

                                                      ^

./CATS-parsemit/CATS/catsparse_all_dats.c:71781:39: error: use of undeclared identifier 'cptr_get'

ATSINSmove(tmp2197, PMVtmpltcstmat[0](cptr_get<S2Ecst(filename_type)>)(tmp2195)) ;

                                      ^

./CATS-parsemit/CATS/catsparse_all_dats.c:71781:70: error: expected expression

ATSINSmove(tmp2197, PMVtmpltcstmat[0](cptr_get<S2Ecst(filename_type)>)(tmp2195)) ;

                                                                     ^

./CATS-parsemit/CATS/catsparse_all_dats.c:71781:21: error: use of undeclared identifier 'PMVtmpltcstmat'

ATSINSmove(tmp2197, PMVtmpltcstmat[0](cptr_get<S2Ecst(filename_type)>)(tmp2195)) ;

                    ^

./CATS-parsemit/CATS/catsparse_all_dats.c:97729:51: warning: implicit declaration of function 'S2Ecst' is invalid in C99 [-Wimplicit-function-declaration]

ATSINSmove(tmpret3537, PMVtmpltcstmat[0](cptr_get<S2Ecst(keyword)>)(tmp3538)) ;

                                                  ^

./CATS-parsemit/CATS/catsparse_all_dats.c:97729:58: error: use of undeclared identifier 'keyword'

ATSINSmove(tmpret3537, PMVtmpltcstmat[0](cptr_get<S2Ecst(keyword)>)(tmp3538)) ;

                                                         ^

./CATS-parsemit/CATS/catsparse_all_dats.c:97729:42: error: use of undeclared identifier 'cptr_get'

ATSINSmove(tmpret3537, PMVtmpltcstmat[0](cptr_get<S2Ecst(keyword)>)(tmp3538)) ;

                                         ^

./CATS-parsemit/CATS/catsparse_all_dats.c:97729:67: error: expected expression

ATSINSmove(tmpret3537, PMVtmpltcstmat[0](cptr_get<S2Ecst(keyword)>)(tmp3538)) ;

                                                                  ^

./CATS-parsemit/CATS/catsparse_all_dats.c:97729:24: error: use of undeclared identifier 'PMVtmpltcstmat'

ATSINSmove(tmpret3537, PMVtmpltcstmat[0](cptr_get<S2Ecst(keyword)>)(tmp3538)) ;

                       ^

./CATS-parsemit/CATS/catsparse_all_dats.c:98757:51: warning: implicit declaration of function 'S2Etyrec' is invalid in C99 [-Wimplicit-function-declaration]

ATSINSmove(tmpret3567, PMVtmpltcstmat[0](cptr_get<S2Etyrec(box; npf=-1; lexerr_loc=S2Ecst(loc_t), lexerr_node=S2Ecst(lexerr_node))>)(tmp3568)) ;

                                                  ^

./CATS-parsemit/CATS/catsparse_all_dats.c:98757:60: error: use of undeclared identifier 'box'

ATSINSmove(tmpret3567, PMVtmpltcstmat[0](cptr_get<S2Etyrec(box; npf=-1; lexerr_loc=S2Ecst(loc_t), lexerr_node=S2Ecst(lexerr_node))>)(tmp3568)) ;

                                                           ^

./CATS-parsemit/CATS/catsparse_all_dats.c:98757:42: error: use of undeclared identifier 'cptr_get'

ATSINSmove(tmpret3567, PMVtmpltcstmat[0](cptr_get<S2Etyrec(box; npf=-1; lexerr_loc=S2Ecst(loc_t), lexerr_node=S2Ecst(lexerr_node))>)(tmp3568)) ;

                                         ^

./CATS-parsemit/CATS/catsparse_all_dats.c:98757:111: warning: implicit declaration of function 'S2Ecst' is invalid in C99 [-Wimplicit-function-declaration]

ATSINSmove(tmpret3567, PMVtmpltcstmat[0](cptr_get<S2Etyrec(box; npf=-1; lexerr_loc=S2Ecst(loc_t), lexerr_node=S2Ecst(lexerr_node))>)(tmp3568)) ;

                                                                                                              ^

./CATS-parsemit/CATS/catsparse_all_dats.c:98757:118: error: use of undeclared identifier 'lexerr_node'

ATSINSmove(tmpret3567, PMVtmpltcstmat[0](cptr_get<S2Etyrec(box; npf=-1; lexerr_loc=S2Ecst(loc_t), lexerr_node=S2Ecst(lexerr_node))>)(tmp3568)) ;

                                                                                                                     ^

fatal error: too many errors emitted, stopping now [-ferror-limit=]

6 warnings and 20 errors generated.

make: *** [bin_atscc2js] Error 1

Artyom Shalkhakov

unread,
Nov 7, 2018, 2:51:41 AM11/7/18
to ats-lang-users
On Tuesday, November 6, 2018 at 6:28:46 PM UTC+2, Dmitry Kouznetsov wrote:
So, now I have the following output:


Curious. Do you have PATSHOME and PATSHOMERELOC environment variables set?

These kinds of errors typically indicate that the compiler was unable to locate template function definitions. For the first error, the offending code is probably


but I guess that unsafe function definitions should have been supplied in the prelude.

Dmitry Kouznetsov

unread,
Nov 7, 2018, 5:18:15 AM11/7/18
to ats-lang-users
I do have PATSHOME set, however PATSHOMERELOC isn't set. What is it supposed to be set to? btw I am using Mac, should it matter.

Artyom Shalkhakov

unread,
Nov 7, 2018, 5:54:41 AM11/7/18
to ats-lan...@googlegroups.com
Hi Dmitry,

ср, 7 нояб. 2018 г. в 12:18, Dmitry Kouznetsov <dmitry.k...@gmail.com>:
I do have PATSHOME set, however PATSHOMERELOC isn't set. What is it supposed to be set to? btw I am using Mac, should it matter.


PATSHOMERELOC should be set to the full path to the ATS2-contrib repo clone.



--
Cheers,
Artyom Shalkhakov

Richard

unread,
Nov 8, 2018, 3:03:00 AM11/8/18
to ats-lang-users
Here is a script to install ats2 (with atscc2js) on macOS.

https://pastebin.com/raw/HEr5fJuK

Reply all
Reply to author
Forward
0 new messages