Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Prune_leakers #20

Merged
merged 3 commits into from
Mar 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions ibis/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ibis/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ wasm = [ "wasm-bindgen", "console_error_panic_hook" ] # Support wasm-bindgen API
[dependencies]
nom = "7.1.0"
paste = "1.0.6"
crepe = "0.1.5"
crepe = "0.1.6"
lazy_static = "1.4.0"
ibis_macros = { package = "arcsjs_ibis_macros", path = "./ibis_macros" }
serde = { version = "1.0", features = ["derive"] }
Expand Down
24 changes: 12 additions & 12 deletions ibis/src/recipes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ ibis! {
KnownType(apply!(y_generic, y_arg));

HasTag(s, n, n, tag) <- Solution(s), Claim(n, tag);
HasTag(s, source, down, tag) <- // Propagate tags 'downstream'
HasTag(s, source, *down, tag) <- // Propagate tags 'downstream'
HasTag(s, source, curr, tag),
Node(_down_particle, down, _, _),
(s.has_edge(curr, down)),
!TrustedToRemoveTag(down, tag);
for (up, down) in &s.solution().edges,
(*up == curr),
!TrustedToRemoveTag(*down, tag);

HasTag(s, source, down, tag) <- // Propagate tags 'across stream' (i.e. inside a particle)
HasTag(s, source, curr, tag),
Expand All @@ -121,18 +121,18 @@ ibis! {
LessPrivateThan(t1, t2),
HasTag(s, source, n, t2); // Check failed, node has a 'more private' tag i.e. is leaking.

TypeError(s, from, from_ty, to, to_ty) <-
Node(_from_p, from, _, from_ty),
Node(_to_p, to, _, to_ty),
TypeError(s, *from, from_ty, *to, to_ty) <-
Solution(s),
(s.has_edge(from, to)),
for (from, to) in &s.solution().edges,
Node(_from_p, *from, _, from_ty),
Node(_to_p, *to, _, to_ty),
!Subtype(from_ty, to_ty); // Check failed, from writes an incompatible type into to

CapabilityError(s, from, from_capability, to, to_capability) <-
Node(_from_p, from, from_capability, _),
Node(_to_p, to, to_capability, _),
CapabilityError(s, *from, from_capability, *to, to_capability) <-
Solution(s),
(s.has_edge(from, to)),
for (from, to) in &s.solution().edges,
Node(_from_p, *from, from_capability, _),
Node(_to_p, *to, to_capability, _),
!Capability(from_capability, to_capability); // Check failed, from writes an incompatible type into to

KnownType(x) <- Node(_par, _node, _cap, x); // Infer types that are used in the recipes.
Expand Down