Search documentation of ash

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

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

# Summary

## Functions

b(statement)

Creates tuples of a boolean statement.

contains?(l1, l2)
find_non_equal_overlap(expression)
left_excludes_right(left, right)

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

left_implies_right(left, right)

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

lift_equals_out_of_in(expression)
mutually_exclusive(predicates, acc \\ [])

Returns a statement expressing that the predicates are mutually exclusive.

mutually_exclusive_and_collectively_exhaustive(predicates)

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

mutually_inclusive(predicates, acc \\ [])

Returns a statement expressing that the predicates are mutually inclusive

right_excludes_left(left, right)

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

right_implies_left(left, right)

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

solutions_to_predicate_values(solution, bindings)
solve_expression(cnf)
split_in_expressions(sub_expr, non_equal_overlap)
strict_filter_subset(filter, candidate)

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)

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

to_cnf(expression)

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

transform(resource, expression)

Prepares a filter for comparison

transform_and_solve(resource, expression)

Calls `transform/2` and solves the expression

unbind(expression, map)

Remaps integers back to clauses

# Functions

Link to this macro

# b(statement)

View Source (macro)

Creates tuples of a boolean statement.

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

Link to this function

# contains?(l1, l2)

View Source
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

# solve_expression(cnf)

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

Link to this function

# to_cnf(expression)

View Source

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

Link to this function

# unbind(expression, map)

View Source

Remaps integers back to clauses