= Sysel = An effort to design a high-level programming language for writing HelenOS severs and applications. == Links == * [https://launchpad.net/sysel Sysel project at launchpad] * [http://trac.helenos.org/trac.fcgi/browser/head/uspace/dist/src/sysel/demos Sysel demos in HelenOS repo (real working Sysel code)] * [http://bazaar.launchpad.net/~jsvoboda/sysel/trunk/files/head:/nnps/ Fragments of NNPS at Launchpad (real working Sysel code)] * [wiki:Sysel/Ideas Description of planned features and ideas] Note that Sysel syntax is not finalized. Some important language features are missing at the moment (especially visibility control and packaging) so the examples presented will need to change when these are implemented. == Roadmap == || '''Sub-project name''' || '''Status''' || '''Description''' || || Sysel Bootstrap Interpreter (SBI) || In progress || Interpreter of Sysel written in C. Runs in HelenOS and POSIX. || || Sysel Compiler Toolkit (NNPS) || Not started || Modular compiler of Sysel written in Sysel itself. To produce C and/or LLVM IR. == SBI == SBI is an interpreter of Sysel currently in development. It is available stand-alone for POSIX or bundled with HelenOS (only in ''Bazaar repository'', not yet in a stable release). You can run it with the command "`sbi `''source_file.sy''". Demos that you can run are available in `/src/sysel/demos`. Source files comprising the library are in `/src/sysel/lib`. You can also run `sbi` without parameters to enter interactive mode. === Synopsis of current SBI features === * Primitive types: `bool`, `char`, `int`, `string` * Compound types: class, multi-dimensional array * Other types: delegates, enumerations * Objective features: constructors, inheritance, grandfather class, static and non-static method invocation * Static functions, static member variables, static properties * Syntactic sugar: variadic functions, accessor methods (named and indexed properties), autoboxing * Arithmetic: big integers, addition, subtraction, multiplication, boolean operators * Static type checking (mostly), generic classes (unconstrained), exception handling * Bindings: Text file I/O, `WriteLine`, `Exec` === Missing SBI features === * Division * Structs * Interfaces * Builtin object methods/properties * Visibility control * Working with binary data * Generic type constraints * Method and operator overloading * Code organization (packages and modules) == NNPS == NNPS (Nativní Nástroje pro Překlad Syslu, en: Native Sysel Compilation Toolkit) is a ''prospective'' toolkit written in Sysel itself that should compile Sysel to binary form. Currently it is in preliminary experimentation/planning stage. Also current plan is to only implement a front end, transforming Sysel into low-level but machine-neutral IR. Most likely the first available output option should be C (used as if it were a machine-independent assembly) and the second LLVM IR. The ''native'' in NNPS means it is written in Sysel itself (i.e. it should be also self-hosting). Ideally NNPS should compile natively in POSIX, cross-compile from POSIX to HelenOS and ''eventually'' compile natively in HelenOS. The ''eventually'' is there because an appropriate backend (i.e. a C compiler) needs to be ported to HelenOS before native compilation is feasible. NNPS will be bootstrapped using SBI. That is by running SBI(NNPS(NNPS)) we will obtain a binary version of NNPS. This process will presumably require 'significant' computing resources since SBI is rather slow and consumes a lot of memory. Once compiled to binary form, NNPS should be much more modest.