For the record, here is the directory for Atscc2clj:
There is a Makefile for generating atscc2clj. Also, some of the running
examples can be found at:
Clojure uses a rather peculiar way to support optimization of recursive
tail-calls. So far, ATS can only properly handle tail-call
optimization if the call is located not inside the body of a pattern
matching clause. Hopefully, this restriction can be removed
later...On Thursday, July 14, 2016 at 5:15:35 PM UTC-4, gmhwxi wrote:
I am pleased to announce that
ATS code can now be compiled to Clojure (and then to JVM).
I include an example as follows.
Obviously, the generated Clojure code is not so-called idiomatic Clojure
But it is really a lot safer than manually written Clojure code because
of the code passes type-checking in ATS.
;;knd = 0
;;var tmplab, tmplab_clj
] ;; with-local-vars
(var-set tmp1 (ats2cljpre_gt_int0_int0 arg0 0))
(var-set tmp3 (ats2cljpre_sub_int0_int0 arg0 1))
(var-set tmp2 (fact @tmp3))
(ats2cljpre_mul_int0_int0 arg0 @tmp2)
) ;; if-then
) ;; if-else
) ;; end-of-with-local-vars
) ;; end-of-fun
Now I need to figure out how to write apps in Clojure After that, we
should be able to write apps in ATS (via Clojure).