source: to-imperative/trunk/samples/Arithm/mult.cc @ 1067

Last change on this file since 1067 was 1067, checked in by pooh, 18 years ago
  • Func term type implemented (requires some compiler support). Apply module implemented.
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.3 KB
Line 
1#include <rf_core.hh>
2#include <refal/StdIO.hh>
3#include <refal/Arithm.hh>
4
5namespace refal
6{
7
8using namespace rfrt;
9
10namespace mult
11{
12
13static const Expr _c_0 = ShortInt::create_expr (22);
14
15static const Expr _c_1 = ShortInt::create_expr (-2);
16
17static const Expr _c_2 = ShortInt::create_expr (2147483647);
18
19static const Expr _c_3 = ShortInt::create_expr (1);
20
21static const Expr _c_4 = ShortInt::create_expr (-1);
22
23static const Expr _c_5 = ShortInt::create_expr (-2147483647);
24
25static const Expr _c_6 = Int::create_expr (2147483648);
26
27static const Expr _c_7 = ShortInt::create_expr (10);
28
29static const Expr _c_8 = ShortInt::create_expr (-11);
30
31static const Expr _c_9 = ShortInt::create_expr (-10);
32
33static const Expr _c_10 = Int::create_expr (-2147483648);
34
35static const Expr _c_11 = ShortInt::create_expr (614189);
36
37static const Expr _c_12 = ShortInt::create_expr (47349);
38
39static const Expr _c_13 = ShortInt::create_expr (-456889);
40
41static const Expr _c_14 = ShortInt::create_expr (-23491);
42
43static const Expr _c_15 = ShortInt::create_expr (-582598);
44
45static const Expr _c_16 = ShortInt::create_expr (59873);
46
47static const Expr _c_17 = ShortInt::create_expr (-998998);
48
49static const Expr _c_18 = ShortInt::create_expr (-6984899);
50
51RF_FUNC (Main, (), (RF_RES _v_res1))
52  {
53    Expr _v__a_1;
54    RF_CALL (Arithm::_a_, (_c_0, _c_1), (_v__a_1));
55    RF_CALL (StdIO::PrintLN, (_v__a_1), ());
56    Expr _v__a_2;
57    RF_CALL (Arithm::_a_, (_c_2, _c_3), (_v__a_2));
58    RF_CALL (StdIO::PrintLN, (_v__a_2), ());
59    Expr _v__a_3;
60    RF_CALL (Arithm::_a_, (_c_2, _c_4), (_v__a_3));
61    RF_CALL (StdIO::PrintLN, (_v__a_3), ());
62    Expr _v__a_4;
63    RF_CALL (Arithm::_a_, (_c_5, _c_3), (_v__a_4));
64    RF_CALL (StdIO::PrintLN, (_v__a_4), ());
65    Expr _v__a_5;
66    RF_CALL (Arithm::_a_, (_c_5, _c_4), (_v__a_5));
67    RF_CALL (StdIO::PrintLN, (_v__a_5), ());
68    Expr _v__a_6;
69    RF_CALL (Arithm::_a_, (_c_6, _c_7), (_v__a_6));
70    RF_CALL (StdIO::PrintLN, (_v__a_6), ());
71    Expr _v__a_7;
72    RF_CALL (Arithm::_a_, (_c_6, _c_8), (_v__a_7));
73    RF_CALL (StdIO::PrintLN, (_v__a_7), ());
74    Expr _v__a_8;
75    RF_CALL (Arithm::_a_, (_c_9, _c_6), (_v__a_8));
76    RF_CALL (StdIO::PrintLN, (_v__a_8), ());
77    Expr _v__a_9;
78    RF_CALL (Arithm::_a_, (_c_8, _c_10), (_v__a_9));
79    RF_CALL (StdIO::PrintLN, (_v__a_9), ());
80    Expr _v__a_10;
81    RF_CALL (Arithm::_a_, (_c_11, _c_12), (_v__a_10));
82    RF_CALL (StdIO::PrintLN, (_v__a_10), ());
83    Expr _v__a_11;
84    RF_CALL (Arithm::_a_, (_c_13, _c_14), (_v__a_11));
85    RF_CALL (StdIO::PrintLN, (_v__a_11), ());
86    Expr _v__a_12;
87    RF_CALL (Arithm::_a_, (_c_15, _c_16), (_v__a_12));
88    RF_CALL (StdIO::PrintLN, (_v__a_12), ());
89    Expr _v__a_13;
90    RF_CALL (Arithm::_a_, (_c_17, _c_18), (_v__a_13));
91    RF_CALL (StdIO::PrintLN, (_v__a_13), ());
92    Expr _v__a_14;
93    RF_CALL (Arithm::_a_, (_c_6, _c_6), (_v__a_14));
94    RF_CALL (StdIO::PrintLN, (_v__a_14), ());
95    Expr _v__a_15;
96    RF_CALL (Arithm::_a_, (_c_6, _c_10), (_v__a_15));
97    RF_CALL (StdIO::PrintLN, (_v__a_15), ());
98    Expr _v__a_16;
99    RF_CALL (Arithm::_a_, (_c_10, _c_6), (_v__a_16));
100    RF_CALL (StdIO::PrintLN, (_v__a_16), ());
101    Expr _v__a_17;
102    RF_CALL (Arithm::_a_, (_c_10, _c_10), (_v__a_17));
103    RF_CALL (StdIO::PrintLN, (_v__a_17), ());
104    _v_res1 = empty;
105  }
106RF_END
107
108}
109
110rfrt::Entry rf_entry (mult::Main);
111
112}
Note: See TracBrowser for help on using the repository browser.