Content deleted Content added
m decapitalized common noun, adjusted wikilink |
BrainStack (talk | contribs) Link suggestions feature: 3 links added. |
||
(37 intermediate revisions by 25 users not shown) | |||
Line 1:
{{Short description|Concurrent programming language}}
{{Distinguish|OCaml}}
{{lowercase title|occam (programming language)}} {{Infobox programming language
| name = occam
| logo = 1983 1988 Trademark occam and occam 2 INMOS Limited.jpg
| paradigm = [[
| designer = [[David May (computer scientist)|David May]]
| released = {{Start date and age|1983}}
▲|developer = [[INMOS]]
| latest release version = 2.1 (official), 2.5 (unofficial), 3 (not fully implemented)
| latest release date =
| typing =
| implementations =
| dialects = [[occam-π]] (pi)
|
| influenced = [[Ease (programming language)|Ease]], [[Go (programming language)|Go]], [[Python (programming language)|Python]]
}}
'''occam''' is a [[
==Overview==
In the following examples indentation and formatting are critical for parsing the code: expressions are terminated by the end of the line, lists of expressions need to be on the same level of indentation. This feature, named the [[off-side rule]], is also found in other languages such as [[
Communication between processes work through named ''[[Channel (programming)|channels]]''. One process outputs data to a channel via
keyboard ? c
Line 30 ⟶ 31:
screen ! c
SEQ
Line 36 ⟶ 37:
y := x * x
PAR
Line 42 ⟶ 43:
q()
ALT
Line 58 ⟶ 59:
out ! count2
This will read data from channels c1 or c2 (whichever is ready) and pass it into a merged channel. If countN reaches 100, reads from the corresponding channel will be disabled. A request on the status channel is answered by outputting the counts to <code>out</code>.
==Language revisions==
[[File:1983 Programming manual occam by INMOS Limited.jpg|thumb|1983 "occam" by INMOS Limited]]
===occam 1===
===occam 2===
With this revision, occam became a language
===occam 2.1===
occam 2.1 introduced several new features to occam 2, including:
*Named data types (DATA TYPE x IS y)
*Named
*Packed
*Relaxation of some of the [[type conversion]] rules
*New operators (e.g. BYTESIN)
*Channel retyping and channel arrays
*Ability to return fixed-length array from function.
For a full list of the changes see Appendix P of the [http://www.wotug.org/occam/documentation/oc21refman.pdf
===occam-π===
*[[Nesting (computing)|Nested]] [[Protocol (object-oriented programming)|protocols]]
*Run-time process creation
*Mobile channels, data, and processes
*[[
*Protocol [[Inheritance (object-oriented programming)|inheritance]]
*
*Extended [[
==See also==
* The
* [[Concurrent computing#Languages supporting concurrent programming|Concurrent programming languages]]
▲*The [[XC Programming Language]], which is based on occam but with C-style syntax.
* [[
==References==
Line 105:
==Further reading==
*{{cite book |title=Communicating Process Architectures 2007
*{{cite book |title=Communicating Process Architectures 2006
*{{cite book |title=Communicating Process Architectures 2005
*{{cite book |
*{{cite book |
*Egorov, A., Technical University
== External links ==
* Information, compilers, editors and utilities at the [http://www.wotug.org/occam/ WoTUG occam pages].▼
* Compilers, documentation, examples, projects and utilities at the [http://www.wotug.org/parallel/occam/ Internet Parallel Computing Archive] (no longer maintained).▼
* Occam books on [http://www.transputer.net/obooks/obooks.asp Transputer.net].▼
▲* [http://www.wotug.org/occam/ Information, compilers, editors and utilities at the
▲* [http://www.wotug.org/parallel/occam/ Compilers, documentation, examples, projects and utilities at the
* [http://www.cs.kent.ac.uk/projects/ofa/kroc/ The occam-pi language].
* [http://projects.cs.kent.ac.uk/projects/tock/trac/ Tock occam compiler]
{{Authority control}}
[[Category:Concurrent programming languages]]
[[Category:Procedural programming languages]]
|