Omnimaga

Omnimaga => Discontinued => Our Projects => Khavi => Topic started by: AngelFish on July 12, 2011, 08:50:27 pm

Title: Khavi: Updates and screenshots
Post by: AngelFish on July 12, 2011, 08:50:27 pm
The Khavi project is once more active, since I now have a reasonable way to debug the program.  Because writing an interpreter framework capable of interpreting serious language bytecodes like Java and Lua is a monumental task, there's obviously a lot of stuff that has to go together for it to work properly.

Uncompleted features:




The Languages:


Technical information:

The Khavi framework is designed to assume as little as possible about the underlying code as possible. At present, the only assumption it makes is that it is parsing an underlying bytecode.

Also, here's a simplified graph of Khavi's control flow and general structure.

Spoiler For Spoiler:
(http://img.removedfromgame.com/imgs/Khavi_Network.png)

Code: [Select]
                                             Shell
                                               |
                                               |
                                              Boot
                                               /\
                                              /  \
                                          Start Fail
                                           /
                                          /
                          Install context switcher
                                          \
                                           \
                                     Allocate heap
                                           /
                                          /
                           Install Primary Thread
                                          \
                                           \
                                    Install Libraries
                                           /
                                          /
            Install Memory Management and Garbage collection
                                          \
                                           \
                                        File loader
                                           /
                                          /
                                 Create Thread
                                          \
                                           \
                               Allocate thread memory
                                           /
                                          /
                                   Execute file

This is actually slightly misleading as not all paths are shown in the network graph and not all paths are always available to be taken. For example, the control paths representing the complex native and inter-thread communication interfaces aren't shown while the components labeled as "Secondary" and "Tertiary" interpreter threads are actually only present when multiple languages are being interpreted within the same instance of Khavi. There are many other things also hidden by the graph, but it does give a general overview of the complexity of Khavi. Perhaps the best analogy would be that Khavi is a virtual computer with its own OS that runs inside of the Prizm alongside Casio-OS.


Latest release:

Sorry, no releases are publicly available at this time.
Title: Re: Khavi: Updates and screenshots
Post by: AngelFish on July 27, 2011, 08:47:57 pm
Okay, I'm going to be re-writing Khavi's API and internal architecture to be simpler and less intrusive. Also, Khavi will pass all programs 2 KB of RAM when they are loaded (except brainf*ck, which will get a flat 7 kb) The form in which this will be passed depends on the language and hasn't been completely decided for all supported bytecodes. If you ask for more via standard methods, Khavi will return a similar object that will also include the size of the allocated memory, an important thing on a system with only 2 MB physical RAM (I will *not* be implementing paging from flash unless it proves to be an absolutely necessary feature). Also, programs will be limited in their privileges. There will be no buffer overflows (all pointers are compared against the "end of memory" and rejected if they fall outside the valid range for that thread.) Additionally, there will be permissions on thread access. All threads will be able to talk to the main system thread, but they will only be able to interact with other threads by first politely asking for permission or edit the main thread. The reasons for this should be self-explanatory.

Anyway, progress.
Title: Re: Khavi: Updates and screenshots
Post by: AngelFish on August 15, 2011, 03:23:55 am
I've gotten a lot of work done with the libraries and the beginnings of Khavi Scripting language. This project is just absolutely massive...
Title: Re: Khavi: Updates and screenshots
Post by: AngelFish on September 14, 2011, 05:03:05 pm
Yeah, looks like I royally screwed up and all of the source for Khavi is gone, along with the rest of my Hard drive. It's the one important thing I have no major backups of either...
Title: Re: Khavi: Updates and screenshots
Post by: AngelFish on December 08, 2011, 04:41:12 pm
Added some math stuff to Khavi's library (Sine, Cosine, floating point Floor, floating point ceiling), fixed a major bug in Khavi's floating point modulo routine, wrote a functioning process selector for the context switcher, and started on Garbage collection.