Jump to content

Vector Pascal

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Paulcockshott (talk | contribs) at 16:58, 17 February 2011. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Template:Unencyclopedic

Vector Pascal is an extension to Pascal programming language. It is designed to support elegant and efficient expression of algorithms using the SIMD model of computation. It imports into Pascal abstraction mechanisms derived from functional languages having their origins in APL programming language. In particular it extends all operators to work on vectors of data. The type system is also extended to handle pixels and dimensional analysis.

Supported Architectures

Standards

The syntax generally follows that of Turbo Pascal. It includes many features of Extended Standard ( ISO 8651-2:1988) and most Turbo Pascal standard (an extended Pascal standard was created as ISO/IEC 10206). For more details Click Vector Pascal Features [1]

Similarities with other compilers

The IO model and string model is derived from Turbo Pascal. The use of Schematic arrays is similar to that in Prospero Pascal.

V-Pascal is another pascal compiler that allows operations on array sections.

ZPL is a data parallel language that is in many ways similar to Vector Pascal, but which is targeted at supercomputers rather than workstations. Single Assignment C is an extension to C that has many similarities to the extensions to Pascal incorporated Vector Pascal.

Pascal Portability

A number of different approaches have been taken to portability of Pascal compilers in the past. The most significant of these was the p-code machine[2] which used an abstract stack machine. Interpreters or macro expanders were then used adapt this to specific machines. An example of this approach was the UCSD[3] compiler. Whilst this approach fitted quite well with early microprocessors in which the concrete machine was not so different from the abstract machine, it is less able to take advantage of modern architectures that have introduce SIMD parallelism, such as the MMX or Streaming SIMD Extensions series of instructionsets. There is a semantic gap between the capabilities of the real machines and the capability of the abstract machines with the real machines being significantly more powerful than the abstract ones. With machines like the [[Cell (microprocessor)]|Cell]> or the Knight's Corner this becomes even more pronounced as the underlying chips provide multiple parallel cores.

In the 1980s Susan Graham[4] pioneered an alternative approach to portability based on formal machine descriptions. The Vector Pascal compiler was initiated as an experimental attempt to apply Grahams techniques of formal machine description to modern parallel machines. The code generation strategy ) used is to translate the source program into an intermediate language which directly supports data parallelism and to describe the machines using the same language. Unification (computer science) based matching is then used to obtain code sequences for the specific machines.

Dimensioned Data Types

Types in programming languages are used to detect errors in programme design at compile time. Pascal was one of the first strongly typed languages. Dimensional Analysis is an analogous technique that is used in Physics to do sanity checks on formulae. The notion of dimension qualfies real numbers to say that a real number is for example a number of meters, or a number of meters per second.

Recent programming languages including Vector Pascal and the Fortress (programming language) provide support for dimensioned data types.

Performance

Pascal provides considerable speedups on vector loop based applications see performance [5]

References

  1. ^ Paul Cockshott, Glasgow Univeristy
  2. ^ p-code machine
  3. ^ UCSD Pascal
  4. ^ Susan L. Graham
  5. ^ Paul Cockshott, "Glasgow University"