-
Notifications
You must be signed in to change notification settings - Fork 35
Home
This wiki provides a general discussion for the WhileyCompiler. The intention is to facilitate discussions around how to improve its design.
The Whiley Compiler (WyC) is one component of the larger Whiley Build Tool. When you run wy build
on the command line, you are running the build tool which, in turn, runs the Whiley Compiler (amongst other things). The goal of the Whiley Compiler is to take one or more whiley
files along with zero or more wyil
files (i.e. package dependencies) and produce a single wyil
file. The wyil
format is the Whiley Intermediate Language which, roughly speaking, provides an Abstract Syntax Tree representation of the whiley
files. A key point here is that the compiler only produces wyil
files and does not, for example, generate JavaScript files or other executable formats (these are handled by other components of the build tool).
The Whiley Compiler is responsible for (amongst other things) parsing and type checking the Whiley files and will report errors if it finds them. The compiler employs a number of pipeline stages for doing various aspects of its work. For example, name resolution and flow type checking are two important stages in the compiler.