Skip to content

Whiley is a programming language particularly suited to safety-critical systems. It is a hybrid object-oriented and functional programming language which employs extended static checking to eliminate errors at compile time, including divide-by-zero, array out-of-bounds and null dereference errors.

License

ejrh/Whiley

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

 __        ___     _ _                              
 \ \      / / |__ (_) | ___ _   _    ___  _ __ __ _ 
  \ \ /\ / /| '_ \| | |/ _ \ | | |  / _ \| '__/ _` |
   \ V  V / | | | | | |  __/ |_| |_| (_) | | | (_| |
    \_/\_/  |_| |_|_|_|\___|\__, (_)\___/|_|  \__, |
                            |___/             |___/ 

======================================================================
Introduction
======================================================================

Whiley is a programming language particularly suited to
safety-critical systems. It is a hybrid object-oriented and functional
programming language which employs extended static checking to
eliminate errors at compile time, including divide-by-zero, array
out-of-bounds and null dereference errors.  

Whiley compiles to the Java Virtual Machine and is fully
inter-operable with existing Java applications.  Whiley will operate
on any system that can run Java including Windows, Mac OS and Linux.
Whiley is released under the New BSD License --- see the LICENSE file
for more on this.

To find out more, visit http://whiley.org

======================================================================
Installation
======================================================================

There are several ways to get going with Whiley:

1) Install the Eclipse Plugin.

2) Download and run the executable Jar.

3) Download and setup the Whiley Development Kit.

The Eclipse plugin is the easiest way to get started with Whiley (see
instructions below).  If you don't use Eclipse, another simple option
is to download and run the executable Jar.  Finally, developers may
like to download the Whiley Development Kit (WDK), which includes the
source code for the compiler/runtime and various scripts to simplify
compiling and running Whiley programs from the command-line.

1. Whiley Eclipse Plugin (Wyclipse)
----------------------------------------------------------------------
To install the Whiley Eclipse plugin start Eclipse and select "Install
New Software" (normally found under "Help").  Then, add
http://whiley.org/eclipse as a "software site", afterwhich you should
find the "Whiley Eclipse Plugin" becomes an option to install.  At
this point, "select all" and follow the instructions to install the
plugin.

For more info on Wyclipse, see http://whiley.org/tools/wyclipse/

2. Whiley Executable Jar
----------------------------------------------------------------------
If you're running on a Windows system without cygwin, or you're having
trouble getting the wyjc scripts to work, then a useful alternative is
to run the executable jar file directly.  First, download the
wyjc-all-vX.Y.Z.jar file from http://whiley.org/downloads.  Then, you
can compile Whiley files as follows:

% cd examples
% java -jar wyjc-all-vX.Y.Z.jar -bp wyjc-all-vX.Y.Z.jar hello-world.whiley

(here, vX.Y.Z is the version number of the distribution)

Then, to run the program you would do this:

% java -cp "wyjc-all-vX.Y.Z.jar;." hello-world
Hello World

(note: under Mac OS and UNIX you will want to replace the ';' with a ':')

3. Whiley Development Kit (WDK)
----------------------------------------------------------------------
To install the Whiley Development Kit, first download it from
http://whiley.org/downloads.  Then, unpack the tarball into an
appropriate directory (as you've probably already done).  You then
need to make sure that PATH environment variable points to the bin/
directory, where several scripts are provided for running Whiley.
(don't worry if you don't know what the PATH is, as you can instead
run the jar directly --- see below).

With the PATH setup correctly, you should be able to run the wyjc
command to compile Whiley programs as follows:

% cd examples
% wyjc hello-world.whiley

At this point, you can run the program using the whiley command:

% wyj hello-world
Hello World

(note: the wyj command is just a wrapper for java -cp lib/wyrt-vX.Y.Z.jar).

NOTE: if you're running on a Windows system without cygwin, or you're
having trouble getting the wyjc scripts to work, then a useful
alternative is to run the jar file directly.  You can do this as
follows:

% cd examples
% java -jar ../lib/wyjc-vX.Y.Z.jar -bp ../lib/wyrt-vX.Y.Z.jar hello-world.whiley

(here, vX.Y.Z is the version number of the distribution)

Then, to run the program you would do this:

% java -cp "../lib/wyrt-vX.Y.Z.jar;." hello-world
Hello World

(note: under Mac OS and UNIX you will want to replace the ';' with a ':')

============================================================================
Making a Contribution
============================================================================

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.

About

Whiley is a programming language particularly suited to safety-critical systems. It is a hybrid object-oriented and functional programming language which employs extended static checking to eliminate errors at compile time, including divide-by-zero, array out-of-bounds and null dereference errors.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 93.7%
  • C 5.3%
  • Shell 0.5%
  • Emacs Lisp 0.2%
  • Perl 0.1%
  • Vim Script 0.1%
  • Other 0.1%