SnoBol: History, Features, and Code Examples in Computer Science

Verified

Added on  2022/08/22

|5
|1170
|24
Report
AI Summary
This report provides a comprehensive overview of the SnoBol programming language, a string-oriented language developed in the 1960s. It details the language's history, including its origins at Bell Labs and its evolution through various versions like SnoBol4. The report highlights key features such as string manipulation capabilities, pattern matching using backtracking, and the support for various data types like strings, arrays, and tables. Examples of SnoBol code are provided, including programs for printing "Hello World" and converting strings to lowercase. The report also mentions the influence of SnoBol on later languages and includes a timeline of its development. References for further reading are also provided. The report covers the language's significance in the context of text processing and its influence on subsequent programming languages such as Icon and SL5. The report concludes with a discussion of SnoBol's key strengths and weaknesses, making it useful for anyone studying programming languages and their evolution.
Document Page
SnoBol
Overview:
StriNg Oriented and symBOlic Language in short SNOBOL is a sequence of
programming language initially developed around 1962 and 1967. Initially it was mainly used
for string analysis and text processing. It was one of the developed text-string based languages
developed and used during the 60s. David J. Farber, Ivan P and Ralph E. Griswold first
developed it at the AT&T Bell Laboratories in the mid-1960s. During the era, SnoBol stands out
because of its data type pattern while performing operations like string alteration and
concatenation. SnoBol language pattern includes manipulation of strings and are mainly object
based similar to object oriented language developed during that time. On later date,
programming languages like SL5 and Icon (containing the backtracking of SnoBol) were
developed based on this (SnoBol) language. Its pattern is like a standard algorithm.
History:
The language SnoBol first came into view in the year 1962 (as mentioned above) and
developed in Bell Labs; owned by a Finnish company, Nokia. It was primarily designed for
performing tasks related to text-string manipulation and by proper ose of the language one can
use the same to perform various types of string manipulations similar to that of object based
languages (OOP languages) like JavaScript (with having a specific type of pattern commonly
known as regular expression). Initially, this language (SnoBol) was created to be used as a tool
mainly for authors for working with manipulation of symbols in polynomials. It basically had a
simple syntax for its coding with only data type that is the string with no function and without
any need of declaration. Nevertheless, due to its simplicity, other people began to use the
language resulting the authors to encompass and arrange the language in an orderly manner; with
tabler-icon-diamond-filled.svg

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
the addition of user defined and standard functions, a new version of SnoBol got released into
the market. In the late 1960s, the first stable version of SnoBol was released with the inclution of
various features and datatypes based on virtual machines to allow a better-quality transportability
of the codes between computers. In later days, new languages (SL5 and Icon) came into view
directly from the SnoBol language as their predecessor.
Features:
The SnoBol language supports various built-in data types like limited precision real
numbers, patterns, strings, arrays, tables (also known as associative arrays) and integers. It also
allows a used to define and include user defined data types and functions. The user defined data
type was advanced at that point of time compared to other similar type of languages. The
language in weakly typed and the typing is dynamic in nature; in other words, the user
(programmer) does not need to declare any variables that are used in programs written in SnoBol
language. Variables used while writing this language are all global. It also contains a ‘goto’ like
statements similar to that of the machine level languages. The pattern matching in SnoBol stable
version uses the well-known backtracking algorithm analogous to that of logical programming
Prolog (it provides pattern like builds via definite clause grammar).
Examples:
Following are some list of some basic examples of SnoBol code:
Printing Hello World in SnoBol
OUTPUT = “Hello World!!...”
END
Document Page
Fig: Printing Hello World using online compiler
It can be found from the above example and output screenshot that printing an output is
very easy in SnoBol; one just simply needs to assign the sequence of string to the “OUTPUT”
and the string will be displayed in the output. The ‘END’ in the concluding part of the program
denotes that the program has ended.
Converting an input string to all lower-case
DEFINE('LOWER(STR)') : (LOWER_END)
LOWER LOWER = REPLACE(STR,&UCASE,&LCASE) : (RETUR)
LOWER_END
STR = INPUT
OUTPUT = LOWER(STR)
END
Document Page
Fig: Uppercase to lowercase conversion using online compiler
In the above example of upper to lower case conversion, initially a method (‘LOWER ()’)
has been defined including the termination section. Here it is named as ‘LOWER_END’. In the
next line, the predefined function ‘REPLACE’ have been used. In the function, initially a string
is accepted using ‘STR’ (used in the main part of the coding); it is considered as uppercase
(using &UCASE), then the uppercased word/s are converted into lowercased words (&LCASE)
and sent back (using RETURN) to the calling section in the main part of the code. The method
ends with ‘LOWER_END’ (as mentioned while defining the method). In the main section of the
code, variable named ‘STR’ is used to take user input as uppercase and convert it in lowercase.
The input is assigned to STR. In the next line of code, the output is displayed while calling the
LOWER method with STR string in it. The method performs its tasks and returns the lowercased
string, which is ultimately displayed as an output. The codes terminates with END.
tabler-icon-diamond-filled.svg

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
References (in MLA):
Hanson, David R. "Variable associations in SNOBOL4." Software: Practice and Experience 6.2
(1976): 245-254.
Ripley, G. David, Ralph E. Griswold, and David R. Hanson. "Performance of storage
management in an implementation of SNOBOL4." IEEE Transactions on Software
Engineering 2 (1978): 130-137.
Farber, David J., Ralph E. Griswold, and Ivan P. Polonsky. "SNOBOL, a string manipulation
language." Journal of the ACM (JACM) 11.1 (1964): 21-30.
Griswold, Ralph E. "A history of the SNOBOL programming languages." ACM Sigplan Notices
13.8 (1978): 275-308.
Jeffery, Clinton, et al. "Integrating regular expressions and SNOBOL patterns into string
scanning: a unifying approach." Proceedings of the 31st Annual ACM Symposium on
Applied Computing. 2016.
Timeline:
Year Name Developed By Predecessor
1962 SnoBol David J. Farber, et al. Fortran II, Comit
1963 SnoBol3 David J. Farber, et al. SnoBol
1967 SnoBol4 David J. Farber, et al. SnoBol3
1977 Icon (Successor concept) Ralph Griswold SnoBol
1979 Icon (Successor implementation) Ralph Griswold SnoBol
chevron_up_icon
1 out of 5
circle_padding
hide_on_mobile
zoom_out_icon
logo.png

Your All-in-One AI-Powered Toolkit for Academic Success.

Available 24*7 on WhatsApp / Email

[object Object]