Content deleted Content added
HeyElliott (talk | contribs) Clean up/copyedit |
|||
Line 28:
The '''Cyclone''' [[programming language]] is intended to be a safe dialect of the [[C (programming language)|C language]]. Cyclone is designed to avoid [[buffer overflow]]s and other vulnerabilities that are possible in C programs, without losing the power and convenience of C as a tool for [[system programming]].
Cyclone development was started as a joint project of [[AT&T Labs]] Research and [[Greg Morrisett]]'s group at [[Cornell University]] in 2001. Version 1.0 was released on May 8, 2006.<ref>{{cite web |title=Cyclone |url=http://www.cs.cornell.edu/Projects/cyclone/ |website=[[Cornell University]]}}</ref>
==Language features==
Line 35:
* [[Pointer arithmetic]] is limited
* Pointers must be initialized before use (this is enforced by [[definite assignment analysis]])
* [[Dangling pointer]]s are prevented through region analysis and limits on
* Only "safe" casts and unions are allowed
* [[Control flow|<code>goto</code>]] into scopes is disallowed
* [[Control flow|<code>switch</code>]] labels in different scopes are disallowed
* Pointer-returning functions must execute <code>return</code>
* [[Setjmp
To maintain the tool set that C programmers are used to, Cyclone provides the following extensions:
Line 55:
For a better high-level introduction to Cyclone, the reasoning behind Cyclone and the source of these lists, see [http://www.cs.umd.edu/projects/cyclone/papers/cyclone-safety.pdf this paper].
Cyclone looks, in general, much like
===Pointer types===
Line 109:
}
</syntaxhighlight>
<syntaxhighlight lang="C">
char *itoa(int i)
Line 119:
}
</syntaxhighlight>
Cyclone does regional analysis of each segment of code, preventing dangling pointers, such as the one returned from this version of <code>itoa</code>. All of the local variables in a given scope are considered to be part of the same region, separate from the heap or any other local region. Thus, when analyzing <code>itoa</code>, the Cyclone compiler would see that <code>z</code> is a pointer into the local stack, and would report an error.
Line 131:
==External links==
* [http://cyclone.thelanguage.org/ Cyclone
* [https://web.archive.org/web/20111227232825/http://www.eecs.harvard.edu/~greg/cyclone/old_cyclone.html Old web site]
* [http://cyclone.thelanguage.org/wiki/Download Cyclone -
* [http://cyclone.thelanguage.org/wiki/Frequently%20Asked%20Questions Cyclone - FAQ]
* [http://cyclone.thelanguage.org/wiki/Cyclone%20for%20C%20Programmers Cyclone for C programmers]
* [http://cyclone.thelanguage.org/wiki/User%20Manual Cyclone
* [http://www.cs.umd.edu/~mwh/papers/cyclone-cuj.pdf Cyclone: a Type-safe Dialect of C] by Dan Grossman, Michael Hicks, Trevor Jim, and Greg Morrisett - published January 2005
|