Declarative language for dynamical properties#
Summary#
In the scope of a BoNesis(dom, data) object, the following methods are defined.
Note
This document summarizes (most of) constraints that can be specified with BoNesis. Do not hesitate to open a discussion or an issue on our GitHub project to suggest new language features, or ask for help on how to express your desired properties.
Objects#
Observation#
maps a subset of components to a Boolean value
O = obs({a:0, b:1,..}) |
Observation from partial mapping of components to 0 or 1 (dict-like object) |
O = obs("name") |
data dictionary |
Configuration#
maps each component to a Boolean value
C = cfg() |
Allocates a fresh configuration |
C = +O |
Fresh configuration matching with the observation O |
C = ~O |
Default configuration matching with the observation O |
Dynamic configuration#
maps each component to either a Boolean value or a most permissive dynamic state (see Most Permissive update mode) . Currently, there is no way to enforce the type of dynamic state, nor to prevent a component to be assigned to a Boolean value.
Dynamic configurations are, by definition, transient configurations. They are useful to account for intermediary states that cannot be modeled as Boolean value.
D = dyncfg() |
Allocates a dynamical configurations |
D = dyncfg(O) |
Dynamical configuration matching with the observation O |
Dynamic configurations can be used in place of (Boolean) configurations in all the constraints.
Note that whenever it is involved in a fixed point constraint (fixed(D)), all components will necessarily be assigned to a Boolean state.
Variable#
S = Some(max_size=k, exclude=(), domain=()) |
Represents a mutation of at most k (default: 1) components.Use S.assignments() to get satisfying valuations.Options exclude and domain can be used to restrict the components to consider.
|
Properties#
Constraints on configurations#
C != C' |
The configurations C and C' differ on at least one component |
C[a] == C'[b] | 0 | 1 | The state of the component a in the configuration C is equal (resp. different) to the state of the component b in the configuration C' (resp. 0 and 1) |
C[a] != C'[b] | 0 | 1 |
|
C != O |
The configuration C does not match with the observation O |
Attractor properties#
fixed(C) |
The configuration C is a fixed point |
fixed(O) |
There exists a trap space where observation O is fixed |
in_attractor(C) |
The configuration C belongs to an attractor |
Reachability#
C >= C' or reach(C,C') |
There exists an MP trajectory from the configuration C to the configuration C' |
C >= O |
... to a configuration matching with the observation O (equiv to C >= +O) |
C >= fixed(O) |
... to a configuration in a trap space where the observation O is fixed |
Note: can be composed, e.g., C1 >= C2 >= fixed(C3) |
|
C / _ or nonreach(C, _) |
Absence of MP trajectory from the configuration C to ... (same as reach) |
Universal properties#
all_fixpoints({O,O',..}) |
All the fixed points match with at least one given observation |
C >> "fixpoints" ^ {O,O',..} |
All the fixed points reachable from the configuration C ... |
Contexts#
with mutant({a:0,..} | S): ...
|
The properties within the with block are subject to mutation specified by {a:0,..} (resp. S) |
Optimizations#
maximize_nodes() |
Maximize the number of nodes in the Boolean network (to be used in conjunction with option `allow_skipping_nodes=True` of `InfluenceGraph`) |
maximize_constants() |
Maximize the number of nodes having a constant Boolean function |
maximize_strong_constants() |
Maximize the number of nodes having a constant Boolean function and being assigned to this constant in all defined configurations. |