Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
834a7bb
Bump Charon and Obol
N1ark Apr 22, 2026
3725362
Separate externs/intrinsics handling + fix poly
N1ark Apr 22, 2026
7d033af
Update intrinsics script for new Charon AST
N1ark Apr 24, 2026
328b767
Add automated stub generation
N1ark Apr 25, 2026
49e6e0b
organise into folders
N1ark Apr 25, 2026
0a2ca42
simplify
N1ark Apr 25, 2026
7bef33a
organise intrinsics into folders
N1ark Apr 25, 2026
cbe3e78
reorganise externs
N1ark Apr 25, 2026
1c1950d
remove leading underscores in arguments
N1ark Apr 25, 2026
0e8317f
finish cleaning
N1ark Apr 25, 2026
be60f71
Rename `intrinsincs.py` -> `stubs.py`
N1ark Apr 25, 2026
083773e
I guess soteria should be stubbed like the rest
N1ark Apr 25, 2026
9ca9b3a
Merge branch 'main' into stubs
N1ark Apr 25, 2026
11470aa
Merge branch 'main' into stubs
N1ark Apr 25, 2026
75e6c62
support "with sig" in stubs + fixes
N1ark Apr 25, 2026
2e5c22e
Update eval.ml
N1ark Apr 25, 2026
e3de179
Migrate new stubs
N1ark Apr 25, 2026
e0cb3be
Delete intrinsics.py
N1ark Apr 25, 2026
9315a03
Add missing stub
N1ark Apr 25, 2026
b03cbe3
support custom "with" in patterns
N1ark Apr 25, 2026
1cf1d81
move comment
N1ark Apr 25, 2026
ab3ab00
this comment disappeared? @claude come on
N1ark Apr 25, 2026
4fdbccc
hehe
N1ark Apr 25, 2026
163ea3f
Saner JSON + schema
N1ark Apr 26, 2026
6a1b60d
We never needed that Miri lib
N1ark Apr 27, 2026
2b3aecc
Better stubs.json
N1ark Apr 27, 2026
88ba413
match on impl elems too + tokio !!
N1ark Apr 27, 2026
321618b
Add soteria comment
N1ark Apr 27, 2026
d7d0e4d
Add pattern aliases
N1ark Apr 27, 2026
591ff17
Add `include` to stubs json
N1ark Apr 27, 2026
cb89398
Add alias of std::rt::begin_panic
N1ark Apr 27, 2026
d5edfa7
Document `eval.ml`
N1ark May 2, 2026
437893c
Merge branch 'main' into stubs
N1ark May 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ env:
OCAML_VERSION: 5.4.0
# [versionsync: OBOL_REPO=soteria-tools/obol]
OBOL_REPO: soteria-tools/obol
# [versionsync: OBOL_COMMIT_HASH=3d2266de79f1e2e601b7a82f6803b649cbe6953c]
OBOL_COMMIT_HASH: 3d2266de79f1e2e601b7a82f6803b649cbe6953c
# [versionsync: OBOL_COMMIT_HASH=ddea5ca5da4c07301584f47f05ea8615fc365b41]
OBOL_COMMIT_HASH: ddea5ca5da4c07301584f47f05ea8615fc365b41
# [versionsync: CHARON_REPO=soteria-tools/charon]
CHARON_REPO: soteria-tools/charon
# [versionsync: CHARON_COMMIT_HASH=fbd54169205bf97e3c42cbfef95ca5807d697bfb]
CHARON_COMMIT_HASH: fbd54169205bf97e3c42cbfef95ca5807d697bfb
# [versionsync: CHARON_COMMIT_HASH=fa7ff7118fc9f695ecde2b4aa8401fe3ea195fba]
CHARON_COMMIT_HASH: fa7ff7118fc9f695ecde2b4aa8401fe3ea195fba

jobs:
build:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:
env:
# [versionsync: OBOL_REPO=soteria-tools/obol]
OBOL_REPO: soteria-tools/obol
# [versionsync: OBOL_COMMIT_HASH=3d2266de79f1e2e601b7a82f6803b649cbe6953c]
OBOL_COMMIT_HASH: 3d2266de79f1e2e601b7a82f6803b649cbe6953c
# [versionsync: OBOL_COMMIT_HASH=ddea5ca5da4c07301584f47f05ea8615fc365b41]
OBOL_COMMIT_HASH: ddea5ca5da4c07301584f47f05ea8615fc365b41

jobs:
test-soteria-c-package:
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,12 @@ We support two frontends: [Obol](https://github.com/soteria-tools/obol) and [Cha

**Manual installation:**
1. **Clone Obol at the correct commit:**
<!-- [versionsync: OBOL_COMMIT_HASH=3d2266de79f1e2e601b7a82f6803b649cbe6953c] -->
<!-- [versionsync: OBOL_COMMIT_HASH=ddea5ca5da4c07301584f47f05ea8615fc365b41] -->
```sh
cd ..
git clone https://github.com/soteria-tools/obol.git
cd obol
git checkout 3d2266de79f1e2e601b7a82f6803b649cbe6953c
git checkout ddea5ca5da4c07301584f47f05ea8615fc365b41
```
> **Note:** The required commit hash can always be found in [`scripts/versions.json`](scripts/versions.json) under `OBOL_COMMIT_HASH`.

Expand All @@ -168,12 +168,12 @@ We support two frontends: [Obol](https://github.com/soteria-tools/obol) and [Cha

**Manual installation:**
1. **Clone Charon at the correct commit:**
<!-- [versionsync: CHARON_COMMIT_HASH=fbd54169205bf97e3c42cbfef95ca5807d697bfb] -->
<!-- [versionsync: CHARON_COMMIT_HASH=fa7ff7118fc9f695ecde2b4aa8401fe3ea195fba] -->
```sh
cd ..
git clone https://github.com/soteria-tools/charon.git
cd charon
git checkout fbd54169205bf97e3c42cbfef95ca5807d697bfb
git checkout fa7ff7118fc9f695ecde2b4aa8401fe3ea195fba
```
> **Note:** The required commit hash can always be found in [`scripts/versions.json`](scripts/versions.json) under `CHARON_COMMIT_HASH`.

Expand Down
4 changes: 2 additions & 2 deletions scripts/versions.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"_comment": "Central version configuration for Soteria. Run `scripts/versionsync.py check` to verify versions are in sync, or `scripts/versionsync.py update` to update versions everywhere.",
"CHARON_REPO": "soteria-tools/charon",
"CHARON_COMMIT_HASH": "fbd54169205bf97e3c42cbfef95ca5807d697bfb",
"CHARON_COMMIT_HASH": "fa7ff7118fc9f695ecde2b4aa8401fe3ea195fba",
"OBOL_REPO": "soteria-tools/obol",
"OBOL_COMMIT_HASH": "3d2266de79f1e2e601b7a82f6803b649cbe6953c",
"OBOL_COMMIT_HASH": "ddea5ca5da4c07301584f47f05ea8615fc365b41",
"OCAMLFORMAT_VERSION": "0.28.1",
"OCAML_VERSION": "5.4.0"
}
8 changes: 4 additions & 4 deletions soteria-rust.opam
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ build: [
dev-repo: "git+https://github.com/soteria-tools/soteria.git"
# Versions managed by scripts/versionsync.py - edit scripts/versions.json to change
pin-depends: [
# [versionsync: CHARON_COMMIT_HASH=fbd54169205bf97e3c42cbfef95ca5807d697bfb]
["name_matcher_parser.~dev" "git+https://github.com/soteria-tools/charon#fbd54169205bf97e3c42cbfef95ca5807d697bfb"]
# [versionsync: CHARON_COMMIT_HASH=fbd54169205bf97e3c42cbfef95ca5807d697bfb]
["charon.~dev" "git+https://github.com/soteria-tools/charon#fbd54169205bf97e3c42cbfef95ca5807d697bfb"]
# [versionsync: CHARON_COMMIT_HASH=fa7ff7118fc9f695ecde2b4aa8401fe3ea195fba]
["name_matcher_parser.~dev" "git+https://github.com/soteria-tools/charon#fa7ff7118fc9f695ecde2b4aa8401fe3ea195fba"]
# [versionsync: CHARON_COMMIT_HASH=fa7ff7118fc9f695ecde2b4aa8401fe3ea195fba]
["charon.~dev" "git+https://github.com/soteria-tools/charon#fa7ff7118fc9f695ecde2b4aa8401fe3ea195fba"]
]
8 changes: 4 additions & 4 deletions soteria-rust.opam.template
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Versions managed by scripts/versionsync.py - edit scripts/versions.json to change
pin-depends: [
# [versionsync: CHARON_COMMIT_HASH=fbd54169205bf97e3c42cbfef95ca5807d697bfb]
["name_matcher_parser.~dev" "git+https://github.com/soteria-tools/charon#fbd54169205bf97e3c42cbfef95ca5807d697bfb"]
# [versionsync: CHARON_COMMIT_HASH=fbd54169205bf97e3c42cbfef95ca5807d697bfb]
["charon.~dev" "git+https://github.com/soteria-tools/charon#fbd54169205bf97e3c42cbfef95ca5807d697bfb"]
# [versionsync: CHARON_COMMIT_HASH=fa7ff7118fc9f695ecde2b4aa8401fe3ea195fba]
["name_matcher_parser.~dev" "git+https://github.com/soteria-tools/charon#fa7ff7118fc9f695ecde2b4aa8401fe3ea195fba"]
# [versionsync: CHARON_COMMIT_HASH=fa7ff7118fc9f695ecde2b4aa8401fe3ea195fba]
["charon.~dev" "git+https://github.com/soteria-tools/charon#fa7ff7118fc9f695ecde2b4aa8401fe3ea195fba"]
]
23 changes: 23 additions & 0 deletions soteria-rust/lib/builtins/core.ml
Original file line number Diff line number Diff line change
Expand Up @@ -208,4 +208,27 @@ module M (StateM : State.StateM.S) = struct
State.load ptr ty
in
Soteria.Symex.Compo_res.is_ok res

let parse_string ptr =
let str_ty : Charon.Types.ty =
TAdt
{ id = TBuiltin TStr; generics = Charon.TypesUtils.empty_generic_args }
in
let+ str_data = State.load ptr str_ty in
let map_opt f l = Option.bind l (Monad.OptionM.all f) in
match str_data with
| Tuple bytes ->
Some bytes
|> map_opt (function Int b -> Typed.BitVec.to_z b | _ -> None)
|> Option.map (fun cs ->
let cs = List.map (fun z -> Char.chr (Z.to_int z)) cs in
let str = String.of_seq @@ List.to_seq cs in
if
String.starts_with ~prefix:"\"" str
&& String.ends_with ~suffix:"\"" str
then
let unquoted = String.sub str 1 (String.length str - 2) in
try Scanf.unescaped unquoted with _ -> unquoted
else str)
| _ -> None
end
Loading
Loading