Jana (computer science)

from Wikipedia, the free encyclopedia

Jana ( J ava-Based A bstract N otation for A lgorithms) is listed on the programming language Java ajar description language for the formulation of algorithms , known as a pseudo-code . It has been used at the Johannes Kepler University Linz in the algorithm introductory event since 2003.

notation

The main differences to the Java programming language are the addition of Pascal- like language constructs, a classification of function parameters and the non-formal specification of some common pseudo-code constructs or concepts.

Repeat loops and Pascal array declarations have been added as Pascal syntax elements. An example of a non-formal specification of a common pseudo-code concept is that the type of a parameter can be written in, but does not have to be written in if it is clear or irrelevant for the solution. Another example is allowing arbitrary expressions in case distinction statements. Function parameters are annotated with preceding arrows. They show whether it is a so-called input (↓), output (↑) or transition parameter (↕).

Example:

List sort ( ↓List l ) {
  Anweisungen
  return sorted_list
}

Syntax highlighting

Some kind of syntax highlighting is often expected for presentation in documents or on websites . For Jana, too, there is an extension for the often used software package pygments for this use. Although it is still under development, the pygments-jana extension can already be used to highlight Jana's own syntax elements.

Individual evidence

  1. http://ssw.jku.at/Teaching/Lectures/Algo/Jana.pdf
  2. Welcome! - Pygments. Accessed March 15, 2018 .
  3. Max Heisinger: maxi maximum / pygments-jana. Accessed March 15, 2018 .