Jump to content

Talk:Guarded Command Language

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
(Redirected from Talk:Guarded commands)

Wrong title?

[edit]

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

[edit]

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

Discussion

[edit]
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?

[edit]
  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?

[edit]
  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).

[edit]

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?

[edit]

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

[edit]

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

Why don't you just help to improve it? 131.155.204.185 (talk) 12:05, 23 October 2012 (UTC)[reply]

No compilers???

[edit]

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?

[edit]

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]

The article does explicitly state that it is not meant as an implementation language. I would not consider it pseudo code either, because its semantics are very strictly defined. So yes, mathematical notation for algorithms. Will need reference, though. 131.155.204.185 (talk) 12:02, 23 October 2012 (UTC)[reply]
[edit]

Hello fellow Wikipedians,

I have just modified one external link on Guarded Command Language. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:

When you have finished reviewing my changes, you may follow the instructions on the template below to fix any issues with the URLs.

This message was posted before February 2018. After February 2018, "External links modified" talk page sections are no longer generated or monitored by InternetArchiveBot. No special action is required regarding these talk page notices, other than regular verification using the archive tool instructions below. Editors have permission to delete these "External links modified" talk page sections if they want to de-clutter talk pages, but see the RfC before doing mass systematic removals. This message is updated dynamically through the template {{source check}} (last update: 5 June 2024).

  • If you have discovered URLs which were erroneously considered dead by the bot, you can report them with this tool.
  • If you found an error with any archives or the URLs themselves, you can fix them with this tool.

Cheers.—InternetArchiveBot (Report bug) 05:23, 15 December 2017 (UTC)[reply]