1: %% The `elsart' style that is used and more information on this style
2: %% can be found at the Author Gateway (http://authors.elsevier.com) and follow %% the link to "Guide to publishing with Elsevier".
3:
4: \documentclass{elsart}
5: \usepackage{hyperref}
6: %% This list environment is used for the references in the
7: %% Program Summary
8: %%
9: \newcounter{bla}
10: \newenvironment{refnummer}{%
11: \list{[\arabic{bla}]}%
12: {\usecounter{bla}%
13: \setlength{\itemindent}{0pt}%
14: \setlength{\topsep}{0pt}%
15: \setlength{\itemsep}{0pt}%
16: \setlength{\labelsep}{2pt}%
17: \setlength{\listparindent}{0pt}%
18: \settowidth{\labelwidth}{[9]}%
19: \setlength{\leftmargin}{\labelwidth}%
20: \addtolength{\leftmargin}{\labelsep}%
21: \setlength{\rightmargin}{0pt}}}
22: {\endlist}
23:
24: \begin{document}
25: \begin{frontmatter}
26:
27: \title{f2mma: FORTRAN to {\sl Mathematica} translator}
28:
29: \author[a]{Andrey S. Siver%\thanksref{siver}
30: }
31:
32: %\thanks[siver]{}
33:
34: \address[a]{Institute for High Energy Physics, Protvino, Moscow region, Russia}
35:
36: \begin{abstract}
37: f2mma program can be used for translation a program written in some
38: subset of the FORTRAN language into {\sl Mathematica} programming language. This subset have been enough to translate GAPP (Global Analysis of Particle Properties) program into {\sl Mathematica} language automatically. A table with Standard Model observables calculated with GAPP({\sl Mathematica}) is presented.
39:
40: \begin{flushleft}
41: \end{flushleft}
42:
43: \begin{keyword}
44: Translation; FORTRAN; Mathematica; GAPP; Standard Model of Particle Physics
45: % Please give some freely chosen keywords that we can use in a
46: % cumulative keyword index.
47: \end{keyword}
48:
49: \end{abstract}
50:
51:
52: \end{frontmatter}
53:
54: % Computer program descriptions should contain the following
55: % PROGRAM SUMMARY.
56:
57: {\bf PROGRAM SUMMARY}
58: %Delete as appropriate.
59:
60: \begin{small}
61: \noindent
62: {\em Manuscript Title:} f2mma: FORTRAN to {\sl Mathematica} translator\\
63: \\
64: {\em Authors:} Siver A.S. \\
65: \\
66: {\em Program Title:} {f2mma} \\
67: \\
68: {\em Journal Reference:} \\
69: %Leave blank, supplied by Elsevier.
70: \\
71: {\em Catalogue identifier:} \\
72: %Leave blank, supplied by Elsevier.
73: \\
74: {\em Licensing provisions:} none \\
75: %enter "none" if CPC non-profit use license is sufficient.
76: \\
77: {\em Programming language:} Perl \\
78: \\
79: {\em Computer:} all \\
80: %Computer(s) for which program has been designed.
81: \\
82: {\em Operating system:} Windows, Unix, ... \\
83: %Operating system(s) for which program has been designed.
84: \\
85: {\em RAM:} 2 Mb \\
86: %RAM in bytes required to execute program with typical data.
87: \\
88: {\em Keywords:} Translation, FORTRAN, Mathematica \\
89: % Please give some freely chosen keywords that we can use in a
90: % cumulative keyword index.
91: %{\em PACS:} \\
92: %{\em Classification:} \\
93: %Classify using CPC Program Library Subject Index
94: %e.g. 4.4 Feynman diagrams, 5 Computer Algebra.
95: \\
96: {\em Nature of problem:} \\
97: f2mma program allows to translate programs from some subset of FORTRAN programming language to {\sl Mathematica} system's language (where mathematical objects can be analyzed more efficiently in symbolic form). The general aim of f2mma is translation of GAPP (Global Analysis of Particle Properties) package [1].\\
98: %Describe the nature of the problem here.
99: \\
100: {\em Solution method:} \\
101: Perl::RecDescent module was used with corresponding FORTRAN grammar and transformation rules.\\
102: %Describe the method solution here.
103: \\
104: {\em Unusual features:} \\
105: f2mma can generate additional new lines in Mathematica output programs.\\
106: %Describe any unusual features of the program/problem here.
107: \\
108: {\em Additional comments:} \\
109: %\begin{itemize}
110: (1) f2mma use only some subset of FORTRAN language grammar (for example, f2mma goes not process `goto' operator);
111: (2) f2mma does not make syntax check of input FORTRAN program;
112: (3) translation process can be slow for large FORTRAN programs.\\
113: %\end{itemize}
114: %Provide any additional comments here.
115: \\
116: {\em References:}
117: \begin{refnummer}
118: \item J.~Erler, hep-ph/0005084 % This is the reference list of the Program Summary
119: %\item Reference 2 % Type references in text as [1], [2], etc.
120: %\item Reference 3 % This list is different from the bibliography, which
121: % you can use in the Long Write-Up.
122: \end{refnummer}
123: \end{small}
124: % -----------------------------------------------------------------------------
125: %\newpage
126: % In program descriptions the main text of the paper is listed under
127: % the heading LONG WRITE-UP.
128:
129: \href{http://sirius.ihep.su/~siver/f2mma.zip}{DOWNLOAD `f2mma' (1.2 Mb)}
130:
131: \hspace{1pc}
132: {\bf LONG WRITE-UP}
133: % -----------------------------------------------------------------------------
134: \section{Introduction}
135: % -----------------------------------------------------------------------------
136: In programs written in FORTRAN programming language scientific models of specific field have been usually embedded into codes. It's difficult and impractical to support or to upgrade them especially by non-programmers. So the only aim of the codes is often to carry out numerical calculations.
137:
138: From other side, it's known that with help of computer algebra system such as {\sl Mathematica} one can represent the scientific model as an object which can be simply analyzed and improved. {\sl Mathematica} provides important capabilities such as:
139: \begin{itemize}
140: \item High-precision calculations;
141: \item Special functions;
142: \item Equations solvers;
143: \item Matrices and vectors manipulations;
144: \item Sophisticated programming language;
145: \item 2D and 3D graphics.
146: \end{itemize}
147:
148: So, there is an idea to translate FORTRAN codes to {\sl Mathematica} system's language and then carry out some calculation in symbolic form. f2mma program can be used as such translator.
149:
150: For others motivations see \cite{f2cl}, for example.
151:
152: A design of f2mma program had not aim to provide tool for translation every FORTRAN program (according to any FORTRAN language standard) into {\sl Mathematica} language but actually to translate GAPP\footnote{GAPP - Global Analysis of Particle Properties}\cite{Erler} package into CAS language (it's important for us since GAPP contains recent scientific models for electroweak interactions of the particles). This purpose was achieved. In the section \ref{sm-table} we present a table with Standard Model observables calculated with GAPP({\sl Mathematica}).
153:
154: f2mma is a rather simple program and can be easily extended by user. Special effort was made to document the codes.
155:
156: % Sometimes program descriptions have Test Run Output at the end.
157: %\newpage
158: % -----------------------------------------------------------------------------
159: \section{An example}
160: % -----------------------------------------------------------------------------
161: Let's translate a test program (which should print out several 'OK'
162: messages and expressions equaling to zero) in order to see the basic functionalities of f2mma program:
163:
164: \hspace{1pc}
165: {\bf TEST RUN INPUT}
166: % ---
167: \bigskip
168: % ---
169: %\rule{350pt}{0.1pt}
170: \input{input-txt.tex}
171: %\rule{350pt}{0.1pt}
172:
173: %The result is following:
174:
175: \hspace{1pc}
176: {\bf TEST RUN OUTPUT}
177: \bigskip
178:
179: %\rule{350pt}{0.1pt}
180: \input{input-m.tex}
181: %\rule{350pt}{0.1pt}
182:
183: % -----------------------------------------------------------------------------
184: \section{Table with Standard Model observables}
185: % -----------------------------------------------------------------------------
186: \label{sm-table}
187: In order to check general correctness of f2mma translation we present table with SM observables (that is values of physical expressions arising from Standard Model theory of particle physics). They were calculated with followings values of the fitted parameters: $M_Z=91.187$ {\rm GeV}, $m_t=166.96$ {\rm GeV},
188: $m_b=4.21$ {\rm GeV}, $m_c=1.29 $ {\rm GeV}, $\alpha_S(0)=0.121$,
189: $m_H=\exp(4.7126)$ {\rm GeV}, $T=U=S=B=0$, $Z=3$, $M_{Z'}=1000$
190: GeV, $sin\theta=0$, $\lambda_g=1$. Total $\chi^2$ (with parameters
191: defined above) is about 49.6 for 37 effective degrees of freedom (it's quite comparable with GAPP(FORTRAN) result 49.4 at the minimum of $\chi^2$).
192:
193: For explanation of the observables abbreviations please see \cite{Erler}, \cite{PDG}.
194: % ---
195: \input{sm-table.tex}
196: % ---
197: % -----------------------------------------------------------------------------
198: \section{Acknowledgments}
199: % -----------------------------------------------------------------------------
200: Author would like to thank Zenin O. V., Ezhela V. V., some Perl
201: experts from public forum http://forum.vingrad.ru.
202:
203: The work was not supported by the project RFFI-05-07-90191-w.
204: % -----------------------------------------------------------------------------
205: \begin{thebibliography}{100}
206: % ---
207: \bibitem{Erler} GAPP,~http://www.fisica.unam.mx/erler/GAPP.html;\\
208: arXiv: hep-ph/0005084
209:
210: \bibitem{PDG} Particle Data Group, ``Review of particle physics'', {\em Physics Letters} {\bf B} 592 (2004) p.114
211:
212: \bibitem{Perl} Perl, www.perl.org
213:
214: \bibitem{Perl::RecDescent} Perl::RecDescent,\\ http://search.cpan.org/$\sim$dconway/Parse-RecDescent-1.94/lib/Parse/RecDescent.pod
215:
216: \bibitem{f2cl} K. A. Broughan, D. M. K. Willcock, ``Fortran to Lisp translation using f2cl'', Source Software—Practice
217: \& Experience, Volume 26, Issue 10 (October 1996), pp. 1127-1139
218:
219: \end{thebibliography}
220: \end{document}
221: