Welcome to the Woma Programming Language!¶
The reference implementation of the Woma programming language compiler. There is also a genus of Python called Aspidites, latin for shield-bearer, that is this project’s namesake.
Unlike most Python software, Aspidites requires a C compiler to be present on the system. The details of getting a C compiler varies according to the system used:
Linux The GNU C Compiler (gcc) is usually present, or easily available through the package system. On Ubuntu or Debian, for instance, the command sudo apt-get install build-essential will fetch everything you need.
Mac OS X To retrieve clang, one option is to install Apple’s XCode command line tools, which can be retrieved from the Mac OS X’s install DVDs or from https://developer.apple.com/.
Windows The CPython project recommends building extension modules (including Cython modules) with the same compiler that Python was built with. This is usually a specific version of Microsoft Visual C/C++ (MSVC) - see https://wiki.python.org/moin/WindowsCompilers. MSVC is the only compiler that Cython is currently tested with on Windows. A possible alternative is the open source MinGW (a Windows distribution of gcc). See the appendix for instructions for setting up MinGW manually. Enthought Canopy and Python(x,y) bundle MinGW, but some of the configuration steps in the appendix might still be necessary.
$ pip install Aspidites
$ docker pull ghcr.io/rjdbcm/aspidites:latest
$ gh repo clone rjdbcm/Aspidites && pip install ./Aspidites
Pretty straightforward just use:
$ aspidites -h
$ docker run -v $PWD:/workdir rjdbcm/aspidites:latest -h
$ aspidites -h
This means Woma uses a simple predicate logic to create well-constrained types. This is currently implemented using AndreaCensi/contracts. More info on refinement type systems:
“Refinement types enrich a language’s type system with logical predicates that circumscribe the set of values described by the type, thereby providing software developers a tunable knob with which to inform the type system about what invariants and correctness properties should be checked on their code. In this article, we distill the ideas developed in the substantial literature on refinement types into a unified tutorial that explains the key ingredients of modern refinement type systems. In particular, we show how to implement a refinement type checker via a progression of languages that incrementally add features to the language or type system.”
Reference: Jhala, R. and Vazou, N., 2020. Refinement Types: A Tutorial. arXiv preprint arXiv:2010.07763. Read More
Compiler and testing directives as pragmas that are used inline in woma, this is similar to how pragmas are used in Ada. Read More
Functions are first class citizens in woma. More info on functional programming:
“In 1989 when functional programming was still considered a niche topic, Hughes wrote a visionary paper arguing convincingly ‘why functional programming matters’. More than two decades have passed. Has functional programming really mattered? Our answer is a resounding ‘Yes!’. Functional programming is now at the forefront of a new generation of programming technologies, and enjoying increasing popularity and influence. In this paper, we review the impact of functional programming, focusing on how it has changed the way we may construct programs, the way we may verify programs, and fundamentally the way we may think about programs.”
Reference: Zhenjiang Hu, John Hughes, Meng Wang, How functional programming mattered, National Science Review, Volume 2, Issue 3, September 2015, Pages 349–370, Read More
Constraint satisfaction is core to woma, should constraints not be satisfied for a given function nullity is returned rather than raising an exception. More about constraint programming:
“A discrete optimization problem can be given a declarative or procedural formulation, and both have their advantages. A declarative formulation simply states the constraints and objective function. It allows one to describe what sort of solution one seeks without the distraction of algorithmic details. A procedural formulation specifies how to search for a solution, and it therefore allows one to take advantage of insight into the problem in order to direct the search. The ideal, of course, would be to have the best of both worlds, and this is the goal of constraint programming.”
Reference: Alexander Bockmayr, John N. Hooker, Constraint programming, May 2003, Read More
Words should be for the programmer and the data model not built-in language features.
A programmers focus should be on the logic of the program not trying to remember methods and namespaces.
The off-sides rule is sufficient to delineate scope, but should be limited in it’s ability to nest.
Ultra-smooth runtime exception handling with useful warnings.
Demonic non-determinism, favors non-termination and type-negotiation (constraint satisfaction).
Terseness that uses symbolic operations in order to make code both concise *and* readable.
Great for writing high-integrity code that works natively with CPython.
Usable for general purpose *or* scientific computing.
Table of Contents¶
- 1. Examples
- 2. Compiler Usage
- 3. Known Limitations
- 4. Woma In Depth
- 5. Built-in Functions
- 6. Troubleshooting
- 7. API Documentation
- 8. Information for Developers
- 8.1. Contributing
- 8.2. Core Dependencies
- 8.3. Copying