Skip to content

Commit 89f0338

Browse files
committed
Fix case study bug introduced by the newest engine version.
1 parent a474032 commit 89f0338

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,12 @@ By providing additional `OPTIONS` (CLI arguments), you can receive more detailed
8989
This enables, for example, to generate witness networks or summarize update functions of the satisfying BNs.
9090
To see the details regarding program's optional arguments, you can run
9191
```
92-
.\target\release\sketches-inference --help`
92+
.\target\release\sketches-inference --help
9393
```
9494

95-
95+
See the section `Benchmarks and Evaluation` below on how to run more specialized inference cases,
96+
such as inference from attractor data. Note that everything can be run using the general inference script.
97+
However, the specialized methods might provide further optimizations or simpler user interface.
9698

9799
## Benchmarks and Evaluation
98100

src/bin/case_study_tlgl.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use boolean_network_sketches::utils::{
55
};
66

77
use biodivine_hctl_model_checker::mc_utils::get_extended_symbolic_graph;
8-
use biodivine_hctl_model_checker::model_checking::model_check_formula;
8+
use biodivine_hctl_model_checker::model_checking::model_check_formula_dirty;
99

1010
use biodivine_lib_param_bn::biodivine_std::traits::Set;
1111
use biodivine_lib_param_bn::BooleanNetwork;
@@ -81,7 +81,7 @@ fn case_study_part_1() {
8181
println!("Analysing candidate set...");
8282

8383
// compute attractors symbolically
84-
let attrs_all_candidates = model_check_formula("!{x}: AG EF {x}".to_string(), &graph).unwrap();
84+
let attrs_all_candidates = model_check_formula_dirty("!{x}: AG EF {x}".to_string(), &graph).unwrap();
8585
println!("Attractors for all candidates computed");
8686
println!(
8787
"Elapsed time from the start of this computation: {}ms",
@@ -91,7 +91,7 @@ fn case_study_part_1() {
9191

9292
// check for candidates without attractor for programmed cell death
9393
let programmed_cell_death_formula = "Apoptosis_ & ~S1P & ~sFas & ~Fas & ~Ceramide_ & ~Caspase & ~MCL1 & ~BID_ & ~DISC_ & ~FLIP_ & ~CTLA4_ & ~TCR & ~IFNG_ & ~CREB & ~P2 & ~SMAD_ & ~GPCR_ & ~IAP_";
94-
let pcd = model_check_formula(programmed_cell_death_formula.to_string(), &graph).unwrap();
94+
let pcd = model_check_formula_dirty(programmed_cell_death_formula.to_string(), &graph).unwrap();
9595
let colors_not_pcd = graph
9696
.mk_unit_colors()
9797
.minus(&attrs_all_candidates.intersect(&pcd).colors());
@@ -107,7 +107,7 @@ fn case_study_part_1() {
107107

108108
// check for candidates with unwanted attractor states
109109
let unwanted_state_formula = "Apoptosis_ & (S1P | sFas | Fas | Ceramide_ | Caspase | MCL1 | BID_ | DISC_ | FLIP_ | CTLA4_ | TCR | IFNG_ | CREB | P2 | SMAD_ | GPCR_ | IAP_)";
110-
let unwanted_states = model_check_formula(unwanted_state_formula.to_string(), &graph).unwrap();
110+
let unwanted_states = model_check_formula_dirty(unwanted_state_formula.to_string(), &graph).unwrap();
111111
let colors_with_unwanted_states = attrs_all_candidates.intersect(&unwanted_states).colors();
112112
println!(
113113
"{} candidates have unwanted states in attractors, such as:\n",
@@ -141,6 +141,7 @@ fn case_study_part_2(summarize_candidates: bool) {
141141
// create the partially specified BN object
142142
let bn = BooleanNetwork::try_from(aeon_string.as_str()).unwrap();
143143
println!("Loaded BN model with {} components.", bn.num_vars());
144+
// create the STG object
144145
let mut graph = get_extended_symbolic_graph(&bn, 2).unwrap();
145146
println!(
146147
"Model has {} symbolic parameters.",
@@ -176,7 +177,7 @@ fn case_study_part_2(summarize_candidates: bool) {
176177
diseased_attractor.to_string(),
177178
];
178179
let formula = mk_formula_forbid_other_attractors(attr_set);
179-
let inferred_colors = model_check_formula(formula, &graph).unwrap().colors();
180+
let inferred_colors = model_check_formula_dirty(formula, &graph).unwrap().colors();
180181
println!(
181182
"{} consistent candidate networks found in total",
182183
inferred_colors.approx_cardinality()

0 commit comments

Comments
 (0)