Architecture

cohadar
Attachments
internals.png (14593 bytes)

Architecture overview

Parapascal consists of 4 java projects:

  • Editor
  • Interpreter
  • Assembler
  • Pascal

Editor

Provides gui components (java swing) for other parts of the system including code editor field with line numbering and support for syntax highlighting.
It also provides config file management, resoure loading (icons), open/save file subsystem, html exporting...


Interpreter

This is the environment in which parapascal programs are executed. Interpreter has several distinct elements:

  • Kernel - provides system functions and process scheduling
  • Processors(1..*) - no general purpose registers, zero and one addressing instructions, stack based.
  • Private Memory - each processor has one separate memory model just for itself.
  • Shared Memory - only one processor can use shared memory at a time (global lock).

internals

ParaPascal interpreter can simulate any number of processors. The picture above shows a configurations with 6 processors.

Parapascal programs consists of list of object that represent instructions - Command pattern.
This is much faster than bytecode interpretation since there is no instruction decoding stage.


Assembler

Translates textual representation of instructions into form sutable for interpretation.
Syntax resembler that of MASM but instruction set is totally different.
This part of the system is just an intermediary stage between compiler and interpreter and is of little value to end user.


Pascal

This is the compiler. It translates parapascal code into assembler form.
It does complete syntax and semantic analysis and error reporting expected of modern compilers.
Grammar definitions are written using ANTLR.


Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.