<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://debianws.lexgopc.com/wiki143/index.php?action=history&amp;feed=atom&amp;title=Concurrent_Pascal</id>
	<title>Concurrent Pascal - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://debianws.lexgopc.com/wiki143/index.php?action=history&amp;feed=atom&amp;title=Concurrent_Pascal"/>
	<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=Concurrent_Pascal&amp;action=history"/>
	<updated>2026-05-04T16:39:16Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>http://debianws.lexgopc.com/wiki143/index.php?title=Concurrent_Pascal&amp;diff=4247965&amp;oldid=prev</id>
		<title>imported&gt;VulcanSphere: Adding short description: &quot;Programming language&quot; (Shortdesc helper)</title>
		<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=Concurrent_Pascal&amp;diff=4247965&amp;oldid=prev"/>
		<updated>2022-04-28T05:14:59Z</updated>

		<summary type="html">&lt;p&gt;Adding &lt;a href=&quot;https://en.wikipedia.org/wiki/Short_description&quot; class=&quot;extiw&quot; title=&quot;wikipedia:Short description&quot;&gt;short description&lt;/a&gt;: &amp;quot;Programming language&amp;quot; (&lt;a href=&quot;https://en.wikipedia.org/wiki/Shortdesc_helper&quot; class=&quot;extiw&quot; title=&quot;wikipedia:Shortdesc helper&quot;&gt;Shortdesc helper&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Short description|Programming language}}&lt;br /&gt;
{{Infobox programming language&lt;br /&gt;
| name = Concurrent Pascal&lt;br /&gt;
| logo = &lt;br /&gt;
| paradigms = [[Imperative programming|Imperative]], [[Structured programming|structured]], [[Concurrent computing|concurrent]]&lt;br /&gt;
| family = [[Niklaus Wirth|Wirth]] [[Pascal (programming language)|Pascal]]&lt;br /&gt;
| designers = [[Per Brinch Hansen]]&lt;br /&gt;
| released = {{Start date and age|1974|04}}&lt;br /&gt;
| latest release version = &lt;br /&gt;
| latest release date = &lt;br /&gt;
| typing = [[Type system|Static and dynamic]], [[Type system#Strong and weak typing|strong]], [[Type system#Safely and unsafely typed systems|safe]]&lt;br /&gt;
| scope = &lt;br /&gt;
| programming language = &lt;br /&gt;
| platform = [[Digital Equipment Corporation|DEC]] [[PDP 11]]&lt;br /&gt;
| operating system = &lt;br /&gt;
| license = &lt;br /&gt;
| file ext = &lt;br /&gt;
| file format = &amp;lt;!-- or: | file formats = --&amp;gt;&lt;br /&gt;
| website = &amp;lt;!-- {{URL|www.example.com}} --&amp;gt;&lt;br /&gt;
| implementations = &lt;br /&gt;
| dialects = &lt;br /&gt;
| influenced by = [[ALGOL 60]], [[Simula]] 67, [[Pascal (programming language)|Pascal]]&lt;br /&gt;
| influenced = &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Concurrent Pascal&amp;#039;&amp;#039;&amp;#039; is a [[programming language]] designed by [[Per Brinch Hansen]] for writing [[concurrent computing]] programs such as [[operating system]]s and [[real-time computing]] monitoring systems on [[shared memory]] computers.&amp;lt;ref&amp;gt;{{Cite journal |url=http://brinch-hansen.net/papers/1975a.pdf |title=The programming language Concurrent Pascal |last=Brinch Hansen |first=Per |date=June 1975 |journal=IEEE Transactions on Software Engineering |issue=2 |doi=10.1109/tse.1975.6312840 |pages=199–207}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A separate language, &amp;#039;&amp;#039;Sequential Pascal&amp;#039;&amp;#039;, is used as the language for applications programs run by the operating systems written in Concurrent Pascal. Both languages are extensions of [[Niklaus Wirth]]&amp;#039;s [[Pascal (programming language)|Pascal]], and share a common threaded code [[Interpreter (computing)|interpreter]].&amp;lt;ref name=&amp;quot;:0&amp;quot;&amp;gt;{{Cite book |title=The Architecture of Concurrent Programs |last=Brinch Hansen |first=Per |publisher=Prentice Hall |year=1977 |isbn=978-0-13-044628-2 }}&amp;lt;/ref&amp;gt; The following describes how Concurrent Pascal differs from Wirth&amp;#039;s Pascal.&lt;br /&gt;
&lt;br /&gt;
==Language description==&lt;br /&gt;
Several constructs in Pascal were removed from Concurrent Pascal for simplicity and security:&amp;lt;ref name=&amp;quot;:0&amp;quot; /&amp;gt;&lt;br /&gt;
*Variant records&lt;br /&gt;
*[[Goto]] statement, and labels&lt;br /&gt;
*[[Subroutine|Procedures as parameter]]s&lt;br /&gt;
*[[Data structure alignment|Packed array]]s&lt;br /&gt;
*[[Pointer (computer programming)|Pointer types]]&lt;br /&gt;
*File types, and associated standard [[input/output]] procedures&lt;br /&gt;
&lt;br /&gt;
These omissions make it possible to guarantee, by a combination of compile-time checks and minimal run-time checking in the threaded-code interpreter, that a program can not damage itself or another program by addressing outside its allotted space.&lt;br /&gt;
&lt;br /&gt;
Concurrent Pascal includes class, monitor, and process data types. Instances of these types are declared as variables, and initialized in an &amp;lt;code&amp;gt;[[init]]&amp;lt;/code&amp;gt; statement.&lt;br /&gt;
&lt;br /&gt;
Classes and monitors are similar: both package private variables and procedures with public procedures (called procedure entries). A class instance can be used by only one process, whereas a monitor instance may be shared by processes. Monitors provide the only mechanism for interprocess communication in a Concurrent Pascal program.&lt;br /&gt;
&lt;br /&gt;
Only one process can execute within a given monitor instance at a time. A built in data type, the queue, together with operations &amp;lt;code&amp;gt;delay&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;continue&amp;lt;/code&amp;gt;, are used for scheduling within monitors. Each variable of type queue can hold one process. If many processes are to be delayed in a monitor, multiple queue variables, usually organized as an array, must be provided. The single process queue variable gives a monitor full control over medium-term scheduling, but the programmer is responsible for unblocking the correct process.&lt;br /&gt;
&lt;br /&gt;
A process, like a class or monitor, has local variables, procedures, and an initial statement, but has no procedure entries. The initial statement ordinarily executes forever, calling local procedures, class procedures, and monitor procedures. Processes communicate through monitor procedures.  Language rules prevent deadlock by imposing a hierarchy on monitors. But nothing can prevent a monitor from erroneously forgetting to unblock a delayed process (by not calling continue) so the system can still effectively hang up through programming errors.&lt;br /&gt;
&lt;br /&gt;
The configuration of processes, monitors, and classes in a Concurrent Pascal program is normally established at the start of execution, and is not changed thereafter. The communication paths between these components are established by variables passed in the &amp;lt;code&amp;gt;init&amp;lt;/code&amp;gt; statements, since class and monitor instance variables cannot be used as procedure parameters.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
The following example shows the declaration of a simple monitor, and its use by two communicating processes.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;componentpascal&amp;quot;&amp;gt;&lt;br /&gt;
type&lt;br /&gt;
    &amp;quot;Bounded buffer monitor&amp;quot;&lt;br /&gt;
    buffer = Monitor&lt;br /&gt;
        var&lt;br /&gt;
            saved         : Integer;  &amp;quot;saved item is an integer&amp;quot;&lt;br /&gt;
            fullq, emptyq : Queue;    &amp;quot;used by only two processes&amp;quot;&lt;br /&gt;
            full          : Boolean;  &amp;quot;true if an item is saved:&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        &amp;quot;Puts item in buffer&amp;quot;&lt;br /&gt;
        procedure entry put(item : Integer);&lt;br /&gt;
            begin&lt;br /&gt;
               if full then&lt;br /&gt;
                   delay(fullq);      &amp;quot;block if full&amp;quot;&lt;br /&gt;
               saved := item;         &amp;quot;save the item&amp;quot;&lt;br /&gt;
               full := true;          &amp;quot;mark as full&amp;quot;&lt;br /&gt;
               continue(emptyq)       &amp;quot;unblock consumer&amp;quot;&lt;br /&gt;
            end;&lt;br /&gt;
&lt;br /&gt;
        &amp;quot;Gets item from the buffer&amp;quot;&lt;br /&gt;
        procedure entry get(var item : Integer);&lt;br /&gt;
            begin&lt;br /&gt;
               if not full then&lt;br /&gt;
                   delay(emptyq);     &amp;quot;block if empty&amp;quot;&lt;br /&gt;
               item := saved;         &amp;quot;get the item&amp;quot;&lt;br /&gt;
               full := false;         &amp;quot;mark as not full&amp;quot;&lt;br /&gt;
               continue(fullq)        &amp;quot;unblock producer&amp;quot;&lt;br /&gt;
            end;&lt;br /&gt;
&lt;br /&gt;
        &amp;quot;Initialize the monitor&amp;quot;&lt;br /&gt;
        begin&lt;br /&gt;
            full := false&lt;br /&gt;
        end;&lt;br /&gt;
&lt;br /&gt;
    &amp;quot;Producer uses a buffer&amp;quot;&lt;br /&gt;
    producer = process(pass : Buffer);&lt;br /&gt;
        var item : Integer;&lt;br /&gt;
        begin&lt;br /&gt;
            cycle                     &amp;quot;execute in a loop forever&amp;quot;&lt;br /&gt;
                &amp;quot;produce an item&amp;quot;&lt;br /&gt;
                pass.put(item)        &amp;quot;pass an item to the monitor&amp;quot;&lt;br /&gt;
            end&lt;br /&gt;
        end;&lt;br /&gt;
&lt;br /&gt;
    &amp;quot;Consumer uses a buffer&amp;quot;&lt;br /&gt;
    consumer = process(pass : Buffer);&lt;br /&gt;
        var item : Integer;&lt;br /&gt;
        begin&lt;br /&gt;
            cycle&lt;br /&gt;
                pass.get(item);       &amp;quot;get an item from the monitor&amp;quot;&lt;br /&gt;
                &amp;quot;consume the item&amp;quot;&lt;br /&gt;
            end&lt;br /&gt;
        end;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;declare instances of the monitor, producer, and consumer&amp;quot;&lt;br /&gt;
&amp;quot;give the producer and consumer access to the monitor&amp;quot;&lt;br /&gt;
var&lt;br /&gt;
   pass : Buffer;&lt;br /&gt;
   prod : Producer;&lt;br /&gt;
   cons : Consumer;&lt;br /&gt;
begin&lt;br /&gt;
   init pass,        &amp;quot;initialize the monitor&amp;quot;&lt;br /&gt;
        prod(pass),  &amp;quot;start the producer process&amp;quot;&lt;br /&gt;
        cons(pass)   &amp;quot;start the consumer process&amp;quot;&lt;br /&gt;
end.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
{{Reflist}}&lt;br /&gt;
&lt;br /&gt;
{{Pascal programming language family}}&lt;br /&gt;
{{Authority control}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Pascal programming language family]]&lt;br /&gt;
[[Category:Pascal (programming language)]]&lt;/div&gt;</summary>
		<author><name>imported&gt;VulcanSphere</name></author>
	</entry>
</feed>