The PRM Project

Rethink Object-Oriented Programming
# Refinement of the class of integers: adding a new method
class Int
    def fibonacci: Int
    do
        if self < 2 then
            return 1
        else
            return (self-1).fibonacci + (self-2).fibonacci
        end
    end
end

let i := 23
print(i.fibonacci)

What is PRM?

PRM stands for "Program with Refinement and Modules". It is an object-oriented programming language. The goal of PRM is to propose a statically typed programming language where structure is not a pain.

Warning

PRM has been forked into NIT, which has a more concise syntax and is more script oriented. However both languages have nearly the same features. Transformation scripts from PRM to NIT will be soon available.

Feature Highlights

  • Full object and powerful multiple inheritance
  • Modules and Refinement: redefine existing classes
  • Clear syntax: no verbosity nor cryptic statement
  • Painless static types: static typing should help programmers
  • More features...

Compiler

The current PRM compiler prototype implements better compilation techniques and allow separate compilation of modules.

It is currently written in Ruby and generates C and assembly files.

Getting Started

Get PRM from its subversion repository:

$ svn checkout http://svn.gna.org/svn/prm/trunk prm

Compile a program:

$ prm/bin/prmc prm/tests/example_hello_world.prm

Execute the program:

$ ./example_hello_world

Participate

PRM is a target framework for novel compilation techniques and object-oriented research. Currently, the compiler and others tools are actively developed in order to reach fully usable state.

The PRM project is hosted at Gna!. Fell free to report bugs, browse the source code or discuss on the mailing list.