Computer Science

Formal Language computer science

Formal language in computer science refers to a set of rules and symbols used to describe a language in a precise and unambiguous way. It is used to define programming languages, communication protocols, and other computer-related systems. Formal languages are often used in the design and analysis of algorithms and data structures.

Written by Perlego with AI-assistance

7 Key excerpts on "Formal Language computer science"

  • Book cover image for: Algorithms and Theory of Computation Handbook, Volume 1
    eBook - PDF
    His work influenced Emil Post, Stephen Kleene, and others to study the mathematical properties of strings and collections of strings. Soon after the advent of modern electronic computers, people realized that all forms of information—whether numbers, names, pictures, or sound waves—can be represented as strings. Then collections of strings known as languages became central to computer science. This chapter is concerned with fundamental mathematical properties of languages and language-generating systems, such as grammars. Every programming language from Fortran to Java can be precisely described by a grammar. Moreover, the grammar allows us to write a computer program (called the syntax analyzer in a compiler) to determine whether a string of statements is syntactically correct in the programming language. Many people would wish that natural languages such as English could be analyzed as precisely, that we could write computer programs to tell which English sentences are grammatically correct. Despite recent advances in natural language processing, many of which have been spurred by formal grammars and other theoretical tools, today’s commercial products for grammar and style fall well short of that ideal. The main problem is that there is no common agreement on what are grammatically correct (English) sentences; nor has anyone yet been able to offer a grammar precise enough to propose as definitive. And style is a matter of taste(!) such as not beginning sentences 20 -1 20 -2 General Concepts and Techniques with “and” or using interior exclamations. Formal languages and grammars have many applications in other fields, including molecular biology (see [17]) and symbolic dynamics (see [14]). In this chapter, we will present some formal systems that define families of formal languages arising in many computer science applications. Our primary focus will be on context-free languages (CFL), since they are most widely used to describe the syntax of programming languages.
  • Book cover image for: Logic, Methodology and Philosophy of Science III
    b. One might require of a formal definition that it can be used as a basis for the development of a compiler. The formal definition should then be designed in such a way that it reflects in some sense the structure of the compiler. It should be remarked that it is often difficult to combine require- ments a and b. c. Recently, suggestions have been made for the introduction of pro- gramming languages which allow the programmer to include modifications or extensions of the language in his program. It is clear that it is necessary in such a situation to provide the programmer with a formalism in which he can state these modifications to the language. d. Finally, a formal definition of a programming language should provide insight into theoretical properties of this language. It should lead to a vocabulary which can be used for discussions about the language. One might expect of such theoretical investigations e.g. the detection of incom- patible, contradictory or ambiguous concepts or constructions in the language. It might also be used as a source of inspiration for new useful concepts, which would not have originated directly from practical con- siderations. We shall now discuss some systems which have been proposed for the formal definition of programming languages. It will appear that the situation is the same as with the theory of computation; i.e., almost every author has his own system; there is as yet no generally accepted method, nor any indication of a convergence in opinion towards such a method. In September 1964, a conference on “Formal Language Description Languages” was held, organized by the technical committee on programming languages of the International Federation for Information Processing. The proceedings of this conference (STEEL 11966aI) show clearly how much the ideas of the several authors diverge. 232 1. W. DE BAKKER First of all we mention the methods that are based upon the A-calculus.
  • Book cover image for: Graph Structure and Monadic Second-Order Logic
    eBook - PDF
    Introduction This book contributes to several fields of Fundamental Computer Science. It extends to finite graphs several central concepts and results of Formal Language Theory and it establishes their relationship to results about Fixed-Parameter Tractability. These developments and results have applications in Structural Graph Theory. They make an essential use of logic for expressing graph problems in a formal way and for specifying graph classes and graph transformations. We will start by giving the historical background to these contributions. Formal Language Theory This theory has been developed with different motivations. Linguistics and compila- tion have been among the first ones, around 1960. In view of the applications to these fields, different types of grammars, automata and transducers have been defined to specify formal languages, i.e., sets of words, and transformations of words called transductions, in finitary ways. The formalization of the semantics of sequential and parallel programming languages, that uses respectively program schemes and traces, 1 the modeling of biological development and yet other applications have motivated the study of new objects, in particular of sets of terms. 2 These objects and their specifying devices have since been investigated from a mathematical point of view, indepen- dently of immediate applications. However, all these investigations have been guided by three main types of questions: comparison of descriptive power, closure properties (with effective constructions in case of positive answers) and decidability problems. A context-free grammar generates words, hence specifies a formal language. How- ever, each generated word has a derivation tree that represents its structure relative to the considered grammar. Such a tree, which can also be viewed as a term, is usually 1 Traces are equivalence classes of words for congruences generated by commutations of letters; see the book [*DiekRoz].
  • Book cover image for: The Science of Computing
    eBook - PDF

    The Science of Computing

    Shaping a Discipline

    C H A P T E R 4 The Formal Verification Debate A fter the birth of the discipline of computing, the schism between prac-tically oriented computing professionals and abstractly oriented math-ematicians grew. Software production was growing incredibly fast, and the industry lacked tools for handling complex software projects. Large software projects were frequently delayed, over budget, and of low quality. Blame for the “software crisis” was thrown around: Some accused academic education for failing to meet the practical needs of the industry, while others blamed the industry for its shoddy standards, poor methods, and inadequate tools. While the software industry suffered, the theoretical community flourished. Automata theory and formal languages developed into a rigorous theory of classes of computational power from the 1960s onward. Complexity theory was born and quickly developed the fundamental concepts for classifying compu-tational problems according to their use of resources such as time and memory space. Formal semantics progressed in its quest to connect syntax with actual computations. Computer scientists in the year 1975 saw a whole landscape of theoretical foundations of computing that was not there in 1955, as well as a new universe of research problems arising from those theoretical foundations. A number of notable pioneers of computing—such as Dijkstra, Floyd, Mc-Carthy, Naur, and Wirth—wished that a mathematical, rigorous approach to program construction could improve the quality of software. They proposed a variety of formal approaches for program construction, and urged software developers to embrace those approaches. A sort of an extreme position—call it, for instance, strong formal verificationism or mathematical reductionism— was articulated by C.
  • Book cover image for: Formal Languages in Logic
    eBook - PDF

    Formal Languages in Logic

    A Philosophical and Cognitive Analysis

    1.2 the formal as computable Uses of the term ‘formal’ as synonymous with ‘computable’ are extremely pervasive in logic and philosophy of logic of the last eight decades, the period which witnessed a revolution in digital computing. In this section, I first present a tentative archaeology of uses of the term ‘formal’ in the sense of computable or algorithmic. Following that, I discuss the very concept of computable in order to attain a better grasp of what it means to be formal in this particular sense. 12 Frege points out that Thomae and Heine ‘do not set out an account of the syntax and proof theory which is remotely adequate as an account of the mathematics with which they deal’ (Weir 2011: sect. 2). 16 Part I 1.2.1 Uses of formal as computable Uses of the term ‘formal’ as synonymous with ‘computable’ are extremely pervasive in the logical developments of the last eight decades; for example, a ‘formal system’ is typically defined as a recursively axiomatized theory (but not necessarily one whose symbols are treated as ‘meaningless’). But, such uses appear to be a relatively recent phenomenon in philosophy and logic: unlike the variations of the formal as pertaining to forms, which have an old and distinguished philosophical pedigree (Dutilh Novaes 2011b), ‘formal’ in the sense of computable seems to have become widely used only in the twentieth century. Moreover, it can be argued that, according to a more precise use of the terminology, the extension of ‘computable’ is actually a proper sub-class of the extension of ‘formal’ in this very sense, as there are systems with which one operates ‘formally’, i.e., according to explicitly stated rules, but which do not display full computability in that they are not recursively axiomatizable. Nevertheless, uses of the term ‘formal’ as synonymous with ‘computable’ have become current practice.
  • Book cover image for: The Space of Mathematics
    eBook - PDF

    The Space of Mathematics

    Philosophical, Epistemological, and Historical Explorations

    • Javier Echeverria, Andoni Ibarra, Thomas Mormann, Javier Echeverria, Andoni Ibarra, Thomas Mormann(Authors)
    • 2012(Publication Date)
    • De Gruyter
      (Publisher)
    30 For all the depth of results in computational complexity, the complexity of most computational tasks we are familiar with - such as sorting, multiplying integers or matrices, or finding shortest paths - is still unknown. Despite the close ties between mathematics and language theory, by and large, the more mathematical aspects of language theory have not been applied in practice. Their greatest potential service is probably pedagogic, in codifying and given clear economical form to key ideas for handling formal languages. Efforts to bring mathematical rigor to programming quickly reached a level of complexity that made the techniques of verification subject to the very concerns that prompted their development. Mathematical semantics could show precisely why [a] nasty surprise can arise from a seemingly well-designed programming language, but not how to eliminate the problems from the outset. As a design tool, mathematical semantics was still far from the goal of correcting the anomalies that gave rise to errors in real programming languages. Another decade later, his successor in the Chair of Computation at Oxford, C. A. R. Hoare, spoke of the mathematics of computing more as aspiration 30 What Can Be Automated? (COSERS), ed. Bruce W. Arden (Cambridge, MA: ΜΓΓ Press, 1980), 139. The committee consisted of Richard M. Karp (Chair; Berkeley), Zohar Manna (Stanford), Albert R. Meyer (ΜΓΓ), John C. Rey-nolds (Syracuse), Robert W. Ritchie (Washington), Jeffrey D. Ullman (Stanford), and Samuel Winograd (IBM Research). 362 Michael S. Mahoney than as reality. 31 He held it as a matter of principle that computers are math-ematical machines, computer programs are mathematical expressions, a pro-gramming language is a mathematical theory, and programming is a mathema-tical activity. These are general philosophical and moral principles, and I hold them to be self-evident - which is just as well, because all the actual evidence is against them.
  • Book cover image for: Discrete Mathematics with Applications
    Chapter 11 Formal Languages and Finite-State Machines Time as he grows old teaches many lessons. — AESCHYLUS T he study of finite-state machines began with the neural networks investigations of Warren S. McCulloch and Walter Pitts in 1943. Today paradigms of finite-state constructs can be seen everywhere: turnstiles, traffic signal controllers, automated teller machines, auto-mated telephone service, garage door openers, household appliances, and coin-operated machines such as vending machines and slot machines. Finite-state machines significantly assist the study of formal languages; for example, a machine can be designed (or a program developed) that determines if an input string over the alphabet {a,b} contains abba as a substring. (The string babaabbaba does, while abaaba does not.) This type of machine produces no output, but instead tells whether or not the input string has a certain property. (Example 11.26 explores this.) Some machines, however, produce output values. For instance, adding two binary numbers requires the input of two numbers, and yields their sum as the output (see Example 11.42). Such a machine, a finite-state automaton, is described in Section 11.4. Since all finite-state automata must recognize particular languages, for-mal languages and types of grammars become important. This chapter explores formal languages, and how automata and formal languages are related, as well as other interesting questions such as: • How do we determine if a string of characters contains a certain substring? • How do we simulate an automatic teller machine? 733 734 Chapter 11 Formal Languages and Finite-State Machines • Can we develop a program that accepts two binary numbers, adds them bit by bit, and outputs their sum? • What sort of languages are accepted by finite-state automata? 11.1 Formal Languages We now continue our study of formal languages, begun in Section 2.1. The language of sets plays an important role in the study, as we saw in Chapter 2.
Index pages curate the most relevant extracts from our library of academic textbooks. They’ve been created using an in-house natural language model (NLM), each adding context and meaning to key research topics.