-
Notifications
You must be signed in to change notification settings - Fork 1
Code Overview
Frédéric Jouault edited this page Dec 20, 2022
·
9 revisions
The purpose of this page is to give an overview of code organisation.
- almost all AnimUML modules are ECMAScript modules
- most modules that are used in the browser are also used in Node.js
- therefore, using them may require setting up a browser-like environment
- for instance, globalThis.WebSocket exists in the browser, but not in Node.js by default
- the Node.js websocket module can be imported (see Dependencies), and injected into globalThis
- for instance, globalThis.WebSocket exists in the browser, but not in Node.js by default
- this way, these modules do not need to care about where (browser or Node.js) they are executed from
- therefore, using them may require setting up a browser-like environment
This section is a work in progress.
The following layered architecture diagram represents AnimUML's high-level code organization.
| Presentation | |||
| Diagram | Transformation | Analysis | |
| Execution/Semantics | External Analysis Tools | ||
| Model Representation | |||
| Load/Save | Export | Code Generation | |
Some modules corresponding to each element of this diagram are listed below.
- PlantUML-based
-
Export2PlantUML.js
-
toPlantUML(...)
- state machines
-
allObjectsToPlantUML(...)
- object diagrams
- class diagrams
- both with (optional) embedded state machines
- (private) js2PlantUMLActivity(...)
- activity diagrams
-
toPlantUML(...)
- history/trace
-
StateSpace2PlantUML.js
- generates a PlantUML model for a complete state space
- only applicable to relatively small state spaces
- utils
-
Export2PlantUML.js
-
ATLc/web-based
-
TCSVGSequenceTemplates.js
- the templates generated by the ATLc/web compiler
-
TCSVGSequenceGenerator.js
- generates TCSVG by wrapping a string containing the appropriate tags
- uses TCSVGSequenceTemplate.js
-
History2TCSVGSequence.js
- translates execution trace/history to an ATLc-based sequence diagram
- uses TCSVGSequenceGenerator.js
-
Interaction2TCSVGSequence.js
- translates (specification) interactions to ATLc-based sequence diagrams
- uses TCSVGSequenceGenerator.js
-
TCSVGSequenceTemplates.js
- operators on engines
- built-in analysis tools
- AnimUMLStaticAnalysis.js
-
Explorer.js
- deprecated in favor of z2mc
-
ParallelExplorer.js
- asynchronous version of Explorer.js
- when used with PooledEngine.js, several steps can be executed concurrently on remotely connected engines
- DiffExplorer.js
- AnalysisWorker.js
- standalone engines
- observer/monitor engines, for synchronous composition with another engine
-
ObserverAnimUMLEngine.js
- simple state machine semantics
-
InteractionEngine.js
- interaction (sequence diagram) interpreter
- work in progress
-
ObserverAnimUMLEngine.js
- Export2AnimUML.js
- ImportFromAnimUML.js
- TranslateToPlantUMLSyntax.js
-
CLILoadModel.js
- for use with Node.js
- can be used to load different kinds of AnimUML models (JSON, JS, HTML)
-
ImportFromPlantUMLClass.js, ImportFromPlantUMLSequence.js, and ImportFromPlantUMLState.js
- PlantUML-like grammars/parsers/serializers
- Preprocessor.js