{"id":18422487,"url":"https://github.com/sri-csl/hybridsal","last_synced_at":"2025-04-13T13:44:28.319Z","repository":{"id":137662166,"uuid":"249601976","full_name":"SRI-CSL/HybridSal","owner":"SRI-CSL","description":null,"archived":false,"fork":false,"pushed_at":"2020-03-31T10:43:55.000Z","size":8668,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-02-16T07:27:17.498Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SRI-CSL.png","metadata":{"files":{"readme":"README","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-24T03:17:54.000Z","updated_at":"2020-08-25T11:54:41.000Z","dependencies_parsed_at":"2024-07-16T05:15:10.084Z","dependency_job_id":null,"html_url":"https://github.com/SRI-CSL/HybridSal","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SRI-CSL%2FHybridSal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SRI-CSL%2FHybridSal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SRI-CSL%2FHybridSal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SRI-CSL%2FHybridSal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SRI-CSL","download_url":"https://codeload.github.com/SRI-CSL/HybridSal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248724491,"owners_count":21151557,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-06T04:30:23.885Z","updated_at":"2025-04-13T13:44:28.299Z","avatar_url":"https://github.com/SRI-CSL.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nContents of this directory:\n---------------------------\n\nREADME: This file\n\nCOPYRIGHT: The content in file COPYRIGHT applies to ALL files \n(recursively) inside this directory except the hybridsal2xml \nsubdirectory.  Files in that directory inherit the SAL licence.\n\nINSTALL.txt: Instructions for installing the software\n\nMakefile: Makefile\n\nsrc/ : Source code of the relational abstractor for hybrid systems\n\nmodelica2hsal/ : A tool for converting Modelica XML models into HybridSal\n\nexamples/ : Examples \n  The examples are written as \u003cfilename\u003e.hsal \n  The relational abstractor AUTOMATICALLY constructs\n  \u003cfilename\u003e.hasal and \u003cfilename\u003e.sal\n    \u003cfilename\u003e.hsal :  HybridSAL specification of the hybrid system\n    \u003cfilename\u003e.hasal: Augmented HybridSAL (original + abstraction)\n    \u003cfilename\u003e.sal:   SAL file containing abstraction of \u003cfilename\u003e.hsal\n\nhybridsal2xml/ : This directory contains code that parses a HybridSAL\n (or Augmented HybridSAL file) and creates an XML for it.\n \n\nHow to run the tool?\n---------------------\nAfter installing (see file INSTALL.txt), you can use the tool by\n(A) Running an existing example, such as,\n     bin/modelica2sal  modelica2hsal/examples/RCEngine.xml modelica2hsal/examples/context-property.xml\n\nOr, you can build your own model:\n(1) Build a .hsal model  (see examples in examples/\u003cfilename\u003e.hsal)\n  Suppose you create examples/mytest.hsal\n(2) From this directory, run the command:\n  make examples/mytest.sal\n  This should create the file examples/mytest.sal -- which is a\n  relational abstraction of the file examples/mytest.hsal\n(3) Analyze examples/mytest.sal using SAL model checkers.\n  For Step~(3), you need to download and install SAL tools\n  (http://sal.csl.sri.com).  Once installed, you can verify\n  examples/mytest.sal using the command \n  (given from inside the subdirectory examples/):\n   sal-inf-bmc -d 5 mytest \u003cproperty\u003e\n  where \u003cproperty\u003e is the name of the property inside the file\n  mytest.hsal\nFor detailed explanation on ONE small example, see the document\n doc/hsal-ra-report.pdf\n\nHow to run the demo?\n--------------------\nmake RCEngineFull\n will run the full tool on an example Modelica XML file.\n\npython cc2hsal/src/cc_modelica_hra_verifier.py cc2hsal/examples/SimplifiedShiftControllerDecl.xml modelica2hsal/examples/SDT_OM_Cyber_dss.xml\npython cc2hsal/src/cc_modelica_hra_verifier.py cc2hsal/examples/SimplifiedShiftControllerDecl.xml modelica2hsal/examples/SDT_OM_Cyber_dss.xml --mapping modelicaURI2CyPhyMap.json\npython cc2hsal/src/cc_modelica_hra_verifier.py cc2hsal/examples/SimplifiedShiftControllerDeclold.xml modelica2hsal/examples/sdt_om_cyber_dss_old.xml --mapping sdt_om_cyber_dss_old.json\npython cc2hsal/src/cc_modelica_hra_verifier.py cc2hsal/examples/SimplifiedControllersCyber_before.xml modelica2hsal/examples/SystemDesignTest-r663.xml --mapping modelicaURI2CyPhyMap_r663.json\n\nSome Simple Examples\n--------------------\nThe Linear*.hsal files contain some simple examples.\n bin/hsal2hasal examples/Linear1.hsal\nThis creates examples/Linear1.sal\n sal-inf-bmc -i -d 2 Linear1 correct\nThis model checks the property.  It fails to find a \nviolation, but also fails to prove it.\n sal-inf-bmc -i -d 2 -l helper Linear1 correct\nUsing the helper lemma, the model checker is able to\nprove the property.\n sal-inf-bmc -i -d 2 Linear1 helper\nThe helper lemma is itself successfully proved.\n\nThe following commands will verify properties of Linear5.hsal\n bin/hsal2hasal examples/Linear1.hsal\n cd examples\n sal-inf-bmc -i -d 3 Linear5 correct\n\nBlood Glucose (incomplete)\n-------------\nRelationally abstract a 8-dimensional blood glucose system:\n   bin/hsal2hasal examples/BGL.hsal\nThe model is incomplete and lacking dynamics of \nInsulin, insulin-injection controller, and a verification \nproperty.\n\nNavigation Examples:\n-------------------\nThe navigation examples are present in files nav*.hsal\nnav01b models the different squares in the grid as\ndifferent components.  HybridSAL supports compositional\nmodeling -- different components can be modeled as different \nMODULEs in HybridSAL.\n   bin/hsal2hasal examples/nav01b.hsal\n   cd examples\n   sal-inf-bmc -d 6 nav01b canreach\n   sal-inf-bmc -i -d 6 nav01b correct\nThe first command creates nav01b.sal, the last two runs of\nsal-inf-bmc check two different properties: one is false\nand the other is true (and proved by sal-inf-bmc).\n\nThe same can be done on nav01.hsal file -- which is the\nsame as nav01b.hsal, but models the entire system\nas a SINGLE MODULE, rather than as a composition of \ndifferent MODULES (as done in nav01b.hsal)\nIrrespective of the modeling style, the analysis time\nand results are the same.\n   bin/hsal2hasal examples/nav01.hsal\n   cd examples\n   sal-inf-bmc -d 6 nav01 canreach\n   sal-inf-bmc -i -d 6 nav01 correct\n\nTrain-Gate-Controller:\n----------------------\nThe file tgc.hsal contains a model of a train-gate-controller.\nNote that the discrete behavior of train, gate, and controller \nare modeled as different MODULES;  the continuous behavior\n(time elapse) is modeled as a separate MODULE; and finally \nthere is one MODULE that enforces the interaction correctly.\nThus, tgc.hsal has five modules and the system is a COMPOSITION\nof these five MODULEs.\nWe can create the relational abstraction, and then verify, using\nthe following commands:\n   bin/hsal2hasal examples/TGC.hsal\n   cd examples\n   sal-inf-bmc -i -d 10 TGC correct\n   sal-inf-bmc -d 10 TGC canreach\n   sal-inf-bmc -d 10 TGC canreach1\n\nRLC Circuit:\n------------\nA simple model of the RLC circuit using three differential equations\nis presented in RLC.hsal\n   bin/hsal2hasal -o examples/RLC.hsal\n   cd examples\n   sal-inf-bmc -i -d 5 RLC ibounded\n   sal-inf-bmc -d 5 RLC canreach\nAnalyzing the RLC circuit at certain sampling times:\n   bin/hsal2hasal -t 0.005 examples/RLC.hsal\n   cd examples\n   sal-inf-bmc -i -d 5 RLC ibounded\n   sal-inf-bmc -i -d 5 RLC canprove\n   sal-inf-bmc -d 8 RLC canreach\n \nPowertrain\n-----------\nTo analyze the powertrain model, run the following commands\n   bin/hsal2hasal -o examples/powertrain.hsal\nThis will create the file examples/powertrain.sal\nNow model check using the following commands\n   cd examples\n   sal-inf-bmc -d 12 powertrain nochatter\nThis takes about 3 minutes of real time and\nverifies the 'nochatter' property of powertrain.\n\nNow change the initial condition: increase \ngrade to 0.15 (15% grade).  This can be done by\nchanging the constant 0.05 in INITIALIZATION of \ngrade in either powertrain.hsal OR powertrain.sal \nto 0.15.  You will have to reconstruct the powertrain.sal\nfrom powertrain.hsal (using bin/hsal2hasal command above)\nif you only change the .hsal file.\nNow, re-verify.\n   sal-inf-bmc -d 12 powertrain nochatter\nYou will get a trace that shows violation of the property.\nThis will take about 3 minutes of real time.\nNote that we can analyze the property for a range of \ninitial conditions using just ONE run.\n\nOther simple examples:\n-----------------\nSimple Thermostat: SimpleThermo4.hsal\nOther linear continuous dynamical systems: Linear*.hsal\nSee doc/hsal-ra-report.pdf for explanation of the working of\nthe relational abstractor on the example examples/Linear1.hsal\n\nContact: Ashish Tiwari\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsri-csl%2Fhybridsal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsri-csl%2Fhybridsal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsri-csl%2Fhybridsal/lists"}