Knowledge (XXG)

occam (programming language)

Source 📝

31: 360: 397:
With this revision, occam became a language able to express 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, so there is an existence proof that reasonably sized, useful programs could be
342:
ALT count1 < 100 & c1 ? data SEQ count1 := count1 + 1 merged ! data count2 < 100 & c2 ? data SEQ count2 := count2 + 1 merged ! data status ? request SEQ out ! count1 out !
413:
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, but the language was never fully implemented in a compiler.
338:
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:
346:
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
246:
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
379:'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. 530: 234:, 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 894: 889: 884: 504: 498: 409:
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
481: 314:
introduces a list of expressions that are evaluated sequentially. This is not implicit as it is in most other programming languages. Example:
779: 759: 746: 739: 786: 766: 623: 190: 150: 808: 635: 606: 581: 30: 394:
support, functions, multi-dimensional arrays and more data types such as varying sizes of integers (INT16, INT32) and bytes.
376: 216: 63: 256: 212: 170: 492: 359: 162: 104: 510: 166: 460:
is the common name for the occam variant implemented by later versions of the Kent Retargetable occam Compiler (
630:. 22nd World Occam and Transputer User Group Technical Meeting. Keele, United Kingdom: IOS Press. p. 219. 334: 208: 205: 47: 43: 679: 264: 852:
Compilers, documentation, examples, projects and utilities at the Internet Parallel Computing Archive
525: 282: 186: 182: 130: 51: 38: 478: 871:– (translator from occam to C from Kent) a Haskell-based compiler for occam and related languages. 70: 276:. Input and output cannot proceed until the other end is ready to accept or offer data. (In the 804: 775: 755: 735: 631: 602: 577: 194: 800: 793: 470:(pi) to the occam name is an allusion to KRoC occam including several ideas inspired by the 198: 692: 553: 444: 58: 658: 391: 231: 193:(CSP) process algebra, and shares many of its features. It is named after philosopher 878: 474:. It contains several significant extensions to the occam 2.1 compiler, for example: 471: 248: 868: 286:
on the channel. However, the program will neither spin nor poll; thus terms like
818: 466: 862: 857: 822: 707: 456: 375:(released 1983) was a preliminary version of the language which borrowed from 228: 224: 137: 522:
The XC programming language, which is based on occam but with C-style syntax.
323:
begins a list of expressions that may be evaluated concurrently. Example:
851: 302:
other independent processes from running.) Examples (c is a variable):
252: 847:
Information, compilers, editors and utilities at the WoTUG occam pages
110:
2.1 (official), 2.5 (unofficial), 3 (not fully implemented) / 1994
298:
may also convey the behaviour; also in the context that it will not
665: 358: 235: 220: 75: 17: 417:
occam 2.1 introduced several new features to occam 2, including:
461: 846: 628:
Architectures, Languages and Techniques for Concurrent Systems
708:"occam-pi: Blending the best of CSP and the pi-calculus" 390:
is an extension produced by Inmos Ltd in 1987 that adds
833:
Egorov, A., Technical University – Sofia, (1983–2011)
657:
Barrett, Geoff; Ericsson-Zenith, Steven (1992-03-31).
531:
List of concurrent and parallel programming languages
443:
For a full list of the changes see Appendix P of the
772:
Communicating Process Architectures 2005 – WoTUG-28
752:
Communicating Process Architectures 2006 – WoTUG-29
732:
Communicating Process Architectures 2007 – WoTUG-30
439:
Ability to return fixed-length array from function.
262:Communication between processes work through named 156: 144: 129: 103: 81: 69: 57: 37: 792: 829:. Programming Research Group, Oxford University. 561:. SGS-Thomson Microelectronics Ltd. 1995-05-12. 430:Relaxation of some of the type conversion rules 227:, as the native programming language for their 795:Transputer and Occam Research: New Directions 8: 548: 546: 268:. One process outputs data to a channel via 23: 251:, is also found in other languages such as 317:SEQ x := x + 1 y := x * x 22: 706:Barnes, Fred; Welch, Peter (2006-01-14). 624:"Occam on Field-Programmable Gate Arrays" 398:written in occam 1, despite its limits). 774:. IOS Press. 2005. pp. 405 pages. 754:. IOS Press. 2006. pp. 391 pages. 734:. IOS Press. 2007. pp. 513 pages. 622:Cook, Barry M; Peel, RMA (1999-04-11). 542: 280:case it is often said that the process 688: 677: 895:Programming languages created in 1983 7: 489:Mobile channels, data, and processes 436:Channel retyping and channel arrays 421:Named data types (DATA TYPE x IS y) 272:while another one inputs data with 191:communicating sequential processes 151:Communicating sequential processes 14: 835:Записки по Компютърни архитектури 890:Procedural programming languages 885:Concurrent programming languages 597:Ericsson-Zenith, Steven (1988). 526:Concurrent programming languages 445:Inmos occam 2.1 Reference Manual 29: 464:). The addition of the symbol 223:(trademark INMOS), advised by 1: 858:Occam books on Transputer.net 827:The Laws of Occam Programming 823:Hoare, Charles Antony Richard 363:1983 "occam" by INMOS Limited 433:New operators (e.g. BYTESIN) 791:Kerridge, Jon, ed. (1993). 626:. In Cook, Barry M. (ed.). 563:Inmos document 72 occ 45 03 112:; 30 years ago 87:; 41 years ago 911: 659:"occam 3 Reference Manual" 555:occam 2.1 Reference Manual 15: 486:Run-time process creation 161: 149: 136: 125: 99: 28: 599:occam 2 Reference Manual 574:occam Programming Manual 16:Not to be confused with 576:. Prentice-Hall. 1984. 215:). It was developed by 854:(no longer maintained) 819:Roscoe, Andrew William 799:. IOS Press. pp.  687:Cite journal requires 364: 863:The occam-pi language 362: 332:specifies a list of 183:programming language 869:Tock occam compiler 82:First appeared 25: 365: 355:Language revisions 326:PAR p() q() 305:keyboard ? c 211:language (such as 189:and builds on the 781:978-1-58603-561-7 761:978-1-58603-671-3 741:978-1-58603-767-3 601:. Prentice-Hall. 195:William of Ockham 176: 175: 902: 830: 814: 798: 785: 765: 745: 718: 717: 715: 714: 703: 697: 696: 690: 685: 683: 675: 673: 672: 663: 654: 648: 647: 645: 644: 619: 613: 612: 594: 588: 587: 570: 564: 562: 560: 550: 350: 331: 322: 313: 308:screen ! c 275: 271: 120: 118: 113: 95: 93: 88: 59:Designed by 33: 26: 910: 909: 905: 904: 903: 901: 900: 899: 875: 874: 843: 817: 811: 790: 782: 770: 762: 750: 742: 730: 727: 725:Further reading 722: 721: 712: 710: 705: 704: 700: 686: 676: 670: 668: 661: 656: 655: 651: 642: 640: 638: 621: 620: 616: 609: 596: 595: 591: 584: 572: 571: 567: 558: 552: 551: 544: 539: 519: 453: 404: 385: 370: 357: 348: 344: 329: 327: 320: 318: 311: 309: 306: 273: 269: 244: 232:microprocessors 121: 116: 114: 111: 91: 89: 86: 21: 12: 11: 5: 908: 906: 898: 897: 892: 887: 877: 876: 873: 872: 866: 860: 855: 849: 842: 841:External links 839: 838: 837: 831: 815: 809: 788: 780: 768: 760: 748: 740: 726: 723: 720: 719: 698: 689:|journal= 649: 636: 614: 607: 589: 582: 565: 541: 540: 538: 535: 534: 533: 528: 523: 518: 515: 514: 513: 507: 501: 495: 490: 487: 484: 452: 449: 441: 440: 437: 434: 431: 428: 427:Packed records 425: 422: 403: 400: 392:floating-point 384: 381: 369: 366: 356: 353: 341: 325: 316: 307: 304: 278:not proceeding 243: 240: 219:and others at 174: 173: 159: 158: 154: 153: 147: 146: 142: 141: 134: 133: 127: 126: 123: 122: 109: 107: 105:Stable release 101: 100: 97: 96: 83: 79: 78: 73: 67: 66: 61: 55: 54: 41: 35: 34: 13: 10: 9: 6: 4: 3: 2: 907: 896: 893: 891: 888: 886: 883: 882: 880: 870: 867: 864: 861: 859: 856: 853: 850: 848: 845: 844: 840: 836: 832: 828: 824: 820: 816: 812: 810:0-8247-0711-7 806: 802: 797: 796: 789: 787: 783: 777: 773: 769: 767: 763: 757: 753: 749: 747: 743: 737: 733: 729: 728: 724: 709: 702: 699: 694: 681: 667: 660: 653: 650: 639: 637:90-5199-480-X 633: 629: 625: 618: 615: 610: 608:0-13-629312-3 604: 600: 593: 590: 585: 583:0-13-629296-8 579: 575: 569: 566: 557: 556: 549: 547: 543: 536: 532: 529: 527: 524: 521: 520: 516: 512: 508: 506: 502: 500: 496: 494: 491: 488: 485: 483: 480: 477: 476: 475: 473: 469: 468: 463: 459: 458: 450: 448: 446: 438: 435: 432: 429: 426: 424:Named records 423: 420: 419: 418: 415: 412: 408: 401: 399: 395: 393: 389: 382: 380: 378: 374: 367: 361: 354: 352: 340: 337: 336: 324: 315: 303: 301: 297: 293: 289: 285: 284: 279: 267: 266: 260: 258: 254: 250: 249:off-side rule 241: 239: 237: 233: 230: 226: 222: 218: 214: 210: 207: 202: 200: 199:Occam's razor 196: 192: 188: 184: 180: 172: 168: 164: 160: 155: 152: 148: 145:Influenced by 143: 139: 135: 132: 128: 124: 108: 106: 102: 98: 84: 80: 77: 74: 72: 68: 65: 62: 60: 56: 53: 49: 45: 42: 40: 36: 32: 27: 19: 834: 826: 794: 771: 751: 731: 711:. Retrieved 701: 680:cite journal 669:. Retrieved 652: 641:. Retrieved 627: 617: 598: 592: 573: 568: 554: 505:constructors 465: 455: 454: 442: 416: 410: 406: 405: 396: 387: 386: 372: 371: 345: 333: 328: 319: 310: 299: 295: 291: 287: 281: 277: 263: 261: 245: 204:occam is an 203: 178: 177: 499:inheritance 197:after whom 879:Categories 713:2006-11-24 671:2008-03-24 643:2016-11-28 537:References 511:rendezvous 472:π-calculus 229:transputer 225:Tony Hoare 209:procedural 206:imperative 201:is named. 187:concurrent 157:Influenced 52:concurrent 48:procedural 44:Imperative 801:253 pages 509:Extended 497:Protocol 493:Recursion 482:protocols 407:occam 2.1 402:occam 2.1 377:David May 217:David May 185:which is 71:Developer 64:David May 825:(1986). 517:See also 265:channels 242:Overview 131:Dialects 39:Paradigm 457:occam-π 451:occam-π 411:occam 3 388:occam 2 383:occam 2 373:occam 1 368:occam 1 343:count2 335:guarded 253:Haskell 138:occam-π 115: ( 90: ( 807:  778:  758:  738:  634:  605:  580:  503:Array 479:Nested 283:blocks 257:Python 213:Pascal 171:Python 666:Inmos 662:(PDF) 559:(PDF) 300:block 296:yield 236:Inmos 221:Inmos 181:is a 179:occam 76:Inmos 24:occam 18:OCaml 805:ISBN 776:ISBN 756:ISBN 736:ISBN 693:help 632:ISBN 603:ISBN 578:ISBN 462:KRoC 292:hang 288:wait 255:and 163:Ease 140:(pi) 117:1994 92:1983 85:1983 349:out 330:ALT 321:PAR 312:SEQ 294:or 881:: 821:; 803:. 684:: 682:}} 678:{{ 664:. 545:^ 447:. 351:. 290:, 259:. 238:. 169:, 167:Go 165:, 50:, 46:, 865:. 813:. 784:. 764:. 744:. 716:. 695:) 691:( 674:. 646:. 611:. 586:. 467:π 274:? 270:! 119:) 94:) 20:.

Index

OCaml

Paradigm
Imperative
procedural
concurrent
Designed by
David May
Developer
Inmos
Stable release
Dialects
occam-π
Communicating sequential processes
Ease
Go
Python
programming language
concurrent
communicating sequential processes
William of Ockham
Occam's razor
imperative
procedural
Pascal
David May
Inmos
Tony Hoare
transputer
microprocessors

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.