Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python3 ? #16

Open
omrischwarz opened this issue Mar 13, 2024 · 4 comments
Open

Python3 ? #16

omrischwarz opened this issue Mar 13, 2024 · 4 comments
Labels
dependencies Pull requests that update a dependency file

Comments

@omrischwarz
Copy link

The install_cocosim script requires a Python 2 installation, which is getting more difficult to keep up. Is there a path to upgrading?

@andreaskatis
Copy link
Collaborator

andreaskatis commented Mar 14, 2024

Hi @omrischwarz,

Thanks for bringing this up and for your interest in CoCoSIm. I have yet to fully assess compatibility with Python 3, but my expectation is that it shouldn't be too much of a problem to switch to it.

For the time being, you can use the installation script by first modifying the line in the following link

[[ ${version:0:1} = 2 ]] && version_ge "$version" "$python_required_version"

to

[[ ${version:0:1} = 3 ]] && version_ge "$version" "$python_required_version"

I will leave this issue open until I have fully tested Python 3. Let me know if you encounter any further issues.

Best Regards,

Andreas

@andreaskatis andreaskatis added the dependencies Pull requests that update a dependency file label Mar 14, 2024
@omrischwarz
Copy link
Author

I can confirm that the spacer pip module is available in python3 now, so you have nothing anchoring cocosim to Python 2 any more.

My next challenge is to fill the gaps so I can generate Rust code with CocoSim. lustrec won't compile because I'm on a Mac with homebrew and OPAM won't find the zstd library as configured. But I'm working on it. Is lustrec the component that is used for generating rust code?

@andreaskatis
Copy link
Collaborator

Hi @omrischwarz ,

Thank you for the information about python. As far as Rust code generation is concerned, Kind 2 is used and not LustreC. You can read more details about it here:

https://kind.cs.uiowa.edu/kind2_user_docs/v2.1.1/9_other/4_rust_compilation.html

It's also highly experimental, so any feedback on this part would be greatly appreciated.

@omrischwarz
Copy link
Author

My use case is pretty simple: I am contending with a Simulink model that is wrapped by some C code to handle a SCADA protocol. Right now there's a race condition in the communications side. If instead of generating C code I can transpire it into Rust, and that code is light on the unsafe sections, then isolating the race conditions should become a lot easier. It's speculative work, so I'm proceeding slowly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

No branches or pull requests

2 participants