packages feed

fast-arithmetic 0.6.0.4 → 0.6.0.5

raw patch · 39 files changed

+4516/−37 lines, 39 filesdep ~base

Dependency ranges changed: base

Files

+ .atspkg/contrib/ats-includes-0.3.10/ccomp/runtime/pats_ccomp_basics.h view
@@ -0,0 +1,172 @@+/* ******************************************************************* */+/*                                                                     */+/*                         Applied Type System                         */+/*                                                                     */+/* ******************************************************************* */++/*+** ATS/Postiats - Unleashing the Potential of Types!+** Copyright (C) 2011-20?? Hongwei Xi, ATS Trustful Software, Inc.+** All rights reserved+**+** ATS is free software;  you can  redistribute it and/or modify it under+** the terms of  the GNU GENERAL PUBLIC LICENSE (GPL) as published by the+** Free Software Foundation; either version 3, or (at  your  option)  any+** later version.+** +** ATS is distributed in the hope that it will be useful, but WITHOUT ANY+** WARRANTY; without  even  the  implied  warranty  of MERCHANTABILITY or+** FITNESS FOR A PARTICULAR PURPOSE.  See the  GNU General Public License+** for more details.+** +** You  should  have  received  a  copy of the GNU General Public License+** along  with  ATS;  see the  file COPYING.  If not, please write to the+** Free Software Foundation,  51 Franklin Street, Fifth Floor, Boston, MA+** 02110-1301, USA.+*/++/* ****** ****** */++/*+(* Author: Hongwei Xi *)+(* Authoremail: hwxi AT cs DOT bu DOT edu *)+(* Start time: October, 2012 *)+*/++/* ****** ****** */++#ifndef PATS_CCOMP_BASICS_H+#define PATS_CCOMP_BASICS_H++/* ****** ****** */+//+// HX: boolean values+//+#define atsbool_true 1+#define atsbool_false 0+//+#define atsptr_null ((void*)0)+#define the_atsptr_null ((void*)0)+//+/* ****** ****** */+//+#define ATSstruct struct+//+/* ****** ****** */+/*+#define ATStypedef typedef+*/+//+/* ****** ****** */++#ifndef \+ATS_EXTERN_DEF__+#define ATSextern() extern+#else+#define ATSextern() ATS_EXTERN_DEF__+#endif // #ifndef++/* ****** ****** */++#ifndef \+ATS_STATIC_DEF__+#define ATSstatic() static+#else+#define ATSstatic() ATS_STATIC_DEF__+#endif // #ifndef++/* ****** ****** */++#ifndef \+ATS_INLINE_DEF__+#define ATSinline() static inline+#else+#define ATSinline() ATS_INLINE_DEF__+#endif // #ifndef++/* ****** ****** */+//+#define ATSdynload()+//+#define ATSdynloadflag_sta(flag)+#define ATSdynloadflag_ext(flag) ATSextern() int flag+//+#define ATSdynloadflag_init(flag) int flag = 0+//+#define ATSdynloadflag_minit(flag) int flag = 0+//+#define ATSdynloadset(flag) flag = 1+#define ATSdynloadfcall(dynloadfun) dynloadfun()+//+/* ****** ****** */++#ifndef \+_ATS_CCOMP_EXCEPTION_NONE_+//+#define \+ATSdynexn_dec(d2c) \+atstype_exncon d2c = { 0, "__ATSEXNMSG__" }+//+#define \+ATSdynexn_extdec(d2c) ATSextern() atstype_exncon d2c+//+#define \+ATSdynexn_initize(d2c, exnmsg) the_atsexncon_initize(&(d2c), exnmsg)+//+#endif // end of [_ATS_CCOMP_EXCEPTION_NONE_]++/* ****** ****** */++#define ATSassume(flag) void *flag = (void*)0++/* ****** ****** */+//+#define ATSclosurerize_end(flab)+#define ATSclosurerize_beg(flab, tenvs, targs, tres)+//+/* ****** ****** */++#define ATSdyncst_mac(d2c)+#define ATSdyncst_castfn(d2c)+#define ATSdyncst_extfun(d2c, targs, tres) ATSextern() tres d2c targs+#define ATSdyncst_stafun(d2c, targs, tres) ATSstatic() tres d2c targs++/* ****** ****** */++#define ATSdyncst_valimp(d2c, type) type d2c+#define ATSdyncst_valdec(d2c, type) ATSextern() type d2c++/* ****** ****** */+//+#define \+ATSmainats_void_0(err) mainats_void_0()+#define \+ATSmainats_argc_argv_0(argc, argv, err) mainats_argc_argv_0(argc, argv)+#define \+ATSmainats_argc_argv_envp_0(argc, argv, envp, err) mainats_argc_argv_envp_0(argc, argv, envp)+//+#define \+ATSmainats_void_int(err) err = mainats_void_int()+#define \+ATSmainats_argc_argv_int(argc, argv, err) err = mainats_argc_argv_int(argc, argv)+#define \+ATSmainats_argc_argv_envp_int(argc, argv, envp, err) err = mainats_argc_argv_envp_int(argc, argv, envp)+//+/* ****** ****** */+//+extern+void atsruntime_raise (void *exn) ;+extern+void atsruntime_handle_uncaughtexn (void *exn0) ;+extern+void atsruntime_handle_unmatchedval (char *msg0) ;+extern+void atsruntime_handle_unmatchedarg (char *msg0) ;+//+/* ****** ****** */++#endif /* PATS_CCOMP_BASICS_H */++/* ****** ****** */++/* end of [pats_ccomp_basics.h] */
+ .atspkg/contrib/ats-includes-0.3.10/ccomp/runtime/pats_ccomp_config.h view
@@ -0,0 +1,49 @@+/* ******************************************************************* */+/*                                                                     */+/*                         Applied Type System                         */+/*                                                                     */+/* ******************************************************************* */++/*+** ATS/Postiats - Unleashing the Potential of Types!+** Copyright (C) 2011-20?? Hongwei Xi, ATS Trustful Software, Inc.+** All rights reserved+**+** ATS is free software;  you can  redistribute it and/or modify it under+** the terms of  the GNU GENERAL PUBLIC LICENSE (GPL) as published by the+** Free Software Foundation; either version 3, or (at  your  option)  any+** later version.+** +** ATS is distributed in the hope that it will be useful, but WITHOUT ANY+** WARRANTY; without  even  the  implied  warranty  of MERCHANTABILITY or+** FITNESS FOR A PARTICULAR PURPOSE.  See the  GNU General Public License+** for more details.+** +** You  should  have  received  a  copy of the GNU General Public License+** along  with  ATS;  see the  file COPYING.  If not, please write to the+** Free Software Foundation,  51 Franklin Street, Fifth Floor, Boston, MA+** 02110-1301, USA.+*/++/* ****** ****** */++/*+(* Author: Hongwei Xi *)+(* Authoremail: hwxi AT cs DOT bu DOT edu *)+(* Start time: January, 2013 *)+*/++/* ****** ****** */++#ifndef PATS_CCOMP_CONFIG_H+#define PATS_CCOMP_CONFIG_H++/* ****** ****** */++// HX: it is yet empty++/* ****** ****** */++#endif /* PATS_CCOMP_CONFIG_H */++/* end of [pats_ccomp_config.h] */
+ .atspkg/contrib/ats-includes-0.3.10/ccomp/runtime/pats_ccomp_exception.h view
@@ -0,0 +1,179 @@+/* ******************************************************************* */+/*                                                                     */+/*                         Applied Type System                         */+/*                                                                     */+/* ******************************************************************* */++/*+** ATS/Postiats - Unleashing the Potential of Types!+** Copyright (C) 2011-20?? Hongwei Xi, ATS Trustful Software, Inc.+** All rights reserved+**+** ATS is free software;  you can  redistribute it and/or modify it under+** the terms of  the GNU GENERAL PUBLIC LICENSE (GPL) as published by the+** Free Software Foundation; either version 3, or (at  your  option)  any+** later version.+** +** ATS is distributed in the hope that it will be useful, but WITHOUT ANY+** WARRANTY; without  even  the  implied  warranty  of MERCHANTABILITY or+** FITNESS FOR A PARTICULAR PURPOSE.  See the  GNU General Public License+** for more details.+** +** You  should  have  received  a  copy of the GNU General Public License+** along  with  ATS;  see the  file COPYING.  If not, please write to the+** Free Software Foundation,  51 Franklin Street, Fifth Floor, Boston, MA+** 02110-1301, USA.+*/++/* ****** ****** */++/*+(* Author: Hongwei Xi *)+(* Authoremail: hwxi AT cs DOT bu DOT edu *)+(* Start time: June, 2013 *)+*/++/* ****** ****** */++#ifndef PATS_CCOMP_EXCEPTION_H+#define PATS_CCOMP_EXCEPTION_H++/* ****** ****** */++/*+use -D_XOPEN_SOURCE+*/+#include <setjmp.h>++/* ****** ****** */++#define atstype_jmp_buf jmp_buf+#define atspre_setjmp(env, mask) setjmp(env)+#define atspre_longjmp(env, ret) longjmp(env, ret)++/* ****** ****** */++/*+#include <alloca.h>+*/+extern void *alloca (size_t bsz) ;++/* ****** ****** */++/*+extern+atstype_exncon *atspre_AssertExn_make() ;+extern+atstype_exncon *atspre_NotFoundExn_make() ;+extern+atstype_exncon *atspre_IllegalArgExn_make(const char*) ;+extern+atstype_exncon *atspre_ListSubscriptExn_make() ;+extern+atstype_exncon *atspre_StreamSubscriptExn_make() ;+extern+atstype_exncon *atspre_ArraySubscriptExn_make() ;+extern+atstype_exncon *atspre_MatrixSubscriptExn_make() ;+//+extern atstype_exncon *atspre_NotSomeExn_make() ;+//+extern+atstype_bool atspre_isListSubscriptExn (const atstype_exncon*) ;+extern+atstype_bool atspre_isStreamSubscriptExn (const atstype_exncon*) ;+extern+atstype_bool atspre_isArraySubscriptExn (const atstype_exncon*) ;+extern+atstype_bool atspre_isMatrixSubscriptExn (const atstype_exncon*) ;+//+extern atstype_bool atspre_isNotSomeExn (const atstype_exncon*) ; +*/++/* ****** ****** */++typedef+struct atsexnframe+{+  atstype_jmp_buf env ;+  atstype_exnconptr exn ;+  struct atsexnframe *prev ;+} atsexnframe_t ;++typedef+atsexnframe_t *atsexnframe_ptr ;++/* ****** ****** */++#define \+atsexnframe_alloc() alloca(sizeof(atsexnframe_t))+#define \+atsexnframe_mfree(frame) /* there-is-nothing-to-do */++/* ****** ****** */++extern+atsexnframe_ptr *my_atsexnframe_getref () ;++/* ****** ****** */++static+inline+void my_atsexnframe_enter+(+  atsexnframe_ptr frame+, atsexnframe_ptr *framep+) {+  frame->prev = *framep ; *framep = frame ; return ;+} // end of [my_atsexnframe_enter]++static+inline+void my_atsexnframe_leave+(+  atsexnframe_ptr *framep+) {+  atsexnframe_mfree(*framep) ; *framep = (*framep)->prev ; return ;+} // end of [my_atsexnframe_leave]++/* ****** ****** */++/*+** HX:+** beg-of-WARNING:+** DO NOT USE THE FOLLOWING MACROS:+*/++#define \+ATStrywith_try(tmpexn) \+do { \+  int flag ; \+  atsexnframe_ptr frame ; \+  atsexnframe_ptr *framep ; \+  frame = atsexnframe_alloc() ; \+  framep = my_atsexnframe_getref() ; \+  my_atsexnframe_enter(frame, framep) ; \+  flag = atspre_setjmp(frame->env, 1) ; \+  if (flag==0) { /* normal */++#define \+ATStrywith_with(tmpexn) \+    my_atsexnframe_leave(framep) ; \+  } else { /* flag<>0 : exceptional */ \+    tmpexn = (*framep)->exn ; \+    my_atsexnframe_leave(framep) ;++#define \+ATStrywith_end(tmpexn) \+  } \+} while(0) ; /* end of [do] */++/* end-of-WARNING */++/* ****** ****** */++#endif /* PATS_CCOMP_EXCEPTION_H */++/* ****** ****** */++/* end of [pats_ccomp_exception.h] */
+ .atspkg/contrib/ats-includes-0.3.10/ccomp/runtime/pats_ccomp_instrset.h view
@@ -0,0 +1,441 @@+/* ******************************************************************* */+/*                                                                     */+/*                         Applied Type System                         */+/*                                                                     */+/* ******************************************************************* */++/*+** ATS/Postiats - Unleashing the Potential of Types!+** Copyright (C) 2011-20?? Hongwei Xi, ATS Trustful Software, Inc.+** All rights reserved+**+** ATS is free software;  you can  redistribute it and/or modify it under+** the terms of  the GNU GENERAL PUBLIC LICENSE (GPL) as published by the+** Free Software Foundation; either version 3, or (at  your  option)  any+** later version.+** +** ATS is distributed in the hope that it will be useful, but WITHOUT ANY+** WARRANTY; without  even  the  implied  warranty  of MERCHANTABILITY or+** FITNESS FOR A PARTICULAR PURPOSE.  See the  GNU General Public License+** for more details.+** +** You  should  have  received  a  copy of the GNU General Public License+** along  with  ATS;  see the  file COPYING.  If not, please write to the+** Free Software Foundation,  51 Franklin Street, Fifth Floor, Boston, MA+** 02110-1301, USA.+*/++/* ****** ****** */++/*+(* Author: Hongwei Xi *)+(* Authoremail: hwxi AT cs DOT bu DOT edu *)+(* Start time: October, 2012 *)+*/++/* ****** ****** */++#ifndef PATS_CCOMP_INSTRSET_H+#define PATS_CCOMP_INSTRSET_H++/* ****** ****** */+//+// HX: boolean values+//+#define atsbool_true 1+#define atsbool_false 0+//+/* ****** ****** */++#define ATStysum() struct{ int contag; }+#define ATStyexn() struct{ int exntag; char *exnmsg; }+#define ATStylist(tyelt) struct{ tyelt head; void *tail; }+#define ATStyclo() struct{ void *cfun; }++/* ****** ****** */+//+// HX: for supporting lazy-evaluation+//+#define \+ATStylazy(tyval) \+  struct{ int flag; union{ void* thunk; tyval saved; } lazy; }+//+/* ****** ****** */++#define ATSif(x) if(x)+#define ATSthen()+#define ATSelse() else++/* ****** ****** */++#define ATSifthen(x) if(x)+#define ATSifnthen(x) if(!(x))++/* ****** ****** */++#define ATSdo() do+#define ATSwhile(x) while(x)+#define ATSbreak() break+#define ATScontinue() continue++/* ****** ****** */+//+// HX: handling for/while loops+//+#define \+ATSloop_open(init, fini, cont) \+  do { init:+#define \+ATSloop_close(init, fini, cont) \+  goto init ; fini: break ; } while(0)+//+#define ATSbreak2(fini) goto fini+#define ATScontinue2(cont) goto cont+//+/* ****** ****** */++#define ATSreturn(x) return(x)+#define ATSreturn_void(x) return++/* ****** ****** */++#define ATSFCreturn(x) return(x)+#define ATSFCreturn_void(x) (x); return++/* ****** ****** */+//+#define ATSbranch_beg()+#define ATSbranch_end() break ;+//+#define ATScaseof_beg() do {+#define ATScaseof_end() } while(0) ;+//+/* ****** ****** */++#define ATSextcode_beg()+#define ATSextcode_end()++/* ****** ****** */++#define ATSfunbody_beg()+#define ATSfunbody_end()++/* ****** ****** */++#define ATSPMVint(i) i+#define ATSPMVintrep(rep) (rep)++#define ATSPMVbool_true() atsbool_true+#define ATSPMVbool_false() atsbool_false+#define ATSPMVchar(c) (c)+#define ATSPMVfloat(rep) (rep)+#define ATSPMVstring(str) (str)++#define ATSPMVi0nt(tok) (tok)+#define ATSPMVf0loat(tok) (tok)++/* ****** ****** */++#define ATSCSTSPmyfil(info) info+#define ATSCSTSPmyloc(info) info++/* ****** ****** */+//+#define ATSPMVtop() atserror_top+//+#define ATSPMVempty() /*empty*/+#define ATSPMVextval(name) (name)+//+/* ****** ****** */++#define ATSPMVptrof(lval) (&(lval))+#define ATSPMVptrof_void(lval) ((void*)0)++/* ****** ****** */++#define ATSPMVrefarg0(val) (val)+#define ATSPMVrefarg1(ref) (ref)++/* ****** ****** */++#define ATSPMVvararg0() 0+#define ATSPMVvararg1(...) __VA_ARGS__+  +/* ****** ****** */++#define ATSPMVtyrep(rep) (rep)++/* ****** ****** */++#define ATSPMVsizeof(hit) (sizeof(hit))++/* ****** ****** */+//+#define ATSPMVfunlab(flab) (flab)+//+// HX-2015-07-06: not yet in use:+//+#define ATSPMVfunlab2(flab, arity) (flab)+//+/* ****** ****** */++#define ATSPMVcfunlab(knd, flab, env) (flab##__closurerize)env++/* ****** ****** */++//+// HX: castfn application+//+#define ATSPMVcastfn(d2c, hit, arg) ((hit)arg)+//+/* ****** ****** */++#define ATSfuncall(fun, funarg) (fun)funarg++/* ****** ****** */+//+#define ATSextfcall(fun, funarg) (fun)funarg+#define ATSextmcall(obj, mtd, funarg) (obj->mtd)funarg+//+/* ****** ****** */+//+#define \+ATSfunclo_fun(pmv, targs, tres) ((tres(*)targs)(pmv))+#define \+ATSfunclo_clo(pmv, targs, tres) ((tres(*)targs)(((ATStyclo()*)pmv)->cfun))+//+/* ****** ****** */+//+#define ATStmpdec(tmp, hit) hit tmp+#define ATStmpdec_void(tmp)+//+#define ATSstatmpdec(tmp, hit) static hit tmp+#define ATSstatmpdec_void(tmp)+//+/* ****** ****** */++#define ATSderef(pmv, hit) (*(hit*)pmv)++/* ****** ****** */+//+// HX: [ATSSELcon] is the same as [ATSSELboxrec]+//+#define ATSSELcon(pmv, tysum, lab) (((tysum*)pmv)->lab)+//+#define ATSSELrecsin(pmv, tyrec, lab) (pmv)+#define ATSSELfltrec(pmv, tyrec, lab) ((pmv).lab)+#define ATSSELboxrec(pmv, tyrec, lab) (((tyrec*)pmv)->lab)+#define ATSSELarrind(pmv, tyarr, lab) (((tyarr)pmv).lab)+#define ATSSELarrptrind(pmv, tyelt, lab) (((tyelt*)pmv)lab)+//+/* ****** ****** */+//+#define ATSCKnot(x) ((x)==0)+//+#define ATSCKiseqz(x) ((x)==0)+#define ATSCKisneqz(x) ((x)!=0)+//+#define ATSCKptriscons(x) (0 != (void*)(x))+#define ATSCKptrisnull(x) (0 == (void*)(x))+//+/* ****** ****** */+//+#define ATSCKpat_int(pmv, pat) ((pmv)==pat)+#define ATSCKpat_bool(pmv, pat) ((pmv)==pat)+#define ATSCKpat_char(pmv, pat) ((pmv)==pat)+#define ATSCKpat_float(pmv, pat) ((pmv)==pat)+#define ATSCKpat_string(pmv, pat) (atspre_string_equal(pmv, pat))+//+/*+** a datatype should not contain more than 1024 constructors!+*/+#define ATS_DATACONMAX 1024+//+#define ATSCKpat_con0(pmv, tag) ((pmv)==(void*)tag)+#define ATSCKpat_con1(pmv, tag) \+  ((pmv)>=(void*)ATS_DATACONMAX && ((ATStysum()*)(pmv))->contag==tag)+//+#define ATSCKpat_exn0(pmv, d2con) ((pmv)==(void*)(&(d2con)))+#define ATSCKpat_exn1(pmv, d2con) (((ATStyexn()*)(pmv))->exntag==(&(d2con))->exntag)+//+/* ****** ****** */+//+#define ATSINSlab(lab) lab+#define ATSINSgoto(lab) goto lab+//+#define ATSINSflab(flab) flab+#define ATSINSfgoto(flab) goto flab+//+/* ****** ****** */++#define ATSINSfreeclo(cloptr) ATS_MFREE(cloptr)+#define ATSINSfreecon(datconptr) ATS_MFREE(datconptr)++/* ****** ****** */++#define ATSINSmove(tmp, val) (tmp = val)+#define ATSINSpmove(tmp, hit, val) (*(hit*)tmp = val)++/* ****** ****** */+/*+** HX-2013-01-20:+** Do not have parentheses around [command]+*/+#define ATSINSmove_void(tmp, command) command+#define ATSINSpmove_void(tmp, hit, command) command++/* ****** ****** */++#define ATSINSmove_ptralloc(tmp, hit) (tmp = ATS_MALLOC(sizeof(hit)))++/* ****** ****** */+//+#define \+ATSINSmove_nil(tmp) (tmp = ((void*)0))+//+#define \+ATSINSmove_con0(tmp, tag) (tmp = ((void*)tag))+//+#define ATSINSmove_con1_beg()+#define ATSINSmove_con1_end()+#define ATSINSmove_con1_new(tmp, tysum) (tmp = ATS_MALLOC(sizeof(tysum)))+#define ATSINSstore_con1_tag(tmp, val) (((ATStysum()*)(tmp))->contag = val)+#define ATSINSstore_con1_ofs(tmp, tysum, lab, val) (((tysum*)(tmp))->lab = val)+//+/* ****** ****** */+//+#define ATSINSmove_exn0(tmp, d2con) (tmp = &(d2con))+//+#define ATSINSmove_exn1_beg()+#define ATSINSmove_exn1_end()+#define ATSINSmove_exn1_new(tmp, tyexn) (tmp = ATS_MALLOC(sizeof(tyexn)))+#define ATSINSstore_exn1_tag(tmp, d2con) (((ATStyexn()*)tmp)->exntag = (&(d2con))->exntag)+#define ATSINSstore_exn1_msg(tmp, d2con) (((ATStyexn()*)tmp)->exnmsg = (&(d2con))->exnmsg)+//+/* ****** ****** */+//+#define ATStailcal_beg() do {+#define ATStailcal_end() } while(0) ;+//+#define ATSINSmove_tlcal(apy, tmp) (apy = tmp)+#define ATSINSargmove_tlcal(arg, apy) (arg = apy)+//+/* ****** ****** */++#define ATSINSmove_fltrec_beg()+#define ATSINSmove_fltrec_end()+#define ATSINSstore_fltrec_ofs(tmp, tyrec, lab, val) ((tmp).lab = val)++/* ****** ****** */++#define ATSINSmove_boxrec_beg()+#define ATSINSmove_boxrec_end()+#define ATSINSmove_boxrec_new(tmp, tyrec) (tmp = ATS_MALLOC(sizeof(tyrec)))+#define ATSINSstore_boxrec_ofs(tmp, tyrec, lab, val) (((tyrec*)(tmp))->lab = val)++/* ****** ****** */++#define ATSINSload(tmp, pmv) (tmp = pmv)+#define ATSINSstore(pmv1, pmv2) (pmv1 = pmv2)+#define ATSINSxstore(tmp, pmv1, pmv2) (tmp = pmv1, pmv1 = pmv2, pmv2 = tmp)++/* ****** ****** */+//+#define ATSINSmove_list_nil(tmp) (tmp = (void*)0)+#define ATSINSmove_list_phead(tmp1, tmp2, tyelt) (tmp1 = &(((ATStylist(tyelt)*)(*(void**)tmp2))->head))+#define ATSINSmove_list_ptail(tmp1, tmp2, tyelt) (tmp1 = &(((ATStylist(tyelt)*)(*(void**)tmp2))->tail))+#define ATSINSpmove_list_nil(tmp) (*(void**)tmp = (void*)0)+#define ATSINSpmove_list_cons(tmp, tyelt) (*(void**)tmp = ATS_MALLOC(sizeof(ATStylist(tyelt))))+//+/* ****** ****** */+//+#define ATSINSstore_arrpsz_asz(tmp, asz) ((tmp).size = asz)+#define ATSINSstore_arrpsz_ptr(tmp, tyelt, asz) ((tmp).ptr = ATS_MALLOC(asz*sizeof(tyelt)))+//+#define ATSINSmove_arrpsz_ptr(tmp, psz) (tmp = (psz).ptr)+//+#define ATSINSupdate_ptrinc(tmp, tyelt) (tmp = (tyelt*)(tmp) + 1)+#define ATSINSupdate_ptrdec(tmp, tyelt) (tmp = (tyelt*)(tmp) - 1)+//+/* ****** ****** */++#define ATSINSextvar_assign(var, pmv) var = (pmv)+#define ATSINSdyncst_valbind(d2cst, pmv) d2cst = (pmv)++/* ****** ****** */++#define ATSINSclosure_initize(flab, tmpenv) (flab##__closureinit)tmpenv++/* ****** ****** */+//+#define ATSINSraise_exn(tmp, pmv) atsruntime_raise(pmv)+//+/* ****** ****** */+//+#define ATSINScaseof_fail(msg) atsruntime_handle_unmatchedval(msg)+#define ATSINSfunarg_fail(msg) atsruntime_handle_unmatchedarg(msg)+//+/* ****** ****** */++#define \+ATSINSmove_delay(tmpret, tyval, pmv_thk) \+do { \+  tmpret = \+    ATS_MALLOC(sizeof(ATStylazy(tyval))) ; \+  (*(ATStylazy(tyval)*)tmpret).flag = 0 ; \+  (*(ATStylazy(tyval)*)tmpret).lazy.thunk = pmv_thk ; \+} while(0) ; /* end of [do ... while ...] */++#define \+ATSINSmove_lazyeval(tmpret, tyval, pmv_lazy) \+do { \+  if ( \+    (*(ATStylazy(tyval)*)pmv_lazy).flag==0 \+  ) { \+    (*(ATStylazy(tyval)*)pmv_lazy).flag += 1 ; \+    atstype_cloptr __thunk = (*(ATStylazy(tyval)*)pmv_lazy).lazy.thunk ; \+    tmpret = ATSfuncall(ATSfunclo_clo(__thunk, (atstype_cloptr), tyval), (__thunk)) ; \+    (*(ATStylazy(tyval)*)pmv_lazy).lazy.saved = tmpret ; \+  } else { \+    tmpret = (*(ATStylazy(tyval)*)pmv_lazy).lazy.saved ; \+  } /* end of [if] */ \+} while(0) /* end of [do ... while ...] */++/* ****** ****** */++#define \+ATSINSmove_ldelay(tmpret, tyval, __thunk) \+do { \+  ATSINSmove(tmpret, __thunk) ; \+} while(0) /* end of [do ... while ...] */++#define \+ATSINSmove_llazyeval(tmpret, tyval, __thunk) \+do { \+  tmpret = \+  ATSfuncall(ATSfunclo_clo(__thunk, (atstype_cloptr, atstype_bool), tyval), (__thunk, atsbool_true)) ; \+  ATS_MFREE(__thunk) ; \+} while(0) /* end of [do ... while ...] */++/* ****** ****** */++#define \+atspre_lazy_vt_free(__thunk) \+do { \+  ATSfuncall(ATSfunclo_clo(__thunk, (atstype_cloptr, atstype_bool), void), (__thunk, atsbool_false)) ; \+  ATS_MFREE(__thunk) ; \+} while(0) /* atspre_lazy_vt_free */++/* ****** ****** */+//+// HX-2014-10:+//+#define atspre_lazy2cloref(pmv_lazy) ((*(ATStylazy(atstype_ptr)*)pmv_lazy).lazy.thunk)+//+/* ****** ****** */++#endif /* PATS_CCOMP_INSTRSET_H */++/* ****** ****** */++/* end of [pats_ccomp_instrset.h] */
+ .atspkg/contrib/ats-includes-0.3.10/ccomp/runtime/pats_ccomp_memalloc.h view
@@ -0,0 +1,132 @@+/* ******************************************************************* */+/*                                                                     */+/*                         Applied Type System                         */+/*                                                                     */+/* ******************************************************************* */++/*+** ATS/Postiats - Unleashing the Potential of Types!+** Copyright (C) 2011-20?? Hongwei Xi, ATS Trustful Software, Inc.+** All rights reserved+**+** ATS is free software;  you can  redistribute it and/or modify it under+** the terms of  the GNU GENERAL PUBLIC LICENSE (GPL) as published by the+** Free Software Foundation; either version 3, or (at  your  option)  any+** later version.+** +** ATS is distributed in the hope that it will be useful, but WITHOUT ANY+** WARRANTY; without  even  the  implied  warranty  of MERCHANTABILITY or+** FITNESS FOR A PARTICULAR PURPOSE.  See the  GNU General Public License+** for more details.+** +** You  should  have  received  a  copy of the GNU General Public License+** along  with  ATS;  see the  file COPYING.  If not, please write to the+** Free Software Foundation,  51 Franklin Street, Fifth Floor, Boston, MA+** 02110-1301, USA.+*/++/* ****** ****** */++/*+(* Author: Hongwei Xi *)+(* Authoremail: hwxi AT cs DOT bu DOT edu *)+(* Start time: October, 2012 *)+*/++/* ****** ****** */++#ifndef PATS_CCOMP_MEMALLOC_H+#define PATS_CCOMP_MEMALLOC_H++/* ****** ****** */+//+// HX: for size_t+//+#include <stddef.h>+//+/* ****** ****** */+//+extern+void atsruntime_mfree_undef (void *ptr) ;+//+extern+void *atsruntime_malloc_undef (size_t bsz) ;+extern+void *atsruntime_calloc_undef (size_t asz, size_t tsz) ;+extern+void *atsruntime_realloc_undef (void *ptr, size_t bsz) ;+//+/* ****** ****** */++#ifdef ATS_MEMALLOC_FLAG+#undef ATS_MEMALLOC_FLAG+#endif // ifdef(ATS_MEMALLOC_FLAG)++/* ****** ****** */++#ifdef ATS_MEMALLOC_LIBC+//+#define ATS_MEMALLOC_FLAG+//+#include "pats_ccomp_memalloc_libc.h"+//+#define ATS_MINIT atsruntime_minit_libc+#define ATS_MFREE atsruntime_mfree_libc+#define ATS_MALLOC atsruntime_malloc_libc_exn+#define ATS_CALLOC atsruntime_calloc_libc_exn+#define ATS_REALLOC atsruntime_realloc_libc_exn+//+#endif // end of [ATS_MEMALLOC_LIBC]++/* ****** ****** */++#ifdef ATS_MEMALLOC_GCBDW+//+#define ATS_MEMALLOC_FLAG+//+#include "pats_ccomp_memalloc_gcbdw.h"+//+#define ATS_MINIT atsruntime_minit_gcbdw+#define ATS_MFREE atsruntime_mfree_gcbdw+#define ATS_MALLOC atsruntime_malloc_gcbdw_exn+#define ATS_CALLOC atsruntime_calloc_gcbdw_exn+#define ATS_REALLOC atsruntime_realloc_gcbdw_exn+//+#endif // end of [ATS_MEMALLOC_GCBDW]++/* ****** ****** */++#ifdef ATS_MEMALLOC_USER+//+#define ATS_MEMALLOC_FLAG+//+#include "pats_ccomp_memalloc_user.h"+//+#define ATS_MINIT atsruntime_minit_user+#define ATS_MFREE atsruntime_mfree_user+#define ATS_MALLOC atsruntime_malloc_user+#define ATS_CALLOC atsruntime_calloc_user+#define ATS_REALLOC atsruntime_realloc_user+//+#endif // end of [ATS_MEMALLOC_USER]++/* ****** ****** */++#ifndef ATS_MEMALLOC_FLAG+#define ATS_MEMALLOC_FLAG+//+#define ATS_MINIT atsruntime_minit_undef+#define ATS_MFREE atsruntime_mfree_undef+#define ATS_MALLOC atsruntime_malloc_undef+#define ATS_CALLOC atsruntime_calloc_undef+#define ATS_REALLOC atsruntime_realloc_undef+//+#endif // end of [ATS_MEMALLOC_FLAG]++/* ****** ****** */++#endif /* PATS_CCOMP_MEMALLOC_H */++/* ****** ****** */++/* end of [pats_ccomp_memalloc.h] */
+ .atspkg/contrib/ats-includes-0.3.10/ccomp/runtime/pats_ccomp_memalloc_gcbdw.h view
@@ -0,0 +1,146 @@+/* ******************************************************************* */+/*                                                                     */+/*                         Applied Type System                         */+/*                                                                     */+/* ******************************************************************* */++/*+** ATS/Postiats - Unleashing the Potential of Types!+** Copyright (C) 2011-20?? Hongwei Xi, ATS Trustful Software, Inc.+** All rights reserved+**+** ATS is free software;  you can  redistribute it and/or modify it under+** the terms of  the GNU GENERAL PUBLIC LICENSE (GPL) as published by the+** Free Software Foundation; either version 3, or (at  your  option)  any+** later version.+** +** ATS is distributed in the hope that it will be useful, but WITHOUT ANY+** WARRANTY; without  even  the  implied  warranty  of MERCHANTABILITY or+** FITNESS FOR A PARTICULAR PURPOSE.  See the  GNU General Public License+** for more details.+** +** You  should  have  received  a  copy of the GNU General Public License+** along  with  ATS;  see the  file COPYING.  If not, please write to the+** Free Software Foundation,  51 Franklin Street, Fifth Floor, Boston, MA+** 02110-1301, USA.+*/++/* ****** ****** */++/*+(* Author: Hongwei Xi *)+(* Authoremail: hwxi AT cs DOT bu DOT edu *)+(* Start time: March, 2013 *)+*/++/* ****** ****** */+//+#include <stdio.h>+/*+extern+int fprintf (FILE *stream, const char *format, ...) ;+*/+/* ****** ****** */+/*+#include <stdlib.h>+*/+extern void exit (int code) ; ++/* ****** ****** */+/*+#include <gc.h>+*/+extern void GC_init () ;+extern void GC_free (void *ptr) ;+extern void *GC_malloc(size_t bsz) ;+extern void *GC_realloc(void *ptr, size_t bsz) ;++/* ****** ****** */++ATSinline()+atsvoid_t0ype+atsruntime_minit_gcbdw+  (/*void*/) { GC_init() ; return ; }+// end of [atsruntime_minit_gcbdw]++/* ****** ****** */++ATSinline()+atsvoid_t0ype+atsruntime_mfree_gcbdw+  (void *ptr) { GC_free(ptr) ; return ; }+// end of [atsruntime_mfree_gcbdw]++/* ****** ****** */++ATSinline()+atstype_ptr+atsruntime_malloc_gcbdw+  (size_t bsz) { return GC_malloc(bsz) ; }+// end of [atsruntime_malloc_gcbdw]++ATSinline()+atstype_ptr+atsruntime_malloc_gcbdw_exn+  (size_t bsz)+{+  void *ptr ;+  ptr = atsruntime_malloc_gcbdw(bsz) ;+  if (!ptr)+  {+    fprintf(+      stderr, "exit(ATS): atsruntime_malloc_gcbdw_exn: [malloc] failed.\n"+    ) ; exit(1) ;+  } // end of [if]+  return (ptr) ;+} /* end of [atsruntime_malloc_gcbdw_exn] */++/* ****** ****** */+//+// HX:+// [GC_malloc] already+// clears the allocated region!+//+ATSinline()+atstype_ptr+atsruntime_calloc_gcbdw+  (size_t asz, size_t tsz)+{+  return atsruntime_malloc_gcbdw (asz*tsz) ;+} // end of [atsruntime_calloc_gcbdw]++ATSinline()+atstype_ptr+atsruntime_calloc_gcbdw_exn+  (size_t asz, size_t tsz)+{+  return atsruntime_malloc_gcbdw_exn (asz*tsz) ;+} // end of [atsruntime_calloc_gcbdw_exn]++/* ****** ****** */++ATSinline()+atstype_ptr+atsruntime_realloc_gcbdw+  (void *ptr, size_t bsz) { return GC_realloc(ptr, bsz) ; }+// end of [atsruntime_realloc_gcbdw]++ATSinline()+atstype_ptr+atsruntime_realloc_gcbdw_exn+  (void *ptr, size_t bsz)+{+  void *ptr2 ;+  ptr2 = atsruntime_realloc_gcbdw(ptr, bsz) ;+  if (!ptr2)+  {+    fprintf(+    stderr, "exit(ATS): atsruntime_realloc_gcbdw_exn: [realloc] failed.\n"+    ) ; exit(1) ;+  } // end of [if]+  return (ptr2) ;+} /* end of [atsruntime_realloc_gcbdw_exn] */++/* ****** ****** */++/* end of [pats_ccomp_memalloc_gcbdw.h] */
+ .atspkg/contrib/ats-includes-0.3.10/ccomp/runtime/pats_ccomp_memalloc_user.h view
@@ -0,0 +1,74 @@+/* ******************************************************************* */+/*                                                                     */+/*                         Applied Type System                         */+/*                                                                     */+/* ******************************************************************* */++/*+** ATS/Postiats - Unleashing the Potential of Types!+** Copyright (C) 2011-20?? Hongwei Xi, ATS Trustful Software, Inc.+** All rights reserved+**+** ATS is free software;  you can  redistribute it and/or modify it under+** the terms of  the GNU GENERAL PUBLIC LICENSE (GPL) as published by the+** Free Software Foundation; either version 3, or (at  your  option)  any+** later version.+** +** ATS is distributed in the hope that it will be useful, but WITHOUT ANY+** WARRANTY; without  even  the  implied  warranty  of MERCHANTABILITY or+** FITNESS FOR A PARTICULAR PURPOSE.  See the  GNU General Public License+** for more details.+** +** You  should  have  received  a  copy of the GNU General Public License+** along  with  ATS;  see the  file COPYING.  If not, please write to the+** Free Software Foundation,  51 Franklin Street, Fifth Floor, Boston, MA+** 02110-1301, USA.+*/++/* ****** ****** */++/*+(* Author: Hongwei Xi *)+(* Authoremail: hwxi AT cs DOT bu DOT edu *)+(* Start time: March, 2013 *)+*/++/* ****** ****** */+//+#include <stdio.h>+/*+extern+int fprintf (FILE *stream, const char *format, ...) ;+*/+/* ****** ****** */+//+// stdlib.h+//+extern void exit (int code) ;+//+/* ****** ****** */++extern void atsruntime_mfree_user (void *ptr) ;+extern void *atsruntime_malloc_user (size_t bsz) ;+extern void *atsruntime_calloc_user (size_t asz, size_t tsz) ;+extern void *atsruntime_realloc_user (void *ptr, size_t bsz) ;++/* ****** ****** */++ATSinline()+atstype_ptr+atsruntime_malloc_user_exn+  (atstype_size bsz)+{+  atstype_ptr p ;+  p = atsruntime_malloc_user(bsz) ;+  if (!p) {+    fprintf(stderr, "exit(ATS): atsruntime_malloc_user_exn: [malloc] failed.\n") ;+    exit(1) ;+  } // end of [if]+  return (p) ;+} /* end of [atsruntime_malloc_user_exn] */++/* ****** ****** */++/* end of [pats_ccomp_memalloc_user.h] */
+ .atspkg/contrib/ats-includes-0.3.10/ccomp/runtime/pats_ccomp_memalloc_user2.h view
@@ -0,0 +1,58 @@+/* ******************************************************************* */+/*                                                                     */+/*                         Applied Type System                         */+/*                                                                     */+/* ******************************************************************* */++/*+** ATS/Postiats - Unleashing the Potential of Types!+** Copyright (C) 2011-20?? Hongwei Xi, ATS Trustful Software, Inc.+** All rights reserved+**+** ATS is free software;  you can  redistribute it and/or modify it under+** the terms of  the GNU GENERAL PUBLIC LICENSE (GPL) as published by the+** Free Software Foundation; either version 3, or (at  your  option)  any+** later version.+** +** ATS is distributed in the hope that it will be useful, but WITHOUT ANY+** WARRANTY; without  even  the  implied  warranty  of MERCHANTABILITY or+** FITNESS FOR A PARTICULAR PURPOSE.  See the  GNU General Public License+** for more details.+** +** You  should  have  received  a  copy of the GNU General Public License+** along  with  ATS;  see the  file COPYING.  If not, please write to the+** Free Software Foundation,  51 Franklin Street, Fifth Floor, Boston, MA+** 02110-1301, USA.+*/++/* ****** ****** */++/*+(* Author: Hongwei Xi *)+(* Authoremail: hwxi AT cs DOT bu DOT edu *)+(* Start time: March, 2013 *)+*/++/* ****** ****** */+//+#include <stdio.h>+/*+extern+int fprintf (FILE *stream, const char *format, ...) ;+*/+/* ****** ****** */+//+// stdlib.h+//+extern void exit (int code) ;+//+/* ****** ****** */++extern void atsruntime_mfree_user2 (void *ptr) ;+extern void *atsruntime_malloc_user2 (size_t bsz) ;+extern void *atsruntime_calloc_user2 (size_t asz, size_t tsz) ;+extern void *atsruntime_realloc_user2 (void *ptr, size_t bsz) ;++/* ****** ****** */++/* end of [pats_ccomp_memalloc_user2.h] */
+ .atspkg/contrib/ats-includes-0.3.10/ccomp/runtime/pats_ccomp_memalloca.h view
@@ -0,0 +1,69 @@+/* ******************************************************************* */+/*                                                                     */+/*                         Applied Type System                         */+/*                                                                     */+/* ******************************************************************* */++/*+** ATS/Postiats - Unleashing the Potential of Types!+** Copyright (C) 2011-20?? Hongwei Xi, ATS Trustful Software, Inc.+** All rights reserved+**+** ATS is free software;  you can  redistribute it and/or modify it under+** the terms of  the GNU GENERAL PUBLIC LICENSE (GPL) as published by the+** Free Software Foundation; either version 3, or (at  your  option)  any+** later version.+** +** ATS is distributed in the hope that it will be useful, but WITHOUT ANY+** WARRANTY; without  even  the  implied  warranty  of MERCHANTABILITY or+** FITNESS FOR A PARTICULAR PURPOSE.  See the  GNU General Public License+** for more details.+** +** You  should  have  received  a  copy of the GNU General Public License+** along  with  ATS;  see the  file COPYING.  If not, please write to the+** Free Software Foundation,  51 Franklin Street, Fifth Floor, Boston, MA+** 02110-1301, USA.+*/++/* ****** ****** */++/*+(* Author: Hongwei Xi *)+(* Authoremail: hwxi AT cs DOT bu DOT edu *)+(* Start time: March, 2013 *)+*/++/* ****** ****** */++#ifndef PATS_CCOMP_MEMALLOCA_H+#define PATS_CCOMP_MEMALLOCA_H++/* ****** ****** */+//+// alloca.h+//+extern void *alloca (size_t bsz) ;+//+/* ****** ****** */+//+// HX: [afree] matches [alloca]+//+ATSinline()+atsvoid_t0ype+atsruntime_afree_libc+  (atstype_ptr ptr) { return ; }+// end of [atsruntime_afree_libc]++ATSinline()+atstype_ptr+atsruntime_alloca_libc+  (atstype_size bsz) { return alloca(bsz) ; }+// end of [atsruntime_alloca_libc]++/* ****** ****** */++#endif /* PATS_CCOMP_MEMALLOCA_H */++/* ****** ****** */++/* end of [pats_ccomp_memalloca.h] */
+ .atspkg/contrib/ats-includes-0.3.10/ccomp/runtime/pats_ccomp_runtime.c view
@@ -0,0 +1,166 @@+/* ******************************************************************* */+/*                                                                     */+/*                         Applied Type System                         */+/*                                                                     */+/* ******************************************************************* */++/*+** ATS/Postiats - Unleashing the Potential of Types!+** Copyright (C) 2011-20?? Hongwei Xi, ATS Trustful Software, Inc.+** All rights reserved+**+** ATS is free software;  you can  redistribute it and/or modify it under+** the terms of  the GNU GENERAL PUBLIC LICENSE (GPL) as published by the+** Free Software Foundation; either version 3, or (at  your  option)  any+** later version.+** +** ATS is distributed in the hope that it will be useful, but WITHOUT ANY+** WARRANTY; without  even  the  implied  warranty  of MERCHANTABILITY or+** FITNESS FOR A PARTICULAR PURPOSE.  See the  GNU General Public License+** for more details.+** +** You  should  have  received  a  copy of the GNU General Public License+** along  with  ATS;  see the  file COPYING.  If not, please write to the+** Free Software Foundation,  51 Franklin Street, Fifth Floor, Boston, MA+** 02110-1301, USA.+*/++/* ****** ****** */++/*+(* Author: Hongwei Xi *)+(* Authoremail: hwxi AT cs DOT bu DOT edu *)+(* Start time: April, 2013 *)+*/++/* ****** ****** */+//+#include <stdio.h>+//+extern void exit (int) ; // in [stdlib.h]+//+/* ****** ****** */++#include "pats_ccomp_basics.h"+#include "pats_ccomp_typedefs.h"++/* ****** ****** */+//+// HX-2013-04: some pre-initialized exceptions+//+/* ****** ****** */++#ifndef \+_ATS_CCOMP_EXCEPTION_NONE_+//+atstype_exncon+ATSLIB_056_prelude__AssertExn = { 10, "AssertException" } ;+atstype_exncon+ATSLIB_056_prelude__GenerallyExn = { 20, "GenerallyException" } ;+atstype_exncon+ATSLIB_056_prelude__IllegalArgExn = { 30, "IllegalArgException" } ;+//+#endif // end of [_ATS_CCOMP_EXCEPTION_NONE_]++/* ****** ****** */++#ifndef \+_ATS_CCOMP_EXCEPTION_NONE_+//+atstype_exncon+ATSLIB_056_prelude__NotSomeExn = { 40, "NotSomeException" } ;+atstype_exncon+ATSLIB_056_prelude__NotFoundExn = { 41, "NotFoundException" } ;+//+atstype_exncon+ATSLIB_056_prelude__ListSubscriptExn = { 50, "ListSubscriptException" } ;+atstype_exncon+ATSLIB_056_prelude__StreamSubscriptExn = { 51, "StreamSubscriptException" } ;+//+atstype_exncon+ATSLIB_056_prelude__ArraySubscriptExn = { 60, "ArraySubscriptException" } ;+atstype_exncon+ATSLIB_056_prelude__MatrixSubscriptExn = { 61, "MatrixSubscriptException" } ;+//+#endif // end of [_ATS_CCOMP_EXCEPTION_NONE_]++/* ****** ****** */++#ifndef \+_ATS_CCOMP_EXCEPTION_NONE_+//+extern+void+the_atsexncon_initize+(+  atstype_exncon *d2c, char* exnmsg+)+{+//+  static int the_atsexntag = 1024 ;+//+  if (!d2c->exntag)+  {+    d2c->exntag = the_atsexntag ;+    the_atsexntag = the_atsexntag + 1 ;+  }+  d2c->exnmsg = exnmsg ;+  return ;+} // end of [the_atsexncon_initize]+//+#endif // end of [_ATS_CCOMP_EXCEPTION_NONE_]++/* ****** ****** */+//+// HX-2013:+// for reporting pattern matching failure+//+extern+void+atsruntime_handle_unmatchedval+  (char *msg0)+{+  fprintf+  ( stderr+  , "exit(ATS): unmatched value at run-time:\n%s\n", msg0+  ) ; exit(1) ;+  return ; // deadcode+} /* end of [atsruntime_handle_unmatchedval] */+//+/* ****** ****** */+//+// HX-2014-06:+// for reporting funarg-pattern matching failure+//+extern+void+atsruntime_handle_unmatchedarg+  (char *msg0)+{+  fprintf+  ( stderr+  , "exit(ATS): unmatched funarg at run-time:\n%s\n", msg0+  ) ; exit(1) ;+  return ; // deadcode+} /* end of [atsruntime_handle_unmatchedarg] */+//+/* ****** ****** */+//+// HX-2014-06:+// for reporting failure due to uncaught exception+//+extern+void+atsruntime_handle_uncaughtexn_rest+  (atstype_exncon *exn0)+{+  fprintf+  ( stderr+  , "exit(ATS): uncaught exception at run-time:\n%s(%d)\n", exn0->exnmsg, exn0->exntag+  ) ; exit(1) ;+  return ; // deadcode+} /* end of [atsruntime_handle_uncaughtexn_rest] */+//+/* ****** ****** */++/* end of [pats_ccomp_runtime.c] */
+ .atspkg/contrib/ats-includes-0.3.10/ccomp/runtime/pats_ccomp_runtime2_dats.c view
@@ -0,0 +1,390 @@+/*+**+** The C code is generated by ATS/Postiats+** The compilation time is: 2014-8-4: 12h:36m+**+*/+/*+typedefs-for-tyrecs-and-tysums(beg)+*/+typedef+ATSstruct {+int exntag ;+char *exnmsg ;+atstkind_type(atstype_ptrk) atslab__0; +} pats_ccomp_runtime2_tyexn ;+/*+typedefs-for-tyrecs-and-tysums(end)+*/+/*+dynconlst-declaration(beg)+*/+/*+dynconlst-declaration(end)+*/+/*+dyncstlst-declaration(beg)+*/+ATSdyncst_mac(atspre_prerr_string)+ATSdyncst_mac(atspre_prerr_newline)+ATSdyncst_mac(atspre_exit)+ATSdyncst_extfun(atsruntime_handle_uncaughtexn_rest, (atstype_exnconptr), atsvoid_t0ype) ;+/*+dyncstlst-declaration(end)+*/+/*+dynvalist-implementation(beg)+*/+/*+dynvalist-implementation(end)+*/+/*+exnconlst-declaration(beg)+*/+/*+assumelst-declaration(beg)+*/+/*+assumelst-declaration(end)+*/+/*+extypelst-declaration(beg)+*/+/*+extypelst-declaration(end)+*/++/* ****** ****** */++/*+/home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1541(line=43, offs=3) -- 2287(line=72, offs=4)+*/+/*+local: +global: atsruntime_handle_uncaughtexn$0$0(level=0)+local: +global: +*/+ATSextern()+atsvoid_t0ype+atsruntime_handle_uncaughtexn(void *arg0)+{+/* tmpvardeclst(beg) */+ATStmpdec_void(tmpret0) ;+ATStmpdec(tmp1, atstkind_type(atstype_ptrk)) ;+ATStmpdec(tmp2, atstkind_type(atstype_ptrk)) ;+ATStmpdec_void(tmp3) ;+ATStmpdec_void(tmp4) ;+ATStmpdec_void(tmp5) ;+ATStmpdec_void(tmp6) ;+ATStmpdec_void(tmp7) ;+ATStmpdec_void(tmp8) ;+ATStmpdec_void(tmp9) ;+ATStmpdec_void(tmp10) ;+ATStmpdec_void(tmp11) ;+ATStmpdec_void(tmp12) ;+ATStmpdec_void(tmp13) ;+ATStmpdec_void(tmp14) ;+ATStmpdec_void(tmp15) ;+ATStmpdec_void(tmp16) ;+/* tmpvardeclst(end) */+/* funbodyinstrlst(beg) */+/*+emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1509(line=42, offs=1) -- 2287(line=72, offs=4)+*/+ATSINSflab(__patsflab_atsruntime_handle_uncaughtexn):+/*+emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1641(line=51, offs=1) -- 2280(line=70, offs=65)+*/+ATScaseof_beg()+/*+** ibranchlst-beg+*/+ATSbranch_beg()+/*+emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1659(line=53, offs=3) -- 1672(line=53, offs=16)+*/+ATSINSlab(__atstmplab0):+/*+emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1542(line=43, offs=4) -- 1545(line=43, offs=7)+*/+ATSifnthen(ATSCKpat_exn0(arg0, ATSLIB_056_prelude__AssertExn)) { ATSINSgoto(__atstmplab2) ; } ;+/*+emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1672(line=53, offs=16) -- 1672(line=53, offs=16)+*/+ATSINSlab(__atstmplab1):+/*+emit_instr: loc0 = : 0(line=0, offs=0) -- 0(line=0, offs=0)+*/+/*+ibranch-mbody:+*/+/*+emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1676(line=53, offs=20) -- 1761(line=56, offs=6)+*/+/*+letpush(beg)+*/+/*+emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1693(line=54, offs=14) -- 1706(line=54, offs=27)+*/+ATSINSmove_void(tmp3, atspre_prerr_string(ATSPMVstring("exit(ATS): uncaught exception at run-time"))) ;++/*+emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1720(line=55, offs=14) -- 1744(line=55, offs=38)+*/+ATSINSmove_void(tmp4, atspre_prerr_string(ATSPMVstring(": AssertExn"))) ;++/*+emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1720(line=55, offs=14) -- 1744(line=55, offs=38)+*/+ATSINSmove_void(tmp5, atspre_prerr_newline()) ;++/*+letpush(end)+*/++/*+emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1748(line=55, offs=42) -- 1754(line=55, offs=48)+*/+ATSINSmove_void(tmpret0, atspre_exit(ATSPMVi0nt(1))) ;++/*+emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1676(line=53, offs=20) -- 1761(line=56, offs=6)+*/+/*+INSletpop()+*/+ATSbranch_end()++ATSbranch_beg()+/*+emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1788(line=57, offs=3) -- 1803(line=57, offs=18)+*/+ATSINSlab(__atstmplab2):+/*+emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1542(line=43, offs=4) -- 1545(line=43, offs=7)+*/+ATSifnthen(ATSCKpat_exn0(arg0, ATSLIB_056_prelude__NotFoundExn)) { ATSINSgoto(__atstmplab4) ; } ;+/*+emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1803(line=57, offs=18) -- 1803(line=57, offs=18)+*/+ATSINSlab(__atstmplab3):+/*+emit_instr: loc0 = : 0(line=0, offs=0) -- 0(line=0, offs=0)+*/+/*+ibranch-mbody:+*/+/*+emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1807(line=57, offs=22) -- 1894(line=60, offs=6)+*/+/*+letpush(beg)+*/+/*+emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1824(line=58, offs=14) -- 1837(line=58, offs=27)+*/+ATSINSmove_void(tmp6, atspre_prerr_string(ATSPMVstring("exit(ATS): uncaught exception at run-time"))) ;++/*+emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1851(line=59, offs=14) -- 1877(line=59, offs=40)+*/+ATSINSmove_void(tmp7, atspre_prerr_string(ATSPMVstring(": NotFoundExn"))) ;++/*+emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1851(line=59, offs=14) -- 1877(line=59, offs=40)+*/+ATSINSmove_void(tmp8, atspre_prerr_newline()) ;++/*+letpush(end)+*/++/*+emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1881(line=59, offs=44) -- 1887(line=59, offs=50)+*/+ATSINSmove_void(tmpret0, atspre_exit(ATSPMVi0nt(1))) ;++/*+emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1807(line=57, offs=22) -- 1894(line=60, offs=6)+*/+/*+INSletpop()+*/+ATSbranch_end()++ATSbranch_beg()+/*+emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1921(line=61, offs=3) -- 1940(line=61, offs=22)+*/+ATSINSlab(__atstmplab4):+/*+emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1542(line=43, offs=4) -- 1545(line=43, offs=7)+*/+ATSifnthen(ATSCKpat_exn1(arg0, ATSLIB_056_prelude__GenerallyExn)) { ATSINSgoto(__atstmplab6) ; } ;+/*+emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1940(line=61, offs=22) -- 1940(line=61, offs=22)+*/+ATSINSlab(__atstmplab5):+/*+emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1936(line=61, offs=18) -- 1939(line=61, offs=21)+*/+ATSINSmove(tmp1, ATSSELcon(arg0, pats_ccomp_runtime2_tyexn, atslab__0)) ;+/*+emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1921(line=61, offs=3) -- 2039(line=64, offs=6)+*/+/*+ATSINSfreecon(arg0) ;+*/+/*+emit_instr: loc0 = : 0(line=0, offs=0) -- 0(line=0, offs=0)+*/+/*+ibranch-mbody:+*/+/*+emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1944(line=61, offs=26) -- 2039(line=64, offs=6)+*/+/*+letpush(beg)+*/+/*+emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1961(line=62, offs=14) -- 1974(line=62, offs=27)+*/+ATSINSmove_void(tmp9, atspre_prerr_string(ATSPMVstring("exit(ATS): uncaught exception at run-time"))) ;++/*+emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1988(line=63, offs=14) -- 2022(line=63, offs=48)+*/+ATSINSmove_void(tmp10, atspre_prerr_string(ATSPMVstring(": GenerallyExn: "))) ;++/*+emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1988(line=63, offs=14) -- 2022(line=63, offs=48)+*/+ATSINSmove_void(tmp11, atspre_prerr_string(tmp1)) ;++/*+emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1988(line=63, offs=14) -- 2022(line=63, offs=48)+*/+ATSINSmove_void(tmp12, atspre_prerr_newline()) ;++/*+letpush(end)+*/++/*+emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 2026(line=63, offs=52) -- 2032(line=63, offs=58)+*/+ATSINSmove_void(tmpret0, atspre_exit(ATSPMVi0nt(1))) ;++/*+emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1944(line=61, offs=26) -- 2039(line=64, offs=6)+*/+/*+INSletpop()+*/+ATSbranch_end()++ATSbranch_beg()+/*+emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 2066(line=65, offs=3) -- 2086(line=65, offs=23)+*/+ATSINSlab(__atstmplab6):+/*+emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 1542(line=43, offs=4) -- 1545(line=43, offs=7)+*/+ATSifnthen(ATSCKpat_exn1(arg0, ATSLIB_056_prelude__IllegalArgExn)) { ATSINSgoto(__atstmplab8) ; } ;+/*+emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 2086(line=65, offs=23) -- 2086(line=65, offs=23)+*/+ATSINSlab(__atstmplab7):+/*+emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 2082(line=65, offs=19) -- 2085(line=65, offs=22)+*/+ATSINSmove(tmp2, ATSSELcon(arg0, pats_ccomp_runtime2_tyexn, atslab__0)) ;+/*+emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 2066(line=65, offs=3) -- 2186(line=68, offs=6)+*/+/*+ATSINSfreecon(arg0) ;+*/+/*+emit_instr: loc0 = : 0(line=0, offs=0) -- 0(line=0, offs=0)+*/+/*+ibranch-mbody:+*/+/*+emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 2090(line=65, offs=27) -- 2186(line=68, offs=6)+*/+/*+letpush(beg)+*/+/*+emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 2107(line=66, offs=14) -- 2120(line=66, offs=27)+*/+ATSINSmove_void(tmp13, atspre_prerr_string(ATSPMVstring("exit(ATS): uncaught exception at run-time"))) ;++/*+emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 2134(line=67, offs=14) -- 2169(line=67, offs=49)+*/+ATSINSmove_void(tmp14, atspre_prerr_string(ATSPMVstring(": IllegalArgExn: "))) ;++/*+emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 2134(line=67, offs=14) -- 2169(line=67, offs=49)+*/+ATSINSmove_void(tmp15, atspre_prerr_string(tmp2)) ;++/*+emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 2134(line=67, offs=14) -- 2169(line=67, offs=49)+*/+ATSINSmove_void(tmp16, atspre_prerr_newline()) ;++/*+letpush(end)+*/++/*+emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 2173(line=67, offs=53) -- 2179(line=67, offs=59)+*/+ATSINSmove_void(tmpret0, atspre_exit(ATSPMVi0nt(1))) ;++/*+emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 2090(line=65, offs=27) -- 2186(line=68, offs=6)+*/+/*+INSletpop()+*/+ATSbranch_end()++ATSbranch_beg()+/*+emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 2219(line=70, offs=4) -- 2219(line=70, offs=4)+*/+ATSINSlab(__atstmplab8):+/*+emit_instr: loc0 = : 0(line=0, offs=0) -- 0(line=0, offs=0)+*/+/*+ibranch-mbody:+*/+/*+emit_instr: loc0 = /home/hwxi/research/Postiats/git/ccomp/runtime/pats_ccomp_runtime2.dats: 2240(line=70, offs=25) -- 2279(line=70, offs=64)+*/+ATSINSmove_void(tmpret0, atsruntime_handle_uncaughtexn_rest(arg0)) ;++ATSbranch_end()++/*+** ibranchlst-end+*/+ATScaseof_end()++/* funbodyinstrlst(end) */+ATSreturn_void(tmpret0) ;+} /* end of [atsruntime_handle_uncaughtexn] */++/* ****** ****** */++/* end of [pats_ccomp_runtime2_dats.c] */
+ .atspkg/contrib/ats-includes-0.3.10/ccomp/runtime/pats_ccomp_runtime_trywith.c view
@@ -0,0 +1,86 @@+/* ******************************************************************* */+/*                                                                     */+/*                         Applied Type System                         */+/*                                                                     */+/* ******************************************************************* */++/*+** ATS/Postiats - Unleashing the Potential of Types!+** Copyright (C) 2011-20?? Hongwei Xi, ATS Trustful Software, Inc.+** All rights reserved+**+** ATS is free software;  you can  redistribute it and/or modify it under+** the terms of  the GNU GENERAL PUBLIC LICENSE (GPL) as published by the+** Free Software Foundation; either version 3, or (at  your  option)  any+** later version.+** +** ATS is distributed in the hope that it will be useful, but WITHOUT ANY+** WARRANTY; without  even  the  implied  warranty  of MERCHANTABILITY or+** FITNESS FOR A PARTICULAR PURPOSE.  See the  GNU General Public License+** for more details.+** +** You  should  have  received  a  copy of the GNU General Public License+** along  with  ATS;  see the  file COPYING.  If not, please write to the+** Free Software Foundation,  51 Franklin Street, Fifth Floor, Boston, MA+** 02110-1301, USA.+*/++/* ****** ****** */++/*+(* Author: Hongwei Xi *)+(* Authoremail: hwxi AT cs DOT bu DOT edu *)+(* Start time: April, 2013 *)+*/++/* ****** ****** */+//+#include "pats_ccomp_basics.h"+#include "pats_ccomp_typedefs.h"+#include "pats_ccomp_exception.h"+//+/* ****** ****** */+//+// HX-2013-06:+// it is only for single-threaded programs+//+/* ****** ****** */++extern+atsexnframe_ptr+*my_atsexnframe_getref ()+{+//+static+atsexnframe_t *my_atsexnframe = (void*)0 ;+//+return &(my_atsexnframe) ;+//+} // end of [my_atsexnframe_getref]++/* ****** ****** */++extern+void+atsruntime_raise+  (void *exn0)+{+//+  atsexnframe_t *frame ;+  frame = *(my_atsexnframe_getref()) ;+//+  do {+    if (!frame) break ;+    (frame)->exn = (atstype_exnconptr)exn0 ;+    atspre_longjmp((frame)->env, 1/*retval*/) ;+  } while (0) ; // end of [do]+//+  atsruntime_handle_uncaughtexn(exn0) ;+//+  return ;+//+} /* end of [atsruntime_raise] */++/* ****** ****** */++/* end of [pats_ccomp_runtime_trywith.c] */
+ .atspkg/contrib/ats-includes-0.3.10/ccomp/runtime/pats_ccomp_typedefs.h view
@@ -0,0 +1,225 @@+/* ******************************************************************* */+/*                                                                     */+/*                         Applied Type System                         */+/*                                                                     */+/* ******************************************************************* */++/*+** ATS/Postiats - Unleashing the Potential of Types!+** Copyright (C) 2011-20?? Hongwei Xi, ATS Trustful Software, Inc.+** All rights reserved+**+** ATS is free software;  you can  redistribute it and/or modify it under+** the terms of  the GNU GENERAL PUBLIC LICENSE (GPL) as published by the+** Free Software Foundation; either version 3, or (at  your  option)  any+** later version.+** +** ATS is distributed in the hope that it will be useful, but WITHOUT ANY+** WARRANTY; without  even  the  implied  warranty  of MERCHANTABILITY or+** FITNESS FOR A PARTICULAR PURPOSE.  See the  GNU General Public License+** for more details.+** +** You  should  have  received  a  copy of the GNU General Public License+** along  with  ATS;  see the  file COPYING.  If not, please write to the+** Free Software Foundation,  51 Franklin Street, Fifth Floor, Boston, MA+** 02110-1301, USA.+*/++/* ****** ****** */++/*+(* Author: Hongwei Xi *)+(* Authoremail: hwxi AT cs DOT bu DOT edu *)+(* Start time: October, 2012 *)+*/++/* ****** ****** */++#ifndef PATS_CCOMP_TYPEDEFS_H+#define PATS_CCOMP_TYPEDEFS_H++/* ****** ****** */++/*+** HX:+** of indefinite size+*/+struct atstype_struct ;++/* ****** ****** */++typedef void atstype_void ;+typedef void atsvoid_t0ype ;++/* ****** ****** */++typedef int atstype_int ;+typedef unsigned int atstype_uint ;++typedef long int atstype_lint ;+typedef unsigned long int atstype_ulint ;++typedef long long int atstype_llint ;+typedef unsigned long long int atstype_ullint ;++typedef short int atstype_sint ;+typedef unsigned short int atstype_usint ;++/* ****** ****** */++typedef atstype_lint atstype_ssize ;+typedef atstype_ulint atstype_size ;++/* ****** ****** */+//+// HX: true/false: 1/0+//+typedef int atstype_bool ;+//+/* ****** ****** */++typedef unsigned char atstype_byte ;++/* ****** ****** */++typedef char atstype_char ;+typedef signed char atstype_schar ;+typedef unsigned char atstype_uchar ;++/* ****** ****** */++typedef char *atstype_string ;+typedef char *atstype_stropt ;+typedef char *atstype_strptr ;++/* ****** ****** */++typedef float atstype_float ;+typedef double atstype_double ;+typedef long double atstype_ldouble ;++/* ****** ****** */+/*+** HX: for pointers+*/+typedef void *atstype_ptr ;+typedef void *atstype_ptrk ;+/*+** HX: for references+*/+typedef void *atstype_ref ;+/*+** HX: for boxed values+*/+typedef void* atstype_boxed ;+/*+** HX: for [datconptr]+*/+typedef void* atstype_datconptr ;+/*+** HX: for [datcontyp]+*/+typedef void* atstype_datcontyp ;++/* ****** ****** */++#ifdef \+_ATS_CCOMP_EXCEPTION_NONE_+//+// HX: should a message be issued?+//+#else+//+typedef struct+{+  atstype_int exntag ;+  atstype_string exnmsg ;+} atstype_exncon ;+//+typedef+atstype_exncon *atstype_exnconptr ;+//+#endif // end of [_ATS_CCOMP_EXCEPTION_NONE_]++/* ****** ****** */+/*+** HX: for pointers to arrays+*/+typedef void* atstype_arrptr ;+/*+** HX: for arrays plus size info+*/+typedef+struct {+  atstype_arrptr ptr ; atstype_size size ;+} atstype_arrpsz ;++/* ****** ****** */++typedef void* atstype_funptr ;+typedef void* atstype_cloptr ;++/* ****** ****** */++#define atstkind_type(tk) tk+#define atstkind_t0ype(tk) tk++/* ****** ****** */+//+// HX-2014-09-16:+// making it unusable unless+// _ATS_ARRAY_FIELD is defined+//+#ifdef _ATS_ARRAY_FIELD_+#define atstyarr_field(fname) fname[]+#else+#define atstyarr_field(fname) atstyarr_field_undef(fname)+#endif // end of [_ATS_ARRAY_FIELD_]+//+/* ****** ****** */+//+// HX-2014-05:+// making it not usable!!!+//+#ifdef _ATSTYPE_VAR_SIZE_+// HX: it is set by the user+#else+#define _ATSTYPE_VAR_SIZE_ 0X10000+#endif // end of [#ifdef]+//+// HX-2014-05:+// for 8-bit or 16-bit march,+// _ATSTYPE_VAR_SIZE can be set to 0X100+//+typedef+struct{char _[_ATSTYPE_VAR_SIZE_];} atstype_var[0] ;+//+/* ****** ****** */++#define atstyvar_type(a) atstype_var++/* ****** ****** */++#define atstybox_type(hit) atstype_boxed++/* ****** ****** */++#define atstyclo_top struct{ void *cfun; }+#define atstyclo_type(flab) flab##__closure_t0ype++/* ****** ****** */++#define atsvararg_type(hit) ...++/* ****** ****** */++#define atsrefarg0_type(hit) hit+#define atsrefarg1_type(hit) atstype_ref++/* ****** ****** */++#endif /* PATS_CCOMP_TYPEDEFS_H */++/* ****** ****** */++/* end of [pats_ccomp_typedefs.h] */
+ .atspkg/contrib/ats-includes-0.3.10/libats/libc/CATS/alloca.cats view
@@ -0,0 +1,61 @@+/***********************************************************************/+/*                                                                     */+/*                         Applied Type System                         */+/*                                                                     */+/***********************************************************************/++/* (*+** ATS/Postiats - Unleashing the Potential of Types!+** Copyright (C) 2010-2015 Hongwei Xi, ATS Trustful Software, Inc.+** All rights reserved+**+** ATS is free software;  you can  redistribute it and/or modify it under+** the terms of  the GNU GENERAL PUBLIC LICENSE (GPL) as published by the+** Free Software Foundation; either version 3, or (at  your  option)  any+** later version.+**+** ATS is distributed in the hope that it will be useful, but WITHOUT ANY+** WARRANTY; without  even  the  implied  warranty  of MERCHANTABILITY or+** FITNESS FOR A PARTICULAR PURPOSE.  See the  GNU General Public License+** for more details.+**+** You  should  have  received  a  copy of the GNU General Public License+** along  with  ATS;  see the  file COPYING.  If not, please write to the+** Free Software Foundation,  51 Franklin Street, Fifth Floor, Boston, MA+** 02110-1301, USA.+*) */++/* ****** ****** */++/*+(* Author: Hongwei Xi *)+(* Authoremail: gmhwxiATgmailDOTcom *)+(* Start time: February, 2014 *)+*/++/* ****** ****** */++#ifndef ATSLIB_LIBATS_LIBC_CATS_ALLOCA+#define ATSLIB_LIBATS_LIBC_CATS_ALLOCA++/* ****** ****** */++#include <alloca.h>++/* ****** ****** */+//+#define atslib_libats_libc_alloca(bsz) alloca(bsz)+//+/* ****** ****** */+//+#define atslib_libats_libc_ptr_alloca_tsz(tsz) alloca(tsz)+//+#define atslib_libats_libc_array_ptr_alloca_tsz(asz, tsz) alloca((asz)*(tsz))+//+/* ****** ****** */++#endif // ifndef ATSLIB_LIBATS_LIBC_CATS_ALLOCA++/* ****** ****** */++/* end of [alloca.cats] */
+ .atspkg/contrib/ats-includes-0.3.10/libats/libc/CATS/dirent.cats view
@@ -0,0 +1,120 @@+/***********************************************************************/+/*                                                                     */+/*                         Applied Type System                         */+/*                                                                     */+/***********************************************************************/++/* (*+** ATS/Postiats - Unleashing the Potential of Types!+** Copyright (C) 2010-2015 Hongwei Xi, ATS Trustful Software, Inc.+** All rights reserved+**+** ATS is free software;  you can  redistribute it and/or modify it under+** the terms of  the GNU GENERAL PUBLIC LICENSE (GPL) as published by the+** Free Software Foundation; either version 3, or (at  your  option)  any+** later version.+**+** ATS is distributed in the hope that it will be useful, but WITHOUT ANY+** WARRANTY; without  even  the  implied  warranty  of MERCHANTABILITY or+** FITNESS FOR A PARTICULAR PURPOSE.  See the  GNU General Public License+** for more details.+**+** You  should  have  received  a  copy of the GNU General Public License+** along  with  ATS;  see the  file COPYING.  If not, please write to the+** Free Software Foundation,  51 Franklin Street, Fifth Floor, Boston, MA+** 02110-1301, USA.+*) */++/* ****** ****** */++/*+(* Author: Hongwei Xi *)+(* Authoremail: gmhwxiATgmailDOTcom *)+(* Start time: March, 2013 *)+*/++/* ****** ****** */++#ifndef ATSLIB_LIBATS_LIBC_CATS_DIRENT+#define ATSLIB_LIBATS_LIBC_CATS_DIRENT++/* ****** ****** */++#include <sys/types.h>+#include <dirent.h> // HX: after sys/types++/* ****** ****** */++#include "share/H/pats_atslib.h"++/* ****** ****** */+//+typedef DIR atslib_libats_libc_DIR_type ;+//+typedef+struct dirent atslib_libats_libc_dirent_type ;+//+/* ****** ****** */++#define \+atslib_libats_libc_dirent_get_d_ino(ent) \+(((atslib_libats_libc_dirent_type*)ent)->d_ino)+#define \+atslib_libats_libc_dirent_get_d_name(ent) \+(((atslib_libats_libc_dirent_type*)ent)->d_name)++/* ****** ****** */++#define \+atslib_libats_libc_direntp_get_d_name(entp) \+(((atslib_libats_libc_dirent_type*)entp)->d_name)++/* ****** ****** */++#define \+atslib_libats_libc_direntp_free(x) atspre_mfree_gc(x)++/* ****** ****** */++#define atslib_libats_libc_alphasort alphasort+#define atslib_libats_libc_versionsort versionsort++/* ****** ****** */++#define atslib_libats_libc_opendir opendir++/* ****** ****** */++#define atslib_libats_libc_closedir closedir++/* ****** ****** */++#define \+atslib_libats_libc_readdir readdir+#define \+atslib_libats_libc_readdir_r(dirp, ent, res) \+  readdir_r((DIR*)dirp, (struct dirent*)ent, (struct dirent**)res)++/* ****** ****** */++#define \+atslib_libats_libc_scandir(dirp, namelst, filter, compar) \+  scandir((char*)dirp, (struct dirent***)namelst, (void*)filter, (void*)compar)++/* ****** ****** */++#define \+atslib_libats_libc_rewinddir rewinddir++/* ****** ****** */++#define atslib_libats_libc_seekdir seekdir+#define atslib_libats_libc_telldir telldir++/* ****** ****** */++#endif // ifndef ATSLIB_LIBATS_LIBC_CATS_DIRENT++/* ****** ****** */++/* end of [dirent.cats] */
+ .atspkg/contrib/ats-includes-0.3.10/libats/libc/CATS/dlfcn.cats view
@@ -0,0 +1,75 @@+/***********************************************************************/+/*                                                                     */+/*                         Applied Type System                         */+/*                                                                     */+/***********************************************************************/++/* (*+** ATS/Postiats - Unleashing the Potential of Types!+** Copyright (C) 2010-2015 Hongwei Xi, ATS Trustful Software, Inc.+** All rights reserved+**+** ATS is free software;  you can  redistribute it and/or modify it under+** the terms of  the GNU GENERAL PUBLIC LICENSE (GPL) as published by the+** Free Software Foundation; either version 3, or (at  your  option)  any+** later version.+**+** ATS is distributed in the hope that it will be useful, but WITHOUT ANY+** WARRANTY; without  even  the  implied  warranty  of MERCHANTABILITY or+** FITNESS FOR A PARTICULAR PURPOSE.  See the  GNU General Public License+** for more details.+**+** You  should  have  received  a  copy of the GNU General Public License+** along  with  ATS;  see the  file COPYING.  If not, please write to the+** Free Software Foundation,  51 Franklin Street, Fifth Floor, Boston, MA+** 02110-1301, USA.+*) */++/* ****** ****** */++/*+(* Author: Hongwei Xi *)+(* Authoremail: gmhwxiATgmailDOTcom *)+(* Start time: December, 2013 *)+*/++/* ****** ****** */++#ifndef ATSLIB_LIBATS_LIBC_CATS_DLFCN+#define ATSLIB_LIBATS_LIBC_CATS_DLFCN++/* ****** ****** */++#include <dlfcn.h>++/* ****** ****** */++#define \+atslib_libats_libc_dlopen dlopen++/* ****** ****** */++#define \+atslib_libats_libc_dlclose dlclose++/* ****** ****** */++#define \+atslib_libats_libc_dlerror dlerror++/* ****** ****** */++#define atslib_libats_libc_dlsym dlsym++/* ****** ****** */++#define atslib_libats_libc_dladdr dladdr+#define atslib_libats_libc_dlvsym dlvsym++/* ****** ****** */++#endif // ifndef ATSLIB_LIBATS_LIBC_CATS_DLFCN++/* ****** ****** */++/* end of [dlfcn.cats] */
+ .atspkg/contrib/ats-includes-0.3.10/libats/libc/CATS/errno.cats view
@@ -0,0 +1,85 @@+/***********************************************************************/+/*                                                                     */+/*                         Applied Type System                         */+/*                                                                     */+/***********************************************************************/++/* (*+** ATS/Postiats - Unleashing the Potential of Types!+** Copyright (C) 2010-2015 Hongwei Xi, ATS Trustful Software, Inc.+** All rights reserved+**+** ATS is free software;  you can  redistribute it and/or modify it under+** the terms of  the GNU GENERAL PUBLIC LICENSE (GPL) as published by the+** Free Software Foundation; either version 3, or (at  your  option)  any+** later version.+**+** ATS is distributed in the hope that it will be useful, but WITHOUT ANY+** WARRANTY; without  even  the  implied  warranty  of MERCHANTABILITY or+** FITNESS FOR A PARTICULAR PURPOSE.  See the  GNU General Public License+** for more details.+**+** You  should  have  received  a  copy of the GNU General Public License+** along  with  ATS;  see the  file COPYING.  If not, please write to the+** Free Software Foundation,  51 Franklin Street, Fifth Floor, Boston, MA+** 02110-1301, USA.+*) */++/* ****** ****** */++/*+** Source:+** $PATSHOME/libc/CATS/CODEGEN/errno.atxt+** Time of generation: Mon Sep  5 20:36:41 2016+*/++/* ****** ****** */++/*+(* Author: Hongwei Xi *)+(* Authoremail: gmhwxiATgmailDOTcom *)+(* Start time: February, 2013 *)+*/++/* ****** ****** */++#ifndef ATSLIB_LIBATS_LIBC_CATS_ERRNO+#define ATSLIB_LIBATS_LIBC_CATS_ERRNO++/* ****** ****** */++#include <errno.h>++/* ****** ****** */++typedef int errno_t ;++/* ****** ****** */++#define ENONE 0++/* ****** ****** */++#define \+atslib_libats_libc_the_errno_get() (errno)+#define \+atslib_libats_libc_the_errno_set(x) (errno = (x))+#define \+atslib_libats_libc_the_errno_reset() (errno = ENONE)++/* ****** ****** */++ATSinline()+atstype_bool+atslib_libats_libc_the_errno_test(errno_t x)+{+  return (errno==(x)) ? atsbool_true : atsbool_false ;+} /* end of [atslib_libats_libc_the_errno_test] */++/* ****** ****** */++#endif // ifndef ATSLIB_LIBATS_LIBC_CATS_ERRNO++/* ****** ****** */++/* end of [errno.cats] */
+ .atspkg/contrib/ats-includes-0.3.10/libats/libc/CATS/fcntl.cats view
@@ -0,0 +1,85 @@+/***********************************************************************/+/*                                                                     */+/*                         Applied Type System                         */+/*                                                                     */+/***********************************************************************/++/* (*+** ATS/Postiats - Unleashing the Potential of Types!+** Copyright (C) 2010-2015 Hongwei Xi, ATS Trustful Software, Inc.+** All rights reserved+**+** ATS is free software;  you can  redistribute it and/or modify it under+** the terms of  the GNU GENERAL PUBLIC LICENSE (GPL) as published by the+** Free Software Foundation; either version 3, or (at  your  option)  any+** later version.+**+** ATS is distributed in the hope that it will be useful, but WITHOUT ANY+** WARRANTY; without  even  the  implied  warranty  of MERCHANTABILITY or+** FITNESS FOR A PARTICULAR PURPOSE.  See the  GNU General Public License+** for more details.+**+** You  should  have  received  a  copy of the GNU General Public License+** along  with  ATS;  see the  file COPYING.  If not, please write to the+** Free Software Foundation,  51 Franklin Street, Fifth Floor, Boston, MA+** 02110-1301, USA.+*) */++/* ****** ****** */++/*+(* Author: Hongwei Xi *)+(* Authoremail: gmhwxiATgmailDOTcom *)+(* Start time: February, 2013 *)+*/++/* ****** ****** */++#ifndef ATSLIB_LIBATS_LIBC_CATS_FCNTL+#define ATSLIB_LIBATS_LIBC_CATS_FCNTL++/* ****** ****** */++#include <sys/types.h>+#include <fcntl.h> // HX: after sys/types++/* ****** ****** */++#define atslib_libats_libc_fildes_get_int(fd) (fd)++/* ****** ****** */++ATSinline()+atstype_bool+atslib_libats_libc_fildes_isgtez+  (atstype_int fd)+{+  return (fd >= 0 ? atsbool_true : atsbool_false) ;+} // end of [atslib_libats_libc_fildes_isgtez]++/* ****** ****** */++#define \+atslib_libats_libc_fcntlflags_lor(x1, x2) ((x1)|(x2))++/* ****** ****** */++#define \+atslib_libats_libc_fcntl_getfl(fd) fcntl(fd, F_GETFL)+#define \+atslib_libats_libc_fcntl_setfl(fd, flags) fcntl(fd, F_SETFL, flags)++/* ****** ****** */++#define \+atslib_libats_libc_open_flags(path, flags) open((char*)path, flags)+#define \+atslib_libats_libc_open_flags_mode(path, flags, mode) open((char*)path, flags, mode)++/* ****** ****** */++#endif // ifndef ATSLIB_LIBATS_LIBC_CATS_FCNTL++/* ****** ****** */++/* end of [fcntl.cats] */
+ .atspkg/contrib/ats-includes-0.3.10/libats/libc/CATS/float.cats view
@@ -0,0 +1,51 @@+/***********************************************************************/+/*                                                                     */+/*                         Applied Type System                         */+/*                                                                     */+/***********************************************************************/++/* (*+** ATS/Postiats - Unleashing the Potential of Types!+** Copyright (C) 2010-2015 Hongwei Xi, ATS Trustful Software, Inc.+** All rights reserved+**+** ATS is free software;  you can  redistribute it and/or modify it under+** the terms of  the GNU GENERAL PUBLIC LICENSE (GPL) as published by the+** Free Software Foundation; either version 3, or (at  your  option)  any+** later version.+**+** ATS is distributed in the hope that it will be useful, but WITHOUT ANY+** WARRANTY; without  even  the  implied  warranty  of MERCHANTABILITY or+** FITNESS FOR A PARTICULAR PURPOSE.  See the  GNU General Public License+** for more details.+**+** You  should  have  received  a  copy of the GNU General Public License+** along  with  ATS;  see the  file COPYING.  If not, please write to the+** Free Software Foundation,  51 Franklin Street, Fifth Floor, Boston, MA+** 02110-1301, USA.+*) */++/* ****** ****** */++/*+(* Author: Hongwei Xi *)+(* Authoremail: gmhwxiATgmailDOTcom *)+(* Start time: October, 2014 *)+*/++/* ****** ****** */++#ifndef ATSLIB_LIBATS_LIBC_CATS_FLOAT+#define ATSLIB_LIBATS_LIBC_CATS_FLOAT++/* ****** ****** */++#include <float.h>++/* ****** ****** */++#endif // ifndef ATSLIB_LIBATS_LIBC_CATS_FLOAT++/* ****** ****** */++/* end of [float.cats] */
+ .atspkg/contrib/ats-includes-0.3.10/libats/libc/CATS/fnmatch.cats view
@@ -0,0 +1,58 @@+/***********************************************************************/+/*                                                                     */+/*                         Applied Type System                         */+/*                                                                     */+/***********************************************************************/++/* (*+** ATS/Postiats - Unleashing the Potential of Types!+** Copyright (C) 2010-2015 Hongwei Xi, ATS Trustful Software, Inc.+** All rights reserved+**+** ATS is free software;  you can  redistribute it and/or modify it under+** the terms of  the GNU GENERAL PUBLIC LICENSE (GPL) as published by the+** Free Software Foundation; either version 3, or (at  your  option)  any+** later version.+**+** ATS is distributed in the hope that it will be useful, but WITHOUT ANY+** WARRANTY; without  even  the  implied  warranty  of MERCHANTABILITY or+** FITNESS FOR A PARTICULAR PURPOSE.  See the  GNU General Public License+** for more details.+**+** You  should  have  received  a  copy of the GNU General Public License+** along  with  ATS;  see the  file COPYING.  If not, please write to the+** Free Software Foundation,  51 Franklin Street, Fifth Floor, Boston, MA+** 02110-1301, USA.+*) */++/* ****** ****** */++/*+(* Author: Hongwei Xi *)+(* Authoremail: hwxi AT cs DOT bu DOT edu *)+(* Start time: March, 2013 *)+*/++/* ****** ****** */++#ifndef ATSLIB_LIBATS_LIBC_CATS_FNMATCH+#define ATSLIB_LIBATS_LIBC_CATS_FNMATCH++/* ****** ****** */++#include <fnmatch.h>++/* ****** ****** */++#define \+atslib_libats_libc_fnmatch_null(pat, str) fnmatch((char*)pat, (char*)str, 0)+#define \+atslib_libats_libc_fnmatch_flags(pat, str, flags) fnmatch((char*)pat, (char*)str, flags)++/* ****** ****** */++#endif // ifndef ATSLIB_LIBATS_LIBC_CATS_FNMATCH++/* ****** ****** */++/* end of [fnmatch.cats] */
+ .atspkg/contrib/ats-includes-0.3.10/libats/libc/CATS/malloc.cats view
@@ -0,0 +1,60 @@+/***********************************************************************/+/*                                                                     */+/*                         Applied Type System                         */+/*                                                                     */+/***********************************************************************/++/* (*+** ATS/Postiats - Unleashing the Potential of Types!+** Copyright (C) 2010-2015 Hongwei Xi, ATS Trustful Software, Inc.+** All rights reserved+**+** ATS is free software;  you can  redistribute it and/or modify it under+** the terms of  the GNU GENERAL PUBLIC LICENSE (GPL) as published by the+** Free Software Foundation; either version 3, or (at  your  option)  any+** later version.+**+** ATS is distributed in the hope that it will be useful, but WITHOUT ANY+** WARRANTY; without  even  the  implied  warranty  of MERCHANTABILITY or+** FITNESS FOR A PARTICULAR PURPOSE.  See the  GNU General Public License+** for more details.+**+** You  should  have  received  a  copy of the GNU General Public License+** along  with  ATS;  see the  file COPYING.  If not, please write to the+** Free Software Foundation,  51 Franklin Street, Fifth Floor, Boston, MA+** 02110-1301, USA.+*) */++/* ****** ****** */++/*+(* Author: Hongwei Xi *)+(* Authoremail: gmhwxiATgmailDOTcom *)+(* Start time: March, 2013 *)+*/++/* ****** ****** */++#ifndef ATSLIB_LIBATS_LIBC_CATS_MALLOC+#define ATSLIB_LIBATS_LIBC_CATS_MALLOC++/* ****** ****** */++#include <malloc.h>++/* ****** ****** */++#define atslib_libats_libc_mallopt mallopt+#define atslib_libats_libc_malloc_trim malloc_trim+#define atslib_libats_libc_malloc_usable_size malloc_usable_size+#define atslib_libats_libc_malloc_stats malloc_stats+#define atslib_libats_libc_malloc_get_state malloc_get_state+#define atslib_libats_libc_malloc_set_state malloc_set_state++/* ****** ****** */++#endif // ifndef ATSLIB_LIBATS_LIBC_CATS_MALLOC++/* ****** ****** */++/* end of [malloc.cats] */
+ .atspkg/contrib/ats-includes-0.3.10/libats/libc/CATS/signal.cats view
@@ -0,0 +1,125 @@+/***********************************************************************/+/*                                                                     */+/*                         Applied Type System                         */+/*                                                                     */+/***********************************************************************/++/* (*+** ATS/Postiats - Unleashing the Potential of Types!+** Copyright (C) 2010-2015 Hongwei Xi, ATS Trustful Software, Inc.+** All rights reserved+**+** ATS is free software;  you can  redistribute it and/or modify it under+** the terms of  the GNU GENERAL PUBLIC LICENSE (GPL) as published by the+** Free Software Foundation; either version 3, or (at  your  option)  any+** later version.+**+** ATS is distributed in the hope that it will be useful, but WITHOUT ANY+** WARRANTY; without  even  the  implied  warranty  of MERCHANTABILITY or+** FITNESS FOR A PARTICULAR PURPOSE.  See the  GNU General Public License+** for more details.+**+** You  should  have  received  a  copy of the GNU General Public License+** along  with  ATS;  see the  file COPYING.  If not, please write to the+** Free Software Foundation,  51 Franklin Street, Fifth Floor, Boston, MA+** 02110-1301, USA.+*) */++/* ****** ****** */++/*+(* Author: Hongwei Xi *)+(* Authoremail: gmhwxiATgmailDOTcom *)+(* Start time: April, 2014 *)+*/++/* ****** ****** */++#ifndef ATSLIB_LIBATS_LIBC_CATS_SIGNAL+#define ATSLIB_LIBATS_LIBC_CATS_SIGNAL++/* ****** ****** */++#include <signal.h>++/* ****** ****** */+//+typedef int signum_t ;+//+typedef+void (*sighandler_t)(signum_t) ;+//+/* ****** ****** */++typedef+struct sigaction+atslib_libats_libc_sigaction_struct ;++/* ****** ****** */++#define atslib_libats_libc_signal signal++/* ****** ****** */++#define atslib_libats_libc_sigaddset sigaddset+#define atslib_libats_libc_sigdelset sigdelset+#define atslib_libats_libc_sigemptyset sigemptyset+#define atslib_libats_libc_sigfillset sigfillset++/* ****** ****** */++#define \+atslib_libats_libc_sigaction sigaction+#define \+atslib_libats_libc_sigaction_null(sgn, act) \+atslib_libats_libc_sigaction(sgn, act, (atslib_libats_libc_sigaction_struct*)0)++/* ****** ****** */++#define atslib_libats_libc_kill kill+#define atslib_libats_libc_killpg killpg+#define atslib_libats_libc_raise raise++/* ****** ****** */++#define atslib_libats_libc_sigset sigset+#define atslib_libats_libc_sighold sighold+#define atslib_libats_libc_sigignore sigignore+#define atslib_libats_libc_sigrelse sigrelse++/* ****** ****** */++#define atslib_libats_libc_sigwait sigwait++/* ****** ****** */++#define atslib_libats_libc_sigpause sigpause+#define atslib_libats_libc_sigsuspend sigsuspend++/* ****** ****** */++#define atslib_libats_libc_sigpending sigpending+#define atslib_libats_libc_siginterrupt siginterrupt++/* ****** ****** */++#define atslib_libats_libc_psignal psignal++/* ****** ****** */++/*+//+// declared in <string.h>+//+extern+char* strsignal (int signum) ;+*/+#define atslib_libats_libc_strsignal strsignal++/* ****** ****** */++#endif // ifndef ATSLIB_LIBATS_LIBC_CATS_SIGNAL++/* ****** ****** */++/* end of [signal.cats] */
+ .atspkg/contrib/ats-includes-0.3.10/libats/libc/CATS/stdlib.cats view
@@ -0,0 +1,206 @@+/***********************************************************************/+/*                                                                     */+/*                         Applied Type System                         */+/*                                                                     */+/***********************************************************************/++/* (*+** ATS/Postiats - Unleashing the Potential of Types!+** Copyright (C) 2010-2015 Hongwei Xi, ATS Trustful Software, Inc.+** All rights reserved+**+** ATS is free software;  you can  redistribute it and/or modify it under+** the terms of  the GNU GENERAL PUBLIC LICENSE (GPL) as published by the+** Free Software Foundation; either version 3, or (at  your  option)  any+** later version.+**+** ATS is distributed in the hope that it will be useful, but WITHOUT ANY+** WARRANTY; without  even  the  implied  warranty  of MERCHANTABILITY or+** FITNESS FOR A PARTICULAR PURPOSE.  See the  GNU General Public License+** for more details.+**+** You  should  have  received  a  copy of the GNU General Public License+** along  with  ATS;  see the  file COPYING.  If not, please write to the+** Free Software Foundation,  51 Franklin Street, Fifth Floor, Boston, MA+** 02110-1301, USA.+*) */++/* ****** ****** */++/*+(* Author: Hongwei Xi *)+(* Authoremail: gmhwxiATgmailDOTcom *)+(* Start time: February, 2013 *)+*/++/* ****** ****** */++#ifndef \+ATSLIB_LIBATS_LIBC_CATS_STDLIB+#define \+ATSLIB_LIBATS_LIBC_CATS_STDLIB++/* ****** ****** */++#include <stdlib.h>++/* ****** ****** */++#define \+atslib_libats_libc_abort abort++/* ****** ****** */++#define \+atslib_libats_libc__Exit _Exit++/* ****** ****** */++#define \+atslib_libats_libc_atexit atexit++/* ****** ****** */++#define atslib_libats_libc_abs abs+#define atslib_libats_libc_labs labs+#define atslib_libats_libc_llabs llabs++/* ****** ****** */++#define atslib_libats_libc_div div+#define atslib_libats_libc_ldiv ldiv+#define atslib_libats_libc_lldiv lldiv++/* ****** ****** */++#define atslib_libats_libc_a64l a64l+#define atslib_libats_libc_l64a l64a++/* ****** ****** */++#define atslib_libats_libc_atoi atoi+#define atslib_libats_libc_atol atol+#define atslib_libats_libc_atoll atoll++/* ****** ****** */++#define atslib_libats_libc_atof atof++/* ****** ****** */++#define \+atslib_libats_libc_strtol0(nptr, base) \+atslib_libats_libc_strtol_unsafe(nptr, 0, base)+#define \+atslib_libats_libc_strtol1(nptr, endptr, base) \+atslib_libats_libc_strtol_unsafe(nptr, endptr, base)+#define \+atslib_libats_libc_strtol_unsafe(nptr, endptr, base) \+strtol((char*)(nptr), (char**)(endptr), base)++/* ****** ****** */++#define \+atslib_libats_libc_strtoll0(nptr, base) \+atslib_libats_libc_strtoll_unsafe(nptr, 0, base)+#define \+atslib_libats_libc_strtoll1(nptr, endptr, base) \+atslib_libats_libc_strtoll_unsafe(nptr, endptr, base)+#define \+atslib_libats_libc_strtoll_unsafe(nptr, endptr, base) \+strtoll((char*)(nptr), (char**)(endptr), base)++/* ****** ****** */++#define \+atslib_libats_libc_strtof0(nptr) \+atslib_libats_libc_strtof_unsafe(nptr, 0)+#define \+atslib_libats_libc_strtof1(nptr, endptr) \+atslib_libats_libc_strtof_unsafe(nptr, endptr)+#define \+atslib_libats_libc_strtof_unsafe(nptr, endptr) \+strtof((char*)(nptr), (char**)(endptr))++/* ****** ****** */++#define \+atslib_libats_libc_strtod0(nptr) \+atslib_libats_libc_strtod_unsafe(nptr, 0)+#define \+atslib_libats_libc_strtod1(nptr, endptr) \+atslib_libats_libc_strtod_unsafe(nptr, endptr)+#define \+atslib_libats_libc_strtod_unsafe(nptr, endptr) \+strtod((char*)(nptr), (char**)(endptr))++/* ****** ****** */++#define atslib_libats_libc_getenv getenv+#define atslib_libats_libc_putenv putenv+#define atslib_libats_libc_setenv setenv+#define atslib_libats_libc_unsetenv unsetenv++/* ****** ****** */++#define atslib_libats_libc_rand rand+#define atslib_libats_libc_srand srand+#define atslib_libats_libc_rand_r rand_r++/* ****** ****** */++#define atslib_libats_libc_random random+#define atslib_libats_libc_srandom srandom++/* ****** ****** */+//+#define atslib_libats_libc_seed48 seed48+#define atslib_libats_libc_srand48 srand48+//+#define atslib_libats_libc_drand48 drand48+#define atslib_libats_libc_erand48 erand48+#define atslib_libats_libc_lrand48 lrand48+#define atslib_libats_libc_nrand48 nrand48+#define atslib_libats_libc_mrand48 mrand48+#define atslib_libats_libc_jrand48 jrand48+#define atslib_libats_libc_lcong48 lcong48+//+/* ****** ****** */++#define \+atslib_libats_libc_qsort\+(base, nmemb, size, compar) \+qsort(base, nmemb, size, (void*)compar)++/* ****** ****** */++#define \+atslib_libats_libc_bsearch\+(key, base, nmemb, size, compar) \+bsearch(key, base, nmemb, size, (void*)compar)++/* ****** ****** */++#define \+atslib_libats_libc_mkstemp mkstemp+#define \+atslib_libats_libc_mkostemp mkostemp++/* ****** ****** */++#define \+atslib_libats_libc_mfree_libc free+#define \+atslib_libats_libc_malloc_libc malloc++/* ****** ****** */++#define atslib_libats_libc_system system++/* ****** ****** */++#endif // ifndef ATSLIB_LIBATS_LIBC_CATS_STDLIB++/* ****** ****** */++/* end of [stdlib.cats] */
+ .atspkg/contrib/ats-includes-0.3.10/libats/libc/CATS/string.cats view
@@ -0,0 +1,139 @@+/***********************************************************************/+/*                                                                     */+/*                         Applied Type System                         */+/*                                                                     */+/***********************************************************************/++/* (*+** ATS/Postiats - Unleashing the Potential of Types!+** Copyright (C) 2010-2015 Hongwei Xi, ATS Trustful Software, Inc.+** All rights reserved+**+** ATS is free software;  you can  redistribute it and/or modify it under+** the terms of  the GNU GENERAL PUBLIC LICENSE (GPL) as published by the+** Free Software Foundation; either version 3, or (at  your  option)  any+** later version.+**+** ATS is distributed in the hope that it will be useful, but WITHOUT ANY+** WARRANTY; without  even  the  implied  warranty  of MERCHANTABILITY or+** FITNESS FOR A PARTICULAR PURPOSE.  See the  GNU General Public License+** for more details.+**+** You  should  have  received  a  copy of the GNU General Public License+** along  with  ATS;  see the  file COPYING.  If not, please write to the+** Free Software Foundation,  51 Franklin Street, Fifth Floor, Boston, MA+** 02110-1301, USA.+*) */++/* ****** ****** */++/*+(* Author: Hongwei Xi *)+(* Authoremail: gmhwxiATgmailDOTcom *)+(* Start time: February, 2013 *)+*/++/* ****** ****** */++#ifndef ATSLIB_LIBATS_LIBC_CATS_STRING+#define ATSLIB_LIBATS_LIBC_CATS_STRING++/* ****** ****** */++#include <errno.h>+#include <string.h>++/* ****** ****** */++#define atslib_libats_libc_strcmp strcmp+#define atslib_libats_libc_strncmp strncmp++/* ****** ****** */++#define atslib_libats_libc_strcoll strcoll++/* ****** ****** */++#define atslib_libats_libc_strspn strspn+#define atslib_libats_libc_strcspn strcspn++/* ****** ****** */++#define atslib_libats_libc_strlen strlen+#define atslib_libats_libc_strnlen strnlen++/* ****** ****** */++#define atslib_libats_libc_strcat strcat+#define atslib_libats_libc_strcat_unsafe strcat+#define atslib_libats_libc_strncat_unsafe strncat++/* ****** ****** */++#define atslib_libats_libc_strcpy strcpy+#define atslib_libats_libc_strcpy_unsafe strcpy+#define atslib_libats_libc_strncpy_unsafe strncpy++/* ****** ****** */++#define atslib_libats_libc_strdup strdup+#define atslib_libats_libc_strndup strndup+#define atslib_libats_libc_strdup_free atsruntime_mfree_libc++#define atslib_libats_libc_strdupa strdupa+#define atslib_libats_libc_strndupa strndupa+#define atslib_libats_libc_strdupa_free atsruntime_afree_libc++/* ****** ****** */++#define atslib_libats_libc_strfry strfry++/* ****** ****** */++#define atslib_libats_libc_memcpy memcpy+#define atslib_libats_libc_memcpy_unsafe memcpy++/* ****** ****** */++#define atslib_libats_libc_memccpy_unsafe memccpy++/* ****** ****** */++#define atslib_libats_libc_mempcpy mempcpy+#define atslib_libats_libc_mempcpy_unsafe mempcpy++/* ****** ****** */++#define atslib_libats_libc_memset_unsafe memset++/* ****** ****** */++#define atslib_libats_libc_memmove_unsafe memmove++/* ****** ****** */++#define atslib_libats_libc_strerror strerror+#define atslib_libats_libc_strerror_r strerror_r++/* ****** ****** */++ATSinline()+atstype_ptr+atslib_libats_libc_strdup_gc+  (atstype_string src)+{+  char *dst ;+  size_t len, len1 ;+  len = atslib_libats_libc_strlen((char*)src) ;+  len1 = len + 1;+  dst = atspre_malloc_gc(len1) ;+  return atslib_libats_libc_memcpy(dst, src, len1) ;+} // end of [atslib_libats_libc_strdup_gc]++/* ****** ****** */++#endif // ifndef ATSLIB_LIBATS_LIBC_CATS_STRING++/* ****** ****** */++/* end of [string.cats] */
+ .atspkg/contrib/ats-includes-0.3.10/libats/libc/CATS/strings.cats view
@@ -0,0 +1,64 @@+/***********************************************************************/+/*                                                                     */+/*                         Applied Type System                         */+/*                                                                     */+/***********************************************************************/++/* (*+** ATS/Postiats - Unleashing the Potential of Types!+** Copyright (C) 2010-2015 Hongwei Xi, ATS Trustful Software, Inc.+** All rights reserved+**+** ATS is free software;  you can  redistribute it and/or modify it under+** the terms of  the GNU GENERAL PUBLIC LICENSE (GPL) as published by the+** Free Software Foundation; either version 3, or (at  your  option)  any+** later version.+**+** ATS is distributed in the hope that it will be useful, but WITHOUT ANY+** WARRANTY; without  even  the  implied  warranty  of MERCHANTABILITY or+** FITNESS FOR A PARTICULAR PURPOSE.  See the  GNU General Public License+** for more details.+**+** You  should  have  received  a  copy of the GNU General Public License+** along  with  ATS;  see the  file COPYING.  If not, please write to the+** Free Software Foundation,  51 Franklin Street, Fifth Floor, Boston, MA+** 02110-1301, USA.+*) */++/* ****** ****** */++/*+(* Author: Hongwei Xi *)+(* Authoremail: gmhwxiATgmailDOTcom *)+(* Start time: February, 2013 *)+*/++/* ****** ****** */++#ifndef ATSLIB_LIBATS_LIBC_CATS_STRINGS+#define ATSLIB_LIBATS_LIBC_CATS_STRINGS++/* ****** ****** */++#include <strings.h>++/* ****** ****** */++#define atslib_libats_libc_index_int index+#define atslib_libats_libc_index_char(c) index((int)c)++#define atslib_libats_libc_rindex_int rindex+#define atslib_libats_libc_rindex_char(c) rindex((int)c)++/* ****** ****** */++#define atslib_libats_libc_strcasecmp strcasecmp+#define atslib_libats_libc_strncasecmp strncasecmp++/* ****** ****** */++#endif // ifndef ATSLIB_LIBATS_LIBC_CATS_STRINGS++/* ****** ****** */++/* end of [strings.cats] */
+ .atspkg/contrib/ats-includes-0.3.10/libats/libc/CATS/sys/mman.cats view
@@ -0,0 +1,59 @@+/***********************************************************************/+/*                                                                     */+/*                         Applied Type System                         */+/*                                                                     */+/***********************************************************************/++/* (*+** ATS/Postiats - Unleashing the Potential of Types!+** Copyright (C) 2010-2015 Hongwei Xi, ATS Trustful Software, Inc.+** All rights reserved+**+** ATS is free software;  you can  redistribute it and/or modify it under+** the terms of  the GNU GENERAL PUBLIC LICENSE (GPL) as published by the+** Free Software Foundation; either version 3, or (at  your  option)  any+** later version.+**+** ATS is distributed in the hope that it will be useful, but WITHOUT ANY+** WARRANTY; without  even  the  implied  warranty  of MERCHANTABILITY or+** FITNESS FOR A PARTICULAR PURPOSE.  See the  GNU General Public License+** for more details.+**+** You  should  have  received  a  copy of the GNU General Public License+** along  with  ATS;  see the  file COPYING.  If not, please write to the+** Free Software Foundation,  51 Franklin Street, Fifth Floor, Boston, MA+** 02110-1301, USA.+*) */++/* ****** ****** */++/*+(* Author: Hongwei Xi *)+(* Authoremail: gmhwxiATgmailDOTcom *)+(* Start time: October, 2013 *)+*/++/* ****** ****** */++#ifndef ATSLIB_LIBATS_LIBC_CATS_SYS_MMAN+#define ATSLIB_LIBATS_LIBC_CATS_SYS_MMAN++/* ****** ****** */+//+#include <fcntl.h>+#include <sys/types.h>+//+#include <sys/mman.h>+//+/* ****** ****** */++#define atslib_libats_libc_shm_open shm_open+#define atslib_libats_libc_shm_unlink shm_unlink++/* ****** ****** */++#endif // ifndef ATSLIB_LIBATS_LIBC_CATS_SYS_MMAN++/* ****** ****** */++/* end of [mman.cats] */
+ .atspkg/contrib/ats-includes-0.3.10/libats/libc/CATS/sys/socket.cats view
@@ -0,0 +1,135 @@+/***********************************************************************/+/*                                                                     */+/*                         Applied Type System                         */+/*                                                                     */+/***********************************************************************/++/* (*+** ATS/Postiats - Unleashing the Potential of Types!+** Copyright (C) 2010-2015 Hongwei Xi, ATS Trustful Software, Inc.+** All rights reserved+**+** ATS is free software;  you can  redistribute it and/or modify it under+** the terms of  the GNU GENERAL PUBLIC LICENSE (GPL) as published by the+** Free Software Foundation; either version 3, or (at  your  option)  any+** later version.+**+** ATS is distributed in the hope that it will be useful, but WITHOUT ANY+** WARRANTY; without  even  the  implied  warranty  of MERCHANTABILITY or+** FITNESS FOR A PARTICULAR PURPOSE.  See the  GNU General Public License+** for more details.+**+** You  should  have  received  a  copy of the GNU General Public License+** along  with  ATS;  see the  file COPYING.  If not, please write to the+** Free Software Foundation,  51 Franklin Street, Fifth Floor, Boston, MA+** 02110-1301, USA.+*) */++/* ****** ****** */++/*+(* Author: Hongwei Xi *)+(* Authoremail: gmhwxiATgmailDOTcom *)+(* Start time: November, 2014 *)+*/++/* ****** ****** */++#ifndef \+ATSLIB_LIBATS_LIBC_CATS_SYS_SOCKET+#define \+ATSLIB_LIBATS_LIBC_CATS_SYS_SOCKET++/* ****** ****** */+//+#include <unistd.h>+#include <sys/socket.h>+//+/* ****** ****** */+//+/*+//+// socket address family+//+typedef+unsigned short int sa_family_t;+*/+//+// socket protocol family+//+typedef+unsigned short int sp_family_t;+//+/* ****** ****** */++#define \+atslib_libats_libc_socket_AF_type socket_AF_type+#define \+atslib_libats_libc_socket_PF_type socket_PF_type++/* ****** ****** */+//+#define \+atslib_libats_libc_bind_err(fd, sa, len) \+  bind(fd, (const struct sockaddr*)sa, len)+//+extern+void+atslib_libats_libc_bind_exn+(+  int sockfd, atstype_ptr sa, socklen_t salen+); // end of [atslib_libats_libc_bind_exn]+//+/* ****** ****** */+//+#define \+atslib_libats_libc_listen_err(fd, qsz) listen(fd, qsz)+//+extern+void+atslib_libats_libc_listen_exn(int sockfd, int listenqsz);+//+/* ****** ****** */+//+#define \+atslib_libats_libc_connect_err(fd, sa, len) \+  connect(fd, (const struct sockaddr*)sa, len)+//+extern+void+atslib_libats_libc_connect_exn+(+  int sockfd, atstype_ptr sa, socklen_t salen+); // end of [atslib_libats_libc_connect_exn]+//+/* ****** ****** */+//+#define \+atslib_libats_libc_accept_err(fd, sa, len) \+  accept(fd, (struct sockaddr*)sa, (socklen_t*)len)+//+#define \+atslib_libats_libc_accept_null_err(fd) atslib_libats_libc_accept_err(fd, 0, 0)+//+/* ****** ****** */++#define atslib_libats_libc_socket_close(fd) close(fd)++/* ****** ****** */++#define atslib_libats_libc_shutdown(fd, how) shutdown(fd, how)++/* ****** ****** */++#define \+atslib_libats_libc_socket_read(fd, bufp, bsz) read(fd, (char*)bufp, bsz)+#define \+atslib_libats_libc_socket_write(fd, bufp, bsz) write(fd, (const char*)bufp, bsz)++/* ****** ****** */++#endif // ifndef ATSLIB_LIBATS_LIBC_CATS_SYS_SOCKET++/* ****** ****** */++/* end of [socket.cats] */
+ .atspkg/contrib/ats-includes-0.3.10/libats/libc/CATS/sys/socket_in.cats view
@@ -0,0 +1,78 @@+/***********************************************************************/+/*                                                                     */+/*                         Applied Type System                         */+/*                                                                     */+/***********************************************************************/++/* (*+** ATS/Postiats - Unleashing the Potential of Types!+** Copyright (C) 2010-2015 Hongwei Xi, ATS Trustful Software, Inc.+** All rights reserved+**+** ATS is free software;  you can  redistribute it and/or modify it under+** the terms of  the GNU GENERAL PUBLIC LICENSE (GPL) as published by the+** Free Software Foundation; either version 3, or (at  your  option)  any+** later version.+**+** ATS is distributed in the hope that it will be useful, but WITHOUT ANY+** WARRANTY; without  even  the  implied  warranty  of MERCHANTABILITY or+** FITNESS FOR A PARTICULAR PURPOSE.  See the  GNU General Public License+** for more details.+**+** You  should  have  received  a  copy of the GNU General Public License+** along  with  ATS;  see the  file COPYING.  If not, please write to the+** Free Software Foundation,  51 Franklin Street, Fifth Floor, Boston, MA+** 02110-1301, USA.+*) */++/* ****** ****** */++/*+(* Author: Hongwei Xi *)+(* Authoremail: gmhwxiATgmailDOTcom *)+(* Start time: November, 2014 *)+*/++/* ****** ****** */++#ifndef \+ATSLIB_LIBATS_LIBC_CATS_SYS_SOCKET_IN+#define \+ATSLIB_LIBATS_LIBC_CATS_SYS_SOCKET_IN++/* ****** ****** */+//+#include <sys/socket.h>+#include <netinet/in.h>+//+/* ****** ****** */+//+#ifdef memset+#else+extern+void *memset (void *p, int c, size_t n) ;+#endif // ifdef(memset)+//+/* ****** ****** */++ATSinline()+atsvoid_t0ype+atslib_libats_libc_sockaddr_in_init+(+  atstype_ptr sa+, sa_family_t af, in_addr_t inp, in_port_t port+) {+  struct sockaddr_in *sa2 = sa ;+  (void)memset(sa2, 0, sizeof(struct sockaddr_in)) ;+  sa2->sin_family = af ;+  sa2->sin_addr.s_addr = inp ;+  sa2->sin_port = port ;+} // end of [atslib_libats_libc_sockaddr_in_init]++/* ****** ****** */++#endif // ifndef ATSLIB_LIBATS_LIBC_CATS_SYS_SOCKET_IN++/* ****** ****** */++/* end of [socket_in.cats] */
+ .atspkg/contrib/ats-includes-0.3.10/libats/libc/CATS/sys/time.cats view
@@ -0,0 +1,94 @@+/***********************************************************************/+/*                                                                     */+/*                         Applied Type System                         */+/*                                                                     */+/***********************************************************************/++/* (*+** ATS/Postiats - Unleashing the Potential of Types!+** Copyright (C) 2010-2015 Hongwei Xi, ATS Trustful Software, Inc.+** All rights reserved+**+** ATS is free software;  you can  redistribute it and/or modify it under+** the terms of  the GNU GENERAL PUBLIC LICENSE (GPL) as published by the+** Free Software Foundation; either version 3, or (at  your  option)  any+** later version.+**+** ATS is distributed in the hope that it will be useful, but WITHOUT ANY+** WARRANTY; without  even  the  implied  warranty  of MERCHANTABILITY or+** FITNESS FOR A PARTICULAR PURPOSE.  See the  GNU General Public License+** for more details.+**+** You  should  have  received  a  copy of the GNU General Public License+** along  with  ATS;  see the  file COPYING.  If not, please write to the+** Free Software Foundation,  51 Franklin Street, Fifth Floor, Boston, MA+** 02110-1301, USA.+*) */++/* ****** ****** */++/*+(* Author: Hongwei Xi *)+(* Authoremail: gmhwxiATgmailDOTcom *)+(* Start time: August, 2013 *)+*/++/* ****** ****** */++#ifndef \+ATSLIB_LIBATS_LIBC_CATS_SYS_TIME+#define \+ATSLIB_LIBATS_LIBC_CATS_SYS_TIME++/* ****** ****** */++#include <sys/time.h>++/* ****** ****** */+//+typedef+struct timeval+atslib_libats_libc_timeval_type ;+typedef+struct timezone+atslib_libats_libc_timezone_type ;+//+typedef+struct itimerval+atslib_libats_libc_itimerval_type ;+//+/* ****** ****** */++#define \+atslib_libats_libc_gettimeofday_tv(tv) gettimeofday(tv, NULL)+#define \+atslib_libats_libc_gettimeofday_tz(tz) gettimeofday(NULL, tz)++#define \+atslib_libats_libc_settimeofday_tv(tv) settimeofday(tv, NULL)+#define \+atslib_libats_libc_settimeofday_tz(tz) settimeofday(NULL, tz)+#define \+atslib_libats_libc_settimeofday_tvtz(tv, tz) settimeofday(tv, tz)++/* ****** ****** */++#define atslib_libats_libc_utimes utimes+#define atslib_libats_libc_futimes futimes+#define atslib_libats_libc_futimesat futimesat++/* ****** ****** */+//+#define atslib_libats_libc_getitimer getitimer+//+#define atslib_libats_libc_setitimer setitimer+#define \+atslib_libats_libc_setitimer_null(which, itval) setitimer(which, itval, NULL)+//+/* ****** ****** */++#endif // ifndef ATSLIB_LIBATS_LIBC_CATS_SYS_TIME++/* ****** ****** */++/* end of [time.cats] */
+ .atspkg/contrib/ats-includes-0.3.10/libats/libc/CATS/sys/wait.cats view
@@ -0,0 +1,60 @@+/***********************************************************************/+/*                                                                     */+/*                         Applied Type System                         */+/*                                                                     */+/***********************************************************************/++/* (*+** ATS/Postiats - Unleashing the Potential of Types!+** Copyright (C) 2010-2015 Hongwei Xi, ATS Trustful Software, Inc.+** All rights reserved+**+** ATS is free software;  you can  redistribute it and/or modify it under+** the terms of  the GNU GENERAL PUBLIC LICENSE (GPL) as published by the+** Free Software Foundation; either version 3, or (at  your  option)  any+** later version.+**+** ATS is distributed in the hope that it will be useful, but WITHOUT ANY+** WARRANTY; without  even  the  implied  warranty  of MERCHANTABILITY or+** FITNESS FOR A PARTICULAR PURPOSE.  See the  GNU General Public License+** for more details.+**+** You  should  have  received  a  copy of the GNU General Public License+** along  with  ATS;  see the  file COPYING.  If not, please write to the+** Free Software Foundation,  51 Franklin Street, Fifth Floor, Boston, MA+** 02110-1301, USA.+*) */++/* ****** ****** */++/*+(* Author: Hongwei Xi *)+(* Authoremail: gmhwxiATgmailDOTcom *)+(* Start time: October, 2013 *)+*/++/* ****** ****** */++#ifndef \+ATSLIB_LIBATS_LIBC_CATS_SYS_WAIT+#define \+ATSLIB_LIBATS_LIBC_CATS_SYS_WAIT++/* ****** ****** */+//+#include <sys/wait.h>+//+/* ****** ****** */+//+#define \+atslib_libats_libc_wait_void() wait((int*)0)+#define \+atslib_libats_libc_wait_status(x) wait((int*)x)+//+/* ****** ****** */++#endif // ifndef ATSLIB_LIBATS_LIBC_CATS_SYS_WAIT++/* ****** ****** */++/* end of [wait.cats] */
+ .atspkg/contrib/ats-includes-0.3.10/libats/libc/CATS/time.cats view
@@ -0,0 +1,206 @@+/***********************************************************************/+/*                                                                     */+/*                         Applied Type System                         */+/*                                                                     */+/***********************************************************************/++/* (*+** ATS/Postiats - Unleashing the Potential of Types!+** Copyright (C) 2010-2015 Hongwei Xi, ATS Trustful Software, Inc.+** All rights reserved+**+** ATS is free software;  you can  redistribute it and/or modify it under+** the terms of  the GNU GENERAL PUBLIC LICENSE (GPL) as published by the+** Free Software Foundation; either version 3, or (at  your  option)  any+** later version.+**+** ATS is distributed in the hope that it will be useful, but WITHOUT ANY+** WARRANTY; without  even  the  implied  warranty  of MERCHANTABILITY or+** FITNESS FOR A PARTICULAR PURPOSE.  See the  GNU General Public License+** for more details.+**+** You  should  have  received  a  copy of the GNU General Public License+** along  with  ATS;  see the  file COPYING.  If not, please write to the+** Free Software Foundation,  51 Franklin Street, Fifth Floor, Boston, MA+** 02110-1301, USA.+*) */++/* ****** ****** */++/*+(* Author: Hongwei Xi *)+(* Authoremail: gmhwxiATgmailDOTcom *)+(* Start time: March, 2013 *)+*/++/* ****** ****** */++#ifndef ATSLIB_LIBATS_LIBC_CATS_TIME+#define ATSLIB_LIBATS_LIBC_CATS_TIME++/* ****** ****** */++#include <time.h>++/* ****** ****** */+//+typedef+time_t+atslib_libats_libc_time_type ;+//+typedef+struct tm+atslib_libats_libc_tm_struct_type ;+//+/* ****** ****** */++typedef+clock_t+atslib_libats_libc_clock_type ;++/* ****** ****** */++typedef+struct timespec+atslib_libats_libc_timespec_type ;++/* ****** ****** */++#define \+atslib_libats_libc_difftime difftime++/* ****** ****** */++#define \+atslib_libats_libc_time_get() time((time_t*)0)++ATSinline()+atstype_bool+atslib_libats_libc_time_getset+(+  atstype_ref tval+) {+  return (time((time_t*)tval) >= 0 ? atsbool_true : atsbool_false) ;+} // end of [atslib_libats_libc_time_getset]++/* ****** ****** */++#define \+atslib_libats_libc_ctime ctime+#define \+atslib_libats_libc_ctime_r ctime_r++/* ****** ****** */++ATSinline()+atstype_int+atslib_libats_libc_tm_get_sec+  (atstype_ptr tm) {+  return ((struct tm*)tm)->tm_sec ;+} // end of [atslib_libats_libc_tm_get_sec]++ATSinline()+atstype_int+atslib_libats_libc_tm_get_min+  (atstype_ptr tm) {+  return ((struct tm*)tm)->tm_min ;+} // end of [atslib_libats_libc_tm_get_min]++ATSinline()+atstype_int+atslib_libats_libc_tm_get_hour+  (atstype_ptr tm) {+  return ((struct tm*)tm)->tm_hour ;+} // end of [atslib_libats_libc_tm_get_hour]++ATSinline()+atstype_int+atslib_libats_libc_tm_get_mday+  (atstype_ptr tm) {+  return ((struct tm*)tm)->tm_mday ;+} // end of [atslib_libats_libc_tm_get_mday]++ATSinline()+atstype_int+atslib_libats_libc_tm_get_mon+  (atstype_ptr tm) {+  return ((struct tm*)tm)->tm_mon ;+} // end of [atslib_libats_libc_tm_get_mon]++ATSinline()+atstype_int+atslib_libats_libc_tm_get_year+  (atstype_ptr tm) {+  return ((struct tm*)tm)->tm_year ;+} // end of [atslib_libats_libc_tm_get_year]++ATSinline()+atstype_int+atslib_libats_libc_tm_get_wday+  (atstype_ptr tm) {+  return ((struct tm*)tm)->tm_wday ;+} // end of [atslib_libats_libc_tm_get_wday]++ATSinline()+atstype_int+atslib_libats_libc_tm_get_yday+  (atstype_ptr tm) {+  return ((struct tm*)tm)->tm_yday ;+} // end of [atslib_libats_libc_tm_get_yday]++ATSinline()+atstype_int+atslib_libats_libc_tm_get_isdst+  (atstype_ptr tm) {+  return ((struct tm*)tm)->tm_isdst ;+} // end of [atslib_libats_libc_tm_get_isdst]++/* ****** ****** */++#define \+atslib_libats_libc_mktime mktime++/* ****** ****** */++#define \+atslib_libats_libc_asctime asctime++/* ****** ****** */++#define \+atslib_libats_libc_gmtime gmtime+#define \+atslib_libats_libc_gmtime_r gmtime_r++/* ****** ****** */++#define \+atslib_libats_libc_localtime localtime+#define \+atslib_libats_libc_localtime_r localtime_r++/* ****** ****** */++#define atslib_libats_libc_tzset tzset++/* ****** ****** */++#define atslib_libats_libc_clock clock++#define \+atslib_libats_libc_clock_getres clock_getres++/* ****** ****** */++#define \+atslib_libats_libc_clock_gettime clock_gettime+#define \+atslib_libats_libc_clock_settime clock_settime++/* ****** ****** */++#endif // ifndef ATSLIB_LIBATS_LIBC_CATS_TIME++/* ****** ****** */++/* end of [time.cats] */
+ .atspkg/contrib/ats-includes-0.3.10/libats/libc/CATS/unistd.cats view
@@ -0,0 +1,174 @@+/***********************************************************************/+/*                                                                     */+/*                         Applied Type System                         */+/*                                                                     */+/***********************************************************************/++/* (*+** ATS/Postiats - Unleashing the Potential of Types!+** Copyright (C) 2010-2015 Hongwei Xi, ATS Trustful Software, Inc.+** All rights reserved+**+** ATS is free software;  you can  redistribute it and/or modify it under+** the terms of  the GNU GENERAL PUBLIC LICENSE (GPL) as published by the+** Free Software Foundation; either version 3, or (at  your  option)  any+** later version.+**+** ATS is distributed in the hope that it will be useful, but WITHOUT ANY+** WARRANTY; without  even  the  implied  warranty  of MERCHANTABILITY or+** FITNESS FOR A PARTICULAR PURPOSE.  See the  GNU General Public License+** for more details.+**+** You  should  have  received  a  copy of the GNU General Public License+** along  with  ATS;  see the  file COPYING.  If not, please write to the+** Free Software Foundation,  51 Franklin Street, Fifth Floor, Boston, MA+** 02110-1301, USA.+*) */++/* ****** ****** */++/*+(* Author: Hongwei Xi *)+(* Authoremail: gmhwxiATgmailDOTcom *)+(* Start time: April, 2012 *)+*/++/* ****** ****** */++#ifndef ATSLIB_LIBATS_LIBC_CATS_UNISTD+#define ATSLIB_LIBATS_LIBC_CATS_UNISTD++/* ****** ****** */++#include <unistd.h>++/* ****** ****** */++#define atslib_libats_libc_close close+#define atslib_libats_libc_close0 atslib_libats_libc_close+#define atslib_libats_libc_close1 atslib_libats_libc_close+#define atslib_libats_libc_close0_exn atslib_libats_libc_close_exn+#define atslib_libats_libc_close1_exn atslib_libats_libc_close_exn++/* ****** ****** */++#define atslib_libats_libc_dup dup+#define atslib_libats_libc_dup_fildes dup+#define atslib_libats_libc_dup2 dup2+#define atslib_libats_libc_dup3 dup3++/* ****** ****** */++#define atslib_libats_libc_execv(path, argv) execv((char*)path, (char**)argv)+#define atslib_libats_libc_execvp(path, argv) execvp((char*)path, (char**)argv)++/* ****** ****** */++#define atslib_libats_libc_encrypt encrypt++/* ****** ****** */++#define atslib_libats_libc_fork fork++/* ****** ****** */++#define atslib_libats_libc_getcwd getcwd++/* ****** ****** */++#define atslib_libats_libc_getlogin getlogin+#define atslib_libats_libc_getlogin_r getlogin_r++/* ****** ****** */++#define atslib_libats_libc_getpid getpid+#define atslib_libats_libc_getppid getppid++/* ****** ****** */++#define atslib_libats_libc_getuid getuid+#define atslib_libats_libc_setuid setuid+#define atslib_libats_libc_geteuid geteuid+#define atslib_libats_libc_seteuid seteuid++/* ****** ****** */++#define atslib_libats_libc_getgid getgid+#define atslib_libats_libc_setgid setgid+#define atslib_libats_libc_getegid getegid+#define atslib_libats_libc_setegid setegid++/* ****** ****** */++#define atslib_libats_libc_setreuid setreuid+#define atslib_libats_libc_setregid setregid+#define atslib_libats_libc_setresuid setresuid+#define atslib_libats_libc_setresgid setresgid++/* ****** ****** */++#define atslib_libats_libc_setfsuid setfsuid+#define atslib_libats_libc_setfsgid setfsgid++/* ****** ****** */++#define atslib_libats_libc_pause pause++/* ****** ****** */++#define atslib_libats_libc_read_err read+#define atslib_libats_libc_write_err write++/* ****** ****** */++#define atslib_libats_libc_pread pread+#define atslib_libats_libc_pwrite pwrite++/* ****** ****** */++#define atslib_libats_libc_alarm alarm+#define atslib_libats_libc_alarm_set alarm+#define atslib_libats_libc_alarm_cancel() alarm(0)++/* ****** ****** */++#define atslib_libats_libc_sleep_int sleep+#define atslib_libats_libc_sleep_uint sleep++/* ****** ****** */++#define atslib_libats_libc_usleep_int usleep+#define atslib_libats_libc_usleep_uint usleep++/* ****** ****** */++#define atslib_libats_libc_rmdir rmdir++/* ****** ****** */++#define atslib_libats_libc_link link+#define atslib_libats_libc_unlink unlink++/* ****** ****** */++#define atslib_libats_libc_symlink symlink+#define atslib_libats_libc_readlink readlink++/* ****** ****** */++#define atslib_libats_libc_sync sync+#define atslib_libats_libc_fsync fsync+#define atslib_libats_libc_fdatasync fdatasync++/* ****** ****** */++#define atslib_libats_libc_truncate truncate+#define atslib_libats_libc_ftruncate ftruncate++/* ****** ****** */++#endif // ifndef ATSLIB_LIBATS_LIBC_CATS_UNISTD++/* ****** ****** */++/* end of [unistd.cats] */
+ .atspkg/contrib/atscntrb-hx-intinf/mydepies.hats view
@@ -0,0 +1,25 @@+(* ****** ****** *)+//+// HX-2017-01-21:+// For handling dependencies+//+(* ****** ****** *)+//+local+//+#define+LIBGMP_targetloc+"\+$PATSHOME/contrib\+/atscntrb/atscntrb-hx-libgmp"+//+in (*in-of-local*)+//+#staload+GMP = "{$LIBGMP}/SATS/gmp.sats"+//+end // end of [local]+//+(* ****** ****** *)++(* end of [mydepies.hats] *)
+ .atspkg/contrib/atscntrb-hx-intinf/mylibies.hats view
@@ -0,0 +1,26 @@+(* ****** ****** *)+//+// HX-2017-01-28:+// For downstream staloading+//+(* ****** ****** *)+//+#staload+INTINF = "./SATS/intinf.sats"+#staload+INTINF_t = "./SATS/intinf_t.sats"+#staload+INTINF_vt = "./SATS/intinf_vt.sats"+//+(* ****** ****** *)+//+#staload+_(*INTINF_t*) = "./DATS/intinf_t.dats"+#staload+_(*INTINF_vt*) = "./DATS/intinf_vt.dats"+//+#staload GINTINF_t = "./DATS/gintinf_t.dats"+//+(* ****** ****** *)++(* end of [mylibies.hats] *)
+ .atspkg/contrib/atscntrb-hx-libgmp/CATS/gmp.cats view
@@ -0,0 +1,331 @@+/* ****** ****** */+//+// API in ATS for libgmp+//+/* ****** ****** */++/*+(*+** ATS/Postiats - Unleashing the Potential of Types!+** Copyright (C) 2011-2013 Hongwei Xi, ATS Trustful Software, Inc.+** All rights reserved+**+** Permission to use, copy, modify, and distribute this software for any+** purpose with or without fee is hereby granted, provided that the above+** copyright notice and this permission notice appear in all copies.+** +** THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES+** WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF+** MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR+** ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES+** WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN+** ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF+** OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.+*)+*/++/* ****** ****** */++/*+** Author: Hongwei Xi+** Authoremail: gmhwxiATgmailDOTcom+*/++/* ****** ****** */++#ifndef ATSCNTRB_LIBGMP_GMP_CATS+#define ATSCNTRB_LIBGMP_GMP_CATS++/* ****** ****** */++#include <gmp.h>++/* ****** ****** */++typedef+__mpz_struct atscntrb_gmp_mpz ;+typedef atscntrb_gmp_mpz *ptrmpz;++/* ****** ****** */+//+// init/clear/realloc+//+#define atscntrb_gmp_mpz_init mpz_init+#define atscntrb_gmp_mpz_init2 mpz_init2+#define atscntrb_gmp_mpz_clear mpz_clear+#define atscntrb_gmp_mpz_realloc2 mpz_realloc2+//+/* ****** ****** */+//+// get-functions+//+#define atscntrb_gmp_mpz_get_int mpz_get_si+#define atscntrb_gmp_mpz_get_uint mpz_get_ui+#define atscntrb_gmp_mpz_get_lint mpz_get_si+#define atscntrb_gmp_mpz_get_ulint mpz_get_ui+#define atscntrb_gmp_mpz_get_double mpz_get_d+#define atscntrb_gmp_mpz_get_str mpz_get_str+#define atscntrb_gmp_mpz_get_str_null(base, mpz) mpz_get_str((char*)0, base, mpz)+//+/* ****** ****** */+//+// set-functions+//+#define atscntrb_gmp_mpz_set_int mpz_set_si+#define atscntrb_gmp_mpz_set_uint mpz_set_ui+#define atscntrb_gmp_mpz_set_lint mpz_set_si+#define atscntrb_gmp_mpz_set_ulint mpz_set_ui+#define atscntrb_gmp_mpz_set_mpz mpz_set+//+/* ****** ****** */+//+// init-set functions+//+#define atscntrb_gmp_mpz_init_set_mpz mpz_init_set+#define atscntrb_gmp_mpz_init_set_int mpz_init_set_si+#define atscntrb_gmp_mpz_init_set_uint mpz_init_set_ui+#define atscntrb_gmp_mpz_init_set_lint mpz_init_set_si+#define atscntrb_gmp_mpz_init_set_ulint mpz_init_set_ui+//+/* ****** ****** */++#define atscntrb_gmp_mpz_size mpz_size++/* ****** ****** */+//+// input-output-functions+//+#define atscntrb_gmp_mpz_inp_str mpz_inp_str+#define atscntrb_gmp_mpz_out_str mpz_out_str+//+/* ****** ****** */++ATSinline()+atsvoid_t0ype+atscntrb_gmp_fprint_mpz_base+(+  atstype_ref out, atstype_ptr x, atstype_int base+) {+  size_t ndigit ;+  ndigit = mpz_out_str ((FILE*)out, base, (ptrmpz)x) ;+  return ;+} // end of [atscntrb_gmp_fprint_mpz_base]++#define atscntrb_gmp_fprint_mpz(out, x) \+  atscntrb_gmp_fprint_mpz_base(out, x, 10)++/* ****** ****** */+//+#define atscntrb_gmp_mpz_inp_raw mpz_inp_raw+#define atscntrb_gmp_mpz_out_raw mpz_out_raw+//+/* ****** ****** */++#define atscntrb_gmp_mpz_odd_p(x) mpz_odd_p((ptrmpz)x)+#define atscntrb_gmp_mpz_even_p(x) mpz_even_p((ptrmpz)x)++/* ****** ****** */++#define atscntrb_gmp_mpz_neg1(x) mpz_neg(x, x)+#define atscntrb_gmp_mpz_neg2(x, y) mpz_neg(x, y)++/* ****** ****** */++#define atscntrb_gmp_mpz_abs1(x) mpz_abs(x, x)+#define atscntrb_gmp_mpz_abs2(x, y) mpz_abs(x, y)++/* ****** ****** */+//+// addition-functions+//+ATSinline()+atsvoid_t0ype+mpz_add_si+(+  mpz_t rop+, mpz_t op1, atstype_lint op2+)+{+  if (op2 >= 0)+    mpz_add_ui (rop, op1,  op2) ;+  else+    mpz_add_ui (rop, op1, -op2) ;+  // end of [if]+} /* end of [mpz_add_si] */+//+// x := x+y // y+z+//+#define atscntrb_gmp_mpz_add2_mpz(x, y) mpz_add(x, x, y)+#define atscntrb_gmp_mpz_add2_int(x, y) mpz_add_si(x, x, y)+#define atscntrb_gmp_mpz_add2_uint(x, y) mpz_add_ui(x, x, y)+#define atscntrb_gmp_mpz_add2_lint(x, y) mpz_add_si(x, x, y)+#define atscntrb_gmp_mpz_add2_ulint(x, y) mpz_add_ui(x, x, y)+#define atscntrb_gmp_mpz_add3_mpz(x, y, z) mpz_add(x, y, z)+#define atscntrb_gmp_mpz_add3_int(x, y, z) mpz_add_si(x, y, z)+#define atscntrb_gmp_mpz_add3_uint(x, y, z) mpz_add_ui(x, y, z)+#define atscntrb_gmp_mpz_add3_lint(x, y, z) mpz_add_si(x, y, z)+#define atscntrb_gmp_mpz_add3_ulint(x, y, z) mpz_add_ui(x, y, z)+//+/* ****** ****** */+//+// subtraction-functions+//+ATSinline()+atsvoid_t0ype+mpz_sub_si+(+  mpz_t rop+, mpz_t op1, atstype_lint op2+)+{+  if (op2 >= 0)+    mpz_sub_ui (rop, op1,  op2) ;+  else+    mpz_sub_ui (rop, op1, -op2) ;+  // end of [if]+} /* end of [mpz_sub_si] */+//+#define atscntrb_gmp_mpz_sub2_mpz(x, y) mpz_sub(x, x, y)+#define atscntrb_gmp_mpz_sub2_int(x, y) mpz_sub_si(x, x, y)+#define atscntrb_gmp_mpz_sub2_uint(x, y) mpz_sub_ui(x, x, y)+#define atscntrb_gmp_mpz_sub2_lint(x, y) mpz_sub_si(x, x, y)+#define atscntrb_gmp_mpz_sub2_ulint(x, y) mpz_sub_ui(x, x, y)+#define atscntrb_gmp_mpz_sub3_mpz(x, y, z) mpz_sub(x, y, z)+#define atscntrb_gmp_mpz_sub3_int(x, y, z) mpz_sub_si(x, y, z)+#define atscntrb_gmp_mpz_sub3_uint(x, y, z) mpz_sub_ui(x, y, z)+#define atscntrb_gmp_mpz_sub3_lint(x, y, z) mpz_sub_si(x, y, z)+#define atscntrb_gmp_mpz_sub3_ulint(x, y, z) mpz_sub_ui(x, y, z)+//+/* ****** ****** */+//+// multiplication-functions+//+// x := x * y // y * z+//+#define atscntrb_gmp_mpz_mul2_mpz(x, y) mpz_mul(x, x, y)+#define atscntrb_gmp_mpz_mul2_int(x, y) mpz_mul_si(x, x, y)+#define atscntrb_gmp_mpz_mul2_uint(x, y) mpz_mul_ui(x, x, y)+#define atscntrb_gmp_mpz_mul2_lint(x, y) mpz_mul_si(x, x, y)+#define atscntrb_gmp_mpz_mul2_ulint(x, y) mpz_mul_ui(x, x, y)+#define atscntrb_gmp_mpz_mul3_mpz(x, y, z) mpz_mul(x, y, z)+#define atscntrb_gmp_mpz_mul3_int(x, y, z) mpz_mul_si(x, y, z)+#define atscntrb_gmp_mpz_mul3_uint(x, y, z) mpz_mul_ui(x, y, z)+#define atscntrb_gmp_mpz_mul3_lint(x, y, z) mpz_mul_si(x, y, z)+#define atscntrb_gmp_mpz_mul3_ulint(x, y, z) mpz_mul_ui(x, y, z)+//+#define atscntrb_gmp_mpz_mul3_2exp(x, y, z) mpz_mul_2exp(x, y, z)+//+/* ****** ****** */+//+// trunc-division-functions+//+#define atscntrb_gmp_mpz_tdiv2_q_mpz(x, y) mpz_tdiv_q(x, x, y)+#define atscntrb_gmp_mpz_tdiv2_q_uint(x, y) mpz_tdiv_q_ui(x, x, y)+#define atscntrb_gmp_mpz_tdiv2_q_ulint(x, y) mpz_tdiv_q_ui(x, x, y)+#define atscntrb_gmp_mpz_tdiv3_q_mpz(x, y, z) mpz_tdiv_q(x, y, z)+#define atscntrb_gmp_mpz_tdiv3_q_uint(x, y, z) mpz_tdiv_q_ui(x, y, z)+#define atscntrb_gmp_mpz_tdiv3_q_ulint(x, y, z) mpz_tdiv_q_ui(x, y, z)+//+#define atscntrb_gmp_mpz_tdiv2_r_mpz(x, y) mpz_tdiv_r(x, x, y)+#define atscntrb_gmp_mpz_tdiv2_r_uint(x, y) mpz_tdiv_r_ui(x, x, y)+#define atscntrb_gmp_mpz_tdiv2_r_ulint(x, y) mpz_tdiv_r_ui(x, x, y)+#define atscntrb_gmp_mpz_tdiv3_r_mpz(x, y, z) mpz_tdiv_r(x, y, z)+#define atscntrb_gmp_mpz_tdiv3_r_uint(x, y, z) mpz_tdiv_r_ui(x, y, z)+#define atscntrb_gmp_mpz_tdiv3_r_ulint(x, y, z) mpz_tdiv_r_ui(x, y, z)+//+#define atscntrb_gmp_mpz_tdiv3_qr_mpz(xq, xr, y) mpz_tdiv_qr(xq, xr, xq, y)+#define atscntrb_gmp_mpz_tdiv3_qr_uint(xq, xr, y) mpz_tdiv_qr_ui(xq, xr, xq, y)+#define atscntrb_gmp_mpz_tdiv3_qr_ulint(xq, xr, y) mpz_tdiv_qr_ui(xq, xr, xq, y)+#define atscntrb_gmp_mpz_tdiv4_qr_mpz(xq, xr, y, z) mpz_tdiv_qr(xq, xr, y, z)+#define atscntrb_gmp_mpz_tdiv4_qr_uint(xq, xr, y, z) mpz_tdiv_qr_ui(xq, xr, y, z)+#define atscntrb_gmp_mpz_tdiv4_qr_ulint(xq, xr, y, z) mpz_tdiv_qr_ui(xq, xr, y, z)+//+/* ****** ****** */+//+// floor-division-functions+//+#define atscntrb_gmp_mpz_fdiv_uint(x, y) mpz_fdiv_ui(x, y)+#define atscntrb_gmp_mpz_fdiv_ulint(x, y) mpz_fdiv_ui(x, y)+//+#define atscntrb_gmp_mpz_fdiv2_q_mpz(x, y) mpz_fdiv_q(x, x, y)+#define atscntrb_gmp_mpz_fdiv2_q_uint(x, y) mpz_fdiv_q_ui(x, x, y)+#define atscntrb_gmp_mpz_fdiv2_q_ulint(x, y) mpz_fdiv_q_ui(x, x, y)+#define atscntrb_gmp_mpz_fdiv3_q_mpz(x, y, z) mpz_fdiv_q(x, y, z)+#define atscntrb_gmp_mpz_fdiv3_q_uint(x, y, z) mpz_fdiv_q_ui(x, y, z)+#define atscntrb_gmp_mpz_fdiv3_q_ulint(x, y, z) mpz_fdiv_q_ui(x, y, z)+//+#define atscntrb_gmp_mpz_fdiv4_qr_mpz(q, r, dd, dr) mpz_fdiv_qr(q, r, dd, dr)+#define atscntrb_gmp_mpz_fdiv4_qr_ulint(q, r, dd, dr) mpz_fdiv_qr_ui(q, r, dd, dr)+//+/* ****** ****** */+//+// ceiling-division-functions+//+#define atscntrb_gmp_mpz_cdiv_uint(x, y) mpz_cdiv_ui(x, y)+#define atscntrb_gmp_mpz_cdiv_ulint(x, y) mpz_cdiv_ui(x, y)+//+#define atscntrb_gmp_mpz_cdiv2_q_mpz(x, y) mpz_cdiv_q(x, x, y)+#define atscntrb_gmp_mpz_cdiv2_q_uint(x, y) mpz_cdiv_q_ui(x, x, y)+#define atscntrb_gmp_mpz_cdiv2_q_ulint(x, y) mpz_cdiv_q_ui(x, x, y)+#define atscntrb_gmp_mpz_cdiv3_q_mpz(x, y, z) mpz_cdiv_q(x, y, z)+#define atscntrb_gmp_mpz_cdiv3_q_uint(x, y, z) mpz_cdiv_q_ui(x, y, z)+#define atscntrb_gmp_mpz_cdiv3_q_ulint(x, y, z) mpz_cdiv_q_ui(x, y, z)+//+/* ****** ****** */+//+// modulo-functions+//+// x := x mod y // y mod z+//+#define atscntrb_gmp_mpz_mod2_mpz(x, y) mpz_mod(x, x, y)+#define atscntrb_gmp_mpz_mod2_uint(x, y) mpz_mod_ui(x, x, y)+#define atscntrb_gmp_mpz_mod2_ulint(x, y) mpz_mod_ui(x, x, y)+#define atscntrb_gmp_mpz_mod3_mpz(x, y, z) mpz_mod(x, y, z)+#define atscntrb_gmp_mpz_mod3_uint(x, y, z) mpz_mod_ui(x, y, z)+#define atscntrb_gmp_mpz_mod3_ulint(x, y, z) mpz_mod_ui(x, y, z)+//+/* ****** ****** */+//+#define atscntrb_gmp_mpz_addmul3_mpz(x, y, z) mpz_addmul(x, y, z)+#define atscntrb_gmp_mpz_addmul3_uint(x, y, z) mpz_addmul_ui(x, y, z)+#define atscntrb_gmp_mpz_addmul3_ulint(x, y, z) mpz_addmul_ui(x, y, z)+//+#define atscntrb_gmp_mpz_submul3_mpz(x, y, z) mpz_submul(x, y, z)+#define atscntrb_gmp_mpz_submul3_uint(x, y, z) mpz_submul_ui(x, y, z)+#define atscntrb_gmp_mpz_submul3_ulint(x, y, z) mpz_submul_ui(x, y, z)+//+/* ****** ****** */+//+// comparison-functions+//+#define atscntrb_gmp_mpz_cmp_mpz(x, y) mpz_cmp((ptrmpz)x, y)+#define atscntrb_gmp_mpz_cmp_int(x, y) mpz_cmp_si((ptrmpz)x, y)+#define atscntrb_gmp_mpz_cmp_uint(x, y) mpz_cmp_ui((ptrmpz)x, y)+#define atscntrb_gmp_mpz_cmp_lint(x, y) mpz_cmp_si((ptrmpz)x, y)+#define atscntrb_gmp_mpz_cmp_ulint(x, y) mpz_cmp_ui((ptrmpz)x, y)+//+/* ****** ****** */+//+// power-functions+//+#define atscntrb_gmp_mpz_pow_uint(pow, base, exp) mpz_pow_ui(pow, base, exp)+#define atscntrb_gmp_mpz_pow_ulint(pow, base, exp) mpz_pow_ui(pow, base, exp)+//+#define atscntrb_gmp_mpz_ui_pow_ui(pow, base, exp) mpz_ui_pow_ui(pow, base, exp)+//+/* ****** ****** */++#define atscntrb_gmp_mpz_fac_uint(res, n) mpz_fac_ui(res, n)++/* ****** ****** */  +//+#define atscntrb_gmp_mpz_fib_uint(res, n) mpz_fib_ui(res, n)+#define atscntrb_gmp_mpz_fib2_uint(res1, res2, n) mpz_fib2_ui(res1, res2, n)+//+/* ****** ****** */++#endif // ifndef ATSCNTRB_LIBGMP_GMP_CATS++/* ****** ****** */++/* end of [gmp.cats] */
cbits/combinatorics.c view
@@ -1,7 +1,7 @@ /* ** ** The C code is generated by [ATS/Postiats-0-3-10]-** The starting compilation time is: 2018-5-13: 17h:59m+** The starting compilation time is: 2018-5-13: 18h:15m ** */ 
cbits/number-theory.c view
@@ -1,7 +1,7 @@ /* ** ** The C code is generated by [ATS/Postiats-0-3-10]-** The starting compilation time is: 2018-5-13: 17h:59m+** The starting compilation time is: 2018-5-13: 18h:15m ** */ 
cbits/numerics.c view
@@ -1,7 +1,7 @@ /* ** ** The C code is generated by [ATS/Postiats-0-3-10]-** The starting compilation time is: 2018-5-13: 17h:59m+** The starting compilation time is: 2018-5-13: 18h:15m ** */ 
fast-arithmetic.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.18 name: fast-arithmetic-version: 0.6.0.4+version: 0.6.0.5 license: BSD3 license-file: LICENSE copyright: Copyright: (c) 2018 Vanessa McHale@@ -16,38 +16,13 @@ extra-source-files:     atspkg.dhall     pkg.dhall-    .atspkg/contrib/ats-includes-0.3.10/prelude/CATS/basics.cats-    .atspkg/contrib/ats-includes-0.3.10/prelude/CATS/integer.cats-    .atspkg/contrib/ats-includes-0.3.10/prelude/CATS/pointer.cats-    .atspkg/contrib/ats-includes-0.3.10/prelude/CATS/integer_long.cats-    .atspkg/contrib/ats-includes-0.3.10/prelude/CATS/integer_size.cats-    .atspkg/contrib/ats-includes-0.3.10/prelude/CATS/integer_short.cats-    .atspkg/contrib/ats-includes-0.3.10/prelude/CATS/bool.cats-    .atspkg/contrib/ats-includes-0.3.10/prelude/CATS/char.cats-    .atspkg/contrib/ats-includes-0.3.10/prelude/CATS/float.cats-    .atspkg/contrib/ats-includes-0.3.10/prelude/CATS/integer_ptr.cats-    .atspkg/contrib/ats-includes-0.3.10/prelude/CATS/integer_fixed.cats-    .atspkg/contrib/ats-includes-0.3.10/prelude/CATS/memory.cats-    .atspkg/contrib/ats-includes-0.3.10/prelude/CATS/string.cats-    .atspkg/contrib/ats-includes-0.3.10/prelude/CATS/strptr.cats-    .atspkg/contrib/ats-includes-0.3.10/prelude/CATS/fprintf.cats-    .atspkg/contrib/ats-includes-0.3.10/prelude/CATS/filebas.cats-    .atspkg/contrib/ats-includes-0.3.10/prelude/CATS/list.cats-    .atspkg/contrib/ats-includes-0.3.10/prelude/CATS/option.cats-    .atspkg/contrib/ats-includes-0.3.10/prelude/CATS/array.cats-    .atspkg/contrib/ats-includes-0.3.10/prelude/CATS/arrayptr.cats-    .atspkg/contrib/ats-includes-0.3.10/prelude/CATS/arrayref.cats-    .atspkg/contrib/ats-includes-0.3.10/prelude/CATS/matrix.cats-    .atspkg/contrib/ats-includes-0.3.10/prelude/CATS/matrixptr.cats-    .atspkg/contrib/ats-includes-0.3.10/libats/libc/CATS/stdio.cats-    .atspkg/contrib/ats-includes-0.3.10/libats/libc/CATS/sys/types.cats-    .atspkg/contrib/ats-includes-0.3.10/libats/libc/CATS/sys/stat.cats-    .atspkg/contrib/ats-includes-0.3.10/libats/libc/CATS/sys/types.cats-    .atspkg/contrib/ats-includes-0.3.10/libats/libc/CATS/stdio.cats-    .atspkg/contrib/ats-includes-0.3.10/libats/libc/CATS/sys/types.cats-    .atspkg/contrib/ats-includes-0.3.10/libats/libc/CATS/math.cats-    .atspkg/contrib/ats-includes-0.3.10/ccomp/runtime/pats_ccomp_memalloc_libc.h-    .atspkg/contrib/ats-includes-0.3.10/ccomp/runtime/pats_ccomp_runtime_memalloc.c+    .atspkg/contrib/ats-includes-0.3.10/ccomp/runtime/*.h+    .atspkg/contrib/ats-includes-0.3.10/ccomp/runtime/*.c+    .atspkg/contrib/ats-includes-0.3.10/prelude/CATS/*.cats+    .atspkg/contrib/ats-includes-0.3.10/libats/libc/CATS/*.cats+    .atspkg/contrib/ats-includes-0.3.10/libats/libc/CATS/sys/*.cats+    .atspkg/contrib/atscntrb-hx-intinf/*.hats+    .atspkg/contrib/atscntrb-hx-libgmp/CATS/*.cats extra-doc-files: README.md  source-repository head@@ -76,7 +51,7 @@                   .atspkg/contrib/ats-includes-0.3.10/ .atspkg/contrib     ghc-options: -Wall -optc-mtune=native -optc-flto -optc-O3     build-depends:-        base >=4.6 && <5,+        base >=4.7 && <5,         composition-prelude >=1.2.0.0,         gmpint -any