Nozc is a compiler for NewOz, written in Java. It is able to translate NewOz files (denoted by the use of .noz
extension) to Oz files (.oz
), which can then be fed to the existing Mozart compiler (ozc
).
It provides an elegant command-line interface with various options, allowing for example to finely custom the logging verbosity, or to print a visual representation of the program's syntax tree in the terminal.
This compiler was developed in the context of my master thesis, which can be found here : LINK (coming soon).
NewOz Is actively looking for contributors to give us feedback on the syntax ! If you are interested, please see below for information on how you can help us.
- Background
- We are looking for feedback !
- Project structure
- Install
- Requirements
- Usage
- Contributing
- License
The Oz programming language is a multi-paradigm language that is designed for advanced, concurrent, networked, soft real-time, and reactive applications. Oz provides the salient features of object-oriented programming (including state, abstract data types, objects, classes, and inheritance), functional programming (including compositional syntax, first-class procedures/functions, and lexical scoping), as well as logic programming and constraint programming (including logic variables, constraints, disjunction constructs, and programmable search mechanisms). It allows users to dynamically create any number of sequential threads. The threads are dataflow threads in the sense that a thread executing an operation will suspend until all needed operands have a well-defined value.
The Mozart programming system, which is the official implementation of Oz, has been developed in the 1990s by researchers from DFKI (the German Research Center for Artificial Intelligence), SICS (the Swedish Institute of Computer Science), the University of the Saarland, UCLouvain (the Université Catholique de Louvain), and others.
Over the years, the Oz programming language has been used with success in various MOOCs and university courses. It's multi-paradigm philosophy proved to be an invaluable strength in teaching students the basics of programming paradigms, through its one-fits-all approach.
However, it has become obvious over time that the syntax of the language constitutes a drawback. In particular, Oz has not been updated like other languages have, which is hindering its ability to keep a growing community of developers around it.
The objective behind NewOz, launched by Prof. Peter Van Roy at UCLouvain is ambitious : bringing the syntax of Oz to par with modern programming languages, while keeping alive the philosophy that makes its strength : giving access to a plethora of programming paradigms in a single, unique environment. This process has started in 2020, with the master thesis of Jean-Pacifique Mbonyincungu, who created a first design for the NewOz syntax, heavily inspired by Scala. The 2021 thesis (coming soon) of Martin Vandenbussche continues this work by making more refinements to the syntax, as well as creating a fully fletched compiler around it.
We are actively looking for people who can help us in the design of this new syntax. We believe involving more people with different backgrounds is important to make this syntax the best it can be. All your help is welcome and greatly appreciated, even if you don't have much experience in programming, or if you don't have a lot of time to give us. Both positive and negative comments are appreciated and will be taken into account.
You can take a look at the docs and examples folder to see what the current version of the syntax looks like.
You can use the GitHub issues to post your comments, thoughts, and ideas.
If you don't have a GitHub account, you could also send me an email at vandenbusschemartin[insert @ here]
gmail.com.
You can visit the CONTRIBUTING file for more info.
Thank you for your help !
.
├── bin # Binaries used to compile the program, shipped to ease the installation process
├── docs # Documenatation to get started with NewOz. You should probably read this before the examples
├── examples # Examples of NewOz programs, useful to get familiar with the syntax
├── gradle # A Gradle distribution used to simplify to build process
├── nozc
│ ├── src
│ │ ├── main # Nozc compiler's source code
│ │ └── test # JUnit4 tests
│ ├── build.gradle # Gradle build configurations
│ └── gradle.properties # Gradle build properties
├── releases # All the multi-platform, distributable Nozc releases to date.
├── README.md # This README file
└── ...
This application does not need to be installed per se.
Instead, you will find in the releases folder all versions of Nozc published to date, both in .tar
and .zip
formats.
Please note that the last version should always be used; no support will be offered for outdated versions.
The downloaded archive will have this form :
. # nozc-X.X.zip
├── bin
│ ├── nozc # Unix executable file (shell script)
│ └── nozc.bat # Windows executable
├── lib # Librairies and JARs necessary to run the app
└── README.md # A small installation guide and contribution invite
Please note that the Windows version of the program, although it should behave exactly the same way, has not been as thoroughly tested as the Linux one, and is thus more prone to bugs.
Simply extract the archive in an empty folder, and run the executable script applicable to your platform in bin
. See the usage section.
See BUILD
These are the prerequisites to run this project. If you are looking for the requirements to build it, please consult the BUILD file.
-
This application requires Java 16 or higher to run. You can download it from Oracle's website, or from other vendors like AdoptOpenJDK.
On Linux, you probably should install
openjdk-16
via your OS package manager instead.Run
java -version
in your terminal to see the installed and configured Java version. Note that, if you have multiple Java versions installed, your operating system might not use the last one by default. Please refer to your OS documentation for help on how to configure a specific Java version as default. -
If you want to compile your NewOz code to a
.ozf
file executable by theozengine
command, you will need to have Mozart installed on your system. In particular, you should have access to theozc
andozengine
commands in your environment.Note that this requirement is not yet present in the current version of Nozc, as the system is not yet able to run Mozart by itself. For now, you still need to copy the generated Oz code in Mozart's Emacs environment and run it from there. This will change in a future release.
When placed in the extracted folder, run the following command to see the valid usage and get started :
./bin/nozc -help
On Windows, type
.\bin\nozc.bat -help
instead.
All contributions of any kind are welcome. See CONTRIBUTING for more information.
Tools used for the making of this program include :
- JavaCC, a parser generator for use with Java applications, published under the BSD License 2.0.
- Gradle, a multi-platform build and packaging system.
- IntelliJ IDEA Utlimate, a modern Java IDE by JetBrains.
- JUnit4, a powerful testing framework for Java programs, with the System Rules library on top.
The general structure of the program is inpired by the works of Bill Campbell, Swami Iyer, and Bahar Akbal-Delibaş on the j-- compiler. The accompanying book has been of great help as well.