Occam (programming language): Difference between revisions

Content deleted Content added
Template:Infobox programming language parameters: update, move, Template:Start date and age add. WP:LINKs: updates; add. WP:REFerence WP:CITation parameters: clarify, author note: must be person. WP:BADEMPHASIS MOS:BOLDs --> <code>s or WP:ITALICs. Small WP:EoS WP:COPYEDITs.
Line 4:
| name = occam
| logo =
| paradigm = [[Imperative programming|Imperative]], [[Procedural programming|procedural]], [[Concurrent computing|concurrent]]
| year = {{Start date and age|1983}}
| designer = [[David May (computer scientist)|David May]]
| developer = [[Inmos]]
| yearreleased = {{Start date and age|1983}}
| latest release version = 2.1 (official), 2.5 (unofficial), 3 (not fully implemented)
| latest release date = 1988+{{Start date and age|1994}}
| typing =
| implementations =
Line 17:
}}
 
'''occam''' is a [[programming language]] which is [[Concurrent computing|concurrent]] and builds on the [[communicating sequential processes]] (CSP) process algebra,<ref name="oc21refman">{{cite book |author=Inmos<!--Must be person--> |author-link=Inmos |url=http://www.wotug.org/occam/documentation/oc21refman.pdf |title=occam 2.1 Reference Manual |publisher=SGS-Thomson Microelectronics Ltd |format=PDF |date=1995-05-12}} Inmos document 72 occ 45 03</ref> and shares many of its features. It is named after philosopher [[William of Ockham]] for whom [[Occam's razor]] is named.
 
occam is an [[Imperative programming|imperative]] [[Procedural programming|procedural]] language (such as [[Pascal (programming language)|Pascal]]). It was developed by [[David May (computer scientist)|David May]] and others at [[Inmos]] (trademark INMOS), advised by [[Tony Hoare]], as the native programming language for their [[transputer]] [[microprocessor]]s, but implementations for other platforms are available. The most widely known version is occam 2; its programming manual was written by Steven Ericsson-Zenith and others at [[Inmos]].
Line 30:
screen ! c
 
'''<code>SEQ'''</code> introduces a list of expressions that are evaluated sequentially. This is not implicit as it is in most other programming languages. Example:
 
SEQ
Line 36:
y := x * x
 
'''<code>PAR'''</code> begins a list of expressions that may be evaluated concurrently. Example:
 
PAR
Line 42:
q()
 
'''<code>ALT'''</code> specifies a list of ''guarded'' commands. The ''guards'' are a combination of a boolean condition and an input expression (both optional). Each guard for which the condition is true and the input channel is ready is successful. One of the successful alternatives is selected for execution. Example:
 
ALT
Line 62:
==Language revisions==
===occam 1===
'''occam 1'''<ref name="oc1refman">{{cite book |author=Inmos<!--Must be person--> |author-link=Inmos |title=occam Programming Manual |publisher=Prentice-Hall |year=1984 |isbn=0-13-629296-8}}</ref> (released 1983) was a preliminary version of the language which borrowed from [[David May (computer scientist)|David May]]'s work on EPL and Tony Hoare's CSP. This supported only the VAR data type, which was an integral type corresponding to the native word length of the target architecture, and arrays of only one dimension.
 
===occam 2===
'''occam 2'''<ref name="oc2refman">{{cite book |last=Ericsson-Zenith |first=Steven |title=occam 2 Reference Manual |publisher=Prentice-Hall |year=1988 |isbn=0-13-629312-3}}</ref> is an extension produced by Inmos Ltd in 1987 that adds [[floating-point]] support, functions, multi-dimensional arrays and more data types such as varying sizes of integers (INT16, INT32) and bytes.
 
With this revision, occam became a language capableable ofto expressingexpress useful programs, whereas occam 1 was more suited to examining algorithms and exploring the new language (however, the occam 1 compiler was written in occam 1,<ref name="cook1">{{cite conference |url=https://books.google.co.uk/books?id=nvnnZtJWAZkC&dq=architectures+languages+and+techniques+barry+cook&source=gbs_navlinks_s |title= Occam on Field-Programmable Gate Arrays |last1=Cook |first1=Barry M |last2=Peel |first2=RMA |author-link= |date=1999-04-11 |conference=22nd World Occam and Transputer User Group Technical Meeting |conference-url= |editor-last=Cook |editor-first=Barry M. Cook |others= |volume= |edition= |book-title=Architectures, Languages and Techniques for Concurrent Systems |publisher= IOS Press |archive-url= |archive-date= |___location= Keele, United Kingdom |pages= |format= |id= |isbn= 90 5199 480 X |bibcode= |oclc= |doi= |quote= |ref= |postscript= |language= |page=219 |at= |trans-title= |access-date=2016-11-28}}</ref> so there is an existence proof that reasonably sized, useful programs could be written in occam 1, despite its limitationslimits).
 
===occam 2.1===
'''occam 2.1'''<ref name="oc21refman"/> was the last of the series of occam language developments contributed by Inmos. Defined in 1994, it was influenced by an earlier proposal for an '''occam 3''' language (also referred to as "occam91" during its early development) created by Geoff Barrett at Inmos in the early 1990s. A revised Reference Manual describing occam 3 was distributed for community comment,<ref name="occam3">{{cite journal |last1=Barrett |first1=Geoff |last2=Ericsson-Zenith |first2=Steven |title=occam 3 Reference Manual |url=http://www.wotug.org/occam/documentation/oc3refman.pdf |date=1992-03-31 |publisher=[[Inmos]] |format=PDF |access-date=2008-03-24}}</ref> but the language was never fully implemented in a compiler.
 
occam 2.1 introduced several new features to occam 2, including:
Line 84:
 
===occam-π===
'''[[occam-π]]'''<ref name="kroc">{{cite web |url=http://www.cs.kent.ac.uk/projects/ofa/kroc/ |title=occam-pi: Blending the best of CSP and the pi-calculus |last1=Barnes |first1=Fred |last2=Welch |first2=Peter |date=2006-01-14 |access-date=2006-11-24}}</ref> is the common name for the occam variant implemented by later versions of the Kent Retargetable occam Compiler ([[KRoC]]). The addition of the symbol ''[[Pi (letter)|π]]'' (pi) to the occam name is an allusion to KRoC occam including several ideas inspired by the [[piπ-calculus]]. It contains several significant extensions to the occam 2.1 compiler, for example:
*[[Nesting (computing)|Nested]] [[Protocol (object-oriented programming)|protocols]]
*Run-time process creation
*Mobile channels, data, and processes
*[[recursionRecursion (computer science)|Recursion]]
*Protocol [[Inheritance (object-oriented programming)|inheritance]]
*[[array data type|Array]] [[constructorConstructor (computerobject-oriented scienceprogramming)|constructors]]
*Extended [[synchronousBarrier rendezvous(computer science)|rendezvous]]
 
==See also==