fbpx
Wikipedia

Language primitive

In computing, language primitives are the simplest elements available in a programming language. A primitive is the smallest 'unit of processing' available to a programmer of a given machine, or can be an atomic element of an expression in a language.

Primitives in the visual programming language DRAKON

Primitives are units with a meaning, i.e., a semantic value in the language. Thus they are different from tokens in a parser, which are the minimal elements of syntax.

Machine-level primitives edit

A machine instruction, usually generated by an assembler program, is often considered the smallest unit of processing although this is not always the case. It typically performs what is perceived to be one operation such as copying a byte or string of bytes from one computer memory location to another or adding one processor register to another.

Microcode primitives edit

Many of today's computers, however, actually embody an even lower unit of processing known as microcode which interprets the machine code and it is then that the microcode instructions would be the genuine primitives. These instructions would typically be available for modification only by the hardware vendor's programmers.

High-level language primitives edit

A high-level programming language (HLL) program is composed of discrete statements and primitive data types that may also be perceived to perform a single operation or represent a single data item, but at a higher semantic level than those provided by the machine. Copying a data item from one location to another may actually involve many machine instructions that, for instance,

before finally

  • performing the final store operation to the target destination.

Some HLL statements, particularly those involving loops, can generate thousands or even millions of primitives in a low-level programming language (LLL), which comprise the genuine instruction path length the processor has to execute at the lowest level. This perception has been referred to as the abstraction penalty.[1][2][3]

Interpreted language primitives edit

An interpreted language statement has similarities to the HLL primitives, but with a further added layer. Before the statement can be executed in a manner very similar to an HLL statement: it must first be processed by an interpreter, a process that may involve many primitives in the target machine language.

Fourth and fifth-generation language primitives edit

Fourth-generation programming languages (4GL) and fifth-generation programming languages (5GL) do not have a simple one-to-many correspondence from high-to-low level primitives. There are some elements of interpreted language primitives embodied in 4GL and 5GL specifications, but the approach to the original problem is less a procedural language construct and are more oriented toward problem solving and systems engineering.

See also edit

References edit

  1. ^ Surana P (2006). "Meta-Compilation of Language Abstractions" (PDF). (PDF) from the original on 2015-02-17. Retrieved 2008-03-17.
  2. ^ Kuketayev. . Archived from the original on 2009-01-11. Retrieved 2008-03-17.
  3. ^ Chatzigeorgiou; Stephanides (2002). "Evaluating Performance and Power Of Object-Oriented Vs. Procedural Programming Languages". In Blieberger; Strohmeier (eds.). Proceedings - 7th International Conference on Reliable Software Technologies - Ada-Europe'2002. Springer. p. 367. ISBN 978-3-540-43784-0.

language, primitive, confused, with, language, construct, computing, language, primitives, simplest, elements, available, programming, language, primitive, smallest, unit, processing, available, programmer, given, machine, atomic, element, expression, language. Not to be confused with Language construct In computing language primitives are the simplest elements available in a programming language A primitive is the smallest unit of processing available to a programmer of a given machine or can be an atomic element of an expression in a language Primitives in the visual programming language DRAKONPrimitives are units with a meaning i e a semantic value in the language Thus they are different from tokens in a parser which are the minimal elements of syntax Contents 1 Machine level primitives 2 Microcode primitives 3 High level language primitives 4 Interpreted language primitives 5 Fourth and fifth generation language primitives 6 See also 7 ReferencesMachine level primitives editA machine instruction usually generated by an assembler program is often considered the smallest unit of processing although this is not always the case It typically performs what is perceived to be one operation such as copying a byte or string of bytes from one computer memory location to another or adding one processor register to another Microcode primitives editMany of today s computers however actually embody an even lower unit of processing known as microcode which interprets the machine code and it is then that the microcode instructions would be the genuine primitives These instructions would typically be available for modification only by the hardware vendor s programmers High level language primitives editA high level programming language HLL program is composed of discrete statements and primitive data types that may also be perceived to perform a single operation or represent a single data item but at a higher semantic level than those provided by the machine Copying a data item from one location to another may actually involve many machine instructions that for instance calculate the address of both operands in memory based on their positions within a data structure convert from one data type to anotherbefore finally performing the final store operation to the target destination Some HLL statements particularly those involving loops can generate thousands or even millions of primitives in a low level programming language LLL which comprise the genuine instruction path length the processor has to execute at the lowest level This perception has been referred to as the abstraction penalty 1 2 3 Interpreted language primitives editAn interpreted language statement has similarities to the HLL primitives but with a further added layer Before the statement can be executed in a manner very similar to an HLL statement it must first be processed by an interpreter a process that may involve many primitives in the target machine language Fourth and fifth generation language primitives editFourth generation programming languages 4GL and fifth generation programming languages 5GL do not have a simple one to many correspondence from high to low level primitives There are some elements of interpreted language primitives embodied in 4GL and 5GL specifications but the approach to the original problem is less a procedural language construct and are more oriented toward problem solving and systems engineering See also editPrimitive type Hardware software codesignReferences edit Surana P 2006 Meta Compilation of Language Abstractions PDF Archived PDF from the original on 2015 02 17 Retrieved 2008 03 17 Kuketayev The Data Abstraction Penalty DAP Benchmark for Small Objects in Java Archived from the original on 2009 01 11 Retrieved 2008 03 17 Chatzigeorgiou Stephanides 2002 Evaluating Performance and Power Of Object Oriented Vs Procedural Programming Languages In Blieberger Strohmeier eds Proceedings 7th International Conference on Reliable Software Technologies Ada Europe 2002 Springer p 367 ISBN 978 3 540 43784 0 Retrieved from https en wikipedia org w index php title Language primitive amp oldid 1175627634, wikipedia, wiki, book, books, library,

article

, read, download, free, free download, mp3, video, mp4, 3gp, jpg, jpeg, gif, png, picture, music, song, movie, book, game, games.