/* ** ** The C code is generated by ATS/Anairiats ** The compilation time is: 2011-9-10: 22h:10m ** */ /* include some .h files */ #ifndef _ATS_HEADER_NONE #include "ats_config.h" #include "ats_basics.h" #include "ats_types.h" #include "ats_exception.h" #include "ats_memory.h" #endif /* _ATS_HEADER_NONE */ /* include some .cats files */ #ifndef _ATS_PRELUDE_NONE #include "prelude/CATS/basics.cats" #include "prelude/CATS/bool.cats" #include "prelude/CATS/byte.cats" #include "prelude/CATS/char.cats" #include "prelude/CATS/float.cats" #include "prelude/CATS/integer.cats" #include "prelude/CATS/integer_fixed.cats" #include "prelude/CATS/integer_ptr.cats" #include "prelude/CATS/lazy.cats" #include "prelude/CATS/lazy_vt.cats" #include "prelude/CATS/pointer.cats" #include "prelude/CATS/printf.cats" #include "prelude/CATS/reference.cats" #include "prelude/CATS/sizetype.cats" #include "prelude/CATS/string.cats" #include "prelude/CATS/array.cats" #include "prelude/CATS/list.cats" #include "prelude/CATS/matrix.cats" #include "prelude/CATS/option.cats" #endif /* _ATS_PRELUDE_NONE */ /* prologues from statically loaded files */ /* external codes at top */ /* type definitions */ typedef struct { int tag ; ats_ptr_type atslab_0 ; ats_int_type atslab_1 ; ats_clo_ref_type atslab_2 ; } anairiats_sum_0 ; typedef struct { int tag ; ats_ptr_type atslab_0 ; ats_int_type atslab_1 ; ats_ptr_type atslab_2 ; ats_clo_ref_type atslab_3 ; } anairiats_sum_1 ; typedef struct { ats_ptr_type atslab_0 ; ats_ptr_type atslab_1 ; } anairiats_sum_2 ; typedef struct { int tag ; ats_ptr_type atslab_0 ; } anairiats_sum_3 ; typedef struct { ats_ptr_type atslab_0 ; } anairiats_sum_4 ; /* external typedefs */ /* external dynamic constructor declarations */ ATSextern_val(ats_sum_type, ATS_2d0_2e2_2e6_2prelude_2basics_sta_2esats__list_cons) ; ATSextern_val(ats_sum_type, ATS_2d0_2e2_2e6_2prelude_2basics_sta_2esats__list_nil) ; ATSextern_val(ats_sum_type, ATS_2d0_2e2_2e6_2prelude_2basics_sta_2esats__None_vt) ; ATSextern_val(ats_sum_type, ATS_2d0_2e2_2e6_2prelude_2basics_sta_2esats__Some_vt) ; ATSextern_val(ats_sum_type, _2cs_2dpub_2www_2ddir_2faculty_2hwxi_2academic_2courses_2CS525_2Spring09_2code_2Tiger_2fixity_2esats__LeftAssoc) ; ATSextern_val(ats_sum_type, _2cs_2dpub_2www_2ddir_2faculty_2hwxi_2academic_2courses_2CS525_2Spring09_2code_2Tiger_2fixity_2esats__RightAssoc) ; ATSextern_val(ats_sum_type, _2cs_2dpub_2www_2ddir_2faculty_2hwxi_2academic_2courses_2CS525_2Spring09_2code_2Tiger_2fixity_2esats__NonAssoc) ; ATSextern_val(ats_sum_type, _2cs_2dpub_2www_2ddir_2faculty_2hwxi_2academic_2courses_2CS525_2Spring09_2code_2Tiger_2fixity_2esats__Prefix) ; ATSextern_val(ats_sum_type, _2cs_2dpub_2www_2ddir_2faculty_2hwxi_2academic_2courses_2CS525_2Spring09_2code_2Tiger_2fixity_2esats__Infix) ; ATSextern_val(ats_sum_type, _2cs_2dpub_2www_2ddir_2faculty_2hwxi_2academic_2courses_2CS525_2Spring09_2code_2Tiger_2fixity_2esats__Postfix) ; ATSextern_val(ats_sum_type, _2cs_2dpub_2www_2ddir_2faculty_2hwxi_2academic_2courses_2CS525_2Spring09_2code_2Tiger_2fixity_2esats__FIXITMatm) ; ATSextern_val(ats_sum_type, _2cs_2dpub_2www_2ddir_2faculty_2hwxi_2academic_2courses_2CS525_2Spring09_2code_2Tiger_2fixity_2esats__FIXITMopr) ; /* external dynamic constant declarations */ ATSextern_fun(ats_bool_type, atspre_lt_int_int) (ats_int_type, ats_int_type) ; ATSextern_fun(ats_bool_type, atspre_gt_int_int) (ats_int_type, ats_int_type) ; /* external dynamic terminating constant declarations */ #ifdef _ATS_PROOFCHECK #endif /* _ATS_PROOFCHECK */ /* sum constructor declarations */ /* exn constructor declarations */ /* global dynamic (non-functional) constant declarations */ /* internal function declarations */ static ats_ptr_type fixopr_assoc_get_1 (ats_ptr_type arg0) ; static ats_int_type fixopr_prec_get_2 (ats_ptr_type arg0) ; static ats_ptr_type resolve_4 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2) ; static ats_ptr_type reduce_5 (ats_ptr_type arg0, ats_ptr_type arg1) ; static ats_ptr_type next_6 (ats_ptr_type arg0, ats_ptr_type arg1) ; /* partial value template declarations */ /* static temporary variable declarations */ /* external value variable declarations */ /* function implementations */ /* // /cs-pub/www-dir/faculty/hwxi/academic/courses/CS525/Spring09/code/Tiger/fixity.dats: 276(line=20, offs=26) -- 389(line=23, offs=31) */ ATSglobaldec() ats_ptr_type _2cs_2dpub_2www_2ddir_2faculty_2hwxi_2academic_2courses_2CS525_2Spring09_2code_2Tiger_2fixity_2esats__fixopr_loc_get (ats_ptr_type arg0) { /* local vardec */ ATSlocal (ats_ptr_type, tmp0) ; ATSlocal (ats_ptr_type, tmp1) ; ATSlocal (ats_ptr_type, tmp2) ; ATSlocal (ats_ptr_type, tmp3) ; __ats_lab__2cs_2dpub_2www_2ddir_2faculty_2hwxi_2academic_2courses_2CS525_2Spring09_2code_2Tiger_2fixity_2esats__fixopr_loc_get: #line 20 "fixity.dats" do { /* branch: __ats_lab_0 */ #line 21 "fixity.dats" __ats_lab_0_0: #line 21 "fixity.dats" if (((ats_sum_ptr_type)arg0)->tag != 0) { goto __ats_lab_1_0 ; } #line 21 "fixity.dats" __ats_lab_0_1: #line 21 "fixity.dats" tmp1 = ats_caselptr_mac(anairiats_sum_0, arg0, atslab_0) ; #line 21 "fixity.dats" tmp0 = tmp1 ; break ; /* branch: __ats_lab_1 */ #line 22 "fixity.dats" __ats_lab_1_0: #line 22 "fixity.dats" if (((ats_sum_ptr_type)arg0)->tag != 1) { goto __ats_lab_2_0 ; } #line 22 "fixity.dats" __ats_lab_1_1: #line 22 "fixity.dats" tmp2 = ats_caselptr_mac(anairiats_sum_1, arg0, atslab_0) ; #line 22 "fixity.dats" tmp0 = tmp2 ; break ; /* branch: __ats_lab_2 */ #line 23 "fixity.dats" __ats_lab_2_0: #line 23 "fixity.dats" // if (((ats_sum_ptr_type)arg0)->tag != 2) { ats_deadcode_failure_handle () ; } #line 23 "fixity.dats" __ats_lab_2_1: #line 23 "fixity.dats" tmp3 = ats_caselptr_mac(anairiats_sum_0, arg0, atslab_0) ; #line 23 "fixity.dats" tmp0 = tmp3 ; break ; } while (0) ; return (tmp0) ; } /* end of [_2cs_2dpub_2www_2ddir_2faculty_2hwxi_2academic_2courses_2CS525_2Spring09_2code_2Tiger_2fixity_2esats__fixopr_loc_get] */ /* // /cs-pub/www-dir/faculty/hwxi/academic/courses/CS525/Spring09/code/Tiger/fixity.dats: 444(line=28, offs=4) -- 561(line=30, offs=52) */ ATSstaticdec() ats_ptr_type fixopr_assoc_get_1 (ats_ptr_type arg0) { /* local vardec */ ATSlocal (ats_ptr_type, tmp4) ; ATSlocal (ats_ptr_type, tmp5) ; __ats_lab_fixopr_assoc_get_1: #line 29 "fixity.dats" do { /* branch: __ats_lab_3 */ #line 30 "fixity.dats" __ats_lab_3_0: #line 30 "fixity.dats" if (((ats_sum_ptr_type)arg0)->tag != 1) { goto __ats_lab_4_0 ; } #line 30 "fixity.dats" __ats_lab_3_1: #line 30 "fixity.dats" tmp5 = ats_caselptr_mac(anairiats_sum_1, arg0, atslab_2) ; #line 30 "fixity.dats" tmp4 = tmp5 ; break ; /* branch: __ats_lab_4 */ #line 30 "fixity.dats" __ats_lab_4_0: #line 30 "fixity.dats" __ats_lab_4_1: #line 30 "fixity.dats" tmp4 = (ats_sum_ptr_type)(&_2cs_2dpub_2www_2ddir_2faculty_2hwxi_2academic_2courses_2CS525_2Spring09_2code_2Tiger_2fixity_2esats__NonAssoc) ; break ; } while (0) ; return (tmp4) ; } /* end of [fixopr_assoc_get_1] */ /* // /cs-pub/www-dir/faculty/hwxi/academic/courses/CS525/Spring09/code/Tiger/fixity.dats: 595(line=33, offs=4) -- 746(line=37, offs=27) */ ATSstaticdec() ats_int_type fixopr_prec_get_2 (ats_ptr_type arg0) { /* local vardec */ ATSlocal (ats_int_type, tmp6) ; ATSlocal (ats_int_type, tmp7) ; ATSlocal (ats_int_type, tmp8) ; ATSlocal (ats_int_type, tmp9) ; __ats_lab_fixopr_prec_get_2: #line 34 "fixity.dats" do { /* branch: __ats_lab_5 */ #line 35 "fixity.dats" __ats_lab_5_0: #line 35 "fixity.dats" if (((ats_sum_ptr_type)arg0)->tag != 0) { goto __ats_lab_6_0 ; } #line 35 "fixity.dats" __ats_lab_5_1: #line 35 "fixity.dats" tmp7 = ats_caselptr_mac(anairiats_sum_0, arg0, atslab_1) ; #line 35 "fixity.dats" tmp6 = tmp7 ; break ; /* branch: __ats_lab_6 */ #line 36 "fixity.dats" __ats_lab_6_0: #line 36 "fixity.dats" if (((ats_sum_ptr_type)arg0)->tag != 1) { goto __ats_lab_7_0 ; } #line 36 "fixity.dats" __ats_lab_6_1: #line 36 "fixity.dats" tmp8 = ats_caselptr_mac(anairiats_sum_1, arg0, atslab_1) ; #line 36 "fixity.dats" tmp6 = tmp8 ; break ; /* branch: __ats_lab_7 */ #line 37 "fixity.dats" __ats_lab_7_0: #line 37 "fixity.dats" // if (((ats_sum_ptr_type)arg0)->tag != 2) { ats_deadcode_failure_handle () ; } #line 37 "fixity.dats" __ats_lab_7_1: #line 37 "fixity.dats" tmp9 = ats_caselptr_mac(anairiats_sum_0, arg0, atslab_1) ; #line 37 "fixity.dats" tmp6 = tmp9 ; break ; } while (0) ; return (tmp6) ; } /* end of [fixopr_prec_get_2] */ /* // /cs-pub/www-dir/faculty/hwxi/academic/courses/CS525/Spring09/code/Tiger/fixity.dats: 983(line=46, offs=7) -- 2278(line=77, offs=30) */ ATSstaticdec() ats_ptr_type resolve_4 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2) { /* local vardec */ ATSlocal (ats_ptr_type, tmp11) ; ATSlocal (ats_ptr_type, tmp12) ; ATSlocal (ats_ptr_type, tmp13) ; ATSlocal (ats_ptr_type, tmp14) ; ATSlocal (ats_ptr_type, tmp15) ; ATSlocal (ats_ptr_type, tmp16) ; ATSlocal (ats_ptr_type, tmp17) ; ATSlocal (ats_ptr_type, tmp18) ; ATSlocal (ats_ptr_type, tmp19) ; ATSlocal (ats_ptr_type, tmp20) ; ATSlocal (ats_ptr_type, tmp21) ; ATSlocal (ats_ptr_type, tmp22) ; ATSlocal (ats_ptr_type, tmp23) ; ATSlocal (ats_ptr_type, tmp24) ; ATSlocal (ats_ptr_type, tmp25) ; ATSlocal (ats_ptr_type, tmp26) ; ATSlocal (ats_int_type, tmp27) ; ATSlocal (ats_int_type, tmp28) ; ATSlocal (ats_bool_type, tmp29) ; ATSlocal (ats_ptr_type, tmp30) ; ATSlocal (ats_bool_type, tmp31) ; ATSlocal (ats_ptr_type, tmp32) ; ATSlocal (ats_ptr_type, tmp33) ; ATSlocal (ats_ptr_type, tmp34) ; ATSlocal (ats_ptr_type, tmp35) ; ATSlocal (ats_ptr_type, tmp36) ; ATSlocal (ats_ptr_type, tmp37) ; ATSlocal (ats_ptr_type, tmp38) ; ATSlocal (ats_ptr_type, tmp39) ; ATSlocal (ats_ptr_type, tmp40) ; ATSlocal (ats_ptr_type, tmp41) ; ATSlocal (ats_ptr_type, tmp42) ; ATSlocal (ats_ptr_type, tmp43) ; ATSlocal (ats_ptr_type, tmp44) ; ATSlocal (ats_ptr_type, tmp45) ; ATSlocal (ats_ptr_type, tmp46) ; ATSlocal (ats_ptr_type, tmp47) ; ATSlocal (ats_ptr_type, tmp48) ; ATSlocal (ats_int_type, tmp49) ; ATSlocal (ats_int_type, tmp50) ; ATSlocal (ats_bool_type, tmp51) ; ATSlocal (ats_ptr_type, tmp52) ; ATSlocal (ats_bool_type, tmp53) ; ATSlocal (ats_ptr_type, tmp54) ; __ats_lab_resolve_4: #line 47 "fixity.dats" do { /* branch: __ats_lab_8 */ #line 48 "fixity.dats" __ats_lab_8_0: #line 48 "fixity.dats" __ats_lab_8_1: #line 48 "fixity.dats" if (((ats_sum_ptr_type)arg1)->tag != 0) { goto __ats_lab_9_1 ; } #line 48 "fixity.dats" __ats_lab_8_2: #line 48 "fixity.dats" __ats_lab_8_3: #line 48 "fixity.dats" tmp12 = ATS_MALLOC(sizeof(anairiats_sum_2)) ; ats_selptrset_mac(anairiats_sum_2, tmp12, atslab_0, arg1) ; ats_selptrset_mac(anairiats_sum_2, tmp12, atslab_1, arg0) ; #line 48 "fixity.dats" tmp11 = next_6 (tmp12, arg2) ; break ; /* branch: __ats_lab_9 */ #line 49 "fixity.dats" __ats_lab_9_0: #line 49 "fixity.dats" __ats_lab_9_1: #line 49 "fixity.dats" if (((ats_sum_ptr_type)arg1)->tag != 1) { goto __ats_lab_10_0 ; } #line 49 "fixity.dats" tmp13 = ats_caselptr_mac(anairiats_sum_3, arg1, atslab_0) ; #line 49 "fixity.dats" if (((ats_sum_ptr_type)tmp13)->tag != 0) { goto __ats_lab_10_0 ; } #line 49 "fixity.dats" __ats_lab_9_2: #line 49 "fixity.dats" __ats_lab_9_3: #line 49 "fixity.dats" tmp14 = ATS_MALLOC(sizeof(anairiats_sum_2)) ; ats_selptrset_mac(anairiats_sum_2, tmp14, atslab_0, arg1) ; ats_selptrset_mac(anairiats_sum_2, tmp14, atslab_1, arg0) ; #line 49 "fixity.dats" tmp11 = next_6 (tmp14, arg2) ; break ; /* branch: __ats_lab_10 */ #line 50 "fixity.dats" __ats_lab_10_0: #line 50 "fixity.dats" if (arg0 == (ats_sum_ptr_type)0) { goto __ats_lab_11_0 ; } #line 50 "fixity.dats" tmp15 = ats_caselptr_mac(anairiats_sum_2, arg0, atslab_1) ; #line 50 "fixity.dats" if (tmp15 != (ats_sum_ptr_type)0) { goto __ats_lab_11_0 ; } #line 50 "fixity.dats" __ats_lab_10_1: #line 50 "fixity.dats" if (((ats_sum_ptr_type)arg1)->tag != 1) { goto __ats_lab_18_1 ; } #line 50 "fixity.dats" tmp16 = ats_caselptr_mac(anairiats_sum_3, arg1, atslab_0) ; #line 50 "fixity.dats" if (((ats_sum_ptr_type)tmp16)->tag != 1) { goto __ats_lab_18_1 ; } #line 50 "fixity.dats" __ats_lab_10_2: #line 50 "fixity.dats" __ats_lab_10_3: #line 50 "fixity.dats" tmp17 = ats_caselptr_mac(anairiats_sum_2, arg0, atslab_0) ; #line 50 "fixity.dats" tmp20 = (ats_sum_ptr_type)0 ; #line 50 "fixity.dats" tmp19 = ATS_MALLOC(sizeof(anairiats_sum_2)) ; ats_selptrset_mac(anairiats_sum_2, tmp19, atslab_0, tmp17) ; ats_selptrset_mac(anairiats_sum_2, tmp19, atslab_1, tmp20) ; #line 50 "fixity.dats" tmp18 = ATS_MALLOC(sizeof(anairiats_sum_2)) ; ats_selptrset_mac(anairiats_sum_2, tmp18, atslab_0, arg1) ; ats_selptrset_mac(anairiats_sum_2, tmp18, atslab_1, tmp19) ; #line 50 "fixity.dats" tmp11 = next_6 (tmp18, arg2) ; break ; /* branch: __ats_lab_11 */ #line 52 "fixity.dats" __ats_lab_11_0: #line 52 "fixity.dats" if (arg0 == (ats_sum_ptr_type)0) { goto __ats_lab_18_0 ; } #line 52 "fixity.dats" tmp21 = ats_caselptr_mac(anairiats_sum_2, arg0, atslab_1) ; #line 52 "fixity.dats" if (tmp21 == (ats_sum_ptr_type)0) { goto __ats_lab_18_0 ; } #line 52 "fixity.dats" tmp22 = ats_caselptr_mac(anairiats_sum_2, tmp21, atslab_0) ; #line 52 "fixity.dats" if (((ats_sum_ptr_type)tmp22)->tag != 1) { goto __ats_lab_18_0 ; } #line 52 "fixity.dats" __ats_lab_11_1: #line 52 "fixity.dats" if (((ats_sum_ptr_type)arg1)->tag != 1) { tmp43 = tmp21 ; goto __ats_lab_19_1 ; } #line 52 "fixity.dats" tmp23 = ats_caselptr_mac(anairiats_sum_3, arg1, atslab_0) ; #line 52 "fixity.dats" if (((ats_sum_ptr_type)tmp23)->tag != 1) { tmp43 = tmp21 ; goto __ats_lab_19_1 ; } #line 52 "fixity.dats" __ats_lab_11_2: #line 52 "fixity.dats" __ats_lab_11_3: #line 52 "fixity.dats" tmp24 = ats_caselptr_mac(anairiats_sum_2, tmp21, atslab_0) ; #line 52 "fixity.dats" tmp25 = ats_caselptr_mac(anairiats_sum_3, tmp24, atslab_0) ; #line 52 "fixity.dats" tmp26 = ats_caselptr_mac(anairiats_sum_3, arg1, atslab_0) ; #line 53 "fixity.dats" tmp27 = fixopr_prec_get_2 (tmp26) ; #line 53 "fixity.dats" tmp28 = fixopr_prec_get_2 (tmp25) ; #line 55 "fixity.dats" do { /* branch: __ats_lab_12 */ #line 56 "fixity.dats" __ats_lab_12_0: #line 56 "fixity.dats" __ats_lab_12_1: #line 56 "fixity.dats" tmp29 = atspre_gt_int_int (tmp27, tmp28) ; #line 56 "fixity.dats" if (!tmp29) { goto __ats_lab_13_1 ; } #line 56 "fixity.dats" tmp30 = ATS_MALLOC(sizeof(anairiats_sum_2)) ; ats_selptrset_mac(anairiats_sum_2, tmp30, atslab_0, arg1) ; ats_selptrset_mac(anairiats_sum_2, tmp30, atslab_1, arg0) ; #line 56 "fixity.dats" tmp11 = next_6 (tmp30, arg2) ; break ; /* branch: __ats_lab_13 */ #line 57 "fixity.dats" __ats_lab_13_0: #line 57 "fixity.dats" __ats_lab_13_1: #line 57 "fixity.dats" tmp31 = atspre_lt_int_int (tmp27, tmp28) ; #line 57 "fixity.dats" if (!tmp31) { goto __ats_lab_14_1 ; } #line 57 "fixity.dats" tmp32 = ATS_MALLOC(sizeof(anairiats_sum_2)) ; ats_selptrset_mac(anairiats_sum_2, tmp32, atslab_0, arg1) ; ats_selptrset_mac(anairiats_sum_2, tmp32, atslab_1, arg2) ; #line 57 "fixity.dats" tmp11 = reduce_5 (arg0, tmp32) ; break ; /* branch: __ats_lab_14 */ #line 58 "fixity.dats" __ats_lab_14_0: #line 58 "fixity.dats" __ats_lab_14_1: #line 59 "fixity.dats" tmp33 = fixopr_assoc_get_1 (tmp26) ; #line 60 "fixity.dats" tmp34 = fixopr_assoc_get_1 (tmp25) ; #line 62 "fixity.dats" do { /* branch: __ats_lab_15 */ #line 63 "fixity.dats" __ats_lab_15_0: #line 63 "fixity.dats" if (((ats_sum_ptr_type)tmp33)->tag != 0) { goto __ats_lab_16_0 ; } #line 63 "fixity.dats" __ats_lab_15_1: #line 63 "fixity.dats" if (((ats_sum_ptr_type)tmp34)->tag != 0) { goto __ats_lab_17_1 ; } #line 63 "fixity.dats" __ats_lab_15_2: #line 63 "fixity.dats" tmp35 = ATS_MALLOC(sizeof(anairiats_sum_2)) ; ats_selptrset_mac(anairiats_sum_2, tmp35, atslab_0, arg1) ; ats_selptrset_mac(anairiats_sum_2, tmp35, atslab_1, arg2) ; #line 63 "fixity.dats" tmp11 = reduce_5 (arg0, tmp35) ; break ; /* branch: __ats_lab_16 */ #line 64 "fixity.dats" __ats_lab_16_0: #line 64 "fixity.dats" if (((ats_sum_ptr_type)tmp33)->tag != 1) { goto __ats_lab_17_0 ; } #line 64 "fixity.dats" __ats_lab_16_1: #line 64 "fixity.dats" if (((ats_sum_ptr_type)tmp34)->tag != 1) { goto __ats_lab_17_1 ; } #line 64 "fixity.dats" __ats_lab_16_2: #line 64 "fixity.dats" tmp36 = ATS_MALLOC(sizeof(anairiats_sum_2)) ; ats_selptrset_mac(anairiats_sum_2, tmp36, atslab_0, arg1) ; ats_selptrset_mac(anairiats_sum_2, tmp36, atslab_1, arg0) ; #line 64 "fixity.dats" tmp11 = next_6 (tmp36, arg2) ; break ; /* branch: __ats_lab_17 */ #line 65 "fixity.dats" __ats_lab_17_0: #line 65 "fixity.dats" __ats_lab_17_1: #line 65 "fixity.dats" __ats_lab_17_2: #line 65 "fixity.dats" tmp11 = (ats_sum_ptr_type)0 ; break ; } while (0) ; break ; } while (0) ; break ; /* branch: __ats_lab_18 */ #line 68 "fixity.dats" __ats_lab_18_0: #line 68 "fixity.dats" if (arg0 == (ats_sum_ptr_type)0) { goto __ats_lab_19_0 ; } #line 68 "fixity.dats" tmp37 = ats_caselptr_mac(anairiats_sum_2, arg0, atslab_1) ; #line 68 "fixity.dats" if (tmp37 != (ats_sum_ptr_type)0) { goto __ats_lab_19_0 ; } #line 68 "fixity.dats" __ats_lab_18_1: #line 68 "fixity.dats" if (((ats_sum_ptr_type)arg1)->tag != 1) { goto __ats_lab_23_1 ; } #line 68 "fixity.dats" tmp38 = ats_caselptr_mac(anairiats_sum_3, arg1, atslab_0) ; #line 68 "fixity.dats" if (((ats_sum_ptr_type)tmp38)->tag != 2) { goto __ats_lab_23_1 ; } #line 68 "fixity.dats" __ats_lab_18_2: #line 68 "fixity.dats" __ats_lab_18_3: #line 68 "fixity.dats" tmp39 = ats_caselptr_mac(anairiats_sum_2, arg0, atslab_0) ; #line 68 "fixity.dats" tmp42 = (ats_sum_ptr_type)0 ; #line 68 "fixity.dats" tmp41 = ATS_MALLOC(sizeof(anairiats_sum_2)) ; ats_selptrset_mac(anairiats_sum_2, tmp41, atslab_0, tmp39) ; ats_selptrset_mac(anairiats_sum_2, tmp41, atslab_1, tmp42) ; #line 68 "fixity.dats" tmp40 = ATS_MALLOC(sizeof(anairiats_sum_2)) ; ats_selptrset_mac(anairiats_sum_2, tmp40, atslab_0, arg1) ; ats_selptrset_mac(anairiats_sum_2, tmp40, atslab_1, tmp41) ; #line 68 "fixity.dats" tmp11 = reduce_5 (tmp40, arg2) ; break ; /* branch: __ats_lab_19 */ #line 69 "fixity.dats" __ats_lab_19_0: #line 69 "fixity.dats" if (arg0 == (ats_sum_ptr_type)0) { goto __ats_lab_23_0 ; } #line 69 "fixity.dats" tmp43 = ats_caselptr_mac(anairiats_sum_2, arg0, atslab_1) ; #line 69 "fixity.dats" if (tmp43 == (ats_sum_ptr_type)0) { goto __ats_lab_23_0 ; } #line 69 "fixity.dats" tmp44 = ats_caselptr_mac(anairiats_sum_2, tmp43, atslab_0) ; #line 69 "fixity.dats" if (((ats_sum_ptr_type)tmp44)->tag != 1) { goto __ats_lab_23_0 ; } #line 69 "fixity.dats" __ats_lab_19_1: #line 69 "fixity.dats" if (((ats_sum_ptr_type)arg1)->tag != 1) { goto __ats_lab_23_1 ; } #line 69 "fixity.dats" tmp45 = ats_caselptr_mac(anairiats_sum_3, arg1, atslab_0) ; #line 69 "fixity.dats" if (((ats_sum_ptr_type)tmp45)->tag != 2) { goto __ats_lab_23_1 ; } #line 69 "fixity.dats" __ats_lab_19_2: #line 69 "fixity.dats" __ats_lab_19_3: #line 69 "fixity.dats" tmp46 = ats_caselptr_mac(anairiats_sum_2, tmp43, atslab_0) ; #line 69 "fixity.dats" tmp47 = ats_caselptr_mac(anairiats_sum_3, tmp46, atslab_0) ; #line 69 "fixity.dats" tmp48 = ats_caselptr_mac(anairiats_sum_3, arg1, atslab_0) ; #line 70 "fixity.dats" tmp49 = fixopr_prec_get_2 (tmp48) ; #line 70 "fixity.dats" tmp50 = fixopr_prec_get_2 (tmp47) ; #line 72 "fixity.dats" do { /* branch: __ats_lab_20 */ #line 73 "fixity.dats" __ats_lab_20_0: #line 73 "fixity.dats" __ats_lab_20_1: #line 73 "fixity.dats" tmp51 = atspre_gt_int_int (tmp49, tmp50) ; #line 73 "fixity.dats" if (!tmp51) { goto __ats_lab_21_1 ; } #line 73 "fixity.dats" tmp52 = ATS_MALLOC(sizeof(anairiats_sum_2)) ; ats_selptrset_mac(anairiats_sum_2, tmp52, atslab_0, arg1) ; ats_selptrset_mac(anairiats_sum_2, tmp52, atslab_1, arg0) ; #line 73 "fixity.dats" tmp11 = reduce_5 (tmp52, arg2) ; break ; /* branch: __ats_lab_21 */ #line 74 "fixity.dats" __ats_lab_21_0: #line 74 "fixity.dats" __ats_lab_21_1: #line 74 "fixity.dats" tmp53 = atspre_lt_int_int (tmp49, tmp50) ; #line 74 "fixity.dats" if (!tmp53) { goto __ats_lab_22_1 ; } #line 74 "fixity.dats" tmp54 = ATS_MALLOC(sizeof(anairiats_sum_2)) ; ats_selptrset_mac(anairiats_sum_2, tmp54, atslab_0, arg1) ; ats_selptrset_mac(anairiats_sum_2, tmp54, atslab_1, arg2) ; #line 74 "fixity.dats" tmp11 = reduce_5 (arg0, tmp54) ; break ; /* branch: __ats_lab_22 */ #line 75 "fixity.dats" __ats_lab_22_0: #line 75 "fixity.dats" __ats_lab_22_1: #line 75 "fixity.dats" tmp11 = (ats_sum_ptr_type)0 ; break ; } while (0) ; break ; /* branch: __ats_lab_23 */ #line 77 "fixity.dats" __ats_lab_23_0: #line 77 "fixity.dats" __ats_lab_23_1: #line 77 "fixity.dats" __ats_lab_23_2: #line 77 "fixity.dats" __ats_lab_23_3: #line 77 "fixity.dats" tmp11 = (ats_sum_ptr_type)0 ; break ; } while (0) ; return (tmp11) ; } /* end of [resolve_4] */ /* // /cs-pub/www-dir/faculty/hwxi/academic/courses/CS525/Spring09/code/Tiger/fixity.dats: 2308(line=80, offs=7) -- 2683(line=87, offs=22) */ ATSstaticdec() ats_ptr_type reduce_5 (ats_ptr_type arg0, ats_ptr_type arg1) { /* local vardec */ ATSlocal (ats_ptr_type, tmp55) ; ATSlocal (ats_ptr_type, tmp56) ; ATSlocal (ats_ptr_type, tmp57) ; ATSlocal (ats_ptr_type, tmp58) ; ATSlocal (ats_ptr_type, tmp59) ; ATSlocal (ats_ptr_type, tmp60) ; ATSlocal (ats_clo_ref_type, tmp61) ; ATSlocal (ats_ptr_type, tmp62) ; ATSlocal (ats_ptr_type, tmp63) ; ATSlocal (ats_ptr_type, tmp64) ; ATSlocal (ats_ptr_type, tmp65) ; ATSlocal (ats_ptr_type, tmp66) ; ATSlocal (ats_ptr_type, tmp67) ; ATSlocal (ats_ptr_type, tmp68) ; ATSlocal (ats_ptr_type, tmp69) ; ATSlocal (ats_ptr_type, tmp70) ; ATSlocal (ats_ptr_type, tmp71) ; ATSlocal (ats_ptr_type, tmp72) ; ATSlocal (ats_clo_ref_type, tmp73) ; ATSlocal (ats_ptr_type, tmp74) ; ATSlocal (ats_ptr_type, tmp75) ; ATSlocal (ats_ptr_type, tmp76) ; ATSlocal (ats_ptr_type, tmp77) ; ATSlocal (ats_ptr_type, tmp78) ; ATSlocal (ats_ptr_type, tmp79) ; ATSlocal (ats_ptr_type, tmp80) ; ATSlocal (ats_ptr_type, tmp81) ; ATSlocal (ats_ptr_type, tmp82) ; ATSlocal (ats_clo_ref_type, tmp83) ; ATSlocal (ats_ptr_type, tmp84) ; ATSlocal (ats_ptr_type, tmp85) ; ATSlocal (ats_ptr_type, tmp86) ; ATSlocal (ats_ptr_type, tmp87) ; ATSlocal (ats_ptr_type, tmp88) ; __ats_lab_reduce_5: #line 80 "fixity.dats" do { /* branch: __ats_lab_24 */ #line 81 "fixity.dats" __ats_lab_24_0: #line 81 "fixity.dats" if (arg0 == (ats_sum_ptr_type)0) { goto __ats_lab_25_0 ; } #line 81 "fixity.dats" tmp56 = ats_caselptr_mac(anairiats_sum_2, arg0, atslab_0) ; #line 81 "fixity.dats" if (((ats_sum_ptr_type)tmp56)->tag != 0) { goto __ats_lab_25_0 ; } #line 81 "fixity.dats" tmp57 = ats_caselptr_mac(anairiats_sum_2, arg0, atslab_1) ; #line 81 "fixity.dats" if (tmp57 == (ats_sum_ptr_type)0) { goto __ats_lab_25_0 ; } #line 81 "fixity.dats" tmp58 = ats_caselptr_mac(anairiats_sum_2, tmp57, atslab_0) ; #line 81 "fixity.dats" if (((ats_sum_ptr_type)tmp58)->tag != 1) { goto __ats_lab_25_0 ; } #line 81 "fixity.dats" tmp59 = ats_caselptr_mac(anairiats_sum_3, tmp58, atslab_0) ; #line 81 "fixity.dats" if (((ats_sum_ptr_type)tmp59)->tag != 0) { goto __ats_lab_25_0 ; } #line 81 "fixity.dats" __ats_lab_24_1: #line 81 "fixity.dats" tmp60 = ats_caselptr_mac(anairiats_sum_3, tmp56, atslab_0) ; #line 81 "fixity.dats" tmp61 = ats_caselptr_mac(anairiats_sum_0, tmp59, atslab_2) ; #line 81 "fixity.dats" tmp62 = ats_caselptr_mac(anairiats_sum_2, tmp57, atslab_1) ; #line 82 "fixity.dats" tmp65 = ((ats_ptr_type(*)(ats_clo_ptr_type, ats_ptr_type))(ats_closure_fun(tmp61))) (tmp61, tmp60) ; #line 82 "fixity.dats" tmp64 = ATS_MALLOC(sizeof(anairiats_sum_3)) ; ((ats_sum_ptr_type)tmp64)->tag = 0 ; ats_selptrset_mac(anairiats_sum_3, tmp64, atslab_0, tmp65) ; #line 82 "fixity.dats" tmp63 = ATS_MALLOC(sizeof(anairiats_sum_2)) ; ats_selptrset_mac(anairiats_sum_2, tmp63, atslab_0, tmp64) ; ats_selptrset_mac(anairiats_sum_2, tmp63, atslab_1, tmp62) ; #line 82 "fixity.dats" tmp55 = next_6 (tmp63, arg1) ; break ; /* branch: __ats_lab_25 */ #line 83 "fixity.dats" __ats_lab_25_0: #line 83 "fixity.dats" if (arg0 == (ats_sum_ptr_type)0) { goto __ats_lab_26_0 ; } #line 83 "fixity.dats" tmp66 = ats_caselptr_mac(anairiats_sum_2, arg0, atslab_0) ; #line 83 "fixity.dats" if (((ats_sum_ptr_type)tmp66)->tag != 0) { goto __ats_lab_26_0 ; } #line 83 "fixity.dats" tmp67 = ats_caselptr_mac(anairiats_sum_2, arg0, atslab_1) ; #line 83 "fixity.dats" if (tmp67 == (ats_sum_ptr_type)0) { goto __ats_lab_26_0 ; } #line 83 "fixity.dats" tmp68 = ats_caselptr_mac(anairiats_sum_2, tmp67, atslab_0) ; #line 83 "fixity.dats" if (((ats_sum_ptr_type)tmp68)->tag != 1) { goto __ats_lab_26_0 ; } #line 83 "fixity.dats" tmp69 = ats_caselptr_mac(anairiats_sum_3, tmp68, atslab_0) ; #line 83 "fixity.dats" if (((ats_sum_ptr_type)tmp69)->tag != 1) { goto __ats_lab_26_0 ; } #line 83 "fixity.dats" tmp70 = ats_caselptr_mac(anairiats_sum_2, tmp67, atslab_1) ; #line 83 "fixity.dats" if (tmp70 == (ats_sum_ptr_type)0) { goto __ats_lab_26_0 ; } #line 83 "fixity.dats" tmp71 = ats_caselptr_mac(anairiats_sum_2, tmp70, atslab_0) ; #line 83 "fixity.dats" if (((ats_sum_ptr_type)tmp71)->tag != 0) { goto __ats_lab_26_0 ; } #line 83 "fixity.dats" __ats_lab_25_1: #line 83 "fixity.dats" tmp72 = ats_caselptr_mac(anairiats_sum_3, tmp66, atslab_0) ; #line 83 "fixity.dats" tmp73 = ats_caselptr_mac(anairiats_sum_1, tmp69, atslab_3) ; #line 83 "fixity.dats" tmp74 = ats_caselptr_mac(anairiats_sum_3, tmp71, atslab_0) ; #line 83 "fixity.dats" tmp75 = ats_caselptr_mac(anairiats_sum_2, tmp70, atslab_1) ; #line 84 "fixity.dats" tmp78 = ((ats_ptr_type(*)(ats_clo_ptr_type, ats_ptr_type, ats_ptr_type))(ats_closure_fun(tmp73))) (tmp73, tmp74, tmp72) ; #line 84 "fixity.dats" tmp77 = ATS_MALLOC(sizeof(anairiats_sum_3)) ; ((ats_sum_ptr_type)tmp77)->tag = 0 ; ats_selptrset_mac(anairiats_sum_3, tmp77, atslab_0, tmp78) ; #line 84 "fixity.dats" tmp76 = ATS_MALLOC(sizeof(anairiats_sum_2)) ; ats_selptrset_mac(anairiats_sum_2, tmp76, atslab_0, tmp77) ; ats_selptrset_mac(anairiats_sum_2, tmp76, atslab_1, tmp75) ; #line 84 "fixity.dats" tmp55 = next_6 (tmp76, arg1) ; break ; /* branch: __ats_lab_26 */ #line 85 "fixity.dats" __ats_lab_26_0: #line 85 "fixity.dats" if (arg0 == (ats_sum_ptr_type)0) { goto __ats_lab_27_0 ; } #line 85 "fixity.dats" tmp79 = ats_caselptr_mac(anairiats_sum_2, arg0, atslab_0) ; #line 85 "fixity.dats" if (((ats_sum_ptr_type)tmp79)->tag != 1) { goto __ats_lab_27_0 ; } #line 85 "fixity.dats" tmp80 = ats_caselptr_mac(anairiats_sum_3, tmp79, atslab_0) ; #line 85 "fixity.dats" if (((ats_sum_ptr_type)tmp80)->tag != 2) { goto __ats_lab_27_0 ; } #line 85 "fixity.dats" tmp81 = ats_caselptr_mac(anairiats_sum_2, arg0, atslab_1) ; #line 85 "fixity.dats" if (tmp81 == (ats_sum_ptr_type)0) { goto __ats_lab_27_0 ; } #line 85 "fixity.dats" tmp82 = ats_caselptr_mac(anairiats_sum_2, tmp81, atslab_0) ; #line 85 "fixity.dats" if (((ats_sum_ptr_type)tmp82)->tag != 0) { goto __ats_lab_27_0 ; } #line 85 "fixity.dats" __ats_lab_26_1: #line 85 "fixity.dats" tmp83 = ats_caselptr_mac(anairiats_sum_0, tmp80, atslab_2) ; #line 85 "fixity.dats" tmp84 = ats_caselptr_mac(anairiats_sum_3, tmp82, atslab_0) ; #line 85 "fixity.dats" tmp85 = ats_caselptr_mac(anairiats_sum_2, tmp81, atslab_1) ; #line 86 "fixity.dats" tmp88 = ((ats_ptr_type(*)(ats_clo_ptr_type, ats_ptr_type))(ats_closure_fun(tmp83))) (tmp83, tmp84) ; #line 86 "fixity.dats" tmp87 = ATS_MALLOC(sizeof(anairiats_sum_3)) ; ((ats_sum_ptr_type)tmp87)->tag = 0 ; ats_selptrset_mac(anairiats_sum_3, tmp87, atslab_0, tmp88) ; #line 86 "fixity.dats" tmp86 = ATS_MALLOC(sizeof(anairiats_sum_2)) ; ats_selptrset_mac(anairiats_sum_2, tmp86, atslab_0, tmp87) ; ats_selptrset_mac(anairiats_sum_2, tmp86, atslab_1, tmp85) ; #line 86 "fixity.dats" tmp55 = next_6 (tmp86, arg1) ; break ; /* branch: __ats_lab_27 */ #line 87 "fixity.dats" __ats_lab_27_0: #line 87 "fixity.dats" __ats_lab_27_1: #line 87 "fixity.dats" tmp55 = (ats_sum_ptr_type)0 ; break ; } while (0) ; return (tmp55) ; } /* end of [reduce_5] */ /* // /cs-pub/www-dir/faculty/hwxi/academic/courses/CS525/Spring09/code/Tiger/fixity.dats: 2712(line=90, offs=7) -- 2895(line=93, offs=44) */ ATSstaticdec() ats_ptr_type next_6 (ats_ptr_type arg0, ats_ptr_type arg1) { /* local vardec */ ATSlocal (ats_ptr_type, tmp89) ; ATSlocal (ats_ptr_type, tmp90) ; ATSlocal (ats_ptr_type, tmp91) ; ATSlocal (ats_ptr_type, tmp92) ; ATSlocal (ats_ptr_type, tmp93) ; ATSlocal (ats_ptr_type, tmp94) ; ATSlocal (ats_ptr_type, tmp95) ; __ats_lab_next_6: #line 90 "fixity.dats" do { /* branch: __ats_lab_28 */ #line 91 "fixity.dats" __ats_lab_28_0: #line 91 "fixity.dats" if (arg0 == (ats_sum_ptr_type)0) { goto __ats_lab_29_0 ; } #line 91 "fixity.dats" tmp90 = ats_caselptr_mac(anairiats_sum_2, arg0, atslab_0) ; #line 91 "fixity.dats" if (((ats_sum_ptr_type)tmp90)->tag != 0) { goto __ats_lab_29_0 ; } #line 91 "fixity.dats" tmp91 = ats_caselptr_mac(anairiats_sum_2, arg0, atslab_1) ; #line 91 "fixity.dats" if (tmp91 != (ats_sum_ptr_type)0) { goto __ats_lab_29_0 ; } #line 91 "fixity.dats" __ats_lab_28_1: #line 91 "fixity.dats" if (arg1 != (ats_sum_ptr_type)0) { goto __ats_lab_29_1 ; } #line 91 "fixity.dats" __ats_lab_28_2: #line 91 "fixity.dats" tmp92 = ats_caselptr_mac(anairiats_sum_3, tmp90, atslab_0) ; #line 91 "fixity.dats" tmp89 = ATS_MALLOC(sizeof(anairiats_sum_4)) ; ats_selptrset_mac(anairiats_sum_4, tmp89, atslab_0, tmp92) ; break ; /* branch: __ats_lab_29 */ #line 92 "fixity.dats" __ats_lab_29_0: #line 92 "fixity.dats" __ats_lab_29_1: #line 92 "fixity.dats" if (arg1 != (ats_sum_ptr_type)0) { goto __ats_lab_30_1 ; } #line 92 "fixity.dats" __ats_lab_29_2: #line 92 "fixity.dats" tmp93 = (ats_sum_ptr_type)0 ; #line 92 "fixity.dats" tmp89 = reduce_5 (arg0, tmp93) ; break ; /* branch: __ats_lab_30 */ #line 93 "fixity.dats" __ats_lab_30_0: #line 93 "fixity.dats" __ats_lab_30_1: #line 93 "fixity.dats" // if (arg1 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; } #line 93 "fixity.dats" __ats_lab_30_2: #line 93 "fixity.dats" tmp94 = ats_caselptr_mac(anairiats_sum_2, arg1, atslab_0) ; #line 93 "fixity.dats" tmp95 = ats_caselptr_mac(anairiats_sum_2, arg1, atslab_1) ; #line 93 "fixity.dats" tmp89 = resolve_4 (arg0, tmp94, tmp95) ; break ; } while (0) ; return (tmp89) ; } /* end of [next_6] */ /* // /cs-pub/www-dir/faculty/hwxi/academic/courses/CS525/Spring09/code/Tiger/fixity.dats: 826(line=42, offs=30) -- 2942(line=97, offs=4) */ ATSglobaldec() ats_ptr_type _2cs_2dpub_2www_2ddir_2faculty_2hwxi_2academic_2courses_2CS525_2Spring09_2code_2Tiger_2fixity_2esats__fixity_resolve (ats_ptr_type arg0) { /* local vardec */ ATSlocal (ats_ptr_type, tmp10) ; ATSlocal (ats_ptr_type, tmp96) ; __ats_lab__2cs_2dpub_2www_2ddir_2faculty_2hwxi_2academic_2courses_2CS525_2Spring09_2code_2Tiger_2fixity_2esats__fixity_resolve: #line 96 "fixity.dats" tmp96 = (ats_sum_ptr_type)0 ; #line 96 "fixity.dats" tmp10 = next_6 (tmp96, arg0) ; return (tmp10) ; } /* end of [_2cs_2dpub_2www_2ddir_2faculty_2hwxi_2academic_2courses_2CS525_2Spring09_2code_2Tiger_2fixity_2esats__fixity_resolve] */ /* static load function */ extern ats_void_type _2cs_2dpub_2www_2ddir_2faculty_2hwxi_2academic_2courses_2CS525_2Spring09_2code_2Tiger_2PARCOMB_2posloc_2esats__staload (void) ; extern ats_void_type _2cs_2dpub_2www_2ddir_2faculty_2hwxi_2academic_2courses_2CS525_2Spring09_2code_2Tiger_2fixity_2esats__staload (void) ; ats_void_type _2cs_2dpub_2www_2ddir_2faculty_2hwxi_2academic_2courses_2CS525_2Spring09_2code_2Tiger_2fixity_2edats__staload () { static int _2cs_2dpub_2www_2ddir_2faculty_2hwxi_2academic_2courses_2CS525_2Spring09_2code_2Tiger_2fixity_2edats__staload_flag = 0 ; if (_2cs_2dpub_2www_2ddir_2faculty_2hwxi_2academic_2courses_2CS525_2Spring09_2code_2Tiger_2fixity_2edats__staload_flag) return ; _2cs_2dpub_2www_2ddir_2faculty_2hwxi_2academic_2courses_2CS525_2Spring09_2code_2Tiger_2fixity_2edats__staload_flag = 1 ; _2cs_2dpub_2www_2ddir_2faculty_2hwxi_2academic_2courses_2CS525_2Spring09_2code_2Tiger_2PARCOMB_2posloc_2esats__staload () ; _2cs_2dpub_2www_2ddir_2faculty_2hwxi_2academic_2courses_2CS525_2Spring09_2code_2Tiger_2fixity_2esats__staload () ; return ; } /* staload function */ /* dynamic load function */ // dynload flag declaration extern ats_int_type _2cs_2dpub_2www_2ddir_2faculty_2hwxi_2academic_2courses_2CS525_2Spring09_2code_2Tiger_2fixity_2edats__dynload_flag ; ats_void_type _2cs_2dpub_2www_2ddir_2faculty_2hwxi_2academic_2courses_2CS525_2Spring09_2code_2Tiger_2fixity_2edats__dynload () { _2cs_2dpub_2www_2ddir_2faculty_2hwxi_2academic_2courses_2CS525_2Spring09_2code_2Tiger_2fixity_2edats__dynload_flag = 1 ; _2cs_2dpub_2www_2ddir_2faculty_2hwxi_2academic_2courses_2CS525_2Spring09_2code_2Tiger_2fixity_2edats__staload () ; #ifdef _ATS_PROOFCHECK #endif /* _ATS_PROOFCHECK */ /* marking static variables for GC */ /* marking external values for GC */ /* code for dynamic loading */ return ; } /* end of [dynload function] */ /* external codes at mid */ /* external codes at bot */ /* ****** ****** */ /* end of [fixity_dats.c] */