The meta model of Nit programs

These modules define the entities of the Nit meta-model like modules, classes, types and properties They also provide an API to build and query models. All model classes starts with the M letter (MModule, MClass, etc.)

The model is used by tools that need a higher view than a AST (see parser). The model represents What the programmer means.

Because of the specification of the Nit language, the model is complex and sometime difficult to understand.

POSet

There is a lot of classes and relation in the model. Most of there relations are based on posets (from the lib poset.)

Posets are partially-ordered sets; they are used to modelize hierarchies of things (eg. hierarchies of modules)

The poset is an expressive data structure that generalizes most services about hierarchies. This avoid the duplication of code and the over-specialization of services. The drawback is that a specific request on the model use an abstract vocabulary.

Example. you want the set of modules directly imported by another module. There is no specific method in MModule for that, the good way is to use services on the some posets

var res = mymodule.in_importation.direct_greaters

posets are used in two dual ways :

  • by the whole hierarchy, most are in the Model and are named something_somerelation_hierarchy (eg. Model::mmodule_importation_hierarchy).
  • by the view on en entity in a specific hierarchy, they are in the MEntity subclasses and are name in_somerelation. (eg. MModule::in_importation).

Refinement

The refinement is the cause of the biggest difficulty with the model since the relations between entities are relative to the module considered.

"How many method in this class?" -- It depends, what modules are you considering? "What is called by x.foo when x is dynamically a Bar?" -- It depends, in which main module?

This relativity cause most services on model entities to have an additional parameter for the module considered.

All subgroups and modules

module mdoc

nitc :: mdoc

Documentation of model entities
module mmodule

nitc :: mmodule

modules and module hierarchies in the metamodel
module mmodule_data

nitc :: mmodule_data

Define and retrieve data in modules
module model

nitc :: model

Classes, types and properties
module model_base

nitc :: model_base

The abstract concept of model and related common things
module model_collect

nitc :: model_collect

Collect things from the model.
module model_examples

nitc :: model_examples

Examples for Model entities
module model_index

nitc :: model_index

Search things from the Model
module model_visitor

nitc :: model_visitor

Simple visitor framework for Nit models.
module model_viz

nitc :: model_viz

Visualisation of Nit models
module mpackage

nitc :: mpackage

Modelisation of a Nit package
module serialize_model

nitc :: serialize_model

Service to serialize POSet to JSON
package_diagram nitc\>model\> model ordered_tree ordered_tree nitc\>model\>->ordered_tree nitc nitc nitc\>model\>->nitc nitc\>frontend\> frontend nitc\>model\>->nitc\>frontend\> trees trees nitc\>model\>->trees more_collections more_collections nitc\>model\>->more_collections graph graph nitc\>model\>->graph json json nitc\>model\>->json core core ordered_tree->core nitc\>compiler\> compiler nitc->nitc\>compiler\> nitc\>doc\> doc nitc->nitc\>doc\> nitc\>doc\>commands\> commands nitc->nitc\>doc\>commands\> nitc\>interpreter\> interpreter nitc->nitc\>interpreter\> nitc\>metrics\> metrics nitc->nitc\>metrics\> nitc\>uml\> uml nitc->nitc\>uml\> nitc\>frontend\>->nitc nitc\>modelize\> modelize nitc\>frontend\>->nitc\>modelize\> gen_nit gen_nit nitc\>frontend\>->gen_nit nitc\>semantize\> semantize nitc\>frontend\>->nitc\>semantize\> nitc\>parser\> parser nitc\>frontend\>->nitc\>parser\> trees->core serialization serialization more_collections->serialization poset poset more_collections->poset graph->core json->serialization parser_base parser_base json->parser_base ...core ... ...core->core ...nitc ... ...nitc->nitc ...nitc\>modelize\> ... ...nitc\>modelize\>->nitc\>modelize\> ...gen_nit ... ...gen_nit->gen_nit ...nitc\>semantize\> ... ...nitc\>semantize\>->nitc\>semantize\> ...nitc\>parser\> ... ...nitc\>parser\>->nitc\>parser\> ...serialization ... ...serialization->serialization ...poset ... ...poset->poset ...parser_base ... ...parser_base->parser_base nitc\>compiler\>->nitc\>model\> nitc\>doc\>->nitc\>model\> nitc\>doc\>commands\>->nitc\>model\> nitc\>doc\>commands\>->nitc\>uml\> nitc\>doc\>templates\> templates nitc\>doc\>templates\>->nitc\>model\> nitc\>doc\>templates\>->nitc\>doc\>commands\> nitc\>interpreter\>->nitc\>model\> nitc\>metrics\>->nitc\>model\> nitc\>uml\>->nitc\>model\> nitc\>compiler\>compiler_ffi\> compiler_ffi nitc\>compiler\>compiler_ffi\>->nitc\>compiler\> nitc\>platform\> platform nitc\>platform\>->nitc\>compiler\> nitc\>compiler\>compiler_ffi\>... ... nitc\>compiler\>compiler_ffi\>...->nitc\>compiler\>compiler_ffi\> nitc\>platform\>... ... nitc\>platform\>...->nitc\>platform\> nitc\>doc\>api\> api nitc\>doc\>api\>->nitc\>doc\>commands\> nitc\>doc\>api\>->nitc\>metrics\> nitc\>doc\>term\> term nitc\>doc\>term\>->nitc\>doc\>commands\> nitc\>doc\>api\>... ... nitc\>doc\>api\>...->nitc\>doc\>api\> nitc\>doc\>templates\>... ... nitc\>doc\>templates\>...->nitc\>doc\>templates\> nitc\>doc\>term\>... ... nitc\>doc\>term\>...->nitc\>doc\>term\> nitc\>interpreter\>dynamic_loading_ffi\> dynamic_loading_ffi nitc\>interpreter\>dynamic_loading_ffi\>->nitc\>interpreter\> nitc\>vm\> vm nitc\>vm\>->nitc\>interpreter\> nitc\>interpreter\>dynamic_loading_ffi\>... ... nitc\>interpreter\>dynamic_loading_ffi\>...->nitc\>interpreter\>dynamic_loading_ffi\> nitc\>vm\>... ... nitc\>vm\>...->nitc\>vm\>

Ancestors

group api

nitc > doc > api

Components required to build a web server about the nit model.
group base64

base64

Offers the base 64 encoding and decoding algorithms
group c

c

Structures and services for compatibility with the C language
group catalog

nitc > catalog

Basic catalog generator for Nit packages
group codecs

core > codecs

Group module for all codec-related manipulations
group collection

core > collection

This module define several collection classes.
group commands

nitc > doc > commands

group compiler

nitc > compiler

Compilation to C
group compiler_ffi

nitc > compiler > compiler_ffi

Full FFI support for the compiler
group config

config

Configuration options for nit tools and apps
group console

console

Defines some ANSI Terminal Control Escape Sequences.
group core

core

Nit common library of core classes and methods
group counter

counter

Simple numerical statistical analysis and presentation
group csv

csv

CSV document handling.
group curl

curl

Data transfer powered by the native curl library
group doc

nitc > doc

group dot

dot

Dot rendering library
group dynamic_loading_ffi

nitc > interpreter > dynamic_loading_ffi

This group implement a partial support for the Nit FFI in the interpreter.
group ffi

nitc > ffi

Full FFI support, independent of the compiler
group gen_nit

gen_nit

Support to generate and otherwise manipulate Nit code
group github

github

Nit wrapper for Github API
group html

html

HTML output facilities
group ini

ini

ini - Read and write INI configuration files
group interpreter

nitc > interpreter

Interpretation of Nit programs
group libevent

libevent

Low-level wrapper around the libevent library to manage events on file descriptors
group logger

logger

A simple logger for Nit
group markdown

markdown

A markdown parser for Nit.
group md5

md5

Native MD5 digest implementation as Text::md5
group meta

meta

Simple user-defined meta-level to manipulate types of instances as object.
group metrics

nitc > metrics

Various statistics about Nit models and programs
group modelize

nitc > modelize

Create a model from nit source files
group mongodb

mongodb

MongoDB Nit Driver.
group neo4j

neo4j

Neo4j connector through its JSON REST API using curl.
group nitcorn

nitcorn

Lightweight framework for Web applications development
group nitni

nitc > nitni

Native interface related services (used underneath the FFI)
group opts

opts

Management of options on the command line
group parser

nitc > parser

Parser and AST for the Nit language
group parser_base

parser_base

Simple base for hand-made parsers of all kinds
group perfect_hashing

perfect_hashing

Perfect hashing and perfect numbering
group performance_analysis

performance_analysis

Services to gather information on the performance of events by categories
group pipeline

pipeline

Pipelined filters and operations on iterators.
group platform

nitc > platform

Platform system, used to customize the behavior of the compiler.
group popcorn

popcorn

Popcorn
group poset

poset

Pre order sets and partial order set (ie hierarchies)
group prompt

prompt

Basic services to display a prompt
group pthreads

pthreads

POSIX Threads support
group realtime

realtime

Services to keep time of the wall clock time
group saf

nitc > saf

Nit Static Analysis Framework.
group semantize

nitc > semantize

Process bodies of methods in regard with the model.
group serialization

serialization

Abstract serialization services
group static

nitc > doc > static

Nitdoc generation framework
group template

template

Basic template system
group term

nitc > doc > term

group testing

nitc > testing

Test unit generation and execution for Nit.
group text

core > text

All the classes and methods related to the manipulation of text entities
group uml

nitc > uml

Group head module for UML generation services
group vm

nitc > vm

Entry point of all vm components

Parents

group frontend

nitc > frontend

Collect and orchestration of main frontend phases
group graph

graph

group json

json

read and write JSON formatted text
group more_collections

more_collections

Highly specific, but useful, collections-related classes.
group nitc

nitc

Nit compiler and tools
group ordered_tree

ordered_tree

Manipulation and presentation of ordered trees.
group trees

trees

General module for tree data structures

Children

group commands

nitc > doc > commands

group compiler

nitc > compiler

Compilation to C
group doc

nitc > doc

group interpreter

nitc > interpreter

Interpretation of Nit programs
group metrics

nitc > metrics

Various statistics about Nit models and programs
group nitc

nitc

Nit compiler and tools
group uml

nitc > uml

Group head module for UML generation services

Descendants

group api

nitc > doc > api

Components required to build a web server about the nit model.
group catalog

nitc > catalog

Basic catalog generator for Nit packages
group compiler_ffi

nitc > compiler > compiler_ffi

Full FFI support for the compiler
group dynamic_loading_ffi

nitc > interpreter > dynamic_loading_ffi

This group implement a partial support for the Nit FFI in the interpreter.
group ffi

nitc > ffi

Full FFI support, independent of the compiler
group frontend

nitc > frontend

Collect and orchestration of main frontend phases
group modelize

nitc > modelize

Create a model from nit source files
group nitni

nitc > nitni

Native interface related services (used underneath the FFI)
group parser

nitc > parser

Parser and AST for the Nit language
group platform

nitc > platform

Platform system, used to customize the behavior of the compiler.
group saf

nitc > saf

Nit Static Analysis Framework.
group semantize

nitc > semantize

Process bodies of methods in regard with the model.
group static

nitc > doc > static

Nitdoc generation framework
group term

nitc > doc > term

group testing

nitc > testing

Test unit generation and execution for Nit.
group vm

nitc > vm

Entry point of all vm components