Студопедия

Главная страница Случайная страница

КАТЕГОРИИ:

АвтомобилиАстрономияБиологияГеографияДом и садДругие языкиДругоеИнформатикаИсторияКультураЛитератураЛогикаМатематикаМедицинаМеталлургияМеханикаОбразованиеОхрана трудаПедагогикаПолитикаПравоПсихологияРелигияРиторикаСоциологияСпортСтроительствоТехнологияТуризмФизикаФилософияФинансыХимияЧерчениеЭкологияЭкономикаЭлектроника






Basic types of programming languages






 

Read the following words and word combinations and use them for understanding and translation of the text:

 

assignment statement – инструкция присваивания

imperative language – императивный язык, процедурный язык

iterative – итеративный, повторный

simulation package – пакет имитационного моделирования

functional, or applicative language – язык функционального программирования, аппликативный язык

conciseness – краткость

to be consistent with – согласовываться с...

overhead - затраты

dispatching – диспетчеризация, управление

to enhance – усиливать

drag-and-drop – буксировка, перетаскивание

control flow – управляющая логика, поток управления

declaration – объявление, описание

query – запрос

to retrieve data – извлекать данные

custom tags – пользовательские теги

data encryption – шифрование данных

gate model – модель логической схемы на вентильном уровне

quantum cellular automata – квантовая сотовая автоматика

to be embedded into – встроенный в...

insofar – в такой степени...

 

The basic architecture of computers has had a profound effect on language design. Most of the popular languages of the past 50 years have been designed around the von Neumann architecture. These languages are called imperative languages.

Because of the von Neumann architecture, the central features of imperative languages are variables, assignment statements, and the iterative form of repetition. In these languages an algorithm is specified in great detail, and the specific order of execution of the instructions or statements must be included.

The syntax and the semantics of the imperative languages are very complex. In an imperative language, the programmer must make a static division of the program into its concurrent parts, which are then written as tasks. Concurrent execution in imperative language can be a complicated process. The most efficient imperative languages are C and FORTRAN.

An imperative language uses a sequence of statements to determine how to reach a certain goal. These statements are said to change the state of the program as each one is executed in turn.

 

All the languages we have discussed have one trait in common: the basic statement is the assignment statement which commands the computer to move data from one place to another. This is actually a relatively low level of abstraction compared to the level of the problems we want to solve with computers. Newer languages prefer to describe a problem and let the computer figure out how to solve it, rather than specifying in great detail how to move data around.

Modern software packages are really highly abstract programming languages. An application generator lets you describe a series of screen and database structures, and then automatically creates the low-level commands needed to implement the program. Similarly, spreadsheets, desktop publishing software, simulation packages and so on have extensive facilities for abstract programming.

It should be obvious that programs in an abstract, non-imperative language cannot hope to be as efficient as hand-coded C programs. Non-imperative languages are to be preferred whenever a software system must search through large amounts of data, or solve problems whose solution cannot be precisely described. Examples are: language processing (translation, style checking), pattern matching (vision, genetics) and process optimization (scheduling). As implementation techniques improve and as it becomes ever more difficult to develop reliable software systems in ordinary languages, these languages will become more widespread.

A functional, or applicative, language is one in which the primary means of computation is applying functions to given parameters. Programming can be done in a functional language without the kind of variables that are used in imperative languages, without assignment statements, and without iteration. This makes the syntax and the semantics of the functional languages simple compared to that of the imperative languages.

Programs in functional languages can be divided into concurrent parts dynamically, by the execution system, making the process highly adaptable to the hardware on which it is running. The closeness of functional programming to mathematics, while resulting in conciseness and elegance, may in fact make functional programming languages less accessible to many programmers.

The most prominent among these languages are: LISP, COMMON LISP, and Scheme, which is widely used to teach functional programming.

In the early days of programming several very influential languages were designed and implemented that had one characteristic in common: the languages each had a preferred data structure and an extensive set of operations for the preferred structure. These languages made it possible to create sophisticated programs that were otherwise difficult to write in languages such as FORTRAN that simply manipulated computer words.

Data-oriented languages are somewhat less popular than they once were, partly because by using object-oriented techniques it is possible to embed such data-oriented operations into ordinary languages like C++ and Ada, but also because of competition from newer language concepts like functional and logic programming. Nevertheless, the languages are technically interesting and quite practical for the programming tasks for which they were designed.

Object-oriented programming (OOP) is a method of structuring programs by identifying real world or other objects, and then writing modules each of which contains all the data and executable statements needed to represent one class of objects. Within such a module, there is a clear distinction between the abstract properties of the class which are exported for use by other objects, and the implementation which is hidden so that it can be modified without affecting the rest of the system.

C++ showed that it was possible to implement the entire machinery of OOP in a manner that is consistent with static allocation and type-checking, and with fixed overhead for dispatching; the dynamic requirements of OOP are used only as needed. Ada 95 based its support for OOP on ideas similar to those found in C++.

The latest step in the evolution of software development is object-oriented design. Object-oriented methodology begins with data abstraction, and adds inheritance and dynamic method binding. Inheritance greatly enhances the potential reuse of existing software, providing the possibility of significant increases in software development productivity. This is an important factor in the increase in the popularity of object-oriented languages, such as Smalltalk, Ada 95, Java, and C++.

Another kind of language, the visual language, forms subcategory of the imperative languages. The most popular visual language is Visual BASIC, which is now being replaced by Visual BASIC.NET. These languages include capabilities for drag-and-drop generation of code segments. The characterizing feature of a visual language provides a simple way to generate graphical user interfaces to programs.

Languages used for logic programming are called logic programming languages, or declarative languages, because programs written in them consist of declarations rather than assignments and control flow statements. These declarations are actually statements in symbolic logic.

Declarative semantics is considerably simpler than the semantics of the imperative languages.

Programming in a logic programming language is nonprocedural. Programs in such languages do not state exactly how a result is to be computed but rather describe the form of the result. The difference is that we assume the computer system can somehow determine how the result is to be computed. What is needed to provide this capability for logic programming languages is a concise means of supplying the computer with both the relevant information and a method of inference for computing the desired result.

Logic programming in general and Prolog language in particular are a natural match to the needs of implementing an RDBMS: only a single language is required, the deductive capability is built in.

Prolog can be used to construct expert systems. It can easily fulfill the basic needs of expert systems, using resolution as the basis for query processing, using its ability to add facts and rules to provide the learning capability, and using its trace facility to inform the user of the ‘reasoning’ behind a given result.

 

In recent years, a new category of languages has emerged, a mark-up/programming hybrid languages. Mark-up languages, including the most widely used mark-up language, XHTML, are not programming languages. They are used to specify the layout of information in Web documents.

Web Languages are used for creating and editing pages on the Web. They can do anything from putting plain text on Webpage, to accessing and retrieving data from a database and vary greatly in terms of power and complexity.

· HTML ( Hyper Text Markup Language) is the core language of the World Wide Web that is used to define the structure and layout of Web pages by using various tags and attributes. Although a fundamental language of the Web, HTML is static - content created with it does not change.

· HML ( Extensible Markup Language) works like HTML, but unlike HTML, allows for custom tags that are defined by programmers. XML allows for the transmission of data between applications and organizations through the use of its custom tags.

· Javascript is developed by Netscape used to provide dynamic and interactive content on Webpages. With Javascript it is possible to communicate with HTML, create animations, create calculators, validate forms, and more. Javascript is often confused with Java, but they are two different languages.

· PHP (Hypertext Preprocessor (it's a recursive acronym)) is a powerful language used for many tasks such as data encryption, database access, and form validation. PHP was originally created in 1994 by Rasmus Lerdorf.

· Java is a powerful and flexible language created by Sun MicroSystems that can be used to create applets (a program that is executed from within another program) that run inside Webpages as well as software applications. Things you can do with Java include interacting with the user, creating graphical programs, reading from files, and more. Java is often confused with Javascript, but they are two different languages.

 

Software languages are used for creating executable programs. They can create anything from simple console programs that print some text to the screen to entire operating systems and vary greatly in terms of power and complexity.

· C is an advanced programming language used for software application development. It has proven itself to be able to be used for various software applications such as business programs, engineering programs, and even games.

· C++ is a descendant of the C language. The difference between the two languages is that C++ is object-oriented. C++ is a very popular language for graphical applications.

· Visual Basic is a language developed by Microsoft based on the BASIC language. Visual Basic is used for creating Windows applications. The VBScript language (also developed by Microsoft) is based on Visual Basic.

 

Within the area of 'Quantum Computing' a new field of research has emerged: designing and realizing experimental ' Quantum Programming Languages ' (QPLs) complement the research fields of 'computational models' (gate model, one-way quantum computer, quantum cellular automata), 'error correction' and 'quantum algorithms'.

From a pragmatical point of view QPLs are formal systems, which serve as a means to control the execution of programs on a quantum computer or on a classical computer simulating a quantum computer. A possible model describing this scenario is Knill's QRAM model, which is based on the idea that the program proper runs on a classical computer which controls the quantum computer, i.e. which controls a device driving a quantum experiment.

QPLs can also be classified into the traditional categories of functional and imperative/object-oriented programming languages.

Just as with classical programming languages there are many more aspects on QPLs which are a matter of debate. A QPL could be designed as a completely new language or as an extension of an existing classical language. The extension itself could either be embedded into the classical language or be realized in form of a library.

One of the problems which language designers face is the relatively small number of quantum algorithms which could help to demonstrate the expressiveness of their language. Another open problem is the construction of high level structures analogous to the structures, which are nowadays common in all modern programming languages such as modules, abstract data types, etc. Up to now, quantum sublanguages of QPLs are still close to assembly languages insofar as they operate directly on registers of qubits.

 

 

Notes:

RDBMS (Relational Database Management System) – объектно-реляционная система управления базами данных компании Oracle.

Quantum gate – базовый элемент квантового компьютера, преобразующий входные данные кубитов в выходные по определенному закону

QRAM (Quantum Random Access Memory) – запоминающее устройство квантового компьютера

 

 


Поделиться с друзьями:

mylektsii.su - Мои Лекции - 2015-2026 год. (0.047 сек.)Все материалы представленные на сайте исключительно с целью ознакомления читателями и не преследуют коммерческих целей или нарушение авторских прав Пожаловаться на материал