Thursday, July 12, 2012



SNOBOL is an unusual programing language in comparsion to most conventional styles, but is used based on a very sound principle of pattern matching to solve string manipulation problems. Thus, SNOBOL is particularly well suited for text processing applications. It contains an unusually powerful collection of string processing functions in comparison to those of other languages.


HISTORY

The first SNOBOL language was developed by David J. Farber, Ralph E. Griswold and Ivan P. Polonsky at Bell Labs in 1962. An early name for SNOBOL was SEXI (String Extraction Interpreter). Farber was once overheard to say that the name SNOBOL was largely contrived when the original JACM article was published. The name was apparently picked when one of the original implementors made a statment such as, "This program doesn't have a snowball's chance in hell of ...". 

The original SNOBOL system was written in the BEFAP (Bell Laboratories FORTRAN assembly program) assembler for the IBM 7090. The main language defect was the lack of built-in functions. A new implementation with built-ins produced SNOBOL2 (c. 1964). Programmer defined functions were added to make SNOBOL3 (c. 1965). 

SNOBOL3 was ported to the IBM 7040/7044 and independent implementations were done for other machines including the Burroughs 5500, CDC 3600, IBM 1620, DEC PDP-6, RCA 601, and SDS 930. Early versions of Unix came with an interpreter called sno. The multitude of implementations caused a proliferation of language dialects both intentional and unintentional.
A recent implementation of SNOBOL3 (in Java!) has been done by Dennis Heimbigner of the Software Engineering Research Laboratory at the Computer Science Department of the University of Colorado! 

The advent of third-generation computers with larger memories and faster CPU's provided the computes for SNOBOL4, and the addition of a number of elements familiar to SNOBOL4 users: improved patterns, numeric data types, arrays, structures and finally, tables.
Work on SNOBOL4 began in 1966, and was meant to be portable from the outset. The SNOBOL Implementation Language or SIL was meant to be implemented as assembler macros. This implementation is sometimes called Macro SNOBOL4. Implementation began on the IBM 7094, in anticpation of moving to the MULTICS Virtual Memory system on the GE 645. After Bell Labs withdrew from the MULTICS project, development was moved to the IBM System/360. Macro SNOBOL4 was ported to over 50 systems, including: CDC 6600, GE 635, UNIVAC 1108, RCA Spectra 70, Ferranti Atlas 2, SDS Sigma 7, DEC PDP-10 Burroughs 6700, and Multics, among others.
Macro SNOBOL4 was not well suited to small machines, and could not fit in the 16-bit address spaces of many microcomputers. Macro SNOBOL4 ports to the 8086 (IBM PC) include Catspaw "Vanilla SNOBOL4" and SNOBOL4+, and Minnesota SNOBOL4. 

Later independent implementations of the language include: SPITBOL\360 and SPITBOL\370 (a highly tuned compiler), Macro SPITBOL (a portable implementation, including MaxSPITBOL, SPITBOL-386), (all by Robert B.K. Dewar), SITBOL (implemented at The Stevens Institute of Technology by James F. Gimpel), FASBOL, ELFBOL and others. 
      


Significant Language Features

  • String Manipulation Operations - has several of these operations which allow a string to be tested for contents and make replacements in the string.
  • Pattern Matching- involves examining substrings, for the occurrences of specified substrings. Substrings are also known as patterns.
  • Dynamically typed - SNOBOL4 has no type declarations and no restrictions on the data type of the value of any variable.
  • Interpretive language - The compiler translates the program into a notation that the interpreter can easily execute.

Area of Application

  • Analysis of Literature
  • Analysis of Music
  • Computer experts using it for database programs.
Implementations and Variations of SNOBOL
SNOBOL is implemented on a large number of computers, including the following:
                Burroughs
                Control Data
                Digital
                Honeywell
                IBM
                Univac

SNOBOL Hello World Example


    OUTPUT = "Hello, world!"
END

INSIGHTS

“SNOBOL4 was not very well structured; it was written at the time when the only viable implementation language was assembly language, and it's a very different kind of thing. It is, in fact, quite portable in certain kinds of computer architecture, although it doesn't fit the current ones very well.”
-Ralph Griswold 25 July 1990

“One of SNOBOL’s greatest strengths is pattern matching. In fact, pattern matching and string operations are fundamental to SNOBOL.
R. E. Giswold, J. F. Poage, and I. P. Polonsky, The SNOBOL4 Programming Language (Englewood Cliffs: Prentice-Hall, Inc., 1971), 6.


“SNOBOL is well suited for studies involving natural language, such as text analysis or handling data from history or archeology. It is a great language for examining or reformatting text because it’s very easy to learn and write, especially for people who do not have experience in programming or mathematics.
-Susan Hockey, Snobol Programming for the Humanities (Oxford: Clarendon Press, 1985), 1.


Reference(s):
       Allen B. Tucker, Jr, “Programming Languages, second edition”, McGraw-Hill,Inc  1986
       http://groups.engin.umd.umich.edu/CIS/course.des/cis400/snobol/snobol.html#samples
       http://math.scu.edu/~dsmolars/ma169/notessnobol.html#sample
       http://www.helloworldexample.net/snobol-hello-world-example.html
       http://www.snobol4.org/history.html


Members:
T-1L
2010-12075 "Hoot"
2010-40364 "NxT.DnY"
2009-26382 "Roj"
2010-04005 "cruz"




No comments:

Post a Comment