pub struct RegulationConstraint { /* private fields */ }
Expand description
A helper structure which provides a collection of static functions that can be used to analyse static constraints of Boolean functions.
Implementations§
source§impl RegulationConstraint
impl RegulationConstraint
sourcepub fn mk_observability(
ctx: &SymbolicContext,
fn_is_true: &Bdd,
input: VariableId
) -> Bdd
pub fn mk_observability( ctx: &SymbolicContext, fn_is_true: &Bdd, input: VariableId ) -> Bdd
Compute a BDD representing all instantiations of a (partial) function where the given
input
is observable (also called essential).
In particular:
ctx
is a symbolic encoding of a BooleanNetwork.fn_is_true
is a BDD representing a (partially unknown) function.input
refers to the function input which should be considered observable.
Note that if fn_is_true
is fully specified, then the result is always true
or false
.
If input
does not appear in fn_is_true
at all, the result is always false
.
The main point of this function is that you can build an observability constraint for an arbitrary symbolic function. Hence, it can be used both to validate an existing regulatory graph, and to infer observability of an otherwise unspecified regulation.
sourcepub fn mk_activation(
ctx: &SymbolicContext,
fn_is_true: &Bdd,
input: VariableId
) -> Bdd
pub fn mk_activation( ctx: &SymbolicContext, fn_is_true: &Bdd, input: VariableId ) -> Bdd
Compute a BDD representing all instantiations of a (partial) function where the given
input
is an activator (also called positively monotonic).
In particular:
ctx
is a symbolic encoding of a BooleanNetwork.fn_is_true
is a BDD representing a (partially unknown) function.input
refers to the function input which should be an activator.
Note that if fn_is_true
is fully specified, then the result is always true
or false
.
If input
does not appear in fn_is_true
at all, the result is always true
.
The main point of this function is that you can build an activator constraint for an arbitrary symbolic function. Hence, it can be used both to validate an existing regulatory graph, and to infer observability of an otherwise unspecified regulation.
sourcepub fn mk_inhibition(
ctx: &SymbolicContext,
fn_is_true: &Bdd,
input: VariableId
) -> Bdd
pub fn mk_inhibition( ctx: &SymbolicContext, fn_is_true: &Bdd, input: VariableId ) -> Bdd
The same as RegulationConstraint::mk_activation, but with negative monotonicity instead of positive monotonicity.
sourcepub fn infer_sufficient_regulation(
ctx: &SymbolicContext,
regulator: VariableId,
target: VariableId,
fn_is_true: &Bdd
) -> Option<Regulation>
pub fn infer_sufficient_regulation( ctx: &SymbolicContext, regulator: VariableId, target: VariableId, fn_is_true: &Bdd ) -> Option<Regulation>
Infer the most specific Regulation which is still sufficient to correctly
cover the relationship between regulator
and target
in the provided function
(represented as a fn_is_true
Bdd).
In particular:
- If
regulator
has no effect ontarget
, returnNone
. - If
regulator
has an effect ontarget
only for some instantiations offn_is_true
, return a regulation withobservable = false
. - If
regulator
impactstarget
in every instantiation offn_is_true
, returnobservable = true
. - If all instantiations are positively/negatively monotonous, return a monotonic
regulation, otherwise return
monotonicity = None
.
sourcepub fn fix_regulation(
ctx: &SymbolicContext,
old_regulation: &Regulation,
fn_is_true: &Bdd
) -> Option<Regulation>
pub fn fix_regulation( ctx: &SymbolicContext, old_regulation: &Regulation, fn_is_true: &Bdd ) -> Option<Regulation>
Similar to Self::infer_sufficient_regulation, but it tries to keep the constraints
from the given old_regulation
assuming they are satisfiable and more restrictive
than the inferred constraints.