PROSA (programming language)

from Wikipedia, the free encyclopedia
PROSE
Paradigms : imperative , structured
Publishing year: 1981
Developer: Jacques Loeckx , Kurt Mehlhorn , Reinhard Wilhelm
Typing : strong , static
Influenced by: ALGOL , Pascal

PROSA ( PRO grammierssprache SA arbrücken) is an imperative programming language developed in the mid-1980s by Jacques Loeckx , Kurt Mehlhorn and Reinhard Wilhelm at the Saarland University in Saarbrücken , whose application is primarily in the field of teaching and the analysis of programs.

General

PROSA is a derived form of the Pascal programming language and therefore also from ALGOL . Due to the simple structure and readability of the programs, PROSA is well suited as a teaching language for beginners. The structure of the language and many of its concepts are to a large extent very similar to Pascal, but for reasons of simplification new aspects unknown in Pascal such as dynamic or nested arrays have been incorporated.

syntax

Hello World

A Hello World program in PROSA could look like this:

program Hallo_Welt;
begin
    print "Hallo Welt";
end.

variables

Due to the strong and static typing, each variable must have exactly one of five data types when it is defined .

Data type values
int Integers ( 0, 37, 5)
real Real numbers ( 0.0, 1.5, 37.25)
char Characters ( 'a', 'b', '+')
string Words ( "A", "PROSA", " ")
bool Truth values ​​( true, false)

Control structures

Conditional statements

If-then-else statements are used for branched program structures.

if x >= 0.0 then print "Zahl ist positiv"
            else print "Zahl ist negativ"
fi

grind

In contrast to other programming languages ​​such as ALGOL 60 or Pascal, PROSA only has while loops and no do or for loops. The reason for this is that the last two loop types can be viewed as special cases of the while loop and can be substituted by them in many cases.

program Schleifen;
var x, y: integer;
begin x := 0; y := 10;
	while x < y do x := x + 1 od
end.

use

PROSA is mainly used at German-speaking universities because, due to its simple structure, it is not only suitable for beginners, but above all for the theoretical analysis of program properties such as runtime and termination. The simple grammar of the language can also be used when testing compilers or as a basis for your own, simple programming languages.

Individual evidence

  1. a b c d e Jacques Loeckx, Kurt Mehlhorn, Reinhard Wilhelm: Fundamentals of programming languages . Springer-Verlag, 2013, ISBN 978-3-322-94706-2 ( google.com [accessed May 30, 2016]).
  2. a b Friedrich Otto: The programming language ePROSA: syntax, context conditions and semantics. (PDF) (No longer available online.) Archived from the original on May 30, 2016 ; accessed on May 30, 2016 . Info: The archive link was inserted automatically and has not yet been checked. Please check the original and archive link according to the instructions and then remove this notice. @1@ 2Template: Webachiv / IABot / www.theory.informatik.uni-kassel.de
  3. ^ The While Programming Language. (PDF) Retrieved May 30, 2016 .
  4. Michael Eulenstein: Generation of portable compilers: The portable system POCO . Springer-Verlag, 2013, ISBN 978-3-642-73431-1 ( google.com [accessed May 30, 2016]).
  5. ^ Stefan Neis: Brief description of orders. Retrieved May 30, 2016 .