Repository navigation
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
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.
- AnimUML.js
- Editor.js
- 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
- History2PlantUMLBranchingHistory.js
- History2PlantUMLSequence.js
- History2PlantUMLTiming.js
- StateSpace2PlantUML.js
- generates a PlantUML model for a complete state space
- only applicable to relatively small state spaces
- Export2PlantUML.js
-
ATLc/web-based
- TCSVGSequenceGenerator.js
- generates TCSVG by wrapping a string containing the appropriate tags
- uses TCSVGSequenceTemplate.js
- TCSVGSequenceTemplate.js
- the templates generated by the ATLc/web compiler
- TCSVGSequenceGenerator.js
- TransformStateMachine2Explicit.js
- operators on engines
- SynchronousCompositionEngine.js
- AnimUMLSmallerStepsEngine.js
- AnimUMLTimedEngine.js
- AnimUMLSynchronousCommunicationEngine.js
- PooledEngine.js
- analysis tools
- Explorer.js
- DiffExplorer.js
- AnalysisWorker.js
- standalone engines
- AnimUMLEngine.js
- RemoteEngine.js
- EMIRemoteEngine.js
- 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
- RemoteTool.js
- Model.js
- ModelUtils.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
- Export2tUML.js
- Export2C.js