Table of Contents
1 Introduction
1.1 Acknowledgements
2 Cyclone for C Programmers
2.1 Getting Started
2.2 Pointers
2.3 Regions
2.4 Tagged Unions and Datatypes
2.5 Exceptions
2.6 Additional Features of Cyclone
2.7 GCC and C99 Additions
2.8 Tuples
2.9 Creating Arrays
2.10 Subtyping
2.11 Let Declarations
2.12 Polymorphic Functions
2.13 Polymorphic Data Structures
2.14 Abstract and Existential Types
2.15 Restrictions
3 Pointers
3.1 Pointer Subtyping
3.2 Pointer Coercions
3.3 Default Region Qualifiers
3.4 Static Expression Bounds
4 Tagged Unions and Datatypes
4.1 Tagged Unions
4.2 Datatypes
4.3 Extensible Datatypes
5 Pattern Matching
5.1 Let Declarations
5.2 Pattern Forms
5.3 Switch Statements
6 Type Inference
7 Polymorphism
8 Memory Management Via Regions
8.1 Introduction
8.2 Allocation
8.3 Common Uses
8.4 Dynamic Regions
8.5 Using Unique Pointers
8.5.1 Simple Unique Pointers
8.5.2 Aliasing Unique Pointers
8.5.3 Nested Unique Pointers
8.5.4 Polymorphic Region Allocation
8.6 Type-Checking Regions
8.6.1 Region Names
8.6.2 Capabilities
8.6.3 Assignment and Outlives
8.6.4 Type Declarations
8.6.5 Function Calls
8.6.6 Explicit and Default Effects
9 Namespaces
10 Varargs
11 Definite Assignment
12 Advanced Features
12.1 Existential Types
12.2 The Truth About Effects, Capabilities, and Region Bounds
12.3 Interprocedural Memory Initialization
A Porting C code to Cyclone
A.1 Semi-Automatic Porting
A.2 Manually Translating C to Cyclone
A.3 Interfacing to C
B Frequently Asked Questions
C Libraries
C.1 C Libraries
C.2
<array.h>
C.3
<bitvec.h>
C.4
<buffer.h>
C.5
<core.h>
C.6
<dict.h>
C.7
<filename.h>
C.8
<fn.h>
C.9
<hashtable.h>
C.10
<iter.h>
C.11
<list.h>
C.12
<pp.h>
C.13
<queue.h>
C.14
<rope.h>
C.15
<set.h>
C.16
<slowdict.h>
C.17
<xarray.h>
D Grammar
E Installing Cyclone
F Tools
F.1 The compiler
F.2 The lexer generator
F.3 The parser generator
F.4 The allocation profiler,
aprof
F.5 The C interface tool,
buildlib