GithubHelp home page GithubHelp logo

coco-team / cocosim-deprecated Goto Github PK

View Code? Open in Web Editor NEW
23.0 14.0 9.0 43.15 MB

Automated Analysis Framework for Simulink/Stateflow (deprecated, see cocoSim2)

Home Page: https://coco-team.github.io/cocosim/

License: Other

MATLAB 84.77% HTML 0.38% Python 1.27% TeX 0.97% CSS 12.37% Limbo 0.13% Shell 0.11%
simulink matlab verification stateflow rust c lustre compiler

cocosim-deprecated's Introduction

Build Status

CoCoSim

CoCoSim is an automated analysis and code generation framework for Simulink and Stateflow models. Specifically, CoCoSim can be used to verify automatically user-supplied safety requirements. Moreover, CoCoSim can be used to generate C and/or Rust code. CoCoSim uses Lustre as its intermediate language. CoCoSim is currently under development. We welcome any feedback and bug report.

ScreenCast of CoCoSim

CoCoSim ToolBox

The CoCoSim toolbox contains linux and osx binariers for the backend solvers. Download the CoCoSim ToolBox

Installation

CoCoSim can be installed and used as follows:

Dependencies

  • MATLAB(c) version R2014b or newer
  • Zustre
  • (Optional) JKind -- Best for Windows OS users
  • (Optional) Kind2
  • Python2.7

Configuration

  • Place the different solvers (Zustre, Kind2, JKind) under cocosim/tools/verifiers/.
  • Set the configuration for the backend solvers in src/config.m:
  • ZUSTRE: Path to Zustre binary.
  • KIND2: Path to Kind2 binary.
  • LUSTREC: Path to LustreC binary.
  • Z3: Path to Z3 binary. If you install Zustre, Z3 can be found in ZUSTRE_PATH/build/run/bin/z3.
  • JKIND: Path to JKind.

Launching

  • Launch Matlab(c)
  • Navigate to cocosim/
  • Just run the file start_cocosim
  • Make sure to have one of the backround solvers installed (e.g. Zustre, Kind2 and or JKind)
  • You can now open your Simulink model, e.g. open test/properties/safe_1.mdl

# Example

  1. To test a safe property: open test/properties/safe_1.mdl
  2. Under the Tools menu choose Verify with ... and then Zustre (or JKind if you are under Windows OS).
  3. To test an unsafe property (which also provide a counterexample): open test/properties/unsafe_1.mdl

More information about CoCoSim can be found here

Waffle

Stories in Ready Throughput Graph

Developers

  • Lead Developer: Temesghen Kahsai

  • Current Contributors: Hamza Bourbouh (SGT - USA), Pierre-Loic Garoche (Onera - France), Claire Pagetti (Onera - France), Eric Noulard (Onera - France), Thomas Loquen (Onera - France), Xavier Thirioux (ENSEEIHT - France)

  • Past Contributors: Arnaud Dieumegard (Fabruary - August 2015)

Acknowledgments and Disclaimers

CoCoSim is partially funded by:

  • NASA NRA NNX14AI09G
  • NSF award 1136008

Any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s) do not necessarily reflect the views of NASA and NSF.

cocosim-deprecated's People

Contributors

hbourbouh avatar lememta avatar ploc avatar waffle-iron avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cocosim-deprecated's Issues

White list of blocks to be abstracted

Create a list of blocks that we have seen that are not important for verification (e.g. message viewer in Stateflow). Such list will be used in the pre-processor and the blocks will be ignored.

Support for trigonometric functions

Currently, there is a support for trigonometric functions, by statically linking the generated lustre code with a library of trig functions (i.e. generated via interpolation). Fix the choice between open<math> and the one generated via generate_table.py

Unsupported blocks

In case of unsupported blocks the error should be more useful.

Eg when in presence of a contunuous block, I would be great to have an error message suggesting the use of model discretizer.

For the discrte ones, we should cover the simpler variation of the z expressions

Silent error from lustrec

In case of compilation failure, for example when generating C code from Simulink, the error message within Matlab is not useful. Please provide a log of lustrec error as well.

Renaming of variables -- Non alphanumeric characters

When block or subsystems names contains non alphanumeric character the generated lustre file is not usable. Recall that lustrec lexer rule for identifier is ['' 'a'-'z'] [ '' 'a'-'z' 'A'-'Z' '0'-'9']*
In the current version, parenthesis are renamed as lpar rpar, but comma ',', plus '+' are preserved.
They should be encoded as well as strings.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.