View Source Ash.SatSolver (ash v3.4.28)

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

Functions

Creates tuples of a boolean statement.

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

Link to this function

find_non_equal_overlap(expression)

View Source
Link to this function

left_excludes_right(left, right)

View Source

Returns b(not (left and right))

Link to this function

left_implies_right(left, right)

View Source

Returns b(not (left and not right))

Link to this function

lift_equals_out_of_in(expression)

View Source
Link to this function

mutually_exclusive(predicates, acc \\ [])

View Source

Returns a statement expressing that the predicates are mutually exclusive.

Link to this function

mutually_exclusive_and_collectively_exhaustive(predicates)

View Source

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

Link to this function

mutually_inclusive(predicates, acc \\ [])

View Source

Returns a statement expressing that the predicates are mutually inclusive

Link to this function

right_excludes_left(left, right)

View Source

Returns b(not (right and left))

Link to this function

right_implies_left(left, right)

View Source

Returns b(not (right and not left))

Link to this function

solutions_to_predicate_values(solution, bindings)

View Source
Link to this function

split_in_expressions(sub_expr, non_equal_overlap)

View Source
Link to this function

strict_filter_subset(filter, candidate)

View Source

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

Link to this function

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

View Source

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.

Link to this function

transform(resource, expression)

View Source

Prepares a filter for comparison

Link to this function

transform_and_solve(resource, expression)

View Source

Calls transform/2 and solves the expression

Remaps integers back to clauses