Commit graph

13 commits

Author SHA1 Message Date
Michalis Kokologiannakis
5e6d9fa6a5 genmc/api: Use returned value from handleFree()
GenMC's handleFree() does return an optional<Error>, so we
may as well use that value.
2025-11-29 13:21:55 +01:00
Michalis Kokologiannakis
b6cc543c3b genmc/api: Handle new GenMC error API
The new error-reporting mechanism of GenMC changed its public API.
This commit adjusts the Miri interface accordingly (all driver
calls need an extra argument that represents possible debugging
information).
2025-11-16 22:20:39 +01:00
Michalis Kokologiannakis
5df5103f99 genmc/build: Drop LLVM dependency from build
GenMC (v0.14.1) no longer depends on LLVM when built as a library.
This commit adjust genmc building and shim accordingly.
2025-11-16 22:20:38 +01:00
Ralf Jung
a47726f10c GenmcScalar: rename extra to provenance 2025-11-04 09:02:27 +01:00
Michalis Kokologiannakis
ec7c884a03 Use Github URL to fetch GenMC
This commit also modifies MiriInterface.hpp so that it is
compatible with GenMC's API.
2025-11-03 22:43:31 +01:00
Patrick-6
4203fe84fb Implement std::sync::Mutex interception in GenMC mode. 2025-10-07 15:32:57 +02:00
Patrick-6
574ff896d6 Implement support for temporal mixing of atomic/non-atomic accesses in GenMC mode.
Remove atomic initialization dummy writes from tests.
2025-10-01 12:35:59 +02:00
Patrick-6
8b38760176 Implement Pointer conversions to and from GenMC. Limitation: Borrow tracking must be disabled. Remove hacks for keeping all memory allocations in GenMC mode. 2025-09-29 19:12:54 +02:00
Patrick-6
1ec098878c Expand GenMC mode:
- Implement support for 'assume' statements.
- Improve scheduling and next instruction type determination.
- Improve GenMC mode documentation.

Co-authored-by: Ralf Jung <post@ralfj.de>
2025-09-23 15:35:10 +02:00
Patrick-6
2c1f1f0e9b Add GenMC estimation mode. Improve error handling and output printing. 2025-09-18 10:25:41 +02:00
Patrick-6
a70d78a552 Implement more features for GenMC mode
- Handling Compare-Exchange operations.
  - Limitation: Compare-Exchange currently ignores possibility of spurious failures.
  - Limitation: Compare-Exchange failure memory ordering is ignored.
    - Upgrade compare-exchange success ordering to avoid reporting non-existent bugs.
- Add warnings for GenMC mode for unsupported features.
- Add a lot of tests, including translation of GenMC litmus tests and Loom tests.
- Cleanup
2025-09-12 17:37:25 +02:00
Patrick-6
61af5da8df Implement more features for GenMC mode
- Support for atomic fences.
- Support for atomic read-modify-write (RMW).
- Add tests using RMW and fences.
- Add options:
  - to disable weak memory effects in GenMC mode.
  - to print GenMC execution graphs.
  - to print GenMC output message.
- Fix GenMC full rebuild issue and run configure step when commit changes.
- Do cleanup.

Co-authored-by: Ralf Jung <post@ralfj.de>
2025-09-07 23:51:17 +02:00
Patrick-6
c1be740564 Implement basic support for running Miri with GenMC.
- Implement memory allocation compatible with GenMC.
  - Extract address generator struct from Miri's allocator.
- Support thread creation and joining.
- Support atomic load and store.
- Support scheduling through GenMC.
- Add tests for GenMC mode.
- Add clang-format file for C++ code in Miri.
- Update genmc-sys crate license to MIT/Apache to match GenMC dependency.
- Add documentation for GenMC mode.

Note: this commit depends on changes to GenMC not yet upstreamed to its official repository.

Co-authored-by: Ralf Jung <post@ralfj.de>
2025-09-03 12:41:32 +02:00