Skip to content

miuml/mi_Text_Language

Repository files navigation

miUML Text Language

The miUML Text Language makes it easy to specify a complete miUML model from your text editor.

Language principles:

  • Models should be easy to read and create in a plain text editor
  • Minimize language artifact (symbol gunk)
  • Support model population, not model editing
  • Supports all miUML features

For a full definition of the language, please see the associated wiki here on Github.

The parser (mitext.py) will consume a .tm file (text model) and uses a two-phase process to validate it.

###Phase 1 - Syntax The parser validates the text script syntax and overall structure. It does not worry about aggregate model integrity. Any error encountered during this phase is fatal (results in termination) and will be reported without initiating any database connection.

Upon successful validation, the parser yields a list of complete and correctly formatted miUML API PostgreSQL calls which will be executed in sequence to populate the miUML DB.

The parser does not ensure that model integrity is preserved. (It will let you try to create two attributes in the same class with the same name, for example). However, the miUML DB is will reject this nonsense in the subsequent phase.

###Phase 2 A connection to the miUML metamodel DB is established and the API calls are issued one by one. If any call fails, the DB is rolled back to its initial state, the connection is closed and an appropriate error message generated by the API call is displayed.

The miUML metamodel is intelligent with regard to model integrity and miUML rules so it will reject any incorrect model structure with a meaningful error message. Thus, the parser can get away with being relatively dumb.

About

A script language and parser for creating miUML models

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages