Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Guarded Command Language
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Dijkstra notation with non-deterministic conditionals}} The '''Guarded Command Language''' ('''GCL''') is a [[programming language]] defined by [[Edsger Dijkstra]] for [[predicate transformer semantics]] in EWD472.<ref name="EWD472">{{cite web | last=Dijkstra | first=Edsger W | authorlink=E. W. Dijkstra | url=http://www.cs.utexas.edu/users/EWD/ewd04xx/EWD472.PDF | title=EWD472: Guarded commands, non-determinacy and formal. derivation of programs. | accessdate=August 16, 2006 }}</ref> It combines programming concepts in a compact way. It makes it easier to develop a program and its proof hand-in-hand, with the proof ideas leading the way; moreover, parts of a program can actually be ''calculated''. An important property of '''GCL''' is [[Nondeterministic programming|nondeterminism]]. For example, in the if-statement, several alternatives may be true, and the choice is made at runtime, when the if-statement is executed. This frees the programmer from having to make unnecessary choices and is an aid in the formal development of programs. '''GCL''' includes the multiple assignment statement. For example, execution of the statement {{code|1= x, y:= y, x}} is done by first evaluating the righthand side values and then storing them in the lefthand variables. Thus, this statement swaps the values of {{mono|x}} and {{mono|y}}. The following books discuss the development of programs using '''GCL''': *{{cite book|ref=none|first=Edsger W. |last=Dijkstra |author-link=Edsger W. Dijkstra |title=A Discipline of Programming |url=https://archive.org/details/disciplineofprog0000dijk |url-access=registration |publisher=Prentice Hall |year=1976 |isbn=978-0132158718}} *{{Cite book |last=Gries |first=D. |author-link=David Gries |date=1981 |title=The Science of Programming |series=Monographs in Computer Science |publisher=Springer Verlag |url=https://link.springer.com/book/10.1007/978-1-4612-5983-1 |location=New York |doi=10.1007/978-1-4612-5983-1 |isbn=978-0-387-96480-5 |s2cid=37034126 |language=English, Spanish, Japanese, Chinese, Italian, Russian}} *{{Cite book |last1=Dijkstra |first1=Edsger W. |author-link1=Edsger W. Dijkstra |last2=Feijen |first2=Wim H.J. |date=1988 |pages=200 |title=A Method of Programming |series= |publisher=Addison-Wesley Longman Publishing Co., Inc. |url=https://dl.acm.org/doi/book/10.5555/576038 |location=Boston, MA |isbn=978-0-201-17536-3}} *{{Cite book |last=Kaldewaij |first=Anne |date=1990 |title=Programming: the derivation of algorithms |series= |publisher=Prentice-Hall, Inc. |url=https://dl.acm.org/doi/10.5555/98158 |isbn=0132041081}} *{{Cite book |last=Cohen |first=Edward |date=1990 |title=Programming in the 1990s: An introduction to the calculation of programs |series=Texts and Monographs in Computer Science |editor=[[David Gries]] |publisher=Springer Verlag |doi=10.1007/978-1-4613-9706-9 |url=https://link.springer.com/book/10.1007/978-1-4613-9706-9 |isbn=978-1-4613-9706-9|s2cid=1509875 }}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)