Content deleted Content added
Tide rolls (talk | contribs) m Reverted edits by 220.226.191.108 to last revision by 92.198.61.236 (HG) |
|||
(90 intermediate revisions by 48 users not shown) | |||
Line 1:
{{short description|Style of computer programming}}
In [[computer science]], '''
== Historical movement ==
The first paper usually<ref name="Standish1975">Standish, Thomas A., "[https://pdfs.semanticscholar.org/7f11/082b409647e8d50dadd3a369a10278b5890f.pdf Extensibility in Programming Language Design]", ''SIGPLAN Notices'' 10 no. 7 (July 1975), pp. 18–21.</ref><ref name="Sammet1969">Sammet, Jean E., ''Programming Languages: History and Fundamentals'', Prentice-Hall, 1969, section III.7.2</ref> associated with the extensible programming language movement is
=== Character of the historical movement ===
As typically envisioned, an extensible
The most prominent language-extension technique used in the movement was macro definition.
<blockquote>any programming language in which programs and data are essentially interchangeable can be regarded as an extendible [sic] language.
At the 1969 conference, [[Simula]] was presented as an extensible
Standish described three classes of language extension, which he
* [[Paraphrase]] defines a facility by showing how to exchange it for something
* Orthophrase adds features to a language that could not be achieved using the base language, such as adding an
* Metaphrase modifies the interpretation rules used for pre-existing expressions.
▲* Orthophrase adds features to a language that could not be achieved using the base language, such as adding an i/o system to a base language that previously had no i/o primitives. Extensions must be understood as orthophrase ''relative'' to some given base language, since a feature not defined in terms of the base language must be defined in terms of some other language. Orthophrase corresponds to the modern notion of [[plug-ins]].
▲* Metaphrase modifies the interpretation rules used for pre-existing expressions. It corresponds to the modern notion of [[Reflection (computer science)|reflection]].
=== Death of the historical movement ===
Standish attributed the failure of the extensibility movement to the difficulty of programming successive extensions.
Despite the earlier presentation of Simula as extensible, by 1975, Standish's survey does not seem in practice to have included the newer abstraction-based technologies (though he used a very general definition of extensibility that technically could have included them).
== Modern movement ==
In the modern sense, a system that supports extensible programming will provide ''all'' of the features described below{{Citation needed|reason=Reliable source needed for this definition|date=October 2017}}.
=== Extensible syntax ===
This simply means that the source language(s) to be compiled must not be closed, fixed, or static. It must be possible to add new keywords, concepts, and structures to the source language(s). Languages which allow the addition of constructs with user defined syntax include [[Coq (software)|Coq]],<ref>{{Cite web |title=Syntax extensions and notation scopes – Coq 8.17.0 documentation |url=https://coq.inria.fr/refman/user-extensions/syntax-extensions.html |access-date=2023-05-25 |website=coq.inria.fr}}</ref> [[Racket (programming language)|Racket]], [[Camlp4]], [[OpenC++ (software tool)|OpenC++]], [[Seed7]],<ref name="Zingaro2007">Zingaro, Daniel, "[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.69.2848&rep=rep1&type=pdf Modern Extensible Languages]", SQRL Report 47 McMaster University (October 2007), page 16.</ref> [[Red (programming language)|Red]], [[Rebol]], and [[Felix (programming language)|Felix]]. While it is acceptable for some fundamental and intrinsic language features to be immutable, the system must not rely solely on those language features. It must be possible to add new ones.
=== Extensible compiler ===
In extensible programming, a compiler is not a monolithic program that converts source code input into binary executable output. The compiler itself must be extensible to the point that it is really a collection of plugins that assist with the translation of source language input into ''anything''. For example, an extensible compiler will support the generation of object code, code documentation, re-formatted source code, or any other desired output. The architecture of the compiler must permit its users to "get inside" the compilation process and provide alternative processing tasks at every reasonable step in the compilation process.
For just the task of translating source code into something that can be executed on a computer, an extensible compiler should:
*
* determine which language or language variant is being compiled and locate the appropriate plug-in to recognize and validate that language
* use formal language specifications to syntactically and structurally validate arbitrary source languages
* assist with the semantic validation of arbitrary source languages by invoking an appropriate validation plug-in
* allow users to select from different kinds of code generators so that the resulting executable can be targeted for different processors, operating systems, virtual machines, or other execution environment.
Line 45:
* allow new values in nodes of the AST,
* allow new kinds of edges between nodes,
* support the transformation of the input AST, or portions thereof, by some external "pass"
* support the translation of the input AST, or portions thereof, into another form by some external "pass"
* assist with the flow of information between internal and external passes as they both transform and translate the AST into new ASTs or other representations
Line 58:
Extensible programming systems must support the debugging of programs using the constructs of the original source language regardless of the extensions or transformation the program has undergone in order to make it executable. Most notably, it cannot be assumed that the only way to display runtime data is in ''structures'' or ''arrays''. The debugger, or more correctly 'program inspector', must permit the display of runtime data in forms suitable to the source language. For example, if the language supports a data structure for a [[business process]] or [[work flow]], it must be possible for the debugger to display that data structure as a [[fishbone chart]] or other form provided by a plugin.
==
* [[Camlp4]]
* Felix
* [[Nemerle]]
* [[Seed7]]
* [[Rebol]]
** [[Red (programming language)|Red]]
* [[Ruby (programming language)|Ruby]] ([[metaprogramming]])
* [[IMP (programming language)|IMP]]
* OpenC++
* [[XL (programming language)|XL]]
* [[XML]]
* [[Forth (programming language)|Forth]]
* [[Factor (programming language)|Factor]]
* [[Lisp (programming language)|Lisp]]
** [[Racket (programming language)|Racket]]
** [[Scheme (programming language)|Scheme]]
* [[Lua (programming language)|Lua]]
* [[PL/I]]
* [[Smalltalk]]
== See also ==
▲* [[:Category:Extensible syntax programming languages]]
* [[Adaptive grammar]]
* [[Concept programming]]
* [[Dialecting]]
* [[Grammar-oriented programming]]
* [[Language-oriented programming]]
* [[Homoiconicity]]
== References ==
{{Reflist}}
== External links ==
=== General ===
# [https://web.archive.org/web/20050209071400/http://www.acmqueue.com/modules.php?name=Content&pa=showpage&pid=247&page=1 Greg Wilson's Article in ACM Queue]
# [http://developers.slashdot.org/article.pl?sid=05/01/18/2157249&from=rss Slashdot Discussion]
# [http://www.cas.mcmaster.ca/sqrl/papers/SQRLreport47.pdf Modern Extensible Languages] {{Webarchive|url=https://web.archive.org/web/20110612014339/http://www.cas.mcmaster.ca/sqrl/papers/SQRLreport47.pdf |date=2011-06-12}} – A paper from [[Daniel Zingaro]]
=== Tools ===
# [http://www.meta-language.net/ MetaL]
# [
# [http://www.jetbrains.com/mps/ MPS]
=== Languages with extensible syntax ===
# [https://openzz.sourceforge.net/ OpenZz]
# [http://cs.nyu.edu/rgrimm/xtc/ xtc – eXTensible C]
# [https://github.com/pannous/english-script English-script]
# [https://web.archive.org/web/20050622032429/http://nemerle.org/Macros Nemerle Macros]▼
# [https://web.archive.org/web/20050817205802/http://boo.codehaus.org/Syntactic+Macros Boo Syntactic Macros]▼
# [https://web.archive.org/web/20061022071450/http://suif.stanford.edu/ Stanford University Intermediate Format compiler]▼
# [https://github.com/chrisseaton/katahdin Katahdin] – a language with syntax and semantics that are mutable at runtime
# [http://www.pi-programming.org/What.html π] – a language with extensible syntax, implemented using an [[Earley parser]]
{{Types of programming languages}}
▲# [http://nemerle.org/Macros Nemerle Macros]
▲# [http://boo.codehaus.org/Syntactic+Macros Boo Syntactic Macros]
▲# [http://suif.stanford.edu/ Stanford University Intermediate Format compiler]
▲# [http://seed7.sourceforge.net/ Seed7 - The extensible programming language]
{{DEFAULTSORT:Extensible Programming}}
[[Category:Extensible syntax programming languages]]
[[Category:Programming paradigms]]
|