MCPcopy Index your code
hub / github.com/Whiley/WhileyCompiler

github.com/Whiley/WhileyCompiler @v0.10.18

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.10.18 ↗ · + Follow
9,256 symbols 23,129 edges 79 files 818 documented · 9%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Overview

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 compiler is responsible for turning whiley source files into wyil intermediate language files. The compiler doesn't generate JavaScript or other binary code, as these aspects are handled by other components (e.g. the Whiley JavaScript backend).

Installation

The easiest way to get started with Whiley is by running it in your web-browser on whileylabs.com. To run Whiley from the command-line (e.g. wy build), see instructions for installing the Whiley Build Tool. You can find more information about Whiley at whiley.org.

Contributing

When making a contribution to the Whiley project, you will need to first sign-off the developers certificate of origin. Please see the CONTRIBUTORS file for more details.

Documentation

An overview of the compiler's architecture is provided in ARCHITECTURE.md.

Extension points exported contracts — how you extend this code

Stmt (Interface)
Provides classes for representing statements in Whiley's source language. Examples include assignments , for-lo [14 implementers]
src/main/java/wyil/lang/WyilFile.java
LVal (Interface)
Represents an arbitrary expression permissible on the left-hand side of an assignment statement. For example, consid [8 …
src/main/java/wyil/lang/WyilFile.java
Expr (Interface)
Represents an arbitrary expression within a Whiley source file. Every expression has a known type and zero or more expre [34 …
src/main/java/wyil/lang/WyilFile.java
UnaryOperator (Interface)
Represents an abstract operator expression over exactly one operand expression . For example, !x is a [25 implementers]
src/main/java/wyil/lang/WyilFile.java
BinaryOperator (Interface)
Represents an abstract operator expression over exactly two operand expressions . For example, x &lt;&lt; 1< [41 implementers]
src/main/java/wyil/lang/WyilFile.java

Core symbols most depended-on inside this repo

get
called by 466
src/main/java/wyil/util/Subtyping.java
add
called by 363
src/main/java/wyil/interpreter/AbstractSemantics.java
size
called by 309
src/main/java/wyil/util/Subtyping.java
getName
called by 188
src/main/java/wyil/interpreter/AbstractSemantics.java
getOperand
called by 171
src/main/java/wyil/lang/WyilFile.java
getFirstOperand
called by 171
src/main/java/wyil/lang/WyilFile.java
getSecondOperand
called by 162
src/main/java/wyil/lang/WyilFile.java
get
called by 158
src/main/java/wycc/lang/Syntactic.java

Shape

Method 8,894
Class 294
Interface 59
Enum 9

Languages

Java100%

Modules by API surface

src/test/java/wyil/testing/RecursiveSubtypeTests.java3,724 symbols
src/test/java/wyil/testing/RecordSubtypeTest.java1,767 symbols
src/main/java/wyil/lang/WyilFile.java952 symbols
src/test/java/wyil/testing/ArraySubtypeTest.java259 symbols
src/main/java/wyil/util/AbstractTranslator.java184 symbols
src/main/java/wyc/io/WhileyFileParser.java176 symbols
src/main/java/wyil/check/FlowTypeCheck.java157 symbols
src/main/java/wyil/interpreter/ConcreteSemantics.java148 symbols
src/main/java/wyil/interpreter/Interpreter.java131 symbols
src/main/java/wycc/util/AbstractCompilationUnit.java116 symbols
src/main/java/wyil/util/AbstractVisitor.java113 symbols
src/main/java/wyil/util/AbstractFunction.java112 symbols

For agents

$ claude mcp add WhileyCompiler \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact