Difference between pages "Log" and "Arjuna"

From Mesham
(Difference between pages)
Jump to navigationJump to search
m
 
 
Line 1: Line 1:
== Overview ==
+
==Introduction==
 +
The Arjuna line of compilers for Mesham are versioned from 0.0 up to 0.99. The latest compiler release based upon the Arjuna core is 0.5. The reason for the distinction is that it was decided to rewrite the compiler and as such a clear distinction between the architectures and technology is useful. Arjuna was the informale name of the language, and specifically compiler before Mesham was decided upon.
  
This log(d) function will find the natural logarithmic value of ''d''
+
==Technology==
 +
Arjuna is based upon a number of different technologies. The main compiling system is written in FlexibO, an OO experimental language designed to be used for compiler writing (certainly the biggest project in this language. ) The reason for this choice was that using this language the compiler was fast to write, very flexible but quite slow in translation. This code aspect is around 20,000 lines which pushed flexibo to, and in some cases beyond it's limits. FlexibO abstracts the syntactic stage, providing automatic lexing and parsing. The core compiler is based around a reflection system, with the type and function libraries, also written in flexibo, quite seperate and connected in via defined services.
  
* '''Pass:''' A double
+
FlexibO does have it's limits and as such a preprocessor is written in Java to convert Mesham into a preprocessed form for use by the core compiler. This preprocessor, around 2000 lines, is used as a band aid to flexibo and for instance adds in scoping information without which the compiler would not operate.
* '''Returns:''' A double representing the logarithmic value
 
  
== Example ==
+
The third major aspect, although not integrated with the compiler is the runtime support library. This has been written in C, around 3000 lines, and a version exists for each machine architecture to support portability. The runtime library in the next line of compilers, Oubliette, is actually based on the existing RTL, but additional services are required so the Arjuna line is not forward compatible (although the Oubliette RTL should work with Arjuna.)
 
 
#include <maths>
 
var a:=log(10.54);
 
var y:=log(a);
 
 
 
[[Category:Function Library]]
 
[[Category:Maths Functions]]
 

Revision as of 14:50, 24 April 2010

Introduction

The Arjuna line of compilers for Mesham are versioned from 0.0 up to 0.99. The latest compiler release based upon the Arjuna core is 0.5. The reason for the distinction is that it was decided to rewrite the compiler and as such a clear distinction between the architectures and technology is useful. Arjuna was the informale name of the language, and specifically compiler before Mesham was decided upon.

Technology

Arjuna is based upon a number of different technologies. The main compiling system is written in FlexibO, an OO experimental language designed to be used for compiler writing (certainly the biggest project in this language. ) The reason for this choice was that using this language the compiler was fast to write, very flexible but quite slow in translation. This code aspect is around 20,000 lines which pushed flexibo to, and in some cases beyond it's limits. FlexibO abstracts the syntactic stage, providing automatic lexing and parsing. The core compiler is based around a reflection system, with the type and function libraries, also written in flexibo, quite seperate and connected in via defined services.

FlexibO does have it's limits and as such a preprocessor is written in Java to convert Mesham into a preprocessed form for use by the core compiler. This preprocessor, around 2000 lines, is used as a band aid to flexibo and for instance adds in scoping information without which the compiler would not operate.

The third major aspect, although not integrated with the compiler is the runtime support library. This has been written in C, around 3000 lines, and a version exists for each machine architecture to support portability. The runtime library in the next line of compilers, Oubliette, is actually based on the existing RTL, but additional services are required so the Arjuna line is not forward compatible (although the Oubliette RTL should work with Arjuna.)