# View Source Ash.SatSolver(ash v3.0.2)

Tools for working with the satsolver that drives filter subset checking (for authorization)

# Summary

## Functions

Creates tuples of a boolean statement.

Returns `b(not (left and right))`

Returns `b(not (left and not right))`

Returns a statement expressing that the predicates are mutually exclusive.

Returns a statement expressing that the predicates are mutually exclusive and collectively exhaustive.

Returns a statement expressing that the predicates are mutually inclusive

Returns `b(not (right and left))`

Returns `b(not (right and not left))`

Returns true if the candidate filter returns the same or less data than the filter

Returns `true` if the relationship paths are synonymous from a data perspective

Transforms a statement to Conjunctive Normal Form(CNF), as lists of lists of integers.

Prepares a filter for comparison

Calls `transform/2` and solves the expression

Remaps integers back to clauses

# b(statement)

View Source (macro)

Creates tuples of a boolean statement.

i.e `b(1 and 2) #=> {:and, 1, 2}`

View Source

View Source

# left_excludes_right(left, right)

View Source

Returns `b(not (left and right))`

# left_implies_right(left, right)

View Source

Returns `b(not (left and not right))`

View Source

# mutually_exclusive(predicates, acc \\ [])

View Source

Returns a statement expressing that the predicates are mutually exclusive.

# mutually_exclusive_and_collectively_exhaustive(predicates)

View Source

Returns a statement expressing that the predicates are mutually exclusive and collectively exhaustive.

# mutually_inclusive(predicates, acc \\ [])

View Source

Returns a statement expressing that the predicates are mutually inclusive

# right_excludes_left(left, right)

View Source

Returns `b(not (right and left))`

# right_implies_left(left, right)

View Source

Returns `b(not (right and not left))`

View Source

View Source

View Source

# strict_filter_subset(filter, candidate)

View Source

Returns true if the candidate filter returns the same or less data than the filter

# synonymous_relationship_paths?(left_resource, candidate, search, right_resource \\ nil)

View Source

Returns `true` if the relationship paths are synonymous from a data perspective

# to_cnf(expression)

View Source

Transforms a statement to Conjunctive Normal Form(CNF), as lists of lists of integers.

# transform(resource, expression)

View Source

Prepares a filter for comparison

# transform_and_solve(resource, expression)

View Source

Calls `transform/2` and solves the expression