Skip to content

Commit

Permalink
Remove unused helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
rix0rrr committed Mar 9, 2022
1 parent e4c3a2a commit 8fbee24
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions packages/@aws-cdk/aws-iam/docs/policy-merging.als
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,6 @@ run show_some_allowed_requests {
//-------------------------------------------------------
// Statement merging

// Helpers to assert that certain fields are the same
let sameAction[a, b] = { a.action = b.action and a.notAction = b.notAction }
let sameResource[a, b] = { a.resource = b.resource and a.notResource = b.notResource }
let samePrincipal[a, b] = { a.principal = b.principal and a.notPrincipal = b.notPrincipal }

// Assert that m is the merged version of a and b
//
// This encodes the important logic: the rules of merging.
Expand All @@ -111,7 +106,7 @@ pred merged[a: Statement, b: Statement, m: Statement] {
m.notResource = b.notResource
m.principal = a.principal + b.principal
m.notPrincipal = a.notPrincipal
m.notPrincipal = b.notPrincipal
m.notPrincipal = b.notPrincipal
}

run show_some_nontrivial_merges {
Expand Down

0 comments on commit 8fbee24

Please sign in to comment.