hi,
i used brew to install ats-2 on a mac.
-
i tried the most basic, i think, hello world example.
-
it spits out a lot of stuff that i didn’t ask for; if things are
working, don’t bother telling me, and don’t use “!” as if it is a
miracle that it worked. it sure makes it hard to see where any real
problems are. -
it gives me errors. they are obtuse to first time users. what do i
need to change to make this work?
thanks for any help. (version at the bottom)
ATS 533 $ cat test.dats
implement main() = print(“Hello World\n”);
ATS 534 $ patscc test.dats
exec(patsopt --output test_dats.c --dynamic test.dats)
Hello from ATS2(ATS/Postiats)!
Loading [fixity.ats] starts!
Loading [fixity.ats] finishes!
Loading [basics_pre.sats] starts!
Loading [basics_pre.sats] finishes!
Loading [basics_sta.sats] starts!
Loading [basics_sta.sats] finishes!
Loading [basics_dyn.sats] starts!
Loading [basics_dyn.sats] finishes!
Loading [basics_gen.sats] starts!
Loading [basics_gen.sats] finishes!
The 1st translation (fixity) of [test.dats] is successfully completed!
The 2nd translation (binding) of [test.dats] is successfully completed!
/Users/x/Downloads/tmp/ATS/test.dats: 20(line=1, offs=20) –
41(line=1, offs=41): error(3):
[/home/hwxi/research/Postiats/git/src/pats_trans3_util.dats]:
d3exp_trdn: the dynamic expression cannot be assigned the type
[S2Eapp(S2Ecst(g0int_t0ype); S2Ecst(int_kind))].
/Users/x/Downloads/tmp/ATS/test.dats: 20(line=1, offs=20) –
41(line=1, offs=41): error(3): mismatch of static terms (tyleq):
The actual term is: S2Ecst(atsvoid_t0ype)
The needed term is: S2Eapp(S2Ecst(g0int_t0ype); S2Ecst(int_kind))
TRANS3: there are [1] errors in total.
exit(ATS): uncaught exception:
_2home_2hwxi_2research_2Postiats_2git_2src_2pats_error_2esats__FatalErrorException(1025)
exec(patsopt --output test_dats.c --dynamic test.dats) = 256
ATS 540 $ patscc -v
exec(gcc -std=c99 -D_XOPEN_SOURCE -I${PATSHOME}
-I${PATSHOME}/ccomp/runtime -L${PATSHOME}/ccomp/atslib/lib
-L${PATSHOME}/ccomp/atslib/lib64 -v)
Using built-in specs.
Target: i686-apple-darwin11
Configured with:
/private/var/tmp/llvmgcc42/llvmgcc42-2335.15~25/src/configure
–disable-checking --enable-werror
–prefix=/Developer/usr/llvm-gcc-4.2 --mandir=/share/man
–enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm-
–program-transform-name=/^[cg][^.-]*$/s/$/-4.2/
–with-slibdir=/usr/lib --build=i686-apple-darwin11
–enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2335.15~25/dst-llvmCore/Developer/usr/local
–program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11
–target=i686-apple-darwin11
–with-gxx-include-dir=/usr/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)
exec(gcc -std=c99 -D_XOPEN_SOURCE -I${PATSHOME}
-I${PATSHOME}/ccomp/runtime -L${PATSHOME}/ccomp/atslib/lib
-L${PATSHOME}/ccomp/atslib/lib64 -v) = 0