{"id":47634275,"url":"https://github.com/jwszolek/smol","last_synced_at":"2026-04-02T00:00:26.154Z","repository":{"id":47569090,"uuid":"89630133","full_name":"jwszolek/SMOL","owner":"jwszolek","description":"SMOL - Network description language (SMOL), which has been designed to describe the necessary network functions, mechanisms, and devices; for the purpose of their computer simulation and verification.","archived":false,"fork":false,"pushed_at":"2022-09-01T22:34:06.000Z","size":12915,"stargazers_count":5,"open_issues_count":3,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-03-01T20:46:41.884Z","etag":null,"topics":["computer-simulation","desmo-j","diagnostics","dsl","ethernet","groovy","simulation","smol"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jwszolek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-27T18:51:01.000Z","updated_at":"2020-12-08T20:50:57.000Z","dependencies_parsed_at":"2022-08-24T14:37:49.843Z","dependency_job_id":null,"html_url":"https://github.com/jwszolek/SMOL","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/jwszolek/SMOL","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwszolek%2FSMOL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwszolek%2FSMOL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwszolek%2FSMOL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwszolek%2FSMOL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jwszolek","download_url":"https://codeload.github.com/jwszolek/SMOL/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwszolek%2FSMOL/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31293139,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T21:15:39.731Z","status":"ssl_error","status_checked_at":"2026-04-01T21:15:34.046Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["computer-simulation","desmo-j","diagnostics","dsl","ethernet","groovy","simulation","smol"],"created_at":"2026-04-02T00:00:21.382Z","updated_at":"2026-04-02T00:00:26.132Z","avatar_url":"https://github.com/jwszolek.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SMOL\n\nNetwork description language (SMOL), which has been designed to describe the necessary network functions, mechanisms, and devices; for the purpose of their computer simulation and verification. \n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"readme-media/graph_smol.png?raw=true\" alt=\"ELK\"/\u003e\n\u003c/p\u003e\n\n\n\n## Requirements\n* Java 1.7\n* Groovy 2.4.3\n* R 3.4.2\n\n## Installation\n\n```\ngit clone https://github.com/jwszolek/smol.git\ncd ./smol\n\nmvn install:install-file -Dfile=libs/desmoj-2.5.1e-bin.jar\n-DgroupId=desmoj -DartifactId=desmoj -Dversion=2.5.1 -Dpackaging=jar   \n\nmvn clean install\n```\n\n## Language concept\n\nSMOL, the dedicated language of semantics enabling the designer to model measurement- diagnostics-control networks, is an example of a domain-specific tool, tailored to solve problems from a specific area.\n\nDescription of the network structure is an essential basis for representing the problems of configuration, re-structuralisation, and optimisation of network subsystems. In other words, SMOL is used to describe the components of a diagnostic network, and the accompanying connections, along with their appropriate parameterisation. Such a formal representation will also enable one to verify the future process of implementing such a network with the use of a relevant parser; which is a software platform for analysing a programmed network structure and its parameters.\n\nThe semantics of the language (SMOL) are based on structures of hierarchical processing. It is assumed that all network signals are eventually bundled together in the Central Node, which is a central vertex of the analysed graph.\n\n## Components of network description\n\nOne of the best ways of modelling industrial computer networks is to use a directed flow graph as a tool suitable for describing relations occurring in a network of interconnections. Such a model is represented by a triple of sets (vertices, edges, and mappings). By defining these sets, we can precisely express the diagram of information flows in the MDC networks.\n\nBelow we introduce the basic types of nodes used in graphs to properly represent network relations. The main division concerns the use of static and dynamic nodes implementing transforming functions.\n\n### Central Node CN\n\nIn general, a central node (CN component) is an object of type MIMO (with multiple inputs and outputs). It is a necessary component in defining practical MDC networks. In an actual computer connection network, such a component represents a centre for transmitted information that receives data from measuring gauges and transmits information or control signals to receivers or actuators. A general scheme of such node is shown below.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"readme-media/central_node.png?raw=true\"  /\u003e\n\u003c/p\u003e\n\n### Transferring Node TN\n\nTransferring node is a universal element of type MIMO, which functions as a transmitter (element TN) in the network; it has a structure shown in figure below, where components CC and R/T function analogously to those described above for the central node.\nThe kernel of this node can perform all necessary functions T(A) transforming information A.\n\nIn an actual implementation of an MDC network, the components TN are assigned specific inputs and outputs, and the desired methods of signal transmission attributed to them. In practice, transmitters are working in most universal contemporary wire and wireless standards (WiFi11, ZigBee12, Switch13, Modem).\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"readme-media/transfer_node.png?raw=true\"  /\u003e\n\u003c/p\u003e\n\n\n### Transformer TR – transforming function\n\nMDC systems often require quick, and rather simple, modification of the transmitted data stream. Therefore, transformers (TRs) enable one to implement a program of universal mathematical function T(A) (sum, difference, product, quotient, differentiation, integration, averaging, and some slightly more complex digital filters) operating on the input data. Currently, the possibility of using transformers is provided only for the nodes CN and TN.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"readme-media/transformer-node.png?raw=true\"/\u003e\n\u003c/p\u003e\n\n\n## First simulation\n\nSMOL code below describes a simple measurement network presented on the image below. The purpose of this task is to simulate network traffic in modeled network.\n \n The list of all available commands that you can use in the SMOL programs can be found in here: [SMOL Syntax](#smol-syntax-elements)\n  \n\n```\n// Transfer node definition\n// Define a network adapter\n// Assign IP address\ntn \"eth1\", {\n    ip \"1\"\n}\n\ntn \"eth3\", {\n    ip \"3\"\n}\n\ntn \"server\", {\n    ip \"2\"\n}\n\nexpander \"bacnet-gw-1\", {\n    connect \"eth4\"\n    model \"bacnet\"\n}\n\n// Expander node definition\n// Define CAN network gateway\n// Connect to the Transfer node\nexpander \"can-gw\", {\n    connect \"eth1\"\n    model \"bacnet\"\n}\n\n\n// Expander node definition\n// Define Bacnet network gateway\n// Connect to the Transfer node\nexpander \"bacnet-gw\", {\n    connect \"eth3\"\n    model \"bacnet\"\n}\n\n// Temp sensor definition\n// Connect sensor to CAN bus\n// Set measure values final destination address (2)\nsan \"temp-sensor-can-1\",{\n    connect \"can-gw\"\n    destAddress \"2\"\n    freq \"2000\" }\n\nsan \"temp-sensor-can-2\",{\n    connect \"can-gw\"\n    destAddress \"2\"\n    freq \"200\"\n}\n\n// Draw graph\naction \"draw\", {\n    fullmap \"true\"\n}\n\n// Run simulation phase. Stop simulation after 60 sec.\naction \"sim\", {\n    stop \"60000\"\n}\n\n```\n\nTo start the simulation provide a SMOL script as a parameter:\n\n```\njava -jar target/smol-1.0-SNAPSHOT.jar network.smol\n```\n\nExpected results:\n\n* Graph that describes network connections and relations. You can modify graph layout by selecting the appropriate options.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"readme-media/graph_example.png?raw=true\" alt=\"graph_example\"/\u003e\n\u003c/p\u003e\n\n\nSimulation results:\n\n* The plot below describes network traffic generated by 3 separate network adapters working in the same network segment. Simulating network is 1Mb/s. Maximum throughput of such network is around 83 Frames per second. During this simulation, we assume that a single frame has 1500B.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"readme-media/smol.png?raw=true\" alt=\"plot_smol\"/\u003e\n\u003c/p\u003e\n\n\n\n## SMOL syntax elements\n\n* `tn \"name\" { ip address }`\n*  `expander \"name\" { connect device_name, model type }`\n* `san \"name\" { connect device_name, destAddress ip_address, freq value_generation_frequency }`\n\n\n## MQTT simulation\nTo simulate the mqtt protocol, use \"mqtt\" model type in the expander.\n#### Syntax elements\n* destAddress - ip address of the broker that is connected to transferring node, client publishes messages to this address       \n* pubTopics - list of topics on which client publishes messages, separated by a comma\n* subTopics - list of topics subscribed by the client, separated by a comma, the broker transfers messages to subscribed clients\n\n#### Example\n```\ntn \"eth1\", {\n    ip \"1\"\n}\n\ntn \"eth2\", {\n    ip \"2\"\n}\n\ntn \"eth3\", {\n    ip \"3\"\n}\n\ntn \"eth4\", {\n    ip \"4\"\n}\n\nexpander \"mqtt-adapter-1\", {\n    connect \"eth1\"\n    model \"mqtt\"\n}\n\nexpander \"mqtt-adapter-2\", {\n    connect \"eth2\"\n    model \"mqtt\"\n}\n\nexpander \"mqtt-adapter-3\", {\n    connect \"eth3\"\n    model \"mqtt\"\n}\n\nexpander \"mqtt-adapter-4\", {\n    connect \"eth4\"\n    model \"mqtt\"\n}\n\n//broker\nsan \"mqtt-broker-1\",{\n    connect \"mqtt-adapter-1\"\n    freq \"50\"\n}\n\n// only publish\nsan \"mqtt-client-1\",{\n    connect \"mqtt-adapter-2\"\n    destAddress \"1\"\n    pubTopics \"pir,hvac\"\n    freq \"500\"\n}\n\n// only subscribe\nsan \"mqtt-client-2\",{\n    connect \"mqtt-adapter-3\"\n    destAddress \"1\"\n    subTopics \"pir,hvac\"\n    freq \"500\"\n}\n\n// publish and subscribe\nsan \"mqtt-client-3\",{\n    connect \"mqtt-adapter-4\"\n    destAddress \"1\"\n    pubTopics \"pir,hvac\"\n    subTopics \"pir,hvac\"\n    freq \"500\"\n}\n\naction \"draw\", {\n    fullmap \"true\"\n}\n\naction \"sim\", {\n    stop \"10000\"\n}\n```\n\n#### Logs\n* Client -\u003e broker | client_name | ip_address: message\n* Broker -\u003e client | client_name | ip_address: message\n* Received | client_name | ip_address: message\n\nMessage contains: srcAddress, dstAddress, transmissionTime, data (topic:UUID)\n\n## References\n* Z.Kowalczuk, J.Wszolek - Analysis Of Economical Lighting Of Highways In The Environment Of SMOL Language. Metrology and Measurement Systems, Polish Academy of Sciences. (2017)\n\n* Z.Kowalczuk, J.Wszolek - Networked Object Monitor - a distributed system for monitoring, diagnostics and control of complex industrial facilities. Metrology And Measurement Systems, ISSN 0860-8229 (2012)\n\n  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwszolek%2Fsmol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjwszolek%2Fsmol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwszolek%2Fsmol/lists"}