Skip to content

Commit

Permalink
New Context API that uses CtrlNodes (#85)
Browse files Browse the repository at this point in the history
## What Changed?

Created new `CtrlNode` struct that can represent any node in the SPDG
(`CallSites`, `CallArguments`, `CtrlArguments`, and `Return`) coupled
with the corresponding `ControllerId`. Updated all of `Context`'s APIs
to use this new struct and all of the props/examples to use the new
APIs.

Some APIs like `has_marker` are not yet fully implemented. 

## Why Does It Need To?

More intuitive way to reason about the SPDG just based on nodes so
properties do not need to differentiate between the different types of
nodes if it is not necessary, which in most cases it isn't. Also makes
the policies more flexible, because now we can say "any node that is
marked x flows into any node that is marked y" rather than needing to
know the specific type of node it is.

## Checklist

- [x] Above description has been filled out so that upon quash merge we
have a
  good record of what changed.
- [x] New functions, methods, types are documented. Old documentation is
updated
  if necessary
- [x] Documentation in Notion has been updated
- [x] Tests for new behaviors are provided 
  - [ ] New test suites (if any) ave been added to the CI tests (in
`.github/workflows/rust.yml`) either as compiler test or integration
test.
*Or* justification for their omission from CI has been provided in this
PR
    description.
  • Loading branch information
livia01px2019 authored Oct 18, 2023
1 parent 8407ecc commit fd7cf5b
Show file tree
Hide file tree
Showing 7 changed files with 378 additions and 328 deletions.
Loading

0 comments on commit fd7cf5b

Please sign in to comment.