Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Ratfor
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== History == Ratfor was designed and implemented by [[Brian Kernighan]] at [[Bell Telephone Laboratories]] in 1974, and described in ''Software—Practice & Experience'' in 1975. It was used in the book "Software Tools" ([[Brian Kernighan|Kernighan]] and [[P.J. Plauger|Plauger]], 1976). In 1977, at [[Purdue University]], an improved version of the Ratfor preprocessor was written. It was called Mouse4, as it was smaller and faster than Ratfor. A published document by Dr. [[Douglas Comer]], professor at Purdue, concluded "contrary to the evidence exhibited by the designer of Ratfor, sequential search is often inadequate for production software. Furthermore, in the case of lexical analysis, well-known techniques do seem to offer efficiency while retaining the simplicity, ease of coding and modularity of ad hoc methods." (CSD-TR236). In comparison to the Ratfor preprocessor on a program of 3000 source lines running on a [[CDC 6500]] system took 185.470 CPU seconds. That was cut by 50% when binary search was used in the Ratfor code. Rewriting the ad hoc lexical scanner using a standard method based on finite automata reduced run time to 12.723 seconds. With the availability of [[Fortran 77]], a successor named [[Ratfiv]] (Ratfor=rat4 => rat5=Ratfiv) could, with an option /f77, output a more readable Fortran 77 code: <syntaxhighlight lang="fortranfixed"> IF (A .GT. B) THEN MAX = A ELSE MAX = B ENDIF </syntaxhighlight> Initial Ratfor source code was ported to C in 1985 <ref>{{ cite web|url=http://ratfor.sourcearchive.com/documentation/1.0-11/rat4_8c-source.html |title=Ratfor implementation in C (1985)}}</ref> and improved to produce Fortran 77 code too.<ref>{{ cite web|url=http://sepwww.stanford.edu/doku.php?id=sep:software:ratfor |title=Ratfor77}}</ref> A [[git (software)|git]] tree has been set in 2010 in order to revive ratfor .<ref>{{ cite web|url=http://gitorious.org/ratfor-revived/c-ratfor |title=Ratfor Git Revived}}</ref> Although the [[GNU Compiler Collection|GNU C compiler]] had the ability to directly compile a Ratfor file (.r) without keeping a useless intermediate Fortran code (.f) (<code>gcc foo.r</code>), this functionality was lost in version 4 during the move in 2005 from [[f77]] to [[GNU Fortran]].<ref>{{ cite web|url=https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24357 |title=gcc lost the ratfor preprocessor}}</ref> The original source was available in .[[deb (file format)|deb]] and .[[rpm (file format)|rpm]] forms at its original site, mirror.corbina.net/mandriva/, and its archive, www.dgate.org/ratfor/ are gone as of April, 2024.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)