Jump to content

Talk:Guarded Command Language: Difference between revisions

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Content deleted Content added
No edit summary
Line 79: Line 79:
I wrote a full compiler for this language in the final year of computer studies degree at Southampton University back in 1987. Written in YACC, it compiled down to p-code for interpretation, or native 68020 which ran on one of our Unix boxes. Ran very nicely on the old text terminals of the day! I even wrote a simple finite-state language parser for it - just to prove you could do 'real' computation with it. I was going to augment it with Parnas' it-ti construct, but ran out of time. So sorry, but at least one compiler does (did) exist!
I wrote a full compiler for this language in the final year of computer studies degree at Southampton University back in 1987. Written in YACC, it compiled down to p-code for interpretation, or native 68020 which ran on one of our Unix boxes. Ran very nicely on the old text terminals of the day! I even wrote a simple finite-state language parser for it - just to prove you could do 'real' computation with it. I was going to augment it with Parnas' it-ti construct, but ran out of time. So sorry, but at least one compiler does (did) exist!
[[Special:Contributions/164.129.1.42|164.129.1.42]] ([[User talk:164.129.1.42|talk]]) 11:22, 29 June 2009 (UTC)
[[Special:Contributions/164.129.1.42|164.129.1.42]] ([[User talk:164.129.1.42|talk]]) 11:22, 29 June 2009 (UTC)

== Pseudocode? Programming language? ==

The article doesn't make clear whether this is intended as an implementable programming language, a pseudo-code specification, or a mathematical/logical notation for describing algorithms. Seems to be a pseudo-code, but the article should explicitly mention this. — [[Special:Contributions/138.100.74.81|138.100.74.81]] ([[User talk:138.100.74.81|talk]]) 09:47, 11 June 2012 (UTC)

Revision as of 09:47, 11 June 2012

WikiProject iconComputing Start‑class
WikiProject iconThis article is within the scope of WikiProject Computing, a collaborative effort to improve the coverage of computers, computing, and information technology on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
StartThis article has been rated as Start-class on Wikipedia's content assessment scale.
???This article has not yet received a rating on the project's importance scale.
WikiProject iconComputer science Start‑class Mid‑importance
WikiProject iconThis article is within the scope of WikiProject Computer science, a collaborative effort to improve the coverage of Computer science related articles on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
StartThis article has been rated as Start-class on Wikipedia's content assessment scale.
MidThis article has been rated as Mid-importance on the project's importance scale.
Things you can help WikiProject Computer science with:

Wrong title?

Guarded Commands are building blocks of the Guarded Command Language, not the name of the language. Reference: EWD472 The Dutch version of this article already uses the name Guarded Command Language. I'm not a regular contributor, and only vaguely familiar with guidelines for such changes. Can someone review this? DaanS 15:00, 10 March 2006 (UTC)[reply]

Requested move


Add *Support or *Oppose followed by an optional one-sentence explanation, then sign your opinion with ~~~~

Discussion

Add any additional comments
  • You can do the move without formal vote or administrator intervention as it's not highly controversial and the target page doesn't exist. However, we could discuss why the proposed name would be more appropriate. In the given paper, my eyes didn't catch the phrase "Guarded Command Language". FOLDOC has an article on "Dijkstra's guarded command language". --TuukkaH 20:12, 10 March 2006 (UTC)[reply]
I was unsure about controversiality since Guarded Commands is commonly used to name the language even though it's incorrect as far as I know. EWD472 doesn't use Guarded Command Language, but does state that Guarded Commands are building blocks. The main problem is that, as far as I know, the language was never "officially" named by it's creator -DaanS 21:37, 10 March 2006 (UTC)[reply]
If the language wasn't named officially, wouldn't the commonly used name make sense? Guarded Commands as an abbreviation for the Language of guarded commands doesn't sound incorrect to me. --TuukkaH 22:53, 10 March 2006 (UTC)[reply]
Actually, both are commonly used names. My problems with Guarded Commands are (1) ambiguity between the language and the construct, and (2) the use of Guarded Command Language to denote the language by Dijkstra's former peers at the Eindhoven University of Technology. I'll admit though that (2) is easily countered. -DaanS 00:05, 11 March 2006 (UTC)[reply]

Well, consensus here on the move or not? —Nightstallion (?) 09:01, 15 March 2006 (UTC)[reply]

Ok, moved as proposed. --TuukkaH 11:21, 15 March 2006 (UTC)[reply]

The usage of "=" and ":=" seems inconsistent, leading to confusion. Dijkstra used ":=" exclusively for assignment ("becomes") and he used the symbol "=" exclusively for the assertion of equality, thus avoiding confusion. --User: RobertH 18:25, 11 August 2006 (UTC)[reply]

Agreed, and fixed. --81.77.124.59 13:25, 2 December 2006 (UTC)[reply]

is this if necessary?

  test -> expression

is same as if

   test-> expression

fi is there *any* reason to keep if fi pair if C as the conditino is already a test ;) ? and it seems like only in blocks where is cycle it is needed;) 84.16.123.194 (talk) 02:32, 31 January 2008 (UTC)[reply]

is this if necessary?

  test -> expression

is same as

 if
   test-> expression
 fi

is there *any* reason to keep if fi pair if C as the conditino is already a test ;) ? and it seems like only in blocks where is cycle it is needed;) 84.16.123.194 (talk) 02:33, 31 January 2008 (UTC) hey why this if fi is not in do od thing:) the idea about having it all in blocks is neat but it is kind of not constistent here in wikiarticle + you might share few characters(6;) by removing unnecessary if fi thing + you would not clone it (~ i am cloning here myself ;) i am gonna change it. comment it somehow then 84.16.123.194 (talk) 02:37, 31 January 2008 (UTC)[reply]

Yes, it is necessary, that is simply the syntax. test -> expression is not the same as if test-> expression fi!

if G  S fi

is equal to abort if G ≡ False, but

G  S

just by itself is undefined. You can only use G S inside either an if..fi or do..od construct.85.145.103.163 (talk) 18:31, 23 May 2008 (UTC)[reply]

This repetition ends when b = 0, in which case the variables hold the solution to Bézout's identity: xa + yb = gcd(a,b).

This gives rather a broad scope to a and y - since apparently x = 1. Somehow the usefulness of Bézout's identity needs additional clarification. presumably what is intended is xA + yB = gcd(A,B) —Preceding unsigned comment added by J.Dering (talkcontribs) 07:51, 7 July 2008 (UTC)[reply]

Operators?

If you read for instance the paper on smoothsort, you see that Dijkstra uses various operators in his expressions - obvious arithmetic ones like +, -, . (meaning multiplication), / and mod, but also what appear to be two logical operators, cor and cand. I assume these are the familiar or and and. A later paper of Dijkstra's uses the same names (albeit in a quite different context) to refer to the 'conditional and' and 'conditional or', in which if the first operand is false or true respectively, the second one is ignored - somewhat like the && and || operators in C-family languages. I assume that smoothsort's cor and cand are the same as Rubin's cor and cand (even though in the Rubin paper he concludes those operators "are better avoided"!).

Anyway, my point is that the description of GCL is incomplete without a list of operators that can be used in expressions. Did Dijkstra ever provide one, or did he use operators willy-nilly and just expect people to understand them? —Preceding unsigned comment added by 93.96.235.0 (talk) 22:23, 13 April 2009 (UTC)[reply]

Quality of this article

This article is very poorly written, which is ironic, given Dijkstra's VERY high standards. I suggest that it be deleted.

No compilers???

I wrote a full compiler for this language in the final year of computer studies degree at Southampton University back in 1987. Written in YACC, it compiled down to p-code for interpretation, or native 68020 which ran on one of our Unix boxes. Ran very nicely on the old text terminals of the day! I even wrote a simple finite-state language parser for it - just to prove you could do 'real' computation with it. I was going to augment it with Parnas' it-ti construct, but ran out of time. So sorry, but at least one compiler does (did) exist! 164.129.1.42 (talk) 11:22, 29 June 2009 (UTC)[reply]

Pseudocode? Programming language?

The article doesn't make clear whether this is intended as an implementable programming language, a pseudo-code specification, or a mathematical/logical notation for describing algorithms. Seems to be a pseudo-code, but the article should explicitly mention this. — 138.100.74.81 (talk) 09:47, 11 June 2012 (UTC)[reply]