From d24a2b589c607078ccb7bdd5e8455a56195ff3aa Mon Sep 17 00:00:00 2001
From: ozgurakgun
Date: Mon, 27 May 2024 10:42:29 +0000
Subject: [PATCH] Actions: Update code coverage for main
---
coverage/main/badges/flat.svg | 14 +-
coverage/main/badges/flat_square.svg | 8 +-
coverage/main/badges/for_the_badge.svg | 8 +-
coverage/main/badges/plastic.svg | 14 +-
coverage/main/badges/social.svg | 10 +-
.../conjure_oxide/src/find_conjure.rs.html | 236 +-
coverage/main/conjure_oxide/src/index.html | 18 +-
.../conjure_oxide/src/utils/conjure.rs.html | 568 +-
.../main/conjure_oxide/src/utils/index.html | 56 +-
.../main/conjure_oxide/src/utils/json.rs.html | 428 +-
.../main/conjure_oxide/src/utils/misc.rs.html | 4 +-
.../conjure_oxide/src/utils/testing.rs.html | 736 +-
.../tests/generated_tests.rs.html | 436 +-
coverage/main/conjure_oxide/tests/index.html | 58 +-
.../conjure_oxide/tests/model_tests.rs.html | 210 +-
.../conjure_oxide/tests/rewrite_tests.rs.html | 10436 +++++-----
coverage/main/coverage.json | 2 +-
.../conjure_core/src/ast/constants.rs.html | 116 +-
.../conjure_core/src/ast/domains.rs.html | 578 +-
.../conjure_core/src/ast/expressions.rs.html | 1206 +-
.../crates/conjure_core/src/ast/index.html | 80 +-
.../conjure_core/src/ast/symbol_table.rs.html | 68 +-
.../crates/conjure_core/src/ast/types.rs.html | 4 +-
.../conjure_core/src/ast/variables.rs.html | 46 +-
.../crates/conjure_core/src/context.rs.html | 4 +-
.../crates/conjure_core/src/error.rs.html | 4 +-
.../main/crates/conjure_core/src/index.html | 46 +-
.../crates/conjure_core/src/metadata.rs.html | 138 +-
.../crates/conjure_core/src/model.rs.html | 488 +-
.../src/parse/example_models.rs.html | 538 +-
.../crates/conjure_core/src/parse/index.html | 44 +-
.../src/parse/parse_model.rs.html | 2208 +--
.../conjure_core/src/rule_engine/index.html | 86 +-
.../conjure_core/src/rule_engine/mod.rs.html | 818 +-
.../src/rule_engine/resolve_rules.rs.html | 618 +-
.../src/rule_engine/rewrite.rs.html | 1008 +-
.../conjure_core/src/rule_engine/rule.rs.html | 386 +-
.../src/rule_engine/rule_set.rs.html | 616 +-
.../conjure_core/src/rules/base.rs.html | 3272 ++--
.../conjure_core/src/rules/bubble.rs.html | 438 +-
.../crates/conjure_core/src/rules/cnf.rs.html | 4 +-
.../conjure_core/src/rules/constant.rs.html | 1048 +-
.../crates/conjure_core/src/rules/index.html | 82 +-
.../conjure_core/src/rules/minion.rs.html | 2060 +-
.../src/solver/adaptors/index.html | 28 +-
.../src/solver/adaptors/kissat.rs.html | 4 +-
.../src/solver/adaptors/minion.rs.html | 2170 +--
.../src/solver/adaptors/sat_common.rs.html | 4 +-
.../crates/conjure_core/src/solver/index.html | 20 +-
.../conjure_core/src/solver/mod.rs.html | 1126 +-
.../src/solver/model_modifier.rs.html | 4 +-
.../crates/conjure_core/src/stats/index.html | 38 +-
.../crates/conjure_core/src/stats/mod.rs.html | 66 +-
.../src/stats/solver_stats.rs.html | 68 +-
.../main/crates/conjure_macros/src/index.html | 18 +-
.../crates/conjure_macros/src/lib.rs.html | 506 +-
.../enum_compatability_macro/src/index.html | 12 +-
.../enum_compatability_macro/src/lib.rs.html | 694 +-
.../main/crates/uniplate/src/biplate.rs.html | 206 +-
coverage/main/crates/uniplate/src/index.html | 72 +-
coverage/main/crates/uniplate/src/lib.rs.html | 1881 --
.../uniplate/src/test_common/index.html | 2 +-
.../uniplate/src/test_common/paper.rs.html | 2 +-
.../main/crates/uniplate/src/tree.rs.html | 780 +-
.../main/crates/uniplate/src/uniplate.rs.html | 176 +-
.../uniplate/tests/expr_stmt_manual.rs.html | 1610 +-
.../main/crates/uniplate/tests/index.html | 18 +-
.../crates/uniplate_derive/src/index.html | 18 +-
.../crates/uniplate_derive/src/lib.rs.html | 602 +-
.../src/utils/generate.rs.html | 426 +-
.../uniplate_derive/src/utils/index.html | 2 +-
.../uniplate_derive/src/utils/parse.rs.html | 206 +-
.../crates/uniplate_derive/tests/index.html | 28 +-
.../uniplate_derive/tests/macro_tests.rs.html | 1890 +-
coverage/main/doc-coverage.json | 6 +-
coverage/main/doc-coverage.txt | 20 +-
coverage/main/index.html | 300 +-
coverage/main/lcov.info | 15838 +++++++---------
coverage/main/solvers/chuffed/src/index.html | 2 +-
coverage/main/solvers/chuffed/src/lib.rs.html | 2 +-
.../chuffed/tests/chuffed_basic_run.rs.html | 76 +-
.../chuffed/tests/chuffed_cpp_run.rs.html | 110 +-
.../solvers/chuffed/tests/dummy_test.rs.html | 40 +-
.../main/solvers/chuffed/tests/index.html | 54 +-
coverage/main/solvers/kissat/src/index.html | 28 +-
coverage/main/solvers/kissat/src/lib.rs.html | 250 +-
coverage/main/solvers/minion/src/ast.rs.html | 278 +-
.../main/solvers/minion/src/error.rs.html | 4 +-
coverage/main/solvers/minion/src/ffi.rs.html | 850 +-
coverage/main/solvers/minion/src/index.html | 116 +-
coverage/main/solvers/minion/src/lib.rs.html | 1945 --
coverage/main/solvers/minion/src/run.rs.html | 3726 ++--
.../solvers/minion/src/scoped_ptr.rs.html | 68 +-
.../main/solvers/minion/src/wrappers.rs.html | 148 +-
coverage/main/solvers/minion/tests/index.html | 28 +-
.../tests/test_watchedor_reifyimply_1.rs.html | 330 +-
96 files changed, 30101 insertions(+), 36041 deletions(-)
delete mode 100644 coverage/main/crates/uniplate/src/lib.rs.html
delete mode 100644 coverage/main/solvers/minion/src/lib.rs.html
diff --git a/coverage/main/badges/flat.svg b/coverage/main/badges/flat.svg
index a8ad798927..f13de57e75 100644
--- a/coverage/main/badges/flat.svg
+++ b/coverage/main/badges/flat.svg
@@ -1,23 +1,23 @@
- coverage: 74%
+ xmlns:xlink="http://www.w3.org/1999/xlink" width="90" height="20" role="img" aria-label="coverage: 7%">
+ coverage: 7%
-
+
-
-
+
+
coverage
coverage
- 74%
- 74%
+ 7%
+ 7%
\ No newline at end of file
diff --git a/coverage/main/badges/flat_square.svg b/coverage/main/badges/flat_square.svg
index fb34f55948..0656c019b6 100644
--- a/coverage/main/badges/flat_square.svg
+++ b/coverage/main/badges/flat_square.svg
@@ -1,13 +1,13 @@
- coverage: 74%
+ xmlns:xlink="http://www.w3.org/1999/xlink" width="90" height="20" role="img" aria-label="coverage: 7%">
+ coverage: 7%
-
+
coverage
- 74%
+ 7%
\ No newline at end of file
diff --git a/coverage/main/badges/for_the_badge.svg b/coverage/main/badges/for_the_badge.svg
index 72da280085..26508526b8 100644
--- a/coverage/main/badges/for_the_badge.svg
+++ b/coverage/main/badges/for_the_badge.svg
@@ -1,13 +1,13 @@
- COVERAGE: 74%
+ xmlns:xlink="http://www.w3.org/1999/xlink" width="133" height="28" role="img" aria-label="COVERAGE: 7%">
+ COVERAGE: 7%
-
+
COVERAGE
- 74%
+ 7%
\ No newline at end of file
diff --git a/coverage/main/badges/plastic.svg b/coverage/main/badges/plastic.svg
index b548872fe3..1896d4ea18 100644
--- a/coverage/main/badges/plastic.svg
+++ b/coverage/main/badges/plastic.svg
@@ -1,6 +1,6 @@
- coverage: 74%
+ xmlns:xlink="http://www.w3.org/1999/xlink" width="90" height="18" role="img" aria-label="coverage: 7%">
+ coverage: 7%
@@ -8,18 +8,18 @@
-
+
-
-
+
+
coverage
coverage
- 74%
- 74%
+ 7%
+ 7%
\ No newline at end of file
diff --git a/coverage/main/badges/social.svg b/coverage/main/badges/social.svg
index f061a944bf..3a0e17ff13 100644
--- a/coverage/main/badges/social.svg
+++ b/coverage/main/badges/social.svg
@@ -1,6 +1,6 @@
- Coverage: 74%
+ xmlns:xlink="http://www.w3.org/1999/xlink" width="93" height="20" role="img" aria-label="Coverage: 7%">
+ Coverage: 7%
@@ -12,7 +12,7 @@
-
+
@@ -20,8 +20,8 @@
Coverage
Coverage
- 74%
- 74%
+ 7%
+ 7%
\ No newline at end of file
diff --git a/coverage/main/conjure_oxide/src/find_conjure.rs.html b/coverage/main/conjure_oxide/src/find_conjure.rs.html
index eeee0a6ee5..87fb17f5a1 100644
--- a/coverage/main/conjure_oxide/src/find_conjure.rs.html
+++ b/coverage/main/conjure_oxide/src/find_conjure.rs.html
@@ -15,7 +15,7 @@
@@ -23,7 +23,7 @@
Functions
- 16.67 %
+
0 %
@@ -166,13 +166,13 @@
9
- 5
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn conjure_executable() -> Result<()> {
+
pub fn conjure_executable() -> Result<()> {
10
- 5
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut cmd = std::process::Command::new("conjure");
+
let mut cmd = std::process::Command::new("conjure");
11
- 5
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let output = cmd.arg("--version").output()?;
+
let output = cmd.arg("--version").output()?;
12
- 5
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let stdout = String::from_utf8(output.stdout)?;
+
let stdout = String::from_utf8(output.stdout)?;
13
- 5
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let stderr = String::from_utf8(output.stderr)?;
+
let stderr = String::from_utf8(output.stderr)?;
15
- 5
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if !stderr.is_empty() {
+
if !stderr.is_empty() {
17
- 5
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
18
- 5
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let first = stdout
+
let first = stdout
19
- 5
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
20
- 5
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
21
- 5
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.ok_or(anyhow!("Could not read stdout"))?;
+
.ok_or(anyhow!("Could not read stdout"))?;
22
- 5
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if first != CORRECT_FIRST_LINE {
+
if first != CORRECT_FIRST_LINE {
34
- 5
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
35
- 5
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let version_line = stdout
+
let version_line = stdout
36
- 5
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
37
- 5
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
38
- 5
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.ok_or(anyhow!("Could not read Conjure's stdout"))?;
+
.ok_or(anyhow!("Could not read Conjure's stdout"))?;
40
- 5
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let version = match version_line.strip_prefix("Release version ") {
+
let version = match version_line.strip_prefix("Release version ") {
41
- 5
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Some(v) => Ok(v),
+
Some(v) => Ok(v),
55
- 5
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if Versioning::new(version) < Versioning::new(CONJURE_MIN_VERSION) {
+
if Versioning::new(version) < Versioning::new(CONJURE_MIN_VERSION) {
61
- 5
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
62
- 5
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
63
- 5
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
-
-
-
-
-
-
-
-
-
Functions
-
- 88.89 %
-
-
-
-
-
-
-
-
-
-
-
-
-
//! A port of Haskell's [Uniplate](https://hackage.haskell.org/package/uniplate) in Rust.
-
-
-
-
-
-
-
-
//! ## A Calculator Input Language
-
-
-
-
-
-
-
-
//! Consider the AST of a calculator input language:
-
-
-
-
- 1
-
-
-
//! Add(Box<AST>,Box<AST>),
-
-
-
-
- 1
-
-
-
//! Sub(Box<AST>,Box<AST>),
-
-
-
-
- 1
-
-
-
//! Div(Box<AST>,Box<AST>),
-
-
-
-
- 1
-
-
-
//! Mul(Box<AST>,Box<AST>)
-
-
-
-
-
-
-
-
//! Using uniplate, one can implement a single function for this AST that can be used in a whole
-
-
-
-
-
-
-
-
//! range of traversals.
-
-
-
-
-
-
-
-
//! While this does not seem helpful in this toy example, the benefits amplify when the number of
-
-
-
-
-
-
-
-
//! enum variants increase, and the different types contained in their fields increase.
-
-
-
-
-
-
-
-
//! The below example implements [`Uniplate`](uniplate::Uniplate) for this language AST, and uses uniplate methods to
-
-
-
-
-
-
-
-
//! evaluate the encoded equation.
-
-
-
-
-
-
-
-
//! use uniplate::uniplate::{Uniplate, UniplateError};
-
-
-
-
-
-
-
-
//! #[derive(Clone,Eq,PartialEq,Debug)]
-
-
-
-
-
-
-
-
//! Add(Box<AST>,Box<AST>),
-
-
-
-
-
-
-
-
//! Sub(Box<AST>,Box<AST>),
-
-
-
-
-
-
-
-
//! Div(Box<AST>,Box<AST>),
-
-
-
-
-
-
-
-
//! Mul(Box<AST>,Box<AST>)
-
-
-
-
-
-
-
-
//! // In the future would be automatically derived.
-
-
-
-
-
-
-
-
//! impl Uniplate for AST {
-
-
-
-
-
-
-
-
//! fn uniplate(&self) -> (Vec<AST>, Box<dyn Fn(Vec<AST>) -> Result<AST, UniplateError> +'_>) {
-
-
-
-
- 9
-
-
-
//! let context: Box<dyn Fn(Vec<AST>) -> Result<AST, UniplateError>> = match self {
-
-
-
-
- 9
-
-
-
//! AST::Int(i) => Box::new(|_| Ok(AST::Int(*i))),
-
-
-
-
- 5
-
-
-
//! AST::Add(_, _) => Box::new(|exprs: Vec<AST>| Ok(AST::Add(Box::new(exprs[0].clone()),Box::new(exprs[1].clone())))),
-
-
-
-
- 2
-
-
-
//! AST::Sub(_, _) => Box::new(|exprs: Vec<AST>| Ok(AST::Sub(Box::new(exprs[0].clone()),Box::new(exprs[1].clone())))),
-
-
-
-
-
-
-
-
//! AST::Div(_, _) => Box::new(|exprs: Vec<AST>| Ok(AST::Div(Box::new(exprs[0].clone()),Box::new(exprs[1].clone())))),
-
-
-
-
- 1
-
-
-
//! AST::Mul(_, _) => Box::new(|exprs: Vec<AST>| Ok(AST::Mul(Box::new(exprs[0].clone()),Box::new(exprs[1].clone()))))
-
-
-
-
-
-
-
-
//! let children: Vec<AST> = match self {
-
-
-
-
- 9
-
-
-
//! AST::Add(a,b) => vec![*a.clone(),*b.clone()],
-
-
-
-
- 2
-
-
-
//! AST::Sub(a,b) => vec![*a.clone(),*b.clone()],
-
-
-
-
-
-
-
-
//! AST::Div(a,b) => vec![*a.clone(),*b.clone()],
-
-
-
-
- 1
-
-
-
//! AST::Mul(a,b) => vec![*a.clone(),*b.clone()],
-
-
-
-
-
-
-
-
//! (children,context)
-
-
-
-
-
-
-
-
//! pub fn my_rule(e: AST) -> AST{
-
-
-
-
- 9
-
-
-
//! AST::Int(a) => AST::Int(a),
-
-
-
-
- 5
-
-
-
//! AST::Add(a,b) => {match (&*a,&*b) { (AST::Int(a), AST::Int(b)) => AST::Int(a+b), _ => AST::Add(a,b) }}
-
-
-
-
- 2
-
-
-
//! AST::Sub(a,b) => {match (&*a,&*b) { (AST::Int(a), AST::Int(b)) => AST::Int(a-b), _ => AST::Sub(a,b) }}
-
-
-
-
-
-
-
-
//! AST::Mul(a,b) => {match (&*a,&*b) { (AST::Int(a), AST::Int(b)) => AST::Int(a*b), _ => AST::Mul(a,b) }}
-
-
-
-
- 1
-
-
-
//! AST::Div(a,b) => {match (&*a,&*b) { (AST::Int(a), AST::Int(b)) => AST::Int(a/b), _ => AST::Div(a,b) }}
-
-
-
-
- 1
-
-
-
//! let ast = AST::Add(
-
-
-
-
- 1
-
-
-
//! Box::new(AST::Int(1)),
-
-
-
-
- 1
-
-
-
//! Box::new(AST::Mul(
-
-
-
-
- 1
-
-
-
//! Box::new(AST::Int(2)),
-
-
-
-
- 1
-
-
-
//! Box::new(AST::Div(
-
-
-
-
- 1
-
-
-
//! Box::new(AST::Add(Box::new(AST::Int(1)),Box::new(AST::Int(2)))),
-
-
-
-
- 1
-
-
-
//! Box::new(AST::Int(3))
-
-
-
-
- 1
-
-
-
//! let new_ast = ast.transform(my_rule);
-
-
-
-
- 1
-
-
-
//! assert!(new_ast.is_ok());
-
-
-
-
- 1
-
-
-
//! println!("{:?}",new_ast);
-
-
-
-
- 1
-
-
-
//! assert_eq!(new_ast.unwrap(), AST::Int(3));
-
-
-
-
-
-
-
-
//! ....MORE DOCS TO COME....
-
-
-
-
-
-
-
-
//! # Acknowledgements / Related Work
-
-
-
-
-
-
-
-
//! *This crate implements programming constructs from the following Haskell libraries and
-
-
-
-
-
-
-
-
//! * [Uniplate](https://hackage.haskell.org/package/uniplate).
-
-
-
-
-
-
-
-
//! * Neil Mitchell and Colin Runciman. 2007. Uniform boilerplate and list processing. In
-
-
-
-
-
-
-
-
//! Proceedings of the ACM SIGPLAN workshop on Haskell workshop (Haskell '07). Association for
-
-
-
-
-
-
-
-
//! Computing Machinery, New York, NY, USA, 49–60. <https://doi.org/10.1145/1291201.1291208>
-
-
-
-
-
-
-
-
//! [(free copy)](https://www.cs.york.ac.uk/plasma/publications/pdf/MitchellRuncimanHW07.pdf)
-
-
-
-
-
-
-
-
//! * Huet G. The Zipper. Journal of Functional Programming. 1997;7(5):549–54. <https://doi.org/10.1017/S0956796897002864>
-
-
-
-
-
-
-
-
//! [(free copy)](https://www.cambridge.org/core/services/aop-cambridge-core/content/view/0C058890B8A9B588F26E6D68CF0CE204/S0956796897002864a.pdf/zipper.pdf)
-
-
-
-
-
diff --git a/coverage/main/conjure_oxide/src/index.html b/coverage/main/conjure_oxide/src/index.html
index 96a6dfcb67..6a5a249161 100644
--- a/coverage/main/conjure_oxide/src/index.html
+++ b/coverage/main/conjure_oxide/src/index.html
@@ -15,7 +15,7 @@
@@ -23,7 +23,7 @@
Functions
- 16.67 %
+
0 %
@@ -46,20 +46,20 @@
- 47.92%
+ 0%
- 47.92%
+ 0%
- 23 / 48
+ 0 / 48
-
16.67%
-
1 / 6
+
0%
+
0 / 4
@@ -67,7 +67,7 @@
diff --git a/coverage/main/conjure_oxide/src/utils/conjure.rs.html b/coverage/main/conjure_oxide/src/utils/conjure.rs.html
index c043101625..68f9af88ad 100644
--- a/coverage/main/conjure_oxide/src/utils/conjure.rs.html
+++ b/coverage/main/conjure_oxide/src/utils/conjure.rs.html
@@ -14,8 +14,8 @@
@@ -23,7 +23,7 @@
Functions
- 22.22 %
+
0 %
@@ -502,13 +502,13 @@
30
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn parse_essence_file(
+
pub fn parse_essence_file(
31
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
path: &str,
+
path: &str,
32
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
filename: &str,
+
filename: &str,
33
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
context: Arc<RwLock<Context<'static>>>,
+
context: Arc<RwLock<Context<'static>>>,
34
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
) -> Result<Model, EssenceParseError> {
+
) -> Result<Model, EssenceParseError> {
35
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut cmd = std::process::Command::new("conjure");
+
let mut cmd = std::process::Command::new("conjure");
36
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let output = match cmd
+
let output = match cmd
37
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.arg("pretty")
+
.arg("pretty")
38
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.arg("--output-format=astjson")
+
.arg("--output-format=astjson")
39
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.arg(format!("{path}/{filename}.essence"))
+
.arg(format!("{path}/{filename}.essence"))
40
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
42
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok(output) => output,
+
Ok(output) => output,
46
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if !output.status.success() {
+
if !output.status.success() {
50
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
52
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let astjson = match String::from_utf8(output.stdout) {
+
let astjson = match String::from_utf8(output.stdout) {
53
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok(astjson) => astjson,
+
Ok(astjson) => astjson,
62
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let parsed_model = model_from_json(&astjson, context)?;
+
let parsed_model = model_from_json(&astjson, context)?;
63
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok(parsed_model)
+
Ok(parsed_model)
64
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
66
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn get_minion_solutions(model: Model) -> Result<Vec<HashMap<Name, Constant>>, anyhow::Error> {
+
pub fn get_minion_solutions(model: Model) -> Result<Vec<HashMap<Name, Constant>>, anyhow::Error> {
67
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let solver = Solver::new(Minion::new());
+
let solver = Solver::new(Minion::new());
68
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
69
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
println!("Building Minion model...");
+
println!("Building Minion model...");
70
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let solver = solver.load_model(model)?;
+
let solver = solver.load_model(model)?;
72
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
println!("Running Minion...");
+
println!("Running Minion...");
73
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
74
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let all_solutions_ref = Arc::new(Mutex::<Vec<HashMap<Name, Constant>>>::new(vec![]));
+
let all_solutions_ref = Arc::new(Mutex::<Vec<HashMap<Name, Constant>>>::new(vec![]));
75
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let all_solutions_ref_2 = all_solutions_ref.clone();
+
let all_solutions_ref_2 = all_solutions_ref.clone();
76
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
#[allow(clippy::unwrap_used)]
+
#[allow(clippy::unwrap_used)]
77
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let solver = solver
+
let solver = solver
78
- 655
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.solve(Box::new(move |sols| {
+
.solve(Box::new(move |sols| {
79
- 655
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut all_solutions = (*all_solutions_ref_2).lock().unwrap();
+
let mut all_solutions = (*all_solutions_ref_2).lock().unwrap();
80
- 655
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
(*all_solutions).push(sols);
+
(*all_solutions).push(sols);
81
- 655
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
82
- 655
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
83
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.unwrap();
+
.unwrap();
84
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
85
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
solver.save_stats_to_context();
+
solver.save_stats_to_context();
86
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
87
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
#[allow(clippy::unwrap_used)]
+
#[allow(clippy::unwrap_used)]
88
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let sols = (*all_solutions_ref).lock().unwrap();
+
let sols = (*all_solutions_ref).lock().unwrap();
89
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
90
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok((*sols).clone())
+
Ok((*sols).clone())
91
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
93
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn minion_solutions_to_json(solutions: &Vec<HashMap<Name, Constant>>) -> JsonValue {
+
pub fn minion_solutions_to_json(solutions: &Vec<HashMap<Name, Constant>>) -> JsonValue {
94
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut json_solutions = Vec::new();
+
let mut json_solutions = Vec::new();
95
- 725
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
for solution in solutions {
+
for solution in solutions {
96
- 655
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut json_solution = Map::new();
+
let mut json_solution = Map::new();
97
- 2980
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
for (var_name, constant) in solution {
+
for (var_name, constant) in solution {
98
- 2325
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let serialized_constant = match constant {
+
let serialized_constant = match constant {
99
- 2325
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Constant::Int(i) => JsonValue::Number((*i).into()),
+
Constant::Int(i) => JsonValue::Number((*i).into()),
102
- 2325
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
json_solution.insert(var_name.to_string(), serialized_constant);
+
json_solution.insert(var_name.to_string(), serialized_constant);
104
- 655
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
json_solutions.push(JsonValue::Object(json_solution));
+
json_solutions.push(JsonValue::Object(json_solution));
106
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let ans = JsonValue::Array(json_solutions);
+
let ans = JsonValue::Array(json_solutions);
107
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
sort_json_object(&ans, true)
+
sort_json_object(&ans, true)
108
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
diff --git a/coverage/main/conjure_oxide/src/utils/index.html b/coverage/main/conjure_oxide/src/utils/index.html
index 7c8ffe1c6c..f2551e98de 100644
--- a/coverage/main/conjure_oxide/src/utils/index.html
+++ b/coverage/main/conjure_oxide/src/utils/index.html
@@ -15,7 +15,7 @@
@@ -23,7 +23,7 @@
@@ -45,21 +45,21 @@
- 80%
+ 0%
-
- 80%
+
+ 0%
-
- 56 / 70
+
+ 0 / 70
-
22.22%
-
4 / 18
+
0%
+
0 / 12
@@ -69,21 +69,21 @@
- 80.77%
+ 0%
-
- 80.77%
+
+ 0%
-
- 42 / 52
+
+ 0 / 52
-
33.33%
-
6 / 18
+
0%
+
0 / 12
@@ -107,7 +107,7 @@
0%
-
0 / 3
+
0 / 2
@@ -118,20 +118,20 @@
- 59.35%
+ 0%
- 59.35%
+ 0%
- 73 / 123
+ 0 / 123
-
25%
-
6 / 24
+
0%
+
0 / 16
@@ -139,7 +139,7 @@
diff --git a/coverage/main/conjure_oxide/src/utils/json.rs.html b/coverage/main/conjure_oxide/src/utils/json.rs.html
index 96cd508810..559cb473bc 100644
--- a/coverage/main/conjure_oxide/src/utils/json.rs.html
+++ b/coverage/main/conjure_oxide/src/utils/json.rs.html
@@ -14,8 +14,8 @@
Lines
-
- 80.77 %
+
+ 0 %
@@ -23,7 +23,7 @@
Functions
- 33.33 %
+
0 %
@@ -134,13 +134,13 @@
7
- 2870
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn json_value_cmp(a: &Value, b: &Value) -> std::cmp::Ordering {
+
fn json_value_cmp(a: &Value, b: &Value) -> std::cmp::Ordering {
8
- 2870
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match (a, b) {
+
match (a, b) {
17
- 240
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
(Value::Array(a), Value::Array(b)) => {
+
(Value::Array(a), Value::Array(b)) => {
18
- 240
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
for (a, b) in a.iter().zip(b.iter()) {
+
for (a, b) in a.iter().zip(b.iter()) {
19
- 240
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let cmp = json_value_cmp(a, b);
+
let cmp = json_value_cmp(a, b);
20
- 240
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if cmp != std::cmp::Ordering::Equal {
+
if cmp != std::cmp::Ordering::Equal {
21
- 240
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
return cmp;
+
return cmp;
26
- 2630
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => a.to_string().cmp(&b.to_string()),
+
_ => a.to_string().cmp(&b.to_string()),
28
- 2870
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
32
- 140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn sort_json_variables(value: &Value) -> Value {
+
pub fn sort_json_variables(value: &Value) -> Value {
33
- 140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match value {
+
match value {
34
- 140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Value::Array(vars) => {
+
Value::Array(vars) => {
35
- 140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut vars_sorted = vars.clone();
+
let mut vars_sorted = vars.clone();
36
- 140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
vars_sorted.sort_by(json_value_cmp);
+
vars_sorted.sort_by(json_value_cmp);
37
- 140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Value::Array(vars_sorted)
+
Value::Array(vars_sorted)
41
- 140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
48
- 15540
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn sort_json_object(value: &Value, sort_arrays: bool) -> Value {
+
pub fn sort_json_object(value: &Value, sort_arrays: bool) -> Value {
49
- 15540
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match value {
+
match value {
50
- 5015
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Value::Object(obj) => {
+
Value::Object(obj) => {
51
- 5015
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut ordered: Vec<(String, Value)> = obj
+
let mut ordered: Vec<(String, Value)> = obj
52
- 5015
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
53
- 10735
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.map(|(k, v)| {
+
.map(|(k, v)| {
54
- 10735
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if k == "variables" {
+
if k == "variables" {
55
- 140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
(k.clone(), sort_json_variables(v))
+
(k.clone(), sort_json_variables(v))
57
- 10595
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
(k.clone(), sort_json_object(v, sort_arrays))
+
(k.clone(), sort_json_object(v, sort_arrays))
59
- 10735
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
60
- 5015
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.collect();
+
.collect();
61
- 5015
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
62
- 5720
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
ordered.sort_by(|a, b| a.0.cmp(&b.0));
+
ordered.sort_by(|a, b| a.0.cmp(&b.0));
63
- 5015
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Value::Object(ordered.into_iter().collect())
+
Value::Object(ordered.into_iter().collect())
65
- 1760
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Value::Array(arr) => {
+
Value::Array(arr) => {
66
- 1760
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut arr: Vec<Value> = arr
+
let mut arr: Vec<Value> = arr
67
- 1760
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
68
- 4555
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.map(|val| sort_json_object(val, sort_arrays))
+
.map(|val| sort_json_object(val, sort_arrays))
69
- 1760
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.collect();
+
.collect();
70
- 1760
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
71
- 1760
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if sort_arrays {
+
if sort_arrays {
72
- 140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
arr.sort_by(json_value_cmp);
+
arr.sort_by(json_value_cmp);
73
- 1620
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
75
- 1760
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Value::Array(arr)
+
Value::Array(arr)
77
- 8765
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => value.clone(),
+
_ => value.clone(),
79
- 15540
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
diff --git a/coverage/main/conjure_oxide/src/utils/misc.rs.html b/coverage/main/conjure_oxide/src/utils/misc.rs.html
index 41ce9a654f..6705a85fa3 100644
--- a/coverage/main/conjure_oxide/src/utils/misc.rs.html
+++ b/coverage/main/conjure_oxide/src/utils/misc.rs.html
@@ -23,7 +23,7 @@
@@ -210,7 +210,7 @@
diff --git a/coverage/main/conjure_oxide/src/utils/testing.rs.html b/coverage/main/conjure_oxide/src/utils/testing.rs.html
index 5beaff5d94..e7532226ee 100644
--- a/coverage/main/conjure_oxide/src/utils/testing.rs.html
+++ b/coverage/main/conjure_oxide/src/utils/testing.rs.html
@@ -15,7 +15,7 @@
@@ -23,7 +23,7 @@
@@ -678,13 +678,13 @@
41
- 140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn serialise_model(model: &ConjureModel) -> Result<String, JsonError> {
+
pub fn serialise_model(model: &ConjureModel) -> Result<String, JsonError> {
45
- 140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let generated_json = sort_json_object(&serde_json::to_value(model.clone())?, false);
+
let generated_json = sort_json_object(&serde_json::to_value(model.clone())?, false);
48
- 140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let generated_json_str = serde_json::to_string_pretty(&generated_json)?;
+
let generated_json_str = serde_json::to_string_pretty(&generated_json)?;
50
- 140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok(generated_json_str)
+
Ok(generated_json_str)
51
- 140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
53
- 140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn save_model_json(
+
pub fn save_model_json(
54
- 140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
model: &ConjureModel,
+
model: &ConjureModel,
55
- 140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
path: &str,
+
path: &str,
56
- 140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
test_name: &str,
+
test_name: &str,
57
- 140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
test_stage: &str,
+
test_stage: &str,
58
- 140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
accept: bool,
+
accept: bool,
59
- 140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
) -> Result<(), std::io::Error> {
+
) -> Result<(), std::io::Error> {
60
- 140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let generated_json_str = serialise_model(model)?;
+
let generated_json_str = serialise_model(model)?;
62
- 140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
File::create(format!(
+
File::create(format!(
63
- 140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
"{path}/{test_name}.generated-{test_stage}.serialised.json"
+
"{path}/{test_name}.generated-{test_stage}.serialised.json"
64
- 140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
65
- 140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.write_all(generated_json_str.as_bytes())?;
+
.write_all(generated_json_str.as_bytes())?;
67
- 140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if accept {
+
if accept {
72
- 140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
74
- 140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
75
- 140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
77
- 110
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn save_stats_json(
+
pub fn save_stats_json(
78
- 110
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
context: Arc<RwLock<Context<'static>>>,
+
context: Arc<RwLock<Context<'static>>>,
79
- 110
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
path: &str,
+
path: &str,
80
- 110
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
test_name: &str,
+
test_name: &str,
81
- 110
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
) -> Result<(), std::io::Error> {
+
) -> Result<(), std::io::Error> {
82
- 110
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
#[allow(clippy::unwrap_used)]
+
#[allow(clippy::unwrap_used)]
83
- 110
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let stats = context.read().unwrap().clone();
+
let stats = context.read().unwrap().clone();
84
- 110
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let generated_json = sort_json_object(&serde_json::to_value(stats)?, false);
+
let generated_json = sort_json_object(&serde_json::to_value(stats)?, false);
87
- 110
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let generated_json_str = serde_json::to_string_pretty(&generated_json)?;
+
let generated_json_str = serde_json::to_string_pretty(&generated_json)?;
89
- 110
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
File::create(format!("{path}/{test_name}-stats.json"))?
+
File::create(format!("{path}/{test_name}-stats.json"))?
90
- 110
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.write_all(generated_json_str.as_bytes())?;
+
.write_all(generated_json_str.as_bytes())?;
92
- 110
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
93
- 110
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
95
- 140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn read_model_json(
+
pub fn read_model_json(
96
- 140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
path: &str,
+
path: &str,
97
- 140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
test_name: &str,
+
test_name: &str,
98
- 140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
prefix: &str,
+
prefix: &str,
99
- 140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
test_stage: &str,
+
test_stage: &str,
100
- 140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
) -> Result<ConjureModel, std::io::Error> {
+
) -> Result<ConjureModel, std::io::Error> {
101
- 140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let expected_json_str = std::fs::read_to_string(format!(
+
let expected_json_str = std::fs::read_to_string(format!(
102
- 140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
"{path}/{test_name}.{prefix}-{test_stage}.serialised.json"
+
"{path}/{test_name}.{prefix}-{test_stage}.serialised.json"
103
- 140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
105
- 140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let expected_model: ConjureModel = serde_json::from_str(&expected_json_str)?;
+
let expected_model: ConjureModel = serde_json::from_str(&expected_json_str)?;
107
- 140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok(expected_model)
+
Ok(expected_model)
108
- 140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
148
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn save_minion_solutions_json(
+
pub fn save_minion_solutions_json(
149
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
solutions: &Vec<HashMap<Name, Constant>>,
+
solutions: &Vec<HashMap<Name, Constant>>,
150
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
path: &str,
+
path: &str,
151
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
test_name: &str,
+
test_name: &str,
152
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
accept: bool,
+
accept: bool,
153
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
) -> Result<JsonValue, std::io::Error> {
+
) -> Result<JsonValue, std::io::Error> {
154
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let json_solutions = minion_solutions_to_json(solutions);
+
let json_solutions = minion_solutions_to_json(solutions);
156
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let generated_json_str = serde_json::to_string_pretty(&json_solutions)?;
+
let generated_json_str = serde_json::to_string_pretty(&json_solutions)?;
158
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
File::create(format!(
+
File::create(format!(
159
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
"{path}/{test_name}.generated-minion.solutions.json"
+
"{path}/{test_name}.generated-minion.solutions.json"
160
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
161
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.write_all(generated_json_str.as_bytes())?;
+
.write_all(generated_json_str.as_bytes())?;
163
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if accept {
+
if accept {
168
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
170
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok(json_solutions)
+
Ok(json_solutions)
171
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
173
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn read_minion_solutions_json(
+
pub fn read_minion_solutions_json(
174
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
path: &str,
+
path: &str,
175
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
test_name: &str,
+
test_name: &str,
176
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
prefix: &str,
+
prefix: &str,
177
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
) -> Result<JsonValue, anyhow::Error> {
+
) -> Result<JsonValue, anyhow::Error> {
178
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let expected_json_str =
+
let expected_json_str =
179
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
std::fs::read_to_string(format!("{path}/{test_name}.{prefix}-minion.solutions.json"))?;
+
std::fs::read_to_string(format!("{path}/{test_name}.{prefix}-minion.solutions.json"))?;
181
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let expected_solutions: JsonValue =
+
let expected_solutions: JsonValue =
182
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
sort_json_object(&serde_json::from_str(&expected_json_str)?, true);
+
sort_json_object(&serde_json::from_str(&expected_json_str)?, true);
184
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok(expected_solutions)
+
Ok(expected_solutions)
185
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
diff --git a/coverage/main/conjure_oxide/tests/generated_tests.rs.html b/coverage/main/conjure_oxide/tests/generated_tests.rs.html
index 5f330ce6e6..ba61c679ad 100644
--- a/coverage/main/conjure_oxide/tests/generated_tests.rs.html
+++ b/coverage/main/conjure_oxide/tests/generated_tests.rs.html
@@ -15,7 +15,7 @@
@@ -23,7 +23,7 @@
@@ -470,13 +470,13 @@
28
- 14
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn integration_test(path: &str, essence_base: &str) -> Result<(), Box<dyn Error>> {
+
fn integration_test(path: &str, essence_base: &str) -> Result<(), Box<dyn Error>> {
29
- 14
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let context: Arc<RwLock<Context<'static>>> = Default::default();
+
let context: Arc<RwLock<Context<'static>>> = Default::default();
30
- 14
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let accept = env::var("ACCEPT").unwrap_or("false".to_string()) == "true";
+
let accept = env::var("ACCEPT").unwrap_or("false".to_string()) == "true";
31
- 14
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let verbose = env::var("VERBOSE").unwrap_or("false".to_string()) == "true";
+
let verbose = env::var("VERBOSE").unwrap_or("false".to_string()) == "true";
32
- 14
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
33
- 14
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if verbose {
+
if verbose {
38
- 14
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
41
- 14
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let model = parse_essence_file(path, essence_base, context.clone())?;
+
let model = parse_essence_file(path, essence_base, context.clone())?;
42
- 14
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if verbose {
+
if verbose {
44
- 14
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
46
- 14
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
context.as_ref().write().unwrap().file_name = Some(format!("{path}/{essence_base}.essence"));
+
context.as_ref().write().unwrap().file_name = Some(format!("{path}/{essence_base}.essence"));
47
- 14
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
48
- 14
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
save_model_json(&model, path, essence_base, "parse", accept)?;
+
save_model_json(&model, path, essence_base, "parse", accept)?;
49
- 14
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let expected_model = read_model_json(path, essence_base, "expected", "parse")?;
+
let expected_model = read_model_json(path, essence_base, "expected", "parse")?;
50
- 14
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if verbose {
+
if verbose {
52
- 14
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
54
- 14
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert_eq!(model, expected_model);
+
assert_eq!(model, expected_model);
57
- 14
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let rule_sets = resolve_rule_sets(
+
let rule_sets = resolve_rule_sets(
58
- 14
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
SolverFamily::Minion,
+
SolverFamily::Minion,
59
- 14
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
&vec!["Constant".to_string(), "Bubble".to_string()],
+
&vec!["Constant".to_string(), "Bubble".to_string()],
60
- 14
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
61
- 14
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let model = rewrite_model(&model, &rule_sets)?;
+
let model = rewrite_model(&model, &rule_sets)?;
62
- 14
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if verbose {
+
if verbose {
64
- 14
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
66
- 14
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
save_model_json(&model, path, essence_base, "rewrite", accept)?;
+
save_model_json(&model, path, essence_base, "rewrite", accept)?;
67
- 14
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let expected_model = read_model_json(path, essence_base, "expected", "rewrite")?;
+
let expected_model = read_model_json(path, essence_base, "expected", "rewrite")?;
68
- 14
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if verbose {
+
if verbose {
70
- 14
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
72
- 14
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert_eq!(model, expected_model);
+
assert_eq!(model, expected_model);
75
- 14
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let solutions = get_minion_solutions(model)?;
+
let solutions = get_minion_solutions(model)?;
76
- 14
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let solutions_json = save_minion_solutions_json(&solutions, path, essence_base, accept)?;
+
let solutions_json = save_minion_solutions_json(&solutions, path, essence_base, accept)?;
77
- 14
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if verbose {
+
if verbose {
79
- 14
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
81
- 14
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let expected_solutions_json = read_minion_solutions_json(path, essence_base, "expected")?;
+
let expected_solutions_json = read_minion_solutions_json(path, essence_base, "expected")?;
82
- 14
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if verbose {
+
if verbose {
84
- 14
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
86
- 14
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert_eq!(solutions_json, expected_solutions_json);
+
assert_eq!(solutions_json, expected_solutions_json);
88
- 14
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
save_stats_json(context, path, essence_base)?;
+
save_stats_json(context, path, essence_base)?;
90
- 14
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
91
- 14
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
94
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn assert_conjure_present() {
+
fn assert_conjure_present() {
95
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
conjure_oxide::find_conjure::conjure_executable().unwrap();
+
conjure_oxide::find_conjure::conjure_executable().unwrap();
96
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
diff --git a/coverage/main/conjure_oxide/tests/index.html b/coverage/main/conjure_oxide/tests/index.html
index a491e86b3f..ec5b10548d 100644
--- a/coverage/main/conjure_oxide/tests/index.html
+++ b/coverage/main/conjure_oxide/tests/index.html
@@ -14,16 +14,16 @@
Lines
-
- 95.51 %
+
+ 0 %
Functions
-
- 96 %
+
+ 0 %
@@ -46,20 +46,20 @@
- 70.49%
+ 0%
- 70.49%
+ 0%
- 43 / 61
+ 0 / 61
-
50%
-
2 / 4
+
0%
+
0 / 4
@@ -69,21 +69,21 @@
- 100%
+ 0%
-
- 100%
+
+ 0%
-
- 20 / 20
+
+ 0 / 20
-
100%
-
1 / 1
+
0%
+
0 / 1
@@ -93,21 +93,21 @@
- 96.84%
+ 0%
-
- 96.84%
+
+ 0%
-
- 1042 / 1076
+
+ 0 / 1076
-
100%
-
45 / 45
+
0%
+
0 / 45
@@ -115,7 +115,7 @@
diff --git a/coverage/main/conjure_oxide/tests/model_tests.rs.html b/coverage/main/conjure_oxide/tests/model_tests.rs.html
index a9533075fe..8d6b68a598 100644
--- a/coverage/main/conjure_oxide/tests/model_tests.rs.html
+++ b/coverage/main/conjure_oxide/tests/model_tests.rs.html
@@ -14,16 +14,16 @@
Functions
-
- 100 %
+
+ 0 %
@@ -182,13 +182,13 @@
10
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn modify_domain() {
+
fn modify_domain() {
11
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let a = Name::UserName(String::from("a"));
+
let a = Name::UserName(String::from("a"));
12
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
13
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let d1 = Domain::IntDomain(vec![Range::Bounded(1, 3)]);
+
let d1 = Domain::IntDomain(vec![Range::Bounded(1, 3)]);
14
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let d2 = Domain::IntDomain(vec![Range::Bounded(1, 2)]);
+
let d2 = Domain::IntDomain(vec![Range::Bounded(1, 2)]);
15
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
16
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut variables = HashMap::new();
+
let mut variables = HashMap::new();
17
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
variables.insert(a.clone(), DecisionVariable { domain: d1.clone() });
+
variables.insert(a.clone(), DecisionVariable { domain: d1.clone() });
18
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
19
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut m = Model::new(
+
let mut m = Model::new(
20
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
variables,
+
variables,
21
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::And(Metadata::new(), Vec::new()),
+
Expression::And(Metadata::new(), Vec::new()),
22
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Default::default(),
+
Default::default(),
23
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
24
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
25
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert_eq!(m.variables.get(&a).unwrap().domain, d1);
+
assert_eq!(m.variables.get(&a).unwrap().domain, d1);
27
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
m.update_domain(&a, d2.clone());
+
m.update_domain(&a, d2.clone());
28
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
29
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert_eq!(m.variables.get(&a).unwrap().domain, d2);
+
assert_eq!(m.variables.get(&a).unwrap().domain, d2);
30
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
diff --git a/coverage/main/conjure_oxide/tests/rewrite_tests.rs.html b/coverage/main/conjure_oxide/tests/rewrite_tests.rs.html
index ed3fc2ba25..402e060452 100644
--- a/coverage/main/conjure_oxide/tests/rewrite_tests.rs.html
+++ b/coverage/main/conjure_oxide/tests/rewrite_tests.rs.html
@@ -14,16 +14,16 @@
Lines
-
- 96.84 %
+
+ 0 %
Functions
-
- 100 %
+
+ 0 %
@@ -326,13 +326,13 @@
19
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn rules_present() {
+
fn rules_present() {
20
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let rules = get_rules();
+
let rules = get_rules();
21
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert!(!rules.is_empty());
+
assert!(!rules.is_empty());
22
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
25
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn sum_of_constants() {
+
fn sum_of_constants() {
26
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let valid_sum_expression = Expression::Sum(
+
let valid_sum_expression = Expression::Sum(
27
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
28
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
29
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Int(1)),
+
Expression::Constant(Metadata::new(), Constant::Int(1)),
30
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Int(2)),
+
Expression::Constant(Metadata::new(), Constant::Int(2)),
31
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Int(3)),
+
Expression::Constant(Metadata::new(), Constant::Int(3)),
32
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
33
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
34
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
35
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let invalid_sum_expression = Expression::Sum(
+
let invalid_sum_expression = Expression::Sum(
36
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
37
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
38
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Int(1)),
+
Expression::Constant(Metadata::new(), Constant::Int(1)),
39
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Reference(Metadata::new(), Name::UserName(String::from("a"))),
+
Expression::Reference(Metadata::new(), Name::UserName(String::from("a"))),
40
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
41
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
42
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
43
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match evaluate_sum_of_constants(&valid_sum_expression) {
+
match evaluate_sum_of_constants(&valid_sum_expression) {
44
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Some(result) => assert_eq!(result, 6),
+
Some(result) => assert_eq!(result, 6),
48
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if evaluate_sum_of_constants(&invalid_sum_expression).is_some() {
+
if evaluate_sum_of_constants(&invalid_sum_expression).is_some() {
50
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
51
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
53
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn evaluate_sum_of_constants(expr: &Expression) -> Option<i32> {
+
fn evaluate_sum_of_constants(expr: &Expression) -> Option<i32> {
54
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match expr {
+
match expr {
55
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Sum(_metadata, expressions) => {
+
Expression::Sum(_metadata, expressions) => {
56
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut sum = 0;
+
let mut sum = 0;
57
- 12
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
for e in expressions {
+
for e in expressions {
58
- 8
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
59
- 8
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(_, Constant::Int(value)) => {
+
Expression::Constant(_, Constant::Int(value)) => {
60
- 8
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
sum += value;
+
sum += value;
61
- 8
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
62
- 2
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => return None,
+
_ => return None,
65
- 2
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
69
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
72
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn recursive_sum_of_constants() {
+
fn recursive_sum_of_constants() {
73
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let complex_expression = Expression::Eq(
+
let complex_expression = Expression::Eq(
74
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
75
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Sum(
+
Box::new(Expression::Sum(
76
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
77
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
78
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Int(1)),
+
Expression::Constant(Metadata::new(), Constant::Int(1)),
79
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Int(2)),
+
Expression::Constant(Metadata::new(), Constant::Int(2)),
80
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Sum(
+
Expression::Sum(
81
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
82
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
83
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Int(1)),
+
Expression::Constant(Metadata::new(), Constant::Int(1)),
84
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Int(2)),
+
Expression::Constant(Metadata::new(), Constant::Int(2)),
85
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
86
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
87
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Reference(Metadata::new(), Name::UserName(String::from("a"))),
+
Expression::Reference(Metadata::new(), Name::UserName(String::from("a"))),
88
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
89
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
90
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Constant(Metadata::new(), Constant::Int(3))),
+
Box::new(Expression::Constant(Metadata::new(), Constant::Int(3))),
91
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
92
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let correct_simplified_expression = Expression::Eq(
+
let correct_simplified_expression = Expression::Eq(
93
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
94
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Sum(
+
Box::new(Expression::Sum(
95
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
97
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Int(1)),
+
Expression::Constant(Metadata::new(), Constant::Int(1)),
98
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Int(2)),
+
Expression::Constant(Metadata::new(), Constant::Int(2)),
99
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Int(3)),
+
Expression::Constant(Metadata::new(), Constant::Int(3)),
100
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Reference(Metadata::new(), Name::UserName(String::from("a"))),
+
Expression::Reference(Metadata::new(), Name::UserName(String::from("a"))),
101
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
102
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
103
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Constant(Metadata::new(), Constant::Int(3))),
+
Box::new(Expression::Constant(Metadata::new(), Constant::Int(3))),
104
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
105
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
106
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let simplified_expression = simplify_expression(complex_expression.clone());
+
let simplified_expression = simplify_expression(complex_expression.clone());
107
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert_eq!(simplified_expression, correct_simplified_expression);
+
assert_eq!(simplified_expression, correct_simplified_expression);
108
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
110
- 7
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn simplify_expression(expr: Expression) -> Expression {
+
fn simplify_expression(expr: Expression) -> Expression {
111
- 7
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match expr {
+
match expr {
112
- 2
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Sum(_metadata, expressions) => {
+
Expression::Sum(_metadata, expressions) => {
113
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if let Some(result) =
+
if let Some(result) =
114
- 2
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
evaluate_sum_of_constants(&Expression::Sum(Metadata::new(), expressions.clone()))
+
evaluate_sum_of_constants(&Expression::Sum(Metadata::new(), expressions.clone()))
116
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Int(result))
+
Expression::Constant(Metadata::new(), Constant::Int(result))
118
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Sum(
+
Expression::Sum(
119
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
120
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
expressions.into_iter().map(simplify_expression).collect(),
+
expressions.into_iter().map(simplify_expression).collect(),
121
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
124
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Eq(_metadata, left, right) => Expression::Eq(
+
Expression::Eq(_metadata, left, right) => Expression::Eq(
125
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
126
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(simplify_expression(*left)),
+
Box::new(simplify_expression(*left)),
127
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(simplify_expression(*right)),
+
Box::new(simplify_expression(*right)),
128
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
134
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => expr,
+
_ => expr,
136
- 7
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
139
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn rule_sum_constants() {
+
fn rule_sum_constants() {
140
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let sum_constants = get_rule_by_name("sum_constants").unwrap();
+
let sum_constants = get_rule_by_name("sum_constants").unwrap();
141
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let unwrap_sum = get_rule_by_name("unwrap_sum").unwrap();
+
let unwrap_sum = get_rule_by_name("unwrap_sum").unwrap();
142
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
143
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut expr = Expression::Sum(
+
let mut expr = Expression::Sum(
144
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
145
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
146
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Int(1)),
+
Expression::Constant(Metadata::new(), Constant::Int(1)),
147
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Int(2)),
+
Expression::Constant(Metadata::new(), Constant::Int(2)),
148
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Int(3)),
+
Expression::Constant(Metadata::new(), Constant::Int(3)),
149
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
150
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
151
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
152
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
expr = sum_constants
+
expr = sum_constants
153
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.apply(&expr, &Model::new_empty(Default::default()))
+
.apply(&expr, &Model::new_empty(Default::default()))
154
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
155
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.new_expression;
+
.new_expression;
156
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
expr = unwrap_sum
+
expr = unwrap_sum
157
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.apply(&expr, &Model::new_empty(Default::default()))
+
.apply(&expr, &Model::new_empty(Default::default()))
158
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
159
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.new_expression;
+
.new_expression;
160
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
161
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert_eq!(
+
assert_eq!(
162
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
163
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Int(6))
+
Expression::Constant(Metadata::new(), Constant::Int(6))
164
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
165
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
168
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn rule_sum_mixed() {
+
fn rule_sum_mixed() {
169
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let sum_constants = get_rule_by_name("sum_constants").unwrap();
+
let sum_constants = get_rule_by_name("sum_constants").unwrap();
170
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
171
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut expr = Expression::Sum(
+
let mut expr = Expression::Sum(
172
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
173
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
174
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Int(1)),
+
Expression::Constant(Metadata::new(), Constant::Int(1)),
175
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Int(2)),
+
Expression::Constant(Metadata::new(), Constant::Int(2)),
176
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Reference(Metadata::new(), Name::UserName(String::from("a"))),
+
Expression::Reference(Metadata::new(), Name::UserName(String::from("a"))),
177
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
178
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
179
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
180
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
expr = sum_constants
+
expr = sum_constants
181
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.apply(&expr, &Model::new_empty(Default::default()))
+
.apply(&expr, &Model::new_empty(Default::default()))
182
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
183
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.new_expression;
+
.new_expression;
184
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
185
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert_eq!(
+
assert_eq!(
186
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
187
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Sum(
+
Expression::Sum(
188
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
189
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
190
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Reference(Metadata::new(), Name::UserName(String::from("a"))),
+
Expression::Reference(Metadata::new(), Name::UserName(String::from("a"))),
191
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Int(3)),
+
Expression::Constant(Metadata::new(), Constant::Int(3)),
192
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
193
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
194
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
195
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
198
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn rule_sum_geq() {
+
fn rule_sum_geq() {
199
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let flatten_sum_geq = get_rule_by_name("flatten_sum_geq").unwrap();
+
let flatten_sum_geq = get_rule_by_name("flatten_sum_geq").unwrap();
200
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
201
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut expr = Expression::Geq(
+
let mut expr = Expression::Geq(
202
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
203
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Sum(
+
Box::new(Expression::Sum(
204
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
205
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
206
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Int(1)),
+
Expression::Constant(Metadata::new(), Constant::Int(1)),
207
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Int(2)),
+
Expression::Constant(Metadata::new(), Constant::Int(2)),
208
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
209
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
210
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Constant(Metadata::new(), Constant::Int(3))),
+
Box::new(Expression::Constant(Metadata::new(), Constant::Int(3))),
211
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
212
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
213
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
expr = flatten_sum_geq
+
expr = flatten_sum_geq
214
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.apply(&expr, &Model::new_empty(Default::default()))
+
.apply(&expr, &Model::new_empty(Default::default()))
215
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
216
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.new_expression;
+
.new_expression;
217
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
218
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert_eq!(
+
assert_eq!(
219
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
220
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::SumGeq(
+
Expression::SumGeq(
221
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
222
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
223
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Int(1)),
+
Expression::Constant(Metadata::new(), Constant::Int(1)),
224
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Int(2)),
+
Expression::Constant(Metadata::new(), Constant::Int(2)),
225
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
226
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Constant(Metadata::new(), Constant::Int(3)))
+
Box::new(Expression::Constant(Metadata::new(), Constant::Int(3)))
227
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
228
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
229
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
239
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn reduce_solve_xyz() {
+
fn reduce_solve_xyz() {
240
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
println!("Rules: {:?}", get_rules());
+
println!("Rules: {:?}", get_rules());
241
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let sum_constants = get_rule_by_name("sum_constants").unwrap();
+
let sum_constants = get_rule_by_name("sum_constants").unwrap();
242
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let unwrap_sum = get_rule_by_name("unwrap_sum").unwrap();
+
let unwrap_sum = get_rule_by_name("unwrap_sum").unwrap();
243
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let lt_to_ineq = get_rule_by_name("lt_to_ineq").unwrap();
+
let lt_to_ineq = get_rule_by_name("lt_to_ineq").unwrap();
244
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let sum_leq_to_sumleq = get_rule_by_name("sum_leq_to_sumleq").unwrap();
+
let sum_leq_to_sumleq = get_rule_by_name("sum_leq_to_sumleq").unwrap();
245
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
246
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
// 2 + 3 - 1
+
// 2 + 3 - 1
247
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut expr1 = Expression::Sum(
+
let mut expr1 = Expression::Sum(
248
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
249
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
250
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Int(2)),
+
Expression::Constant(Metadata::new(), Constant::Int(2)),
251
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Int(3)),
+
Expression::Constant(Metadata::new(), Constant::Int(3)),
252
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Int(-1)),
+
Expression::Constant(Metadata::new(), Constant::Int(-1)),
253
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
254
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
255
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
256
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
expr1 = sum_constants
+
expr1 = sum_constants
257
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.apply(&expr1, &Model::new_empty(Default::default()))
+
.apply(&expr1, &Model::new_empty(Default::default()))
258
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
259
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.new_expression;
+
.new_expression;
260
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
expr1 = unwrap_sum
+
expr1 = unwrap_sum
261
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.apply(&expr1, &Model::new_empty(Default::default()))
+
.apply(&expr1, &Model::new_empty(Default::default()))
262
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
263
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.new_expression;
+
.new_expression;
264
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert_eq!(
+
assert_eq!(
265
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
266
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Int(4))
+
Expression::Constant(Metadata::new(), Constant::Int(4))
267
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
270
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
expr1 = Expression::Leq(
+
expr1 = Expression::Leq(
271
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
272
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Sum(
+
Box::new(Expression::Sum(
273
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
274
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
275
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Reference(Metadata::new(), Name::UserName(String::from("a"))),
+
Expression::Reference(Metadata::new(), Name::UserName(String::from("a"))),
276
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Reference(Metadata::new(), Name::UserName(String::from("b"))),
+
Expression::Reference(Metadata::new(), Name::UserName(String::from("b"))),
277
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Reference(Metadata::new(), Name::UserName(String::from("c"))),
+
Expression::Reference(Metadata::new(), Name::UserName(String::from("c"))),
278
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
279
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
280
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(expr1),
+
Box::new(expr1),
281
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
282
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
expr1 = sum_leq_to_sumleq
+
expr1 = sum_leq_to_sumleq
283
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.apply(&expr1, &Model::new_empty(Default::default()))
+
.apply(&expr1, &Model::new_empty(Default::default()))
284
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
285
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.new_expression;
+
.new_expression;
286
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert_eq!(
+
assert_eq!(
287
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
288
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::SumLeq(
+
Expression::SumLeq(
289
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
290
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
291
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Reference(Metadata::new(), Name::UserName(String::from("a"))),
+
Expression::Reference(Metadata::new(), Name::UserName(String::from("a"))),
292
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Reference(Metadata::new(), Name::UserName(String::from("b"))),
+
Expression::Reference(Metadata::new(), Name::UserName(String::from("b"))),
293
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Reference(Metadata::new(), Name::UserName(String::from("c"))),
+
Expression::Reference(Metadata::new(), Name::UserName(String::from("c"))),
294
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
295
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Constant(Metadata::new(), Constant::Int(4)))
+
Box::new(Expression::Constant(Metadata::new(), Constant::Int(4)))
296
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
297
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
300
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut expr2 = Expression::Lt(
+
let mut expr2 = Expression::Lt(
301
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
302
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Reference(
+
Box::new(Expression::Reference(
303
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
304
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Name::UserName(String::from("a")),
+
Name::UserName(String::from("a")),
305
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
306
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Reference(
+
Box::new(Expression::Reference(
307
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
308
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Name::UserName(String::from("b")),
+
Name::UserName(String::from("b")),
309
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
310
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
311
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
expr2 = lt_to_ineq
+
expr2 = lt_to_ineq
312
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.apply(&expr2, &Model::new_empty(Default::default()))
+
.apply(&expr2, &Model::new_empty(Default::default()))
313
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
314
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.new_expression;
+
.new_expression;
315
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert_eq!(
+
assert_eq!(
316
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
317
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Ineq(
+
Expression::Ineq(
318
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
319
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Reference(
+
Box::new(Expression::Reference(
320
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
321
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Name::UserName(String::from("a"))
+
Name::UserName(String::from("a"))
322
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
323
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Reference(
+
Box::new(Expression::Reference(
324
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
325
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Name::UserName(String::from("b"))
+
Name::UserName(String::from("b"))
326
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
327
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Constant(Metadata::new(), Constant::Int(-1)))
+
Box::new(Expression::Constant(Metadata::new(), Constant::Int(-1)))
328
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
329
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
331
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut model = Model::new(
+
let mut model = Model::new(
332
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
HashMap::new(),
+
HashMap::new(),
333
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::And(Metadata::new(), vec![expr1, expr2]),
+
Expression::And(Metadata::new(), vec![expr1, expr2]),
334
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Default::default(),
+
Default::default(),
335
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
336
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
model.variables.insert(
+
model.variables.insert(
337
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Name::UserName(String::from("a")),
+
Name::UserName(String::from("a")),
338
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
DecisionVariable {
+
DecisionVariable {
339
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
domain: Domain::IntDomain(vec![Range::Bounded(1, 3)]),
+
domain: Domain::IntDomain(vec![Range::Bounded(1, 3)]),
340
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
341
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
342
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
model.variables.insert(
+
model.variables.insert(
343
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Name::UserName(String::from("b")),
+
Name::UserName(String::from("b")),
344
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
DecisionVariable {
+
DecisionVariable {
345
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
domain: Domain::IntDomain(vec![Range::Bounded(1, 3)]),
+
domain: Domain::IntDomain(vec![Range::Bounded(1, 3)]),
346
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
347
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
348
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
model.variables.insert(
+
model.variables.insert(
349
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Name::UserName(String::from("c")),
+
Name::UserName(String::from("c")),
350
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
DecisionVariable {
+
DecisionVariable {
351
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
domain: Domain::IntDomain(vec![Range::Bounded(1, 3)]),
+
domain: Domain::IntDomain(vec![Range::Bounded(1, 3)]),
352
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
353
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
354
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
355
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let solver: Solver<adaptors::Minion> = Solver::new(adaptors::Minion::new());
+
let solver: Solver<adaptors::Minion> = Solver::new(adaptors::Minion::new());
356
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let solver = solver.load_model(model).unwrap();
+
let solver = solver.load_model(model).unwrap();
357
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
solver.solve(Box::new(|_| true)).unwrap();
+
solver.solve(Box::new(|_| true)).unwrap();
358
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
361
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn rule_remove_double_negation() {
+
fn rule_remove_double_negation() {
362
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let remove_double_negation = get_rule_by_name("remove_double_negation").unwrap();
+
let remove_double_negation = get_rule_by_name("remove_double_negation").unwrap();
363
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
364
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut expr = Expression::Not(
+
let mut expr = Expression::Not(
365
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
366
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Not(
+
Box::new(Expression::Not(
367
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
368
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Constant(Metadata::new(), Constant::Bool(true))),
+
Box::new(Expression::Constant(Metadata::new(), Constant::Bool(true))),
369
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
370
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
371
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
372
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
expr = remove_double_negation
+
expr = remove_double_negation
373
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.apply(&expr, &Model::new_empty(Default::default()))
+
.apply(&expr, &Model::new_empty(Default::default()))
374
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
375
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.new_expression;
+
.new_expression;
376
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
377
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert_eq!(
+
assert_eq!(
378
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
379
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Bool(true))
+
Expression::Constant(Metadata::new(), Constant::Bool(true))
380
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
381
- 1
-
-
-
}
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
+
+
384
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn rule_unwrap_nested_or() {
+
fn rule_unwrap_nested_or() {
385
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let unwrap_nested_or = get_rule_by_name("unwrap_nested_or").unwrap();
+
let unwrap_nested_or = get_rule_by_name("unwrap_nested_or").unwrap();
386
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
387
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut expr = Expression::Or(
+
let mut expr = Expression::Or(
388
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
389
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
390
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Or(
+
Expression::Or(
391
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
392
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
393
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Bool(true)),
+
Expression::Constant(Metadata::new(), Constant::Bool(true)),
394
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Bool(false)),
+
Expression::Constant(Metadata::new(), Constant::Bool(false)),
395
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
396
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
397
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Bool(true)),
+
Expression::Constant(Metadata::new(), Constant::Bool(true)),
398
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
399
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
400
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
401
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
expr = unwrap_nested_or
+
expr = unwrap_nested_or
402
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.apply(&expr, &Model::new_empty(Default::default()))
+
.apply(&expr, &Model::new_empty(Default::default()))
403
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
404
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.new_expression;
+
.new_expression;
405
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
406
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert_eq!(
+
assert_eq!(
407
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
408
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Or(
+
Expression::Or(
409
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
410
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
411
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Bool(true)),
+
Expression::Constant(Metadata::new(), Constant::Bool(true)),
412
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Bool(false)),
+
Expression::Constant(Metadata::new(), Constant::Bool(false)),
413
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Bool(true)),
+
Expression::Constant(Metadata::new(), Constant::Bool(true)),
414
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
415
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
416
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
417
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
420
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn rule_unwrap_nested_and() {
+
fn rule_unwrap_nested_and() {
421
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let unwrap_nested_and = get_rule_by_name("unwrap_nested_and").unwrap();
+
let unwrap_nested_and = get_rule_by_name("unwrap_nested_and").unwrap();
422
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
423
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut expr = Expression::And(
+
let mut expr = Expression::And(
424
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
425
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
426
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::And(
+
Expression::And(
427
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
428
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
429
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Bool(true)),
+
Expression::Constant(Metadata::new(), Constant::Bool(true)),
430
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Bool(false)),
+
Expression::Constant(Metadata::new(), Constant::Bool(false)),
431
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
432
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
433
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Bool(true)),
+
Expression::Constant(Metadata::new(), Constant::Bool(true)),
434
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
435
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
436
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
437
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
expr = unwrap_nested_and
+
expr = unwrap_nested_and
438
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.apply(&expr, &Model::new_empty(Default::default()))
+
.apply(&expr, &Model::new_empty(Default::default()))
439
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
440
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.new_expression;
+
.new_expression;
441
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
442
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert_eq!(
+
assert_eq!(
443
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
444
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::And(
+
Expression::And(
445
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
446
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
447
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Bool(true)),
+
Expression::Constant(Metadata::new(), Constant::Bool(true)),
448
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Bool(false)),
+
Expression::Constant(Metadata::new(), Constant::Bool(false)),
449
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Bool(true)),
+
Expression::Constant(Metadata::new(), Constant::Bool(true)),
450
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
451
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
452
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
453
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
456
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn unwrap_nested_or_not_changed() {
+
fn unwrap_nested_or_not_changed() {
457
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let unwrap_nested_or = get_rule_by_name("unwrap_nested_or").unwrap();
+
let unwrap_nested_or = get_rule_by_name("unwrap_nested_or").unwrap();
458
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
459
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let expr = Expression::Or(
+
let expr = Expression::Or(
460
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
461
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
462
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Bool(true)),
+
Expression::Constant(Metadata::new(), Constant::Bool(true)),
463
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Bool(false)),
+
Expression::Constant(Metadata::new(), Constant::Bool(false)),
464
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
465
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
466
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
467
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let result = unwrap_nested_or.apply(&expr, &Model::new_empty(Default::default()));
+
let result = unwrap_nested_or.apply(&expr, &Model::new_empty(Default::default()));
468
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
469
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert!(result.is_err());
+
assert!(result.is_err());
470
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
473
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn unwrap_nested_and_not_changed() {
+
fn unwrap_nested_and_not_changed() {
474
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let unwrap_nested_and = get_rule_by_name("unwrap_nested_and").unwrap();
+
let unwrap_nested_and = get_rule_by_name("unwrap_nested_and").unwrap();
475
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
476
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let expr = Expression::And(
+
let expr = Expression::And(
477
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
478
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
479
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Bool(true)),
+
Expression::Constant(Metadata::new(), Constant::Bool(true)),
480
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Bool(false)),
+
Expression::Constant(Metadata::new(), Constant::Bool(false)),
481
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
482
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
483
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
484
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let result = unwrap_nested_and.apply(&expr, &Model::new_empty(Default::default()));
+
let result = unwrap_nested_and.apply(&expr, &Model::new_empty(Default::default()));
485
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
486
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert!(result.is_err());
+
assert!(result.is_err());
487
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
490
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn remove_trivial_and_or() {
+
fn remove_trivial_and_or() {
491
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let remove_trivial_and = get_rule_by_name("remove_trivial_and").unwrap();
+
let remove_trivial_and = get_rule_by_name("remove_trivial_and").unwrap();
492
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let remove_trivial_or = get_rule_by_name("remove_trivial_or").unwrap();
+
let remove_trivial_or = get_rule_by_name("remove_trivial_or").unwrap();
493
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
494
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut expr_and = Expression::And(
+
let mut expr_and = Expression::And(
495
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
496
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
vec![Expression::Constant(Metadata::new(), Constant::Bool(true))],
+
vec![Expression::Constant(Metadata::new(), Constant::Bool(true))],
497
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
498
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut expr_or = Expression::Or(
+
let mut expr_or = Expression::Or(
499
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
500
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
vec![Expression::Constant(Metadata::new(), Constant::Bool(false))],
+
vec![Expression::Constant(Metadata::new(), Constant::Bool(false))],
501
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
502
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
503
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
expr_and = remove_trivial_and
+
expr_and = remove_trivial_and
504
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.apply(&expr_and, &Model::new_empty(Default::default()))
+
.apply(&expr_and, &Model::new_empty(Default::default()))
505
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
506
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.new_expression;
+
.new_expression;
507
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
expr_or = remove_trivial_or
+
expr_or = remove_trivial_or
508
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.apply(&expr_or, &Model::new_empty(Default::default()))
+
.apply(&expr_or, &Model::new_empty(Default::default()))
509
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
510
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.new_expression;
+
.new_expression;
511
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
512
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert_eq!(
+
assert_eq!(
513
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
514
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Bool(true))
+
Expression::Constant(Metadata::new(), Constant::Bool(true))
515
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
516
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert_eq!(
+
assert_eq!(
517
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
518
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Bool(false))
+
Expression::Constant(Metadata::new(), Constant::Bool(false))
519
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
520
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
523
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn rule_remove_constants_from_or() {
+
fn rule_remove_constants_from_or() {
524
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let remove_constants_from_or = get_rule_by_name("remove_constants_from_or").unwrap();
+
let remove_constants_from_or = get_rule_by_name("remove_constants_from_or").unwrap();
525
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
526
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut expr = Expression::Or(
+
let mut expr = Expression::Or(
527
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
528
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
529
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Bool(true)),
+
Expression::Constant(Metadata::new(), Constant::Bool(true)),
530
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Bool(false)),
+
Expression::Constant(Metadata::new(), Constant::Bool(false)),
531
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Reference(Metadata::new(), Name::UserName(String::from("a"))),
+
Expression::Reference(Metadata::new(), Name::UserName(String::from("a"))),
532
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
533
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
534
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
535
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
expr = remove_constants_from_or
+
expr = remove_constants_from_or
536
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.apply(&expr, &Model::new_empty(Default::default()))
+
.apply(&expr, &Model::new_empty(Default::default()))
537
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
538
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.new_expression;
+
.new_expression;
539
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
540
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert_eq!(
+
assert_eq!(
541
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
542
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Bool(true))
+
Expression::Constant(Metadata::new(), Constant::Bool(true))
543
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
544
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
547
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn rule_remove_constants_from_and() {
+
fn rule_remove_constants_from_and() {
548
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let remove_constants_from_and = get_rule_by_name("remove_constants_from_and").unwrap();
+
let remove_constants_from_and = get_rule_by_name("remove_constants_from_and").unwrap();
549
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
550
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut expr = Expression::And(
+
let mut expr = Expression::And(
551
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
552
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
553
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Bool(true)),
+
Expression::Constant(Metadata::new(), Constant::Bool(true)),
554
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Bool(false)),
+
Expression::Constant(Metadata::new(), Constant::Bool(false)),
555
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Reference(Metadata::new(), Name::UserName(String::from("a"))),
+
Expression::Reference(Metadata::new(), Name::UserName(String::from("a"))),
556
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
557
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
558
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
559
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
expr = remove_constants_from_and
+
expr = remove_constants_from_and
560
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.apply(&expr, &Model::new_empty(Default::default()))
+
.apply(&expr, &Model::new_empty(Default::default()))
561
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
562
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.new_expression;
+
.new_expression;
563
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
564
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert_eq!(
+
assert_eq!(
565
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
566
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Bool(false))
+
Expression::Constant(Metadata::new(), Constant::Bool(false))
567
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
568
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
571
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn remove_constants_from_or_not_changed() {
+
fn remove_constants_from_or_not_changed() {
572
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let remove_constants_from_or = get_rule_by_name("remove_constants_from_or").unwrap();
+
let remove_constants_from_or = get_rule_by_name("remove_constants_from_or").unwrap();
573
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
574
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let expr = Expression::Or(
+
let expr = Expression::Or(
575
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
576
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
577
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Reference(Metadata::new(), Name::UserName(String::from("a"))),
+
Expression::Reference(Metadata::new(), Name::UserName(String::from("a"))),
578
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Reference(Metadata::new(), Name::UserName(String::from("b"))),
+
Expression::Reference(Metadata::new(), Name::UserName(String::from("b"))),
579
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
580
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
581
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
582
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let result = remove_constants_from_or.apply(&expr, &Model::new_empty(Default::default()));
+
let result = remove_constants_from_or.apply(&expr, &Model::new_empty(Default::default()));
583
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
584
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert!(result.is_err());
+
assert!(result.is_err());
585
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
588
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn remove_constants_from_and_not_changed() {
+
fn remove_constants_from_and_not_changed() {
589
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let remove_constants_from_and = get_rule_by_name("remove_constants_from_and").unwrap();
+
let remove_constants_from_and = get_rule_by_name("remove_constants_from_and").unwrap();
590
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
591
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let expr = Expression::And(
+
let expr = Expression::And(
592
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
593
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
594
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Reference(Metadata::new(), Name::UserName(String::from("a"))),
+
Expression::Reference(Metadata::new(), Name::UserName(String::from("a"))),
595
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Reference(Metadata::new(), Name::UserName(String::from("b"))),
+
Expression::Reference(Metadata::new(), Name::UserName(String::from("b"))),
596
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
597
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
598
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
599
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let result = remove_constants_from_and.apply(&expr, &Model::new_empty(Default::default()));
+
let result = remove_constants_from_and.apply(&expr, &Model::new_empty(Default::default()));
600
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
601
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert!(result.is_err());
+
assert!(result.is_err());
602
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
605
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn rule_distribute_not_over_and() {
+
fn rule_distribute_not_over_and() {
606
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let distribute_not_over_and = get_rule_by_name("distribute_not_over_and").unwrap();
+
let distribute_not_over_and = get_rule_by_name("distribute_not_over_and").unwrap();
607
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
608
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut expr = Expression::Not(
+
let mut expr = Expression::Not(
609
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
610
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::And(
+
Box::new(Expression::And(
611
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
612
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
613
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Reference(Metadata::new(), Name::UserName(String::from("a"))),
+
Expression::Reference(Metadata::new(), Name::UserName(String::from("a"))),
614
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Reference(Metadata::new(), Name::UserName(String::from("b"))),
+
Expression::Reference(Metadata::new(), Name::UserName(String::from("b"))),
615
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
616
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
617
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
618
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
619
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
expr = distribute_not_over_and
+
expr = distribute_not_over_and
620
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.apply(&expr, &Model::new_empty(Default::default()))
+
.apply(&expr, &Model::new_empty(Default::default()))
621
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
622
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.new_expression;
+
.new_expression;
623
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
624
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert_eq!(
+
assert_eq!(
625
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
626
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Or(
+
Expression::Or(
627
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
628
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
629
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Not(
+
Expression::Not(
630
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
631
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Reference(
+
Box::new(Expression::Reference(
632
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
633
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Name::UserName(String::from("a"))
+
Name::UserName(String::from("a"))
634
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
635
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
636
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Not(
+
Expression::Not(
637
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
638
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Reference(
+
Box::new(Expression::Reference(
639
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
640
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Name::UserName(String::from("b"))
+
Name::UserName(String::from("b"))
641
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
642
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
643
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
644
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
645
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
646
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
649
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn rule_distribute_not_over_or() {
+
fn rule_distribute_not_over_or() {
650
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let distribute_not_over_or = get_rule_by_name("distribute_not_over_or").unwrap();
+
let distribute_not_over_or = get_rule_by_name("distribute_not_over_or").unwrap();
651
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
652
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut expr = Expression::Not(
+
let mut expr = Expression::Not(
653
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
654
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Or(
+
Box::new(Expression::Or(
655
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
656
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
657
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Reference(Metadata::new(), Name::UserName(String::from("a"))),
+
Expression::Reference(Metadata::new(), Name::UserName(String::from("a"))),
658
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Reference(Metadata::new(), Name::UserName(String::from("b"))),
+
Expression::Reference(Metadata::new(), Name::UserName(String::from("b"))),
659
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
660
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
661
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
662
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
663
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
expr = distribute_not_over_or
+
expr = distribute_not_over_or
664
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.apply(&expr, &Model::new_empty(Default::default()))
+
.apply(&expr, &Model::new_empty(Default::default()))
665
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
666
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.new_expression;
+
.new_expression;
667
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
668
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert_eq!(
+
assert_eq!(
669
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
670
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::And(
+
Expression::And(
671
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
672
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
673
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Not(
+
Expression::Not(
674
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
675
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Reference(
+
Box::new(Expression::Reference(
676
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
677
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Name::UserName(String::from("a"))
+
Name::UserName(String::from("a"))
678
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
679
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
680
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Not(
+
Expression::Not(
681
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
682
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Reference(
+
Box::new(Expression::Reference(
683
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
684
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Name::UserName(String::from("b"))
+
Name::UserName(String::from("b"))
685
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
686
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
687
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
688
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
689
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
690
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
693
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn rule_distribute_not_over_and_not_changed() {
+
fn rule_distribute_not_over_and_not_changed() {
694
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let distribute_not_over_and = get_rule_by_name("distribute_not_over_and").unwrap();
+
let distribute_not_over_and = get_rule_by_name("distribute_not_over_and").unwrap();
695
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
696
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let expr = Expression::Not(
+
let expr = Expression::Not(
697
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
698
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Reference(
+
Box::new(Expression::Reference(
699
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
700
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Name::UserName(String::from("a")),
+
Name::UserName(String::from("a")),
701
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
702
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
703
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
704
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let result = distribute_not_over_and.apply(&expr, &Model::new_empty(Default::default()));
+
let result = distribute_not_over_and.apply(&expr, &Model::new_empty(Default::default()));
705
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
706
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert!(result.is_err());
+
assert!(result.is_err());
707
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
710
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn rule_distribute_not_over_or_not_changed() {
+
fn rule_distribute_not_over_or_not_changed() {
711
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let distribute_not_over_or = get_rule_by_name("distribute_not_over_or").unwrap();
+
let distribute_not_over_or = get_rule_by_name("distribute_not_over_or").unwrap();
712
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
713
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let expr = Expression::Not(
+
let expr = Expression::Not(
714
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
715
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Reference(
+
Box::new(Expression::Reference(
716
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
717
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Name::UserName(String::from("a")),
+
Name::UserName(String::from("a")),
718
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
719
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
720
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
721
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let result = distribute_not_over_or.apply(&expr, &Model::new_empty(Default::default()));
+
let result = distribute_not_over_or.apply(&expr, &Model::new_empty(Default::default()));
722
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
723
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert!(result.is_err());
+
assert!(result.is_err());
724
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
727
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn rule_distribute_or_over_and() {
+
fn rule_distribute_or_over_and() {
728
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let distribute_or_over_and = get_rule_by_name("distribute_or_over_and").unwrap();
+
let distribute_or_over_and = get_rule_by_name("distribute_or_over_and").unwrap();
729
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
730
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let expr = Expression::Or(
+
let expr = Expression::Or(
731
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
732
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
733
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::And(
+
Expression::And(
734
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
735
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
736
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Reference(Metadata::new(), Name::MachineName(1)),
+
Expression::Reference(Metadata::new(), Name::MachineName(1)),
737
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Reference(Metadata::new(), Name::MachineName(2)),
+
Expression::Reference(Metadata::new(), Name::MachineName(2)),
738
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
739
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
740
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Reference(Metadata::new(), Name::MachineName(3)),
+
Expression::Reference(Metadata::new(), Name::MachineName(3)),
741
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
742
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
743
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
744
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let red = distribute_or_over_and
+
let red = distribute_or_over_and
745
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.apply(&expr, &Model::new_empty(Default::default()))
+
.apply(&expr, &Model::new_empty(Default::default()))
746
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.unwrap();
+
.unwrap();
747
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
748
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert_eq!(
+
assert_eq!(
749
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
red.new_expression,
+
red.new_expression,
750
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::And(
+
Expression::And(
751
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
752
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
753
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Or(
+
Expression::Or(
754
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
755
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
756
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Reference(Metadata::new(), Name::MachineName(3)),
+
Expression::Reference(Metadata::new(), Name::MachineName(3)),
757
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Reference(Metadata::new(), Name::MachineName(1)),
+
Expression::Reference(Metadata::new(), Name::MachineName(1)),
758
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
759
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
760
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Or(
+
Expression::Or(
761
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
762
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
763
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Reference(Metadata::new(), Name::MachineName(3)),
+
Expression::Reference(Metadata::new(), Name::MachineName(3)),
764
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Reference(Metadata::new(), Name::MachineName(2)),
+
Expression::Reference(Metadata::new(), Name::MachineName(2)),
765
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
766
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
767
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
768
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
769
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
770
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
828
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn rewrite_solve_xyz() {
+
fn rewrite_solve_xyz() {
829
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
println!("Rules: {:?}", get_rules());
+
println!("Rules: {:?}", get_rules());
831
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let rule_sets = match resolve_rule_sets(SolverFamily::Minion, &vec!["Constant".to_string()]) {
+
let rule_sets = match resolve_rule_sets(SolverFamily::Minion, &vec!["Constant".to_string()]) {
832
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok(rs) => rs,
+
Ok(rs) => rs,
838
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
println!("Rule sets: {:?}", rule_sets);
+
println!("Rule sets: {:?}", rule_sets);
839
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
840
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
// Create variables and domains
+
// Create variables and domains
841
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let variable_a = Name::UserName(String::from("a"));
+
let variable_a = Name::UserName(String::from("a"));
842
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let variable_b = Name::UserName(String::from("b"));
+
let variable_b = Name::UserName(String::from("b"));
843
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let variable_c = Name::UserName(String::from("c"));
+
let variable_c = Name::UserName(String::from("c"));
844
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let domain = Domain::IntDomain(vec![Range::Bounded(1, 3)]);
+
let domain = Domain::IntDomain(vec![Range::Bounded(1, 3)]);
845
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
846
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
// Construct nested expression
+
// Construct nested expression
847
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let nested_expr = Expression::And(
+
let nested_expr = Expression::And(
848
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
849
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
850
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Eq(
+
Expression::Eq(
851
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
852
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Sum(
+
Box::new(Expression::Sum(
853
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
854
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
855
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Reference(Metadata::new(), variable_a.clone()),
+
Expression::Reference(Metadata::new(), variable_a.clone()),
856
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Reference(Metadata::new(), variable_b.clone()),
+
Expression::Reference(Metadata::new(), variable_b.clone()),
857
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Reference(Metadata::new(), variable_c.clone()),
+
Expression::Reference(Metadata::new(), variable_c.clone()),
858
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
859
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
860
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Constant(Metadata::new(), Constant::Int(4))),
+
Box::new(Expression::Constant(Metadata::new(), Constant::Int(4))),
861
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
862
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Lt(
+
Expression::Lt(
863
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
864
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Reference(Metadata::new(), variable_a.clone())),
+
Box::new(Expression::Reference(Metadata::new(), variable_a.clone())),
865
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Reference(Metadata::new(), variable_b.clone())),
+
Box::new(Expression::Reference(Metadata::new(), variable_b.clone())),
866
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
867
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
868
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
870
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let rule_sets = match resolve_rule_sets(SolverFamily::Minion, &vec!["Constant".to_string()]) {
+
let rule_sets = match resolve_rule_sets(SolverFamily::Minion, &vec!["Constant".to_string()]) {
871
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok(rs) => rs,
+
Ok(rs) => rs,
879
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let rewritten_expr = rewrite_model(
+
let rewritten_expr = rewrite_model(
880
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
&Model::new(HashMap::new(), nested_expr, Default::default()),
+
&Model::new(HashMap::new(), nested_expr, Default::default()),
881
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
&rule_sets,
+
&rule_sets,
882
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
883
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
884
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.constraints;
+
.constraints;
885
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
886
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
// Check if the expression is in its simplest form
+
// Check if the expression is in its simplest form
887
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let expr = rewritten_expr.clone();
+
let expr = rewritten_expr.clone();
888
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert!(is_simple(&expr));
+
assert!(is_simple(&expr));
891
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut model = Model::new(HashMap::new(), rewritten_expr, Default::default());
+
let mut model = Model::new(HashMap::new(), rewritten_expr, Default::default());
892
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
893
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
// Insert variables and domains
+
// Insert variables and domains
894
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
model.variables.insert(
+
model.variables.insert(
895
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
variable_a.clone(),
+
variable_a.clone(),
896
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
DecisionVariable {
+
DecisionVariable {
897
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
domain: domain.clone(),
+
domain: domain.clone(),
898
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
899
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
900
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
model.variables.insert(
+
model.variables.insert(
901
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
variable_b.clone(),
+
variable_b.clone(),
902
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
DecisionVariable {
+
DecisionVariable {
903
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
domain: domain.clone(),
+
domain: domain.clone(),
904
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
905
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
906
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
model.variables.insert(
+
model.variables.insert(
907
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
variable_c.clone(),
+
variable_c.clone(),
908
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
DecisionVariable {
+
DecisionVariable {
909
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
domain: domain.clone(),
+
domain: domain.clone(),
910
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
911
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
912
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
913
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let solver: Solver<adaptors::Minion> = Solver::new(adaptors::Minion::new());
+
let solver: Solver<adaptors::Minion> = Solver::new(adaptors::Minion::new());
914
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let solver = solver.load_model(model).unwrap();
+
let solver = solver.load_model(model).unwrap();
915
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
solver.solve(Box::new(|_| true)).unwrap();
+
solver.solve(Box::new(|_| true)).unwrap();
916
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
919
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn rewrite_solve_xyz_parameterized() {
+
fn rewrite_solve_xyz_parameterized() {
920
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
println!("Rules: {:?}", get_rules());
+
println!("Rules: {:?}", get_rules());
922
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let rule_sets = match resolve_rule_sets(SolverFamily::Minion, &vec!["Constant".to_string()]) {
+
let rule_sets = match resolve_rule_sets(SolverFamily::Minion, &vec!["Constant".to_string()]) {
923
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok(rs) => rs,
+
Ok(rs) => rs,
929
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
println!("Rule sets: {:?}", rule_sets);
+
println!("Rule sets: {:?}", rule_sets);
930
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
931
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
// Create variables and domain
+
// Create variables and domain
932
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let variable_a = Name::UserName(String::from("a"));
+
let variable_a = Name::UserName(String::from("a"));
933
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let variable_b = Name::UserName(String::from("b"));
+
let variable_b = Name::UserName(String::from("b"));
934
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let variable_c = Name::UserName(String::from("c"));
+
let variable_c = Name::UserName(String::from("c"));
935
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let domain = Domain::IntDomain(vec![Range::Bounded(1, 3)]);
+
let domain = Domain::IntDomain(vec![Range::Bounded(1, 3)]);
936
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
937
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
// Create a vector of test cases with varying number of OR clauses
+
// Create a vector of test cases with varying number of OR clauses
938
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let test_cases = vec![1, 2, 3, 4];
+
let test_cases = vec![1, 2, 3, 4];
940
- 5
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
for num_or_clauses in test_cases {
+
for num_or_clauses in test_cases {
942
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut or_exprs = Vec::new();
+
let mut or_exprs = Vec::new();
943
- 10
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
for _i in 0..num_or_clauses {
+
for _i in 0..num_or_clauses {
944
- 10
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let expr = Expression::And(
+
let expr = Expression::And(
945
- 10
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
946
- 10
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
947
- 10
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Eq(
+
Expression::Eq(
948
- 10
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
949
- 10
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Sum(
+
Box::new(Expression::Sum(
950
- 10
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
951
- 10
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
952
- 10
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Reference(Metadata::new(), variable_a.clone()),
+
Expression::Reference(Metadata::new(), variable_a.clone()),
953
- 10
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Reference(Metadata::new(), variable_b.clone()),
+
Expression::Reference(Metadata::new(), variable_b.clone()),
954
- 10
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Reference(Metadata::new(), variable_c.clone()),
+
Expression::Reference(Metadata::new(), variable_c.clone()),
955
- 10
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
956
- 10
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
957
- 10
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Constant(Metadata::new(), Constant::Int(4))),
+
Box::new(Expression::Constant(Metadata::new(), Constant::Int(4))),
958
- 10
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
959
- 10
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Lt(
+
Expression::Lt(
960
- 10
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
961
- 10
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Reference(Metadata::new(), variable_a.clone())),
+
Box::new(Expression::Reference(Metadata::new(), variable_a.clone())),
962
- 10
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Reference(Metadata::new(), variable_b.clone())),
+
Box::new(Expression::Reference(Metadata::new(), variable_b.clone())),
963
- 10
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
964
- 10
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
965
- 10
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
966
- 10
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
or_exprs.push(expr);
+
or_exprs.push(expr);
967
- 10
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
968
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let nested_expr = Expression::Or(Metadata::new(), or_exprs);
+
let nested_expr = Expression::Or(Metadata::new(), or_exprs);
969
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
970
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let model_for_rewrite = Model::new(HashMap::new(), nested_expr.clone(), Default::default());
+
let model_for_rewrite = Model::new(HashMap::new(), nested_expr.clone(), Default::default());
971
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let model_for_rewrite_unoptimized =
+
let model_for_rewrite_unoptimized =
972
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Model::new(HashMap::new(), nested_expr.clone(), Default::default());
+
Model::new(HashMap::new(), nested_expr.clone(), Default::default());
973
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
974
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
// Apply rewrite function to the nested expression
+
// Apply rewrite function to the nested expression
975
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let rewritten_expr = rewrite_model(&model_for_rewrite, &rule_sets)
+
let rewritten_expr = rewrite_model(&model_for_rewrite, &rule_sets)
976
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
977
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.constraints;
+
.constraints;
978
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
979
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
env::set_var("OPTIMIZATIONS", "0");
+
env::set_var("OPTIMIZATIONS", "0");
980
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
981
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let rewritten_expr_unoptimized = rewrite_model(&model_for_rewrite_unoptimized, &rule_sets)
+
let rewritten_expr_unoptimized = rewrite_model(&model_for_rewrite_unoptimized, &rule_sets)
982
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
983
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.constraints;
+
.constraints;
984
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
985
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
env::remove_var("OPTIMIZATIONS");
+
env::remove_var("OPTIMIZATIONS");
986
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
987
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let info_file_name_optimized = format!("rewrite_solve_xyz_optimized_{}", num_or_clauses);
+
let info_file_name_optimized = format!("rewrite_solve_xyz_optimized_{}", num_or_clauses);
988
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let info_file_name_unoptimized =
+
let info_file_name_unoptimized =
989
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
format!("rewrite_solve_xyz_unoptimized_{}", num_or_clauses);
+
format!("rewrite_solve_xyz_unoptimized_{}", num_or_clauses);
990
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
991
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
save_stats_json(
+
save_stats_json(
992
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
model_for_rewrite.context,
+
model_for_rewrite.context,
993
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
994
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
&info_file_name_optimized,
+
&info_file_name_optimized,
995
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
996
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.expect("Could not save stats!");
+
.expect("Could not save stats!");
997
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
save_stats_json(
+
save_stats_json(
998
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
model_for_rewrite_unoptimized.context,
+
model_for_rewrite_unoptimized.context,
999
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1000
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
&info_file_name_unoptimized,
+
&info_file_name_unoptimized,
1001
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1002
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.expect("Could not save stats!");
+
.expect("Could not save stats!");
1003
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1004
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
// Check if the expression is in its simplest form
+
// Check if the expression is in its simplest form
1005
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let expr = rewritten_expr.clone();
+
let expr = rewritten_expr.clone();
1006
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert!(is_simple(&expr));
+
assert!(is_simple(&expr));
1008
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let expr_unoptimized = rewritten_expr_unoptimized.clone();
+
let expr_unoptimized = rewritten_expr_unoptimized.clone();
1009
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert!(is_simple(&expr_unoptimized));
+
assert!(is_simple(&expr_unoptimized));
1012
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut model = Model::new(HashMap::new(), rewritten_expr, Default::default());
+
let mut model = Model::new(HashMap::new(), rewritten_expr, Default::default());
1013
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut model_unoptimized = Model::new(
+
let mut model_unoptimized = Model::new(
1014
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
HashMap::new(),
+
HashMap::new(),
1015
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
rewritten_expr_unoptimized,
+
rewritten_expr_unoptimized,
1016
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Default::default(),
+
Default::default(),
1017
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1018
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1019
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
// Insert variables and domains
+
// Insert variables and domains
1020
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
model.variables.insert(
+
model.variables.insert(
1021
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
variable_a.clone(),
+
variable_a.clone(),
1022
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
DecisionVariable {
+
DecisionVariable {
1023
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
domain: domain.clone(),
+
domain: domain.clone(),
1024
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1025
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1026
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
model.variables.insert(
+
model.variables.insert(
1027
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
variable_b.clone(),
+
variable_b.clone(),
1028
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
DecisionVariable {
+
DecisionVariable {
1029
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
domain: domain.clone(),
+
domain: domain.clone(),
1030
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1031
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1032
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
model.variables.insert(
+
model.variables.insert(
1033
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
variable_c.clone(),
+
variable_c.clone(),
1034
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
DecisionVariable {
+
DecisionVariable {
1035
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
domain: domain.clone(),
+
domain: domain.clone(),
1036
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1037
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1038
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1039
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
model_unoptimized.variables.insert(
+
model_unoptimized.variables.insert(
1040
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
variable_a.clone(),
+
variable_a.clone(),
1041
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
DecisionVariable {
+
DecisionVariable {
1042
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
domain: domain.clone(),
+
domain: domain.clone(),
1043
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1044
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1045
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
model_unoptimized.variables.insert(
+
model_unoptimized.variables.insert(
1046
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
variable_b.clone(),
+
variable_b.clone(),
1047
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
DecisionVariable {
+
DecisionVariable {
1048
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
domain: domain.clone(),
+
domain: domain.clone(),
1049
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1050
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1051
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
model_unoptimized.variables.insert(
+
model_unoptimized.variables.insert(
1052
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
variable_c.clone(),
+
variable_c.clone(),
1053
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
DecisionVariable {
+
DecisionVariable {
1054
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
domain: domain.clone(),
+
domain: domain.clone(),
1055
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1056
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1057
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1058
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let solver: Solver<adaptors::Minion> = Solver::new(adaptors::Minion::new());
+
let solver: Solver<adaptors::Minion> = Solver::new(adaptors::Minion::new());
1059
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let solver = solver.load_model(model).unwrap();
+
let solver = solver.load_model(model).unwrap();
1060
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
solver.solve(Box::new(|_| true)).unwrap();
+
solver.solve(Box::new(|_| true)).unwrap();
1061
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1062
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let solver_unoptimized: Solver<adaptors::Minion> = Solver::new(adaptors::Minion::new());
+
let solver_unoptimized: Solver<adaptors::Minion> = Solver::new(adaptors::Minion::new());
1063
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let solver_unoptimized = solver_unoptimized.load_model(model_unoptimized).unwrap();
+
let solver_unoptimized = solver_unoptimized.load_model(model_unoptimized).unwrap();
1064
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
solver_unoptimized.solve(Box::new(|_| true)).unwrap();
+
solver_unoptimized.solve(Box::new(|_| true)).unwrap();
1066
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1077
- 9
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn is_simple(expression: &Expression) -> bool {
+
pub fn is_simple(expression: &Expression) -> bool {
1078
- 9
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let rules = get_rules();
+
let rules = get_rules();
1079
- 9
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut new = expression.clone();
+
let mut new = expression.clone();
1080
- 9
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
while let Some(step) = is_simple_iteration(&new, &rules) {
+
while let Some(step) = is_simple_iteration(&new, &rules) {
1083
- 9
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
new == *expression
+
new == *expression
1084
- 9
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1089
- 4233
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn is_simple_iteration<'a>(
+
fn is_simple_iteration<'a>(
1090
- 4233
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
expression: &'a Expression,
+
expression: &'a Expression,
1091
- 4233
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
rules: &'a Vec<&'a Rule<'a>>,
+
rules: &'a Vec<&'a Rule<'a>>,
1092
- 4233
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
) -> Option<Expression> {
+
) -> Option<Expression> {
1093
- 4233
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let rule_results = apply_all_rules(expression, rules);
+
let rule_results = apply_all_rules(expression, rules);
1094
- 4233
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if let Some(new) = choose_rewrite(&rule_results) {
+
if let Some(new) = choose_rewrite(&rule_results) {
1097
- 4233
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut sub = expression.children();
+
let mut sub = expression.children();
1098
- 4233
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
for i in 0..sub.len() {
+
for i in 0..sub.len() {
1099
- 4224
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if let Some(new) = is_simple_iteration(&sub[i], rules) {
+
if let Some(new) = is_simple_iteration(&sub[i], rules) {
1104
- 4224
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1107
- 4233
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
None // No rules applicable to this branch of the expression
+
None // No rules applicable to this branch of the expression
1108
- 4233
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1113
- 4233
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn apply_all_rules<'a>(
+
fn apply_all_rules<'a>(
1114
- 4233
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
expression: &'a Expression,
+
expression: &'a Expression,
1115
- 4233
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
rules: &'a Vec<&'a Rule<'a>>,
+
rules: &'a Vec<&'a Rule<'a>>,
1116
- 4233
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
) -> Vec<RuleResult<'a>> {
+
) -> Vec<RuleResult<'a>> {
1117
- 4233
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut results = Vec::new();
+
let mut results = Vec::new();
1118
- 143922
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
for rule in rules {
+
for rule in rules {
1119
- 139689
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match rule.apply(expression, &Model::new_empty(Default::default())) {
+
match rule.apply(expression, &Model::new_empty(Default::default())) {
1126
- 139689
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Err(_) => continue,
+
Err(_) => continue,
1129
- 4233
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1130
- 4233
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1135
- 4233
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn choose_rewrite(results: &[RuleResult]) -> Option<Expression> {
+
fn choose_rewrite(results: &[RuleResult]) -> Option<Expression> {
1136
- 4233
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if results.is_empty() {
+
if results.is_empty() {
1137
- 4233
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
return None;
+
return None;
1142
- 4233
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1145
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn eval_const_int() {
+
fn eval_const_int() {
1146
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let expr = Expression::Constant(Metadata::new(), Constant::Int(1));
+
let expr = Expression::Constant(Metadata::new(), Constant::Int(1));
1147
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let result = eval_constant(&expr);
+
let result = eval_constant(&expr);
1148
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert_eq!(result, Some(Constant::Int(1)));
+
assert_eq!(result, Some(Constant::Int(1)));
1149
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1152
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn eval_const_bool() {
+
fn eval_const_bool() {
1153
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let expr = Expression::Constant(Metadata::new(), Constant::Bool(true));
+
let expr = Expression::Constant(Metadata::new(), Constant::Bool(true));
1154
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let result = eval_constant(&expr);
+
let result = eval_constant(&expr);
1155
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert_eq!(result, Some(Constant::Bool(true)));
+
assert_eq!(result, Some(Constant::Bool(true)));
1156
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1159
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn eval_const_and() {
+
fn eval_const_and() {
1160
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let expr = Expression::And(
+
let expr = Expression::And(
1161
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
1162
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1163
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Bool(true)),
+
Expression::Constant(Metadata::new(), Constant::Bool(true)),
1164
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Bool(false)),
+
Expression::Constant(Metadata::new(), Constant::Bool(false)),
1165
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1166
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1167
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let result = eval_constant(&expr);
+
let result = eval_constant(&expr);
1168
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert_eq!(result, Some(Constant::Bool(false)));
+
assert_eq!(result, Some(Constant::Bool(false)));
1169
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1172
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn eval_const_ref() {
+
fn eval_const_ref() {
1173
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let expr = Expression::Reference(Metadata::new(), Name::UserName(String::from("a")));
+
let expr = Expression::Reference(Metadata::new(), Name::UserName(String::from("a")));
1174
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let result = eval_constant(&expr);
+
let result = eval_constant(&expr);
1175
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert_eq!(result, None);
+
assert_eq!(result, None);
1176
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1179
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn eval_const_nested_ref() {
+
fn eval_const_nested_ref() {
1180
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let expr = Expression::Sum(
+
let expr = Expression::Sum(
1181
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
1182
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1183
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Int(1)),
+
Expression::Constant(Metadata::new(), Constant::Int(1)),
1184
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::And(
+
Expression::And(
1185
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
1186
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1187
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Bool(true)),
+
Expression::Constant(Metadata::new(), Constant::Bool(true)),
1188
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Reference(Metadata::new(), Name::UserName(String::from("a"))),
+
Expression::Reference(Metadata::new(), Name::UserName(String::from("a"))),
1189
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1190
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1191
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1192
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1193
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let result = eval_constant(&expr);
+
let result = eval_constant(&expr);
1194
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert_eq!(result, None);
+
assert_eq!(result, None);
1195
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1198
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn eval_const_eq_int() {
+
fn eval_const_eq_int() {
1199
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let expr = Expression::Eq(
+
let expr = Expression::Eq(
1200
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
1201
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Constant(Metadata::new(), Constant::Int(1))),
+
Box::new(Expression::Constant(Metadata::new(), Constant::Int(1))),
1202
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Constant(Metadata::new(), Constant::Int(1))),
+
Box::new(Expression::Constant(Metadata::new(), Constant::Int(1))),
1203
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1204
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let result = eval_constant(&expr);
+
let result = eval_constant(&expr);
1205
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert_eq!(result, Some(Constant::Bool(true)));
+
assert_eq!(result, Some(Constant::Bool(true)));
1206
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1209
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn eval_const_eq_bool() {
+
fn eval_const_eq_bool() {
1210
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let expr = Expression::Eq(
+
let expr = Expression::Eq(
1211
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
1212
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Constant(Metadata::new(), Constant::Bool(true))),
+
Box::new(Expression::Constant(Metadata::new(), Constant::Bool(true))),
1213
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Constant(Metadata::new(), Constant::Bool(true))),
+
Box::new(Expression::Constant(Metadata::new(), Constant::Bool(true))),
1214
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1215
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let result = eval_constant(&expr);
+
let result = eval_constant(&expr);
1216
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert_eq!(result, Some(Constant::Bool(true)));
+
assert_eq!(result, Some(Constant::Bool(true)));
1217
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1220
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn eval_const_eq_mixed() {
+
fn eval_const_eq_mixed() {
1221
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let expr = Expression::Eq(
+
let expr = Expression::Eq(
1222
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
1223
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Constant(Metadata::new(), Constant::Int(1))),
+
Box::new(Expression::Constant(Metadata::new(), Constant::Int(1))),
1224
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Constant(Metadata::new(), Constant::Bool(true))),
+
Box::new(Expression::Constant(Metadata::new(), Constant::Bool(true))),
1225
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1226
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let result = eval_constant(&expr);
+
let result = eval_constant(&expr);
1227
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert_eq!(result, None);
+
assert_eq!(result, None);
1228
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1231
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn eval_const_sum_mixed() {
+
fn eval_const_sum_mixed() {
1232
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let expr = Expression::Sum(
+
let expr = Expression::Sum(
1233
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
1234
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1235
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Int(1)),
+
Expression::Constant(Metadata::new(), Constant::Int(1)),
1236
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Bool(true)),
+
Expression::Constant(Metadata::new(), Constant::Bool(true)),
1237
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1238
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1239
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let result = eval_constant(&expr);
+
let result = eval_constant(&expr);
1240
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert_eq!(result, None);
+
assert_eq!(result, None);
1241
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1244
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn eval_const_sum_xyz() {
+
fn eval_const_sum_xyz() {
1245
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let expr = Expression::And(
+
let expr = Expression::And(
1246
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
1247
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1248
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Eq(
+
Expression::Eq(
1249
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
1250
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Sum(
+
Box::new(Expression::Sum(
1251
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
1252
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1253
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Reference(Metadata::new(), Name::UserName(String::from("x"))),
+
Expression::Reference(Metadata::new(), Name::UserName(String::from("x"))),
1254
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Reference(Metadata::new(), Name::UserName(String::from("y"))),
+
Expression::Reference(Metadata::new(), Name::UserName(String::from("y"))),
1255
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Reference(Metadata::new(), Name::UserName(String::from("z"))),
+
Expression::Reference(Metadata::new(), Name::UserName(String::from("z"))),
1256
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1257
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1258
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Constant(Metadata::new(), Constant::Int(4))),
+
Box::new(Expression::Constant(Metadata::new(), Constant::Int(4))),
1259
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1260
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Geq(
+
Expression::Geq(
1261
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
1262
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Reference(
+
Box::new(Expression::Reference(
1263
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
1264
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Name::UserName(String::from("x")),
+
Name::UserName(String::from("x")),
1265
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1266
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Reference(
+
Box::new(Expression::Reference(
1267
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
1268
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Name::UserName(String::from("y")),
+
Name::UserName(String::from("y")),
1269
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1270
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1271
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1272
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1273
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let result = eval_constant(&expr);
+
let result = eval_constant(&expr);
1274
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert_eq!(result, None);
+
assert_eq!(result, None);
1275
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1278
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn eval_const_or() {
+
fn eval_const_or() {
1279
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let expr = Expression::Or(
+
let expr = Expression::Or(
1280
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
1281
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1282
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Bool(false)),
+
Expression::Constant(Metadata::new(), Constant::Bool(false)),
1283
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Bool(false)),
+
Expression::Constant(Metadata::new(), Constant::Bool(false)),
1284
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1285
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
1286
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let result = eval_constant(&expr);
+
let result = eval_constant(&expr);
1287
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert_eq!(result, Some(Constant::Bool(false)));
+
assert_eq!(result, Some(Constant::Bool(false)));
1288
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
diff --git a/coverage/main/coverage.json b/coverage/main/coverage.json
index c510cfd054..7eae605673 100644
--- a/coverage/main/coverage.json
+++ b/coverage/main/coverage.json
@@ -1 +1 @@
-{"schemaVersion":1,"label":"coverage","message":"74.74%","color":"red"}
\ No newline at end of file
+{"schemaVersion":1,"label":"coverage","message":"7.90%","color":"red"}
\ No newline at end of file
diff --git a/coverage/main/crates/conjure_core/src/ast/constants.rs.html b/coverage/main/crates/conjure_core/src/ast/constants.rs.html
index a9b9205e79..312182c24d 100644
--- a/coverage/main/crates/conjure_core/src/ast/constants.rs.html
+++ b/coverage/main/crates/conjure_core/src/ast/constants.rs.html
@@ -15,7 +15,7 @@
@@ -23,7 +23,7 @@
Functions
- 13.64 %
+
0 %
@@ -102,13 +102,13 @@
5
- 430
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
+
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
14
- 632
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn try_from(value: Constant) -> Result<Self, Self::Error> {
+
fn try_from(value: Constant) -> Result<Self, Self::Error> {
15
- 632
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match value {
+
match value {
16
- 587
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Constant::Int(i) => Ok(i),
+
Constant::Int(i) => Ok(i),
17
- 45
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => Err("Cannot convert non-i32 Constant to i32"),
+
_ => Err("Cannot convert non-i32 Constant to i32"),
19
- 632
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
24
- 255
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn try_from(value: Constant) -> Result<Self, Self::Error> {
+
fn try_from(value: Constant) -> Result<Self, Self::Error> {
25
- 255
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match value {
+
match value {
26
- 105
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Constant::Bool(b) => Ok(b),
+
Constant::Bool(b) => Ok(b),
27
- 150
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => Err("Cannot convert non-bool Constant to bool"),
+
_ => Err("Cannot convert non-bool Constant to bool"),
29
- 255
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
diff --git a/coverage/main/crates/conjure_core/src/ast/domains.rs.html b/coverage/main/crates/conjure_core/src/ast/domains.rs.html
index 1d4243f81a..2ec727e20c 100644
--- a/coverage/main/crates/conjure_core/src/ast/domains.rs.html
+++ b/coverage/main/crates/conjure_core/src/ast/domains.rs.html
@@ -14,8 +14,8 @@
Lines
-
- 96.61 %
+
+ 0 %
@@ -23,7 +23,7 @@
Functions
- 23.81 %
+
0 %
@@ -86,13 +86,13 @@
4
- 825
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
+
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
13
- 650
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
+
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
21
- 282
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn values_i32(&self) -> Option<Vec<i32>> {
+
pub fn values_i32(&self) -> Option<Vec<i32>> {
22
- 282
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match self {
+
match self {
23
- 281
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Domain::IntDomain(ranges) => Some(
+
Domain::IntDomain(ranges) => Some(
24
- 281
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
25
- 281
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
26
- 281
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.flat_map(|r| match r {
+
.flat_map(|r| match r {
27
- 20
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Range::Single(i) => vec![*i],
+
Range::Single(i) => vec![*i],
28
- 261
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Range::Bounded(i, j) => (*i..=*j).collect(),
+
Range::Bounded(i, j) => (*i..=*j).collect(),
29
- 281
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
30
- 281
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.collect(),
+
.collect(),
31
- 281
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
32
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => None,
+
_ => None,
34
- 282
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
42
- 141
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn apply_i32(&self, op: fn(i32, i32) -> Option<i32>, other: &Domain) -> Option<Domain> {
+
pub fn apply_i32(&self, op: fn(i32, i32) -> Option<i32>, other: &Domain) -> Option<Domain> {
43
- 141
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if let (Some(vs1), Some(vs2)) = (self.values_i32(), other.values_i32()) {
+
if let (Some(vs1), Some(vs2)) = (self.values_i32(), other.values_i32()) {
45
- 140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut new_ranges = vec![];
+
let mut new_ranges = vec![];
46
- 1658
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
for (v1, v2) in itertools::iproduct!(vs1, vs2) {
+
for (v1, v2) in itertools::iproduct!(vs1, vs2) {
47
- 1658
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
op(v1, v2).map(|v| new_ranges.push(Range::Single(v)));
+
op(v1, v2).map(|v| new_ranges.push(Range::Single(v)));
48
- 1658
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
49
- 140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
return Some(Domain::IntDomain(new_ranges));
+
return Some(Domain::IntDomain(new_ranges));
50
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
51
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
52
- 141
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
60
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn test_negative_product() {
+
fn test_negative_product() {
61
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let d1 = Domain::IntDomain(vec![Range::Bounded(-2, 1)]);
+
let d1 = Domain::IntDomain(vec![Range::Bounded(-2, 1)]);
62
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let d2 = Domain::IntDomain(vec![Range::Bounded(-2, 1)]);
+
let d2 = Domain::IntDomain(vec![Range::Bounded(-2, 1)]);
63
- 16
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let res = d1.apply_i32(|a, b| Some(a * b), &d2).unwrap();
+
let res = d1.apply_i32(|a, b| Some(a * b), &d2).unwrap();
65
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if let Domain::IntDomain(ranges) = res {
+
if let Domain::IntDomain(ranges) = res {
66
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert!(!ranges.contains(&Range::Single(-4)));
+
assert!(!ranges.contains(&Range::Single(-4)));
67
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert!(!ranges.contains(&Range::Single(-3)));
+
assert!(!ranges.contains(&Range::Single(-3)));
68
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert!(ranges.contains(&Range::Single(-2)));
+
assert!(ranges.contains(&Range::Single(-2)));
69
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert!(ranges.contains(&Range::Single(-1)));
+
assert!(ranges.contains(&Range::Single(-1)));
70
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert!(ranges.contains(&Range::Single(0)));
+
assert!(ranges.contains(&Range::Single(0)));
71
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert!(ranges.contains(&Range::Single(1)));
+
assert!(ranges.contains(&Range::Single(1)));
72
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert!(ranges.contains(&Range::Single(2)));
+
assert!(ranges.contains(&Range::Single(2)));
73
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert!(!ranges.contains(&Range::Single(3)));
+
assert!(!ranges.contains(&Range::Single(3)));
74
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert!(ranges.contains(&Range::Single(4)));
+
assert!(ranges.contains(&Range::Single(4)));
78
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
81
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn test_negative_div() {
+
fn test_negative_div() {
82
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let d1 = Domain::IntDomain(vec![Range::Bounded(-2, 1)]);
+
let d1 = Domain::IntDomain(vec![Range::Bounded(-2, 1)]);
83
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let d2 = Domain::IntDomain(vec![Range::Bounded(-2, 1)]);
+
let d2 = Domain::IntDomain(vec![Range::Bounded(-2, 1)]);
84
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let res = d1
+
let res = d1
85
- 16
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.apply_i32(|a, b| if b != 0 { Some(a / b) } else { None }, &d2)
+
.apply_i32(|a, b| if b != 0 { Some(a / b) } else { None }, &d2)
86
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.unwrap();
+
.unwrap();
88
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if let Domain::IntDomain(ranges) = res {
+
if let Domain::IntDomain(ranges) = res {
89
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert!(!ranges.contains(&Range::Single(-4)));
+
assert!(!ranges.contains(&Range::Single(-4)));
90
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert!(!ranges.contains(&Range::Single(-3)));
+
assert!(!ranges.contains(&Range::Single(-3)));
91
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert!(ranges.contains(&Range::Single(-2)));
+
assert!(ranges.contains(&Range::Single(-2)));
92
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert!(ranges.contains(&Range::Single(-1)));
+
assert!(ranges.contains(&Range::Single(-1)));
93
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert!(ranges.contains(&Range::Single(0)));
+
assert!(ranges.contains(&Range::Single(0)));
94
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert!(ranges.contains(&Range::Single(1)));
+
assert!(ranges.contains(&Range::Single(1)));
95
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert!(ranges.contains(&Range::Single(2)));
+
assert!(ranges.contains(&Range::Single(2)));
96
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert!(!ranges.contains(&Range::Single(3)));
+
assert!(!ranges.contains(&Range::Single(3)));
97
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert!(!ranges.contains(&Range::Single(4)));
+
assert!(!ranges.contains(&Range::Single(4)));
101
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
diff --git a/coverage/main/crates/conjure_core/src/ast/expressions.rs.html b/coverage/main/crates/conjure_core/src/ast/expressions.rs.html
index aaed49a9ab..cb8abe8088 100644
--- a/coverage/main/crates/conjure_core/src/ast/expressions.rs.html
+++ b/coverage/main/crates/conjure_core/src/ast/expressions.rs.html
@@ -15,7 +15,7 @@
@@ -23,7 +23,7 @@
Functions
- 15.67 %
+
0 %
@@ -310,13 +310,13 @@
18
- 36216615
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize, is_enum_variant, Uniplate)]
+
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize, is_enum_variant, Uniplate)]
109
- 80
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn expr_vec_to_domain_i32(
+
fn expr_vec_to_domain_i32(
110
- 80
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
exprs: &Vec<Expression>,
+
exprs: &Vec<Expression>,
111
- 80
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
op: fn(i32, i32) -> Option<i32>,
+
op: fn(i32, i32) -> Option<i32>,
112
- 80
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
vars: &SymbolTable,
+
vars: &SymbolTable,
113
- 80
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
) -> Option<Domain> {
+
) -> Option<Domain> {
114
- 158
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let domains: Vec<Option<_>> = exprs.iter().map(|e| e.domain_of(vars)).collect();
+
let domains: Vec<Option<_>> = exprs.iter().map(|e| e.domain_of(vars)).collect();
115
- 80
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
116
- 80
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.into_iter()
+
.into_iter()
117
- 80
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.reduce(|a, b| a.and_then(|x| b.and_then(|y| x.apply_i32(op, &y))))
+
.reduce(|a, b| a.and_then(|x| b.and_then(|y| x.apply_i32(op, &y))))
118
- 80
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.flatten()
+
.flatten()
119
- 80
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
121
- 136
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn range_vec_bounds_i32(ranges: &Vec<Range<i32>>) -> (i32, i32) {
+
fn range_vec_bounds_i32(ranges: &Vec<Range<i32>>) -> (i32, i32) {
122
- 136
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut min = i32::MAX;
+
let mut min = i32::MAX;
123
- 136
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut max = i32::MIN;
+
let mut max = i32::MIN;
124
- 1565
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
for r in ranges {
+
for r in ranges {
125
- 1429
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
126
- 1429
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Range::Single(i) => {
+
Range::Single(i) => {
127
- 1429
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if *i < min {
+
if *i < min {
128
- 196
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
129
- 1233
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
130
- 1429
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if *i > max {
+
if *i > max {
131
- 423
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
132
- 1008
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
144
- 136
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
(min, max)
+
(min, max)
145
- 136
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
149
- 420
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn domain_of(&self, vars: &SymbolTable) -> Option<Domain> {
+
pub fn domain_of(&self, vars: &SymbolTable) -> Option<Domain> {
150
- 419
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let ret = match self {
+
let ret = match self {
151
- 261
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Reference(_, name) => Some(vars.get(name)?.domain.clone()),
+
Expression::Reference(_, name) => Some(vars.get(name)?.domain.clone()),
152
- 18
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(_, Constant::Int(n)) => {
+
Expression::Constant(_, Constant::Int(n)) => {
153
- 18
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Some(Domain::IntDomain(vec![Range::Single(*n)]))
+
Some(Domain::IntDomain(vec![Range::Single(*n)]))
155
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(_, Constant::Bool(_)) => Some(Domain::BoolDomain),
+
Expression::Constant(_, Constant::Bool(_)) => Some(Domain::BoolDomain),
156
- 6
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Sum(_, exprs) => expr_vec_to_domain_i32(exprs, |x, y| Some(x + y), vars),
+
Expression::Sum(_, exprs) => expr_vec_to_domain_i32(exprs, |x, y| Some(x + y), vars),
157
- 75
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Min(_, exprs) => {
+
Expression::Min(_, exprs) => {
158
- 750
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
expr_vec_to_domain_i32(exprs, |x, y| Some(if x < y { x } else { y }), vars)
+
expr_vec_to_domain_i32(exprs, |x, y| Some(if x < y { x } else { y }), vars)
160
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::UnsafeDiv(_, a, b) | Expression::SafeDiv(_, a, b) => {
+
Expression::UnsafeDiv(_, a, b) | Expression::SafeDiv(_, a, b) => {
161
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
a.domain_of(vars)?.apply_i32(
+
a.domain_of(vars)?.apply_i32(
162
- 870
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
|x, y| if y != 0 { Some(x / y) } else { None },
+
|x, y| if y != 0 { Some(x / y) } else { None },
163
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
&b.domain_of(vars)?,
+
&b.domain_of(vars)?,
169
- 416
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match ret {
+
match ret {
172
- 416
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Some(Domain::IntDomain(ranges)) if ranges.len() > 1 => {
+
Some(Domain::IntDomain(ranges)) if ranges.len() > 1 => {
173
- 136
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let (min, max) = range_vec_bounds_i32(&ranges);
+
let (min, max) = range_vec_bounds_i32(&ranges);
174
- 136
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Some(Domain::IntDomain(vec![Range::Bounded(min, max)]))
+
Some(Domain::IntDomain(vec![Range::Bounded(min, max)]))
176
- 283
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
178
- 420
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
180
- 150
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn can_be_undefined(&self) -> bool {
+
pub fn can_be_undefined(&self) -> bool {
182
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match self {
+
match self {
183
- 90
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Reference(_, _) => false,
+
Expression::Reference(_, _) => false,
185
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(_, Constant::Int(_)) => false,
+
Expression::Constant(_, Constant::Int(_)) => false,
186
- 45
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => true,
+
_ => true,
188
- 150
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
190
- 135
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn return_type(&self) -> Option<ReturnType> {
+
pub fn return_type(&self) -> Option<ReturnType> {
200
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Eq(_, _, _) => Some(ReturnType::Bool),
+
Expression::Eq(_, _, _) => Some(ReturnType::Bool),
201
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Neq(_, _, _) => Some(ReturnType::Bool),
+
Expression::Neq(_, _, _) => Some(ReturnType::Bool),
206
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::SafeDiv(_, _, _) => Some(ReturnType::Int),
+
Expression::SafeDiv(_, _, _) => Some(ReturnType::Int),
217
- 135
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
333
- 75
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn from(i: i32) -> Self {
+
fn from(i: i32) -> Self {
334
- 75
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Constant(Metadata::new(), Constant::Int(i))
+
Expression::Constant(Metadata::new(), Constant::Int(i))
335
- 75
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
445
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn test_domain_of_constant_sum() {
+
fn test_domain_of_constant_sum() {
446
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let c1 = Expression::Constant(Metadata::new(), Constant::Int(1));
+
let c1 = Expression::Constant(Metadata::new(), Constant::Int(1));
447
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let c2 = Expression::Constant(Metadata::new(), Constant::Int(2));
+
let c2 = Expression::Constant(Metadata::new(), Constant::Int(2));
448
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let sum = Expression::Sum(Metadata::new(), vec![c1.clone(), c2.clone()]);
+
let sum = Expression::Sum(Metadata::new(), vec![c1.clone(), c2.clone()]);
449
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert_eq!(
+
assert_eq!(
450
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
sum.domain_of(&SymbolTable::new()),
+
sum.domain_of(&SymbolTable::new()),
451
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Some(Domain::IntDomain(vec![Range::Single(3)]))
+
Some(Domain::IntDomain(vec![Range::Single(3)]))
452
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
453
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
456
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn test_domain_of_constant_invalid_type() {
+
fn test_domain_of_constant_invalid_type() {
457
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let c1 = Expression::Constant(Metadata::new(), Constant::Int(1));
+
let c1 = Expression::Constant(Metadata::new(), Constant::Int(1));
458
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let c2 = Expression::Constant(Metadata::new(), Constant::Bool(true));
+
let c2 = Expression::Constant(Metadata::new(), Constant::Bool(true));
459
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let sum = Expression::Sum(Metadata::new(), vec![c1.clone(), c2.clone()]);
+
let sum = Expression::Sum(Metadata::new(), vec![c1.clone(), c2.clone()]);
460
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert_eq!(sum.domain_of(&SymbolTable::new()), None);
+
assert_eq!(sum.domain_of(&SymbolTable::new()), None);
461
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
464
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn test_domain_of_empty_sum() {
+
fn test_domain_of_empty_sum() {
465
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let sum = Expression::Sum(Metadata::new(), vec![]);
+
let sum = Expression::Sum(Metadata::new(), vec![]);
466
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert_eq!(sum.domain_of(&SymbolTable::new()), None);
+
assert_eq!(sum.domain_of(&SymbolTable::new()), None);
467
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
470
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn test_domain_of_reference() {
+
fn test_domain_of_reference() {
471
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let reference = Expression::Reference(Metadata::new(), Name::MachineName(0));
+
let reference = Expression::Reference(Metadata::new(), Name::MachineName(0));
472
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut vars = SymbolTable::new();
+
let mut vars = SymbolTable::new();
473
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
vars.insert(
+
vars.insert(
474
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Name::MachineName(0),
+
Name::MachineName(0),
475
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
DecisionVariable::new(Domain::IntDomain(vec![Range::Single(1)])),
+
DecisionVariable::new(Domain::IntDomain(vec![Range::Single(1)])),
476
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
477
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert_eq!(
+
assert_eq!(
478
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
reference.domain_of(&vars),
+
reference.domain_of(&vars),
479
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Some(Domain::IntDomain(vec![Range::Single(1)]))
+
Some(Domain::IntDomain(vec![Range::Single(1)]))
480
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
481
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
484
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn test_domain_of_reference_not_found() {
+
fn test_domain_of_reference_not_found() {
485
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let reference = Expression::Reference(Metadata::new(), Name::MachineName(0));
+
let reference = Expression::Reference(Metadata::new(), Name::MachineName(0));
486
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert_eq!(reference.domain_of(&SymbolTable::new()), None);
+
assert_eq!(reference.domain_of(&SymbolTable::new()), None);
487
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
490
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn test_domain_of_reference_sum_single() {
+
fn test_domain_of_reference_sum_single() {
491
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let reference = Expression::Reference(Metadata::new(), Name::MachineName(0));
+
let reference = Expression::Reference(Metadata::new(), Name::MachineName(0));
492
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut vars = SymbolTable::new();
+
let mut vars = SymbolTable::new();
493
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
vars.insert(
+
vars.insert(
494
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Name::MachineName(0),
+
Name::MachineName(0),
495
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
DecisionVariable::new(Domain::IntDomain(vec![Range::Single(1)])),
+
DecisionVariable::new(Domain::IntDomain(vec![Range::Single(1)])),
496
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
497
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let sum = Expression::Sum(Metadata::new(), vec![reference.clone(), reference.clone()]);
+
let sum = Expression::Sum(Metadata::new(), vec![reference.clone(), reference.clone()]);
498
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert_eq!(
+
assert_eq!(
499
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
sum.domain_of(&vars),
+
sum.domain_of(&vars),
500
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Some(Domain::IntDomain(vec![Range::Single(2)]))
+
Some(Domain::IntDomain(vec![Range::Single(2)]))
501
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
502
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
505
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn test_domain_of_reference_sum_bounded() {
+
fn test_domain_of_reference_sum_bounded() {
506
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let reference = Expression::Reference(Metadata::new(), Name::MachineName(0));
+
let reference = Expression::Reference(Metadata::new(), Name::MachineName(0));
507
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut vars = SymbolTable::new();
+
let mut vars = SymbolTable::new();
508
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
vars.insert(
+
vars.insert(
509
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Name::MachineName(0),
+
Name::MachineName(0),
510
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
DecisionVariable::new(Domain::IntDomain(vec![Range::Bounded(1, 2)])),
+
DecisionVariable::new(Domain::IntDomain(vec![Range::Bounded(1, 2)])),
511
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
512
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let sum = Expression::Sum(Metadata::new(), vec![reference.clone(), reference.clone()]);
+
let sum = Expression::Sum(Metadata::new(), vec![reference.clone(), reference.clone()]);
513
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert_eq!(
+
assert_eq!(
514
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
sum.domain_of(&vars),
+
sum.domain_of(&vars),
515
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Some(Domain::IntDomain(vec![Range::Bounded(2, 4)]))
+
Some(Domain::IntDomain(vec![Range::Bounded(2, 4)]))
516
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
517
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
diff --git a/coverage/main/crates/conjure_core/src/ast/index.html b/coverage/main/crates/conjure_core/src/ast/index.html
index 9a29869898..0c02264152 100644
--- a/coverage/main/crates/conjure_core/src/ast/index.html
+++ b/coverage/main/crates/conjure_core/src/ast/index.html
@@ -15,7 +15,7 @@
@@ -23,7 +23,7 @@
Functions
- 15.58 %
+
0 %
@@ -46,20 +46,20 @@
- 50%
+ 0%
- 50%
+ 0%
- 11 / 22
+ 0 / 22
-
13.64%
-
6 / 44
+
0%
+
0 / 28
@@ -69,21 +69,21 @@
- 96.61%
+ 0%
-
- 96.61%
+
+ 0%
-
- 57 / 59
+
+ 0 / 59
-
23.81%
-
20 / 84
+
0%
+
0 / 54
@@ -94,20 +94,20 @@
- 36.59%
+ 0%
- 36.59%
+ 0%
- 120 / 328
+ 0 / 328
-
15.67%
-
68 / 434
+
0%
+
0 / 283
@@ -117,21 +117,21 @@
- 100%
+ 0%
-
- 100%
+
+ 0%
-
- 6 / 6
+
+ 0 / 6
-
12.5%
-
4 / 32
+
0%
+
0 / 20
@@ -155,7 +155,7 @@
0%
-
0 / 29
+
0 / 18
@@ -166,20 +166,20 @@
- 21.05%
+ 0%
- 21.05%
+ 0%
- 4 / 19
+ 0 / 19
-
13.16%
-
5 / 38
+
0%
+
0 / 24
@@ -187,7 +187,7 @@
diff --git a/coverage/main/crates/conjure_core/src/ast/symbol_table.rs.html b/coverage/main/crates/conjure_core/src/ast/symbol_table.rs.html
index ad389edc7e..54d2015ebf 100644
--- a/coverage/main/crates/conjure_core/src/ast/symbol_table.rs.html
+++ b/coverage/main/crates/conjure_core/src/ast/symbol_table.rs.html
@@ -14,8 +14,8 @@
@@ -23,7 +23,7 @@
@@ -150,13 +150,13 @@
8
- 1690
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
#[derive(Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
+
#[derive(Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
15
- 6975
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
16
- 6975
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match self {
+
match self {
17
- 5190
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Name::UserName(s) => write!(f, "UserName({})", s),
+
Name::UserName(s) => write!(f, "UserName({})", s),
18
- 1785
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Name::MachineName(i) => write!(f, "MachineName({})", i),
+
Name::MachineName(i) => write!(f, "MachineName({})", i),
20
- 6975
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
diff --git a/coverage/main/crates/conjure_core/src/ast/types.rs.html b/coverage/main/crates/conjure_core/src/ast/types.rs.html
index df58384bbd..aa9338f309 100644
--- a/coverage/main/crates/conjure_core/src/ast/types.rs.html
+++ b/coverage/main/crates/conjure_core/src/ast/types.rs.html
@@ -23,7 +23,7 @@
@@ -146,7 +146,7 @@
diff --git a/coverage/main/crates/conjure_core/src/ast/variables.rs.html b/coverage/main/crates/conjure_core/src/ast/variables.rs.html
index 33dc8ffd8d..48a48ec717 100644
--- a/coverage/main/crates/conjure_core/src/ast/variables.rs.html
+++ b/coverage/main/crates/conjure_core/src/ast/variables.rs.html
@@ -15,7 +15,7 @@
@@ -23,7 +23,7 @@
Functions
- 13.16 %
+
0 %
@@ -134,13 +134,13 @@
7
- 650
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
+
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
13
- 138
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn new(domain: Domain) -> DecisionVariable {
+
pub fn new(domain: Domain) -> DecisionVariable {
14
- 138
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
DecisionVariable { domain }
+
DecisionVariable { domain }
15
- 138
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
diff --git a/coverage/main/crates/conjure_core/src/context.rs.html b/coverage/main/crates/conjure_core/src/context.rs.html
index 596227f5c5..a6720df368 100644
--- a/coverage/main/crates/conjure_core/src/context.rs.html
+++ b/coverage/main/crates/conjure_core/src/context.rs.html
@@ -23,7 +23,7 @@
@@ -1426,7 +1426,7 @@
diff --git a/coverage/main/crates/conjure_core/src/error.rs.html b/coverage/main/crates/conjure_core/src/error.rs.html
index 2edac38b82..334c960dd7 100644
--- a/coverage/main/crates/conjure_core/src/error.rs.html
+++ b/coverage/main/crates/conjure_core/src/error.rs.html
@@ -23,7 +23,7 @@
@@ -370,7 +370,7 @@
diff --git a/coverage/main/crates/conjure_core/src/index.html b/coverage/main/crates/conjure_core/src/index.html
index 5c044a7c2e..1a62484491 100644
--- a/coverage/main/crates/conjure_core/src/index.html
+++ b/coverage/main/crates/conjure_core/src/index.html
@@ -15,7 +15,7 @@
@@ -23,7 +23,7 @@
Functions
- 12.35 %
+
0 %
@@ -59,7 +59,7 @@
0%
-
0 / 18
+
0 / 12
@@ -83,7 +83,7 @@
0%
-
0 / 12
+
0 / 8
@@ -93,21 +93,21 @@
- 81.25%
+ 0%
-
- 81.25%
+
+ 0%
-
- 13 / 16
+
+ 0 / 16
-
14.63%
-
6 / 41
+
0%
+
0 / 26
@@ -117,21 +117,21 @@
- 77.42%
+ 0%
-
- 77.42%
+
+ 0%
-
- 48 / 62
+
+ 0 / 62
-
15.38%
-
14 / 91
+
0%
+
0 / 58
@@ -139,7 +139,7 @@
diff --git a/coverage/main/crates/conjure_core/src/metadata.rs.html b/coverage/main/crates/conjure_core/src/metadata.rs.html
index 3222c8c2dd..dcc75c865e 100644
--- a/coverage/main/crates/conjure_core/src/metadata.rs.html
+++ b/coverage/main/crates/conjure_core/src/metadata.rs.html
@@ -14,8 +14,8 @@
Lines
-
- 81.25 %
+
+ 0 %
@@ -23,7 +23,7 @@
Functions
- 14.63 %
+
0 %
@@ -118,13 +118,13 @@
6
- 3480
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize, Default)]
+
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize, Default)]
13
- 18853
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn new() -> Metadata {
+
pub fn new() -> Metadata {
14
- 18853
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata {
+
Metadata {
15
- 18853
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
clean: false,
+
clean: false,
16
- 18853
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
etype: None,
+
etype: None,
17
- 18853
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
18
- 18853
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
20
- 19950
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn clone_dirty(&self) -> Metadata {
+
pub fn clone_dirty(&self) -> Metadata {
21
- 19950
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata {
+
Metadata {
22
- 19950
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
clean: false,
+
clean: false,
23
- 19950
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
..self.clone()
+
..self.clone()
24
- 19950
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
25
- 19950
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
diff --git a/coverage/main/crates/conjure_core/src/model.rs.html b/coverage/main/crates/conjure_core/src/model.rs.html
index 4eb4b6cfab..8d7ea4d8c0 100644
--- a/coverage/main/crates/conjure_core/src/model.rs.html
+++ b/coverage/main/crates/conjure_core/src/model.rs.html
@@ -14,8 +14,8 @@
Lines
-
- 77.42 %
+
+ 0 %
@@ -23,7 +23,7 @@
Functions
- 15.38 %
+
0 %
@@ -246,13 +246,13 @@
14
- 980
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
#[derive(Derivative, Clone, Debug, Serialize, Deserialize)]
+
#[derive(Derivative, Clone, Debug, Serialize, Deserialize)]
27
- 2096250
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn new(
+
pub fn new(
28
- 2096250
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
variables: SymbolTable,
+
variables: SymbolTable,
29
- 2096250
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
constraints: Expression,
+
constraints: Expression,
30
- 2096250
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
context: Arc<RwLock<Context<'static>>>,
+
context: Arc<RwLock<Context<'static>>>,
31
- 2096250
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
) -> Model {
+
) -> Model {
32
- 2096250
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
33
- 2096250
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
variables,
+
variables,
34
- 2096250
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
constraints,
+
constraints,
35
- 2096250
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
36
- 2096250
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
next_var: RefCell::new(0),
+
next_var: RefCell::new(0),
37
- 2096250
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
38
- 2096250
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
40
- 2095950
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn new_empty(context: Arc<RwLock<Context<'static>>>) -> Model {
+
pub fn new_empty(context: Arc<RwLock<Context<'static>>>) -> Model {
41
- 2095950
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Model::new(Default::default(), Expression::Nothing, context)
+
Model::new(Default::default(), Expression::Nothing, context)
42
- 2095950
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
44
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn update_domain(&mut self, name: &Name, new_domain: Domain) {
+
pub fn update_domain(&mut self, name: &Name, new_domain: Domain) {
45
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if let Some(decision_var) = self.variables.get_mut(name) {
+
if let Some(decision_var) = self.variables.get_mut(name) {
46
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
decision_var.domain = new_domain;
+
decision_var.domain = new_domain;
47
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
48
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
55
- 540
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn add_variable(&mut self, name: Name, decision_var: DecisionVariable) {
+
pub fn add_variable(&mut self, name: Name, decision_var: DecisionVariable) {
56
- 540
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
self.variables.insert(name, decision_var);
+
self.variables.insert(name, decision_var);
57
- 540
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
59
- 645
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn get_constraints_vec(&self) -> Vec<Expression> {
+
pub fn get_constraints_vec(&self) -> Vec<Expression> {
60
- 645
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match &self.constraints {
+
match &self.constraints {
61
- 300
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::And(_, constraints) => constraints.clone(),
+
Expression::And(_, constraints) => constraints.clone(),
62
- 255
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Nothing => vec![],
+
Expression::Nothing => vec![],
63
- 90
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => vec![self.constraints.clone()],
+
_ => vec![self.constraints.clone()],
65
- 645
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
67
- 270
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn set_constraints(&mut self, constraints: Vec<Expression>) {
+
pub fn set_constraints(&mut self, constraints: Vec<Expression>) {
68
- 270
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if constraints.is_empty() {
+
if constraints.is_empty() {
70
- 270
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
} else if constraints.len() == 1 {
+
} else if constraints.len() == 1 {
71
- 225
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
self.constraints = constraints[0].clone();
+
self.constraints = constraints[0].clone();
72
- 225
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
73
- 45
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
self.constraints = Expression::And(Metadata::new(), constraints);
+
self.constraints = Expression::And(Metadata::new(), constraints);
74
- 45
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
75
- 270
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
89
- 270
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn add_constraints(&mut self, expressions: Vec<Expression>) {
+
pub fn add_constraints(&mut self, expressions: Vec<Expression>) {
90
- 270
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut constraints = self.get_constraints_vec();
+
let mut constraints = self.get_constraints_vec();
91
- 270
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
constraints.extend(expressions);
+
constraints.extend(expressions);
92
- 270
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
self.set_constraints(constraints);
+
self.set_constraints(constraints);
93
- 270
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
96
- 135
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn gensym(&self) -> Name {
+
pub fn gensym(&self) -> Name {
97
- 135
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let num = *self.next_var.borrow();
+
let num = *self.next_var.borrow();
98
- 135
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
*(self.next_var.borrow_mut()) += 1;
+
*(self.next_var.borrow_mut()) += 1;
99
- 135
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Name::MachineName(num) // incremented when inserted
+
Name::MachineName(num) // incremented when inserted
100
- 135
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
diff --git a/coverage/main/crates/conjure_core/src/parse/example_models.rs.html b/coverage/main/crates/conjure_core/src/parse/example_models.rs.html
index b6296cc0e4..ffab9e1450 100644
--- a/coverage/main/crates/conjure_core/src/parse/example_models.rs.html
+++ b/coverage/main/crates/conjure_core/src/parse/example_models.rs.html
@@ -14,8 +14,8 @@
@@ -23,7 +23,7 @@
Functions
- 33.33 %
+
0 %
@@ -358,13 +358,13 @@
21
- 45
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn get_example_model(filename: &str) -> Result<Model, anyhow::Error> {
+
pub fn get_example_model(filename: &str) -> Result<Model, anyhow::Error> {
23
- 45
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let base_dir = get_project_root()?;
+
let base_dir = get_project_root()?;
24
- 45
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut essence_path = PathBuf::new();
+
let mut essence_path = PathBuf::new();
27
- 254445
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
for entry in WalkDir::new(base_dir).into_iter().filter_map(|e| e.ok()) {
+
for entry in WalkDir::new(base_dir).into_iter().filter_map(|e| e.ok()) {
28
- 254445
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let path = entry.path();
+
let path = entry.path();
29
- 254445
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if path.is_file()
+
if path.is_file()
30
- 215610
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
&& path.extension().map_or(false, |e| e == "essence")
+
&& path.extension().map_or(false, |e| e == "essence")
31
- 360
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
&& path.file_stem() == Some(std::ffi::OsStr::new(filename))
+
&& path.file_stem() == Some(std::ffi::OsStr::new(filename))
33
- 30
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
essence_path = path.to_path_buf();
+
essence_path = path.to_path_buf();
34
- 30
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
35
- 254415
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
41
- 45
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if essence_path.as_os_str().is_empty() {
+
if essence_path.as_os_str().is_empty() {
42
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
return Err(anyhow::Error::new(std::io::Error::new(
+
return Err(anyhow::Error::new(std::io::Error::new(
43
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
std::io::ErrorKind::NotFound,
+
std::io::ErrorKind::NotFound,
44
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
"ERROR: File not found in any subdirectory",
+
"ERROR: File not found in any subdirectory",
45
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
46
- 30
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
47
- 30
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
48
- 30
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
// let path = PathBuf::from(format!("../tests/integration/basic/comprehension{}.essence", filename));
+
// let path = PathBuf::from(format!("../tests/integration/basic/comprehension{}.essence", filename));
49
- 30
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut cmd = std::process::Command::new("conjure");
+
let mut cmd = std::process::Command::new("conjure");
50
- 30
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let output = cmd
+
let output = cmd
51
- 30
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.arg("pretty")
+
.arg("pretty")
52
- 30
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.arg("--output-format=astjson")
+
.arg("--output-format=astjson")
53
- 30
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.arg(essence_path)
+
.arg(essence_path)
54
- 30
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.output()?;
+
.output()?;
57
- 30
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let astjson = String::from_utf8(output.stdout)?;
+
let astjson = String::from_utf8(output.stdout)?;
62
- 30
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let generated_mdl = model_from_json(&astjson, Default::default())?;
+
let generated_mdl = model_from_json(&astjson, Default::default())?;
64
- 30
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok(generated_mdl)
+
Ok(generated_mdl)
65
- 45
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
77
- 30
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn get_example_model_by_path(filepath: &str) -> Result<Model, anyhow::Error> {
+
pub fn get_example_model_by_path(filepath: &str) -> Result<Model, anyhow::Error> {
78
- 30
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let essence_path = PathBuf::from(filepath);
+
let essence_path = PathBuf::from(filepath);
79
- 30
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
80
- 30
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
// return error if file not found
+
// return error if file not found
81
- 30
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if essence_path.as_os_str().is_empty() {
+
if essence_path.as_os_str().is_empty() {
82
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
return Err(anyhow::Error::new(std::io::Error::new(
+
return Err(anyhow::Error::new(std::io::Error::new(
83
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
std::io::ErrorKind::NotFound,
+
std::io::ErrorKind::NotFound,
84
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
"ERROR: File not found in any subdirectory",
+
"ERROR: File not found in any subdirectory",
85
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
86
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
87
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
88
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
// println!("PATH TO FILE: {}", essence_path.display());
+
// println!("PATH TO FILE: {}", essence_path.display());
89
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
90
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
// Command execution using 'conjure' CLI tool with provided path
+
// Command execution using 'conjure' CLI tool with provided path
91
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut cmd = std::process::Command::new("conjure");
+
let mut cmd = std::process::Command::new("conjure");
92
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let output = cmd
+
let output = cmd
93
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.arg("pretty")
+
.arg("pretty")
94
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.arg("--output-format=astjson")
+
.arg("--output-format=astjson")
95
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.arg(&essence_path)
+
.arg(&essence_path)
96
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.output()?;
+
.output()?;
99
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let astjson = String::from_utf8(output.stdout)?;
+
let astjson = String::from_utf8(output.stdout)?;
104
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let generated_model = model_from_json(&astjson, Default::default())?;
+
let generated_model = model_from_json(&astjson, Default::default())?;
106
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok(generated_model)
+
Ok(generated_model)
107
- 30
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
diff --git a/coverage/main/crates/conjure_core/src/parse/index.html b/coverage/main/crates/conjure_core/src/parse/index.html
index f7fc7e0917..2cb2318ce9 100644
--- a/coverage/main/crates/conjure_core/src/parse/index.html
+++ b/coverage/main/crates/conjure_core/src/parse/index.html
@@ -14,8 +14,8 @@
@@ -23,7 +23,7 @@
@@ -45,21 +45,21 @@
- 100%
+ 0%
-
- 100%
+
+ 0%
-
- 53 / 53
+
+ 0 / 53
-
33.33%
-
4 / 12
+
0%
+
0 / 8
@@ -69,21 +69,21 @@
- 88.35%
+ 0%
-
- 88.35%
+
+ 0%
-
- 220 / 249
+
+ 0 / 249
-
29.17%
-
14 / 48
+
0%
+
0 / 32
@@ -91,7 +91,7 @@
diff --git a/coverage/main/crates/conjure_core/src/parse/parse_model.rs.html b/coverage/main/crates/conjure_core/src/parse/parse_model.rs.html
index 1e89b5d605..948378aa21 100644
--- a/coverage/main/crates/conjure_core/src/parse/parse_model.rs.html
+++ b/coverage/main/crates/conjure_core/src/parse/parse_model.rs.html
@@ -14,8 +14,8 @@
Lines
-
- 88.35 %
+
+ 0 %
@@ -23,7 +23,7 @@
Functions
- 29.17 %
+
0 %
@@ -230,13 +230,13 @@
13
- 255
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn model_from_json(str: &str, context: Arc<RwLock<Context<'static>>>) -> Result<Model> {
+
pub fn model_from_json(str: &str, context: Arc<RwLock<Context<'static>>>) -> Result<Model> {
14
- 255
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut m = Model::new_empty(context);
+
let mut m = Model::new_empty(context);
15
- 255
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let v: JsonValue = serde_json::from_str(str)?;
+
let v: JsonValue = serde_json::from_str(str)?;
16
- 255
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let statements = v["mStatements"]
+
let statements = v["mStatements"]
17
- 255
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.as_array()
+
.as_array()
18
- 255
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.ok_or(Error::Parse("mStatements is not an array".to_owned()))?;
+
.ok_or(Error::Parse("mStatements is not an array".to_owned()))?;
20
- 1065
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
for statement in statements {
+
for statement in statements {
21
- 810
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let entry = statement
+
let entry = statement
22
- 810
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.as_object()
+
.as_object()
23
- 810
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.ok_or(Error::Parse("mStatements contains a non-object".to_owned()))?
+
.ok_or(Error::Parse("mStatements contains a non-object".to_owned()))?
24
- 810
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
25
- 810
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
26
- 810
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.ok_or(Error::Parse(
+
.ok_or(Error::Parse(
27
- 810
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
"mStatements contains an empty object".to_owned(),
+
"mStatements contains an empty object".to_owned(),
28
- 810
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
29
- 810
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match entry.0.as_str() {
+
match entry.0.as_str() {
30
- 810
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
"Declaration" => {
+
"Declaration" => {
31
- 540
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let (name, var) = parse_variable(entry.1)?;
+
let (name, var) = parse_variable(entry.1)?;
32
- 540
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
m.add_variable(name, var);
+
m.add_variable(name, var);
34
- 270
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
"SuchThat" => {
+
"SuchThat" => {
35
- 270
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let constraints_arr = match entry.1.as_array() {
+
let constraints_arr = match entry.1.as_array() {
36
- 270
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Some(x) => x,
+
Some(x) => x,
42
- 270
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let constraints: Vec<Expression> =
+
let constraints: Vec<Expression> =
43
- 270
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
constraints_arr.iter().flat_map(parse_expression).collect();
+
constraints_arr.iter().flat_map(parse_expression).collect();
44
- 270
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
m.add_constraints(constraints);
+
m.add_constraints(constraints);
51
- 255
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
52
- 255
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
54
- 540
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn parse_variable(v: &JsonValue) -> Result<(Name, DecisionVariable)> {
+
fn parse_variable(v: &JsonValue) -> Result<(Name, DecisionVariable)> {
55
- 540
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let arr = v
+
let arr = v
56
- 540
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.as_object()
+
.as_object()
57
- 540
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.ok_or(Error::Parse("Declaration is not an object".to_owned()))?["FindOrGiven"]
+
.ok_or(Error::Parse("Declaration is not an object".to_owned()))?["FindOrGiven"]
58
- 540
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.as_array()
+
.as_array()
59
- 540
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.ok_or(Error::Parse("FindOrGiven is not an array".to_owned()))?;
+
.ok_or(Error::Parse("FindOrGiven is not an array".to_owned()))?;
60
- 540
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let name = arr[1]
+
let name = arr[1]
61
- 540
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.as_object()
+
.as_object()
62
- 540
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.ok_or(Error::Parse("FindOrGiven[1] is not an object".to_owned()))?["Name"]
+
.ok_or(Error::Parse("FindOrGiven[1] is not an object".to_owned()))?["Name"]
63
- 540
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
64
- 540
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.ok_or(Error::Parse(
+
.ok_or(Error::Parse(
65
- 540
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
"FindOrGiven[1].Name is not a string".to_owned(),
+
"FindOrGiven[1].Name is not a string".to_owned(),
66
- 540
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
67
- 540
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let name = Name::UserName(name.to_owned());
+
let name = Name::UserName(name.to_owned());
68
- 540
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let domain = arr[2]
+
let domain = arr[2]
69
- 540
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.as_object()
+
.as_object()
70
- 540
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.ok_or(Error::Parse("FindOrGiven[2] is not an object".to_owned()))?
+
.ok_or(Error::Parse("FindOrGiven[2] is not an object".to_owned()))?
71
- 540
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
72
- 540
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
73
- 540
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.ok_or(Error::Parse("FindOrGiven[2] is an empty object".to_owned()))?;
+
.ok_or(Error::Parse("FindOrGiven[2] is an empty object".to_owned()))?;
74
- 540
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let domain = match domain.0.as_str() {
+
let domain = match domain.0.as_str() {
75
- 540
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
"DomainInt" => Ok(parse_int_domain(domain.1)?),
+
"DomainInt" => Ok(parse_int_domain(domain.1)?),
76
- 105
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
"DomainBool" => Ok(Domain::BoolDomain),
+
"DomainBool" => Ok(Domain::BoolDomain),
81
- 540
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok((name, DecisionVariable { domain }))
+
Ok((name, DecisionVariable { domain }))
82
- 540
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
84
- 435
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn parse_int_domain(v: &JsonValue) -> Result<Domain> {
+
fn parse_int_domain(v: &JsonValue) -> Result<Domain> {
85
- 435
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut ranges = Vec::new();
+
let mut ranges = Vec::new();
86
- 435
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let arr = v
+
let arr = v
87
- 435
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.as_array()
+
.as_array()
88
- 435
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.ok_or(Error::Parse("DomainInt is not an array".to_owned()))?[1]
+
.ok_or(Error::Parse("DomainInt is not an array".to_owned()))?[1]
89
- 435
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.as_array()
+
.as_array()
90
- 435
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.ok_or(Error::Parse("DomainInt[1] is not an array".to_owned()))?;
+
.ok_or(Error::Parse("DomainInt[1] is not an array".to_owned()))?;
91
- 870
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
for range in arr {
+
for range in arr {
92
- 435
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let range = range
+
let range = range
93
- 435
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.as_object()
+
.as_object()
94
- 435
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.ok_or(Error::Parse(
+
.ok_or(Error::Parse(
95
- 435
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
"DomainInt[1] contains a non-object".to_owned(),
+
"DomainInt[1] contains a non-object".to_owned(),
96
- 435
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
97
- 435
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
98
- 435
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
99
- 435
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.ok_or(Error::Parse(
+
.ok_or(Error::Parse(
100
- 435
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
"DomainInt[1] contains an empty object".to_owned(),
+
"DomainInt[1] contains an empty object".to_owned(),
101
- 435
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
102
- 435
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match range.0.as_str() {
+
match range.0.as_str() {
103
- 435
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
"RangeBounded" => {
+
"RangeBounded" => {
104
- 435
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let arr = range
+
let arr = range
105
- 435
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
106
- 435
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.as_array()
+
.as_array()
107
- 435
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.ok_or(Error::Parse("RangeBounded is not an array".to_owned()))?;
+
.ok_or(Error::Parse("RangeBounded is not an array".to_owned()))?;
108
- 435
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut nums = Vec::new();
+
let mut nums = Vec::new();
109
- 870
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
for item in arr.iter() {
+
for item in arr.iter() {
110
- 870
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let num = item["Constant"]["ConstantInt"][1]
+
let num = item["Constant"]["ConstantInt"][1]
111
- 870
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
112
- 870
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.ok_or(Error::Parse(
+
.ok_or(Error::Parse(
113
- 870
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
"Could not parse int domain constant".to_owned(),
+
"Could not parse int domain constant".to_owned(),
114
- 870
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
115
- 870
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let num32 = i32::try_from(num).map_err(|_| {
+
let num32 = i32::try_from(num).map_err(|_| {
117
- 870
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
118
- 870
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
nums.push(num32);
+
nums.push(num32);
120
- 435
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
ranges.push(Range::Bounded(nums[0], nums[1]));
+
ranges.push(Range::Bounded(nums[0], nums[1]));
139
- 435
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok(Domain::IntDomain(ranges))
+
Ok(Domain::IntDomain(ranges))
140
- 435
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
147
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn parse_expression(obj: &JsonValue) -> Option<Expression> {
+
fn parse_expression(obj: &JsonValue) -> Option<Expression> {
148
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let binary_operators: HashMap<&str, BinOp> = [
+
let binary_operators: HashMap<&str, BinOp> = [
149
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
150
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
151
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Eq) as Box<dyn Fn(_, _, _) -> _>,
+
Box::new(Expression::Eq) as Box<dyn Fn(_, _, _) -> _>,
152
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
153
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
154
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
"MkOpNeq",
+
"MkOpNeq",
155
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Neq) as Box<dyn Fn(_, _, _) -> _>,
+
Box::new(Expression::Neq) as Box<dyn Fn(_, _, _) -> _>,
156
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
157
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
158
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
"MkOpGeq",
+
"MkOpGeq",
159
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Geq) as Box<dyn Fn(_, _, _) -> _>,
+
Box::new(Expression::Geq) as Box<dyn Fn(_, _, _) -> _>,
160
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
161
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
162
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
"MkOpLeq",
+
"MkOpLeq",
163
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Leq) as Box<dyn Fn(_, _, _) -> _>,
+
Box::new(Expression::Leq) as Box<dyn Fn(_, _, _) -> _>,
164
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
165
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
166
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
167
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Gt) as Box<dyn Fn(_, _, _) -> _>,
+
Box::new(Expression::Gt) as Box<dyn Fn(_, _, _) -> _>,
168
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
169
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
170
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
171
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Lt) as Box<dyn Fn(_, _, _) -> _>,
+
Box::new(Expression::Lt) as Box<dyn Fn(_, _, _) -> _>,
172
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
173
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
174
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
175
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Gt) as Box<dyn Fn(_, _, _) -> _>,
+
Box::new(Expression::Gt) as Box<dyn Fn(_, _, _) -> _>,
176
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
177
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
178
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
179
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Lt) as Box<dyn Fn(_, _, _) -> _>,
+
Box::new(Expression::Lt) as Box<dyn Fn(_, _, _) -> _>,
180
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
181
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
182
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
"MkOpDiv",
+
"MkOpDiv",
183
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::UnsafeDiv) as Box<dyn Fn(_, _, _) -> _>,
+
Box::new(Expression::UnsafeDiv) as Box<dyn Fn(_, _, _) -> _>,
184
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
185
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
186
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.into_iter()
+
.into_iter()
187
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.collect();
+
.collect();
188
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
189
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let unary_operators: HashMap<&str, UnaryOp> = [(
+
let unary_operators: HashMap<&str, UnaryOp> = [(
190
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
"MkOpNot",
+
"MkOpNot",
191
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Not) as Box<dyn Fn(_, _) -> _>,
+
Box::new(Expression::Not) as Box<dyn Fn(_, _) -> _>,
192
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
193
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.into_iter()
+
.into_iter()
194
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.collect();
+
.collect();
195
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
196
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let vec_operators: HashMap<&str, VecOp> = [
+
let vec_operators: HashMap<&str, VecOp> = [
197
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
198
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
"MkOpSum",
+
"MkOpSum",
199
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Sum) as Box<dyn Fn(_, _) -> _>,
+
Box::new(Expression::Sum) as Box<dyn Fn(_, _) -> _>,
200
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
201
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
202
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
"MkOpAnd",
+
"MkOpAnd",
203
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::And) as Box<dyn Fn(_, _) -> _>,
+
Box::new(Expression::And) as Box<dyn Fn(_, _) -> _>,
204
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
205
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
("MkOpOr", Box::new(Expression::Or) as Box<dyn Fn(_, _) -> _>),
+
("MkOpOr", Box::new(Expression::Or) as Box<dyn Fn(_, _) -> _>),
206
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
207
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
"MkOpMin",
+
"MkOpMin",
208
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Min) as Box<dyn Fn(_, _) -> _>,
+
Box::new(Expression::Min) as Box<dyn Fn(_, _) -> _>,
209
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
210
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
211
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.into_iter()
+
.into_iter()
212
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.collect();
+
.collect();
213
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
214
- 2775
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut binary_operator_names = binary_operators.iter().map(|x| x.0);
+
let mut binary_operator_names = binary_operators.iter().map(|x| x.0);
215
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut unary_operator_names = unary_operators.iter().map(|x| x.0);
+
let mut unary_operator_names = unary_operators.iter().map(|x| x.0);
216
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut vec_operator_names = vec_operators.iter().map(|x| x.0);
+
let mut vec_operator_names = vec_operators.iter().map(|x| x.0);
218
- 195
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match obj {
+
match obj {
219
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Value::Object(op) if op.contains_key("Op") => match &op["Op"] {
+
Value::Object(op) if op.contains_key("Op") => match &op["Op"] {
220
- 2775
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Value::Object(bin_op) if binary_operator_names.any(|key| bin_op.contains_key(*key)) => {
+
Value::Object(bin_op) if binary_operator_names.any(|key| bin_op.contains_key(*key)) => {
221
- 345
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
parse_bin_op(bin_op, binary_operators)
+
parse_bin_op(bin_op, binary_operators)
223
- 180
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Value::Object(un_op) if unary_operator_names.any(|key| un_op.contains_key(*key)) => {
+
Value::Object(un_op) if unary_operator_names.any(|key| un_op.contains_key(*key)) => {
224
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
parse_unary_op(un_op, unary_operators)
+
parse_unary_op(un_op, unary_operators)
226
- 420
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Value::Object(vec_op) if vec_operator_names.any(|key| vec_op.contains_key(*key)) => {
+
Value::Object(vec_op) if vec_operator_names.any(|key| vec_op.contains_key(*key)) => {
227
- 165
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
parse_vec_op(vec_op, vec_operators)
+
parse_vec_op(vec_op, vec_operators)
231
- 780
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Value::Object(refe) if refe.contains_key("Reference") => {
+
Value::Object(refe) if refe.contains_key("Reference") => {
232
- 585
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let name = refe["Reference"].as_array()?[0].as_object()?["Name"].as_str()?;
+
let name = refe["Reference"].as_array()?[0].as_object()?["Name"].as_str()?;
233
- 585
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Some(Expression::Reference(
+
Some(Expression::Reference(
234
- 585
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
235
- 585
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Name::UserName(name.to_string()),
+
Name::UserName(name.to_string()),
236
- 585
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
238
- 195
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Value::Object(constant) if constant.contains_key("Constant") => parse_constant(constant),
+
Value::Object(constant) if constant.contains_key("Constant") => parse_constant(constant),
241
- 1305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
243
- 345
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn parse_bin_op(
+
fn parse_bin_op(
244
- 345
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
bin_op: &serde_json::Map<String, Value>,
+
bin_op: &serde_json::Map<String, Value>,
245
- 345
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
binary_operators: HashMap<&str, BinOp>,
+
binary_operators: HashMap<&str, BinOp>,
246
- 345
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
) -> Option<Expression> {
+
) -> Option<Expression> {
249
- 345
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let (key, value) = bin_op.into_iter().next()?;
+
let (key, value) = bin_op.into_iter().next()?;
251
- 345
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let constructor = binary_operators.get(key.as_str())?;
+
let constructor = binary_operators.get(key.as_str())?;
253
- 345
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match &value {
+
match &value {
254
- 345
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Value::Array(bin_op_args) if bin_op_args.len() == 2 => {
+
Value::Array(bin_op_args) if bin_op_args.len() == 2 => {
255
- 345
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let arg1 = parse_expression(&bin_op_args[0])?;
+
let arg1 = parse_expression(&bin_op_args[0])?;
256
- 345
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let arg2 = parse_expression(&bin_op_args[1])?;
+
let arg2 = parse_expression(&bin_op_args[1])?;
257
- 345
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Some(constructor(Metadata::new(), Box::new(arg1), Box::new(arg2)))
+
Some(constructor(Metadata::new(), Box::new(arg1), Box::new(arg2)))
261
- 345
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
263
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn parse_unary_op(
+
fn parse_unary_op(
264
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
un_op: &serde_json::Map<String, Value>,
+
un_op: &serde_json::Map<String, Value>,
265
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
unary_operators: HashMap<&str, UnaryOp>,
+
unary_operators: HashMap<&str, UnaryOp>,
266
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
) -> Option<Expression> {
+
) -> Option<Expression> {
267
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let (key, value) = un_op.into_iter().next()?;
+
let (key, value) = un_op.into_iter().next()?;
268
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let constructor = unary_operators.get(key.as_str())?;
+
let constructor = unary_operators.get(key.as_str())?;
270
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let arg = parse_expression(value)?;
+
let arg = parse_expression(value)?;
271
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Some(constructor(Metadata::new(), Box::new(arg)))
+
Some(constructor(Metadata::new(), Box::new(arg)))
272
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
274
- 165
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn parse_vec_op(
+
fn parse_vec_op(
275
- 165
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
vec_op: &serde_json::Map<String, Value>,
+
vec_op: &serde_json::Map<String, Value>,
276
- 165
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
vec_operators: HashMap<&str, VecOp>,
+
vec_operators: HashMap<&str, VecOp>,
277
- 165
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
) -> Option<Expression> {
+
) -> Option<Expression> {
278
- 165
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let (key, value) = vec_op.into_iter().next()?;
+
let (key, value) = vec_op.into_iter().next()?;
279
- 165
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let constructor = vec_operators.get(key.as_str())?;
+
let constructor = vec_operators.get(key.as_str())?;
281
- 165
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let args_parsed: Vec<Option<Expression>> = value["AbstractLiteral"]["AbsLitMatrix"][1]
+
let args_parsed: Vec<Option<Expression>> = value["AbstractLiteral"]["AbsLitMatrix"][1]
282
- 165
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.as_array()?
+
.as_array()?
283
- 165
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
284
- 165
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.map(parse_expression)
+
.map(parse_expression)
285
- 165
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.collect();
+
.collect();
286
- 165
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
287
- 165
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let number_of_args = args_parsed.len();
+
let number_of_args = args_parsed.len();
288
- 165
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let valid_args: Vec<Expression> = args_parsed.into_iter().flatten().collect();
+
let valid_args: Vec<Expression> = args_parsed.into_iter().flatten().collect();
289
- 165
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if number_of_args != valid_args.len() {
+
if number_of_args != valid_args.len() {
292
- 165
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Some(constructor(Metadata::new(), valid_args))
+
Some(constructor(Metadata::new(), valid_args))
294
- 165
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
296
- 195
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn parse_constant(constant: &serde_json::Map<String, Value>) -> Option<Expression> {
+
fn parse_constant(constant: &serde_json::Map<String, Value>) -> Option<Expression> {
297
- 195
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match &constant["Constant"] {
+
match &constant["Constant"] {
298
- 195
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Value::Object(int) if int.contains_key("ConstantInt") => {
+
Value::Object(int) if int.contains_key("ConstantInt") => {
299
- 195
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let int_32: i32 = match int["ConstantInt"].as_array()?[1].as_i64()?.try_into() {
+
let int_32: i32 = match int["ConstantInt"].as_array()?[1].as_i64()?.try_into() {
300
- 195
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok(x) => x,
+
Ok(x) => x,
310
- 195
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Some(Expression::Constant(Metadata::new(), Constant::Int(int_32)))
+
Some(Expression::Constant(Metadata::new(), Constant::Int(int_32)))
314
- 195
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
diff --git a/coverage/main/crates/conjure_core/src/rule_engine/index.html b/coverage/main/crates/conjure_core/src/rule_engine/index.html
index 95f68bec03..3d442f7ba3 100644
--- a/coverage/main/crates/conjure_core/src/rule_engine/index.html
+++ b/coverage/main/crates/conjure_core/src/rule_engine/index.html
@@ -14,8 +14,8 @@
Lines
-
- 77.26 %
+
+ 0 %
@@ -23,7 +23,7 @@
Functions
- 24.39 %
+
0 %
@@ -45,21 +45,21 @@
- 87.95%
+ 0%
-
- 87.95%
+
+ 0%
-
- 73 / 83
+
+ 0 / 29
-
28.3%
-
15 / 53
+
0%
+
0 / 18
@@ -69,21 +69,21 @@
- 87.14%
+ 0%
-
- 87.14%
+
+ 0%
-
- 61 / 70
+
+ 0 / 70
-
29.17%
-
7 / 24
+
0%
+
0 / 16
@@ -93,21 +93,21 @@
- 88.5%
+ 0%
-
- 88.5%
+
+ 0%
-
- 100 / 113
+
+ 0 / 113
-
20.83%
-
5 / 24
+
0%
+
0 / 16
@@ -118,20 +118,20 @@
- 56.72%
+ 0%
- 56.72%
+ 0%
- 38 / 67
+ 0 / 67
-
18.18%
-
6 / 33
+
0%
+
0 / 22
@@ -142,20 +142,20 @@
- 62.24%
+ 0%
- 62.24%
+ 0%
- 61 / 98
+ 0 / 98
-
23.33%
-
7 / 30
+
0%
+
0 / 20
@@ -163,7 +163,7 @@
diff --git a/coverage/main/crates/conjure_core/src/rule_engine/mod.rs.html b/coverage/main/crates/conjure_core/src/rule_engine/mod.rs.html
index 9b822796ad..6f27b69b94 100644
--- a/coverage/main/crates/conjure_core/src/rule_engine/mod.rs.html
+++ b/coverage/main/crates/conjure_core/src/rule_engine/mod.rs.html
@@ -14,8 +14,8 @@
Lines
-
- 87.95 %
+
+ 0 %
@@ -23,7 +23,7 @@
@@ -566,13 +566,13 @@
34
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
/// use conjure_core::ast::Expression;
+
/// use conjure_core::ast::Expression;
35
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
/// use conjure_core::model::Model;
+
/// use conjure_core::model::Model;
36
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
/// use conjure_core::rule_engine::{ApplicationError, ApplicationResult, Reduction};
+
/// use conjure_core::rule_engine::{ApplicationError, ApplicationResult, Reduction};
37
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
/// use conjure_core::rule_engine::register_rule;
+
/// use conjure_core::rule_engine::register_rule;
38
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
39
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
/// #[register_rule(("RuleSetName", 10))]
+
/// #[register_rule(("RuleSetName", 10))]
40
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
/// fn identity(expr: &Expression, mdl: &Model) -> ApplicationResult {
+
/// fn identity(expr: &Expression, mdl: &Model) -> ApplicationResult {
41
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
/// Ok(Reduction::pure(expr.clone()))
+
/// Ok(Reduction::pure(expr.clone()))
42
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
-
43
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
-
44
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
pub use conjure_macros::register_rule;
+
pub use conjure_macros::register_rule;
60
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
/// use conjure_core::rule_engine::register_rule_set;
+
/// use conjure_core::rule_engine::register_rule_set;
61
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
62
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
/// register_rule_set!("MyRuleSet", 10, ("DependencyRuleSet", "AnotherRuleSet"));
+
/// register_rule_set!("MyRuleSet", 10, ("DependencyRuleSet", "AnotherRuleSet"));
63
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
64
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
#[doc(inline)]
+
#[doc(inline)]
103
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
-
-
/// fn identity(expr: &Expression, mdl: &Model) -> ApplicationResult {
+
/// fn identity(expr: &Expression, mdl: &Model) -> ApplicationResult {
104
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
-
-
/// Ok(Reduction::pure(expr.clone()))
+
/// Ok(Reduction::pure(expr.clone()))
105
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
-
106
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
-
108
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
/// println!("Rules: {:?}", get_rules());
+
/// println!("Rules: {:?}", get_rules());
109
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
110
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
117
- 735
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn get_rules() -> Vec<&'static Rule<'static>> {
+
pub fn get_rules() -> Vec<&'static Rule<'static>> {
118
- 735
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
RULES_DISTRIBUTED_SLICE.iter().collect()
+
RULES_DISTRIBUTED_SLICE.iter().collect()
119
- 735
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
132
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
-
-
/// fn identity(expr: &Expression, mdl: &Model) -> ApplicationResult {
+
/// fn identity(expr: &Expression, mdl: &Model) -> ApplicationResult {
133
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
-
-
/// Ok(Reduction::pure(expr.clone()))
+
/// Ok(Reduction::pure(expr.clone()))
134
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
-
135
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
-
137
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
/// println!("Rule: {:?}", get_rule_by_name("identity"));
+
/// println!("Rule: {:?}", get_rule_by_name("identity"));
138
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
139
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
145
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn get_rule_by_name(name: &str) -> Option<&'static Rule<'static>> {
+
pub fn get_rule_by_name(name: &str) -> Option<&'static Rule<'static>> {
146
- 8235
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
get_rules().iter().find(|rule| rule.name == name).cloned()
+
get_rules().iter().find(|rule| rule.name == name).cloned()
147
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
155
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
/// use conjure_core::rule_engine::register_rule_set;
+
/// use conjure_core::rule_engine::register_rule_set;
156
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
/// use conjure_core::rule_engine::get_rule_sets;
+
/// use conjure_core::rule_engine::get_rule_sets;
157
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
158
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
/// register_rule_set!("MyRuleSet", 10, ("AnotherRuleSet"));
+
/// register_rule_set!("MyRuleSet", 10, ("AnotherRuleSet"));
159
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
/// register_rule_set!("AnotherRuleSet", 5, ());
+
/// register_rule_set!("AnotherRuleSet", 5, ());
160
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
161
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
/// println!("Rule sets: {:?}", get_rule_sets());
+
/// println!("Rule sets: {:?}", get_rule_sets());
162
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
163
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
172
- 855
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn get_rule_sets() -> Vec<&'static RuleSet<'static>> {
+
pub fn get_rule_sets() -> Vec<&'static RuleSet<'static>> {
173
- 855
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
RULE_SETS_DISTRIBUTED_SLICE.iter().collect()
+
RULE_SETS_DISTRIBUTED_SLICE.iter().collect()
174
- 855
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
181
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
/// use conjure_core::rule_engine::register_rule_set;
+
/// use conjure_core::rule_engine::register_rule_set;
182
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
/// use conjure_core::rule_engine::get_rule_set_by_name;
+
/// use conjure_core::rule_engine::get_rule_set_by_name;
183
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
184
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
/// register_rule_set!("MyRuleSet", 10, ("DependencyRuleSet", "AnotherRuleSet"));
+
/// register_rule_set!("MyRuleSet", 10, ("DependencyRuleSet", "AnotherRuleSet"));
185
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
186
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
/// println!("Rule set: {:?}", get_rule_set_by_name("MyRuleSet"));
+
/// println!("Rule set: {:?}", get_rule_set_by_name("MyRuleSet"));
187
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
188
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
193
- 555
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn get_rule_set_by_name(name: &str) -> Option<&'static RuleSet<'static>> {
+
pub fn get_rule_set_by_name(name: &str) -> Option<&'static RuleSet<'static>> {
194
- 555
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
get_rule_sets()
+
get_rule_sets()
195
- 555
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
196
- 1695
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.find(|rule_set| rule_set.name == name)
+
.find(|rule_set| rule_set.name == name)
197
- 555
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
198
- 555
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
206
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
/// use conjure_core::solver::SolverFamily;
+
/// use conjure_core::solver::SolverFamily;
207
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
/// use conjure_core::rule_engine::get_rule_sets_for_solver_family;
+
/// use conjure_core::rule_engine::get_rule_sets_for_solver_family;
208
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
209
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
/// let rule_sets = get_rule_sets_for_solver_family(SolverFamily::SAT);
+
/// let rule_sets = get_rule_sets_for_solver_family(SolverFamily::SAT);
210
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
/// assert_eq!(rule_sets.len(), 1);
+
/// assert_eq!(rule_sets.len(), 1);
211
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
/// assert_eq!(rule_sets[0].name, "CNF");
+
/// assert_eq!(rule_sets[0].name, "CNF");
212
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
213
- 267
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn get_rule_sets_for_solver_family(
+
pub fn get_rule_sets_for_solver_family(
214
- 285
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
solver_family: SolverFamily,
+
solver_family: SolverFamily,
215
- 285
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
) -> Vec<&'static RuleSet<'static>> {
+
) -> Vec<&'static RuleSet<'static>> {
216
- 285
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
get_rule_sets()
+
get_rule_sets()
217
- 285
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
218
- 1425
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.filter(|rule_set| {
+
.filter(|rule_set| {
219
- 1425
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
220
- 1425
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.solver_families
+
.solver_families
221
- 1425
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
222
- 1425
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.any(|family| family.eq(&solver_family))
+
.any(|family| family.eq(&solver_family))
223
- 1425
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
224
- 285
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
225
- 285
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.collect()
+
.collect()
226
- 285
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
diff --git a/coverage/main/crates/conjure_core/src/rule_engine/resolve_rules.rs.html b/coverage/main/crates/conjure_core/src/rule_engine/resolve_rules.rs.html
index c016e71dd0..530a7a07e4 100644
--- a/coverage/main/crates/conjure_core/src/rule_engine/resolve_rules.rs.html
+++ b/coverage/main/crates/conjure_core/src/rule_engine/resolve_rules.rs.html
@@ -14,8 +14,8 @@
Lines
-
- 87.14 %
+
+ 0 %
@@ -23,7 +23,7 @@
Functions
- 29.17 %
+
0 %
@@ -486,13 +486,13 @@
29
- 480
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn get_rule_set(rule_set_name: &str) -> Result<&'static RuleSet<'static>, ResolveRulesError> {
+
fn get_rule_set(rule_set_name: &str) -> Result<&'static RuleSet<'static>, ResolveRulesError> {
30
- 480
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match get_rule_set_by_name(rule_set_name) {
+
match get_rule_set_by_name(rule_set_name) {
31
- 480
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Some(rule_set) => Ok(rule_set),
+
Some(rule_set) => Ok(rule_set),
34
- 480
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
45
- 270
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn rule_sets_by_names<'a>(
+
pub fn rule_sets_by_names<'a>(
46
- 270
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
rule_set_names: &Vec<String>,
+
rule_set_names: &Vec<String>,
47
- 270
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
) -> Result<HashSet<&'a RuleSet<'static>>, ResolveRulesError> {
+
) -> Result<HashSet<&'a RuleSet<'static>>, ResolveRulesError> {
48
- 270
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut rs_set: HashSet<&'static RuleSet<'static>> = HashSet::new();
+
let mut rs_set: HashSet<&'static RuleSet<'static>> = HashSet::new();
50
- 750
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
for rule_set_name in rule_set_names {
+
for rule_set_name in rule_set_names {
51
- 480
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let rule_set = get_rule_set(rule_set_name)?;
+
let rule_set = get_rule_set(rule_set_name)?;
52
- 480
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let new_dependencies = rule_set.get_dependencies();
+
let new_dependencies = rule_set.get_dependencies();
53
- 480
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
rs_set.insert(rule_set);
+
rs_set.insert(rule_set);
54
- 480
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
rs_set.extend(new_dependencies);
+
rs_set.extend(new_dependencies);
57
- 270
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok(rs_set)
+
Ok(rs_set)
58
- 270
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
70
- 270
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn resolve_rule_sets<'a>(
+
pub fn resolve_rule_sets<'a>(
71
- 270
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
target_solver: SolverFamily,
+
target_solver: SolverFamily,
72
- 270
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
extra_rs_names: &Vec<String>,
+
extra_rs_names: &Vec<String>,
73
- 270
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
) -> Result<Vec<&'a RuleSet<'static>>, ResolveRulesError> {
+
) -> Result<Vec<&'a RuleSet<'static>>, ResolveRulesError> {
74
- 270
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut ans = HashSet::new();
+
let mut ans = HashSet::new();
76
- 270
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
for rs in get_rule_sets_for_solver_family(target_solver) {
+
for rs in get_rule_sets_for_solver_family(target_solver) {
77
- 270
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
ans.extend(rs.with_dependencies());
+
ans.extend(rs.with_dependencies());
78
- 270
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
80
- 270
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
ans.extend(rule_sets_by_names(extra_rs_names)?);
+
ans.extend(rule_sets_by_names(extra_rs_names)?);
81
- 270
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok(ans.iter().cloned().collect())
+
Ok(ans.iter().cloned().collect())
82
- 270
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
90
- 360
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn get_rule_priorities<'a>(
+
pub fn get_rule_priorities<'a>(
91
- 360
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
rule_sets: &Vec<&'a RuleSet<'a>>,
+
rule_sets: &Vec<&'a RuleSet<'a>>,
92
- 360
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
) -> Result<HashMap<&'a Rule<'a>, u8>, ResolveRulesError> {
+
) -> Result<HashMap<&'a Rule<'a>, u8>, ResolveRulesError> {
93
- 360
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut rule_priorities: HashMap<&'a Rule<'a>, (&'a RuleSet<'a>, u8)> = HashMap::new();
+
let mut rule_priorities: HashMap<&'a Rule<'a>, (&'a RuleSet<'a>, u8)> = HashMap::new();
95
- 1650
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
for rs in rule_sets {
+
for rs in rule_sets {
96
- 11430
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
for (rule, priority) in rs.get_rules() {
+
for (rule, priority) in rs.get_rules() {
97
- 11430
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if let Some((old_rs, _)) = rule_priorities.get(rule) {
+
if let Some((old_rs, _)) = rule_priorities.get(rule) {
101
- 11430
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
102
- 11430
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
rule_priorities.insert(rule, (&rs, *priority));
+
rule_priorities.insert(rule, (&rs, *priority));
103
- 11430
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
107
- 360
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut ans: HashMap<&'a Rule<'a>, u8> = HashMap::new();
+
let mut ans: HashMap<&'a Rule<'a>, u8> = HashMap::new();
108
- 11790
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
for (rule, (_, priority)) in rule_priorities {
+
for (rule, (_, priority)) in rule_priorities {
109
- 11430
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
ans.insert(rule, priority);
+
ans.insert(rule, priority);
110
- 11430
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
112
- 360
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
113
- 360
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
128
- 52695
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn rule_cmp<'a>(
+
pub fn rule_cmp<'a>(
129
- 52695
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
a: &Rule<'a>,
+
a: &Rule<'a>,
130
- 52695
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
b: &Rule<'a>,
+
b: &Rule<'a>,
131
- 52695
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
rule_priorities: &HashMap<&'a Rule<'a>, u8>,
+
rule_priorities: &HashMap<&'a Rule<'a>, u8>,
132
- 52695
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
) -> std::cmp::Ordering {
+
) -> std::cmp::Ordering {
133
- 52695
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let a_priority = *rule_priorities.get(a).unwrap_or(&0);
+
let a_priority = *rule_priorities.get(a).unwrap_or(&0);
134
- 52695
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let b_priority = *rule_priorities.get(b).unwrap_or(&0);
+
let b_priority = *rule_priorities.get(b).unwrap_or(&0);
135
- 52695
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
136
- 52695
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if a_priority == b_priority {
+
if a_priority == b_priority {
137
- 47310
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
return a.name.cmp(b.name);
+
return a.name.cmp(b.name);
138
- 5385
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
139
- 5385
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
140
- 5385
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
b_priority.cmp(&a_priority)
+
b_priority.cmp(&a_priority)
141
- 52695
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
150
- 360
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn get_rules_vec<'a>(rule_priorities: &HashMap<&'a Rule<'a>, u8>) -> Vec<&'a Rule<'a>> {
+
pub fn get_rules_vec<'a>(rule_priorities: &HashMap<&'a Rule<'a>, u8>) -> Vec<&'a Rule<'a>> {
151
- 360
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut rules: Vec<&'a Rule<'a>> = rule_priorities.keys().copied().collect();
+
let mut rules: Vec<&'a Rule<'a>> = rule_priorities.keys().copied().collect();
152
- 52695
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
rules.sort_by(|a, b| rule_cmp(a, b, rule_priorities));
+
rules.sort_by(|a, b| rule_cmp(a, b, rule_priorities));
153
- 360
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
154
- 360
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
diff --git a/coverage/main/crates/conjure_core/src/rule_engine/rewrite.rs.html b/coverage/main/crates/conjure_core/src/rule_engine/rewrite.rs.html
index 73066c6273..62c980f1c0 100644
--- a/coverage/main/crates/conjure_core/src/rule_engine/rewrite.rs.html
+++ b/coverage/main/crates/conjure_core/src/rule_engine/rewrite.rs.html
@@ -14,8 +14,8 @@
@@ -23,7 +23,7 @@
Functions
- 20.83 %
+
0 %
@@ -790,13 +790,13 @@
48
- 720
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn optimizations_enabled() -> bool {
+
fn optimizations_enabled() -> bool {
49
- 720
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match env::var("OPTIMIZATIONS") {
+
match env::var("OPTIMIZATIONS") {
50
- 120
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok(val) => val == "1",
+
Ok(val) => val == "1",
51
- 600
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Err(_) => false, // Assume optimizations are disabled if the environment variable is not set
+
Err(_) => false, // Assume optimizations are disabled if the environment variable is not set
53
- 720
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
61
- 360
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn rewrite_model<'a>(
+
pub fn rewrite_model<'a>(
62
- 360
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
model: &Model,
+
model: &Model,
63
- 360
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
rule_sets: &Vec<&'a RuleSet<'a>>,
+
rule_sets: &Vec<&'a RuleSet<'a>>,
64
- 360
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
) -> Result<Model, RewriteError> {
+
) -> Result<Model, RewriteError> {
65
- 360
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let rule_priorities = get_rule_priorities(rule_sets)?;
+
let rule_priorities = get_rule_priorities(rule_sets)?;
66
- 360
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let rules = get_rules_vec(&rule_priorities);
+
let rules = get_rules_vec(&rule_priorities);
67
- 360
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut new_model = model.clone();
+
let mut new_model = model.clone();
68
- 360
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut stats = RewriterStats {
+
let mut stats = RewriterStats {
69
- 360
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
is_optimization_enabled: Some(optimizations_enabled()),
+
is_optimization_enabled: Some(optimizations_enabled()),
70
- 360
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
rewriter_run_time: None,
+
rewriter_run_time: None,
71
- 360
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
rewriter_rule_application_attempts: Some(0),
+
rewriter_rule_application_attempts: Some(0),
72
- 360
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
rewriter_rule_applications: Some(0),
+
rewriter_rule_applications: Some(0),
73
- 360
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
74
- 360
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
75
- 360
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
// Check if optimizations are enabled
+
// Check if optimizations are enabled
76
- 360
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let apply_optimizations = optimizations_enabled();
+
let apply_optimizations = optimizations_enabled();
77
- 360
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
78
- 360
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let start = std::time::Instant::now();
+
let start = std::time::Instant::now();
80
- 16275
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
while let Some(step) = rewrite_iteration(
+
while let Some(step) = rewrite_iteration(
81
- 16275
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
&new_model.constraints,
+
&new_model.constraints,
82
- 16275
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
&new_model,
+
&new_model,
83
- 16275
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
84
- 16275
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
apply_optimizations,
+
apply_optimizations,
85
- 16275
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
&mut stats,
+
&mut stats,
86
- 16275
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
87
- 15915
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
step.apply(&mut new_model); // Apply side-effects (e.g. symbol table updates)
+
step.apply(&mut new_model); // Apply side-effects (e.g. symbol table updates)
88
- 15915
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
89
- 360
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
stats.rewriter_run_time = Some(start.elapsed());
+
stats.rewriter_run_time = Some(start.elapsed());
90
- 360
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
model.context.write().unwrap().stats.add_rewriter_run(stats);
+
model.context.write().unwrap().stats.add_rewriter_run(stats);
91
- 360
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok(new_model)
+
Ok(new_model)
92
- 360
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
97
- 7178565
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn rewrite_iteration<'a>(
+
fn rewrite_iteration<'a>(
98
- 7178565
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
expression: &'a Expression,
+
expression: &'a Expression,
99
- 7178565
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
model: &'a Model,
+
model: &'a Model,
100
- 7178565
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
rules: &'a Vec<&'a Rule<'a>>,
+
rules: &'a Vec<&'a Rule<'a>>,
101
- 7178565
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
apply_optimizations: bool,
+
apply_optimizations: bool,
102
- 7178565
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
stats: &mut RewriterStats,
+
stats: &mut RewriterStats,
103
- 7178565
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
) -> Option<Reduction> {
+
) -> Option<Reduction> {
104
- 7178565
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if apply_optimizations && expression.is_clean() {
+
if apply_optimizations && expression.is_clean() {
107
- 7178565
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
108
- 7178565
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
109
- 7178565
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
// Mark the expression as clean - will be marked dirty if any rule is applied
+
// Mark the expression as clean - will be marked dirty if any rule is applied
110
- 7178565
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut expression = expression.clone();
+
let mut expression = expression.clone();
111
- 7178565
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
112
- 7178565
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let rule_results = apply_all_rules(&expression, model, rules, stats);
+
let rule_results = apply_all_rules(&expression, model, rules, stats);
113
- 7178565
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if let Some(new) = choose_rewrite(&rule_results) {
+
if let Some(new) = choose_rewrite(&rule_results) {
115
- 15915
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
return Some(new);
+
return Some(new);
116
- 7162650
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
117
- 7162650
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
118
- 7162650
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut sub = expression.children();
+
let mut sub = expression.children();
119
- 7162650
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
for i in 0..sub.len() {
+
for i in 0..sub.len() {
120
- 7162290
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if let Some(red) = rewrite_iteration(&sub[i], model, rules, apply_optimizations, stats) {
+
if let Some(red) = rewrite_iteration(&sub[i], model, rules, apply_optimizations, stats) {
121
- 20130
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
sub[i] = red.new_expression;
+
sub[i] = red.new_expression;
122
- 20130
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if let Ok(res) = expression.with_children(sub.clone()) {
+
if let Ok(res) = expression.with_children(sub.clone()) {
123
- 20130
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
return Some(Reduction::new(res, red.new_top, red.symbols));
+
return Some(Reduction::new(res, red.new_top, red.symbols));
125
- 7142160
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
128
- 7142520
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if apply_optimizations {
+
if apply_optimizations {
132
- 7142520
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
133
- 7142520
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
134
- 7178565
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
139
- 7178565
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn apply_all_rules<'a>(
+
fn apply_all_rules<'a>(
140
- 7178565
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
expression: &'a Expression,
+
expression: &'a Expression,
141
- 7178565
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
model: &'a Model,
+
model: &'a Model,
142
- 7178565
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
rules: &'a Vec<&'a Rule<'a>>,
+
rules: &'a Vec<&'a Rule<'a>>,
143
- 7178565
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
stats: &mut RewriterStats,
+
stats: &mut RewriterStats,
144
- 7178565
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
) -> Vec<RuleResult<'a>> {
+
) -> Vec<RuleResult<'a>> {
145
- 7178565
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut results = Vec::new();
+
let mut results = Vec::new();
146
- 222551175
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
for rule in rules {
+
for rule in rules {
147
- 215372610
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match rule.apply(expression, model) {
+
match rule.apply(expression, model) {
148
- 16005
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok(red) => {
+
Ok(red) => {
149
- 16005
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
log::trace!(target: "file", "Rule applicable: {:?}, to Expression: {:?}, resulting in: {:?}", rule, expression, red.new_expression);
+
log::trace!(target: "file", "Rule applicable: {:?}, to Expression: {:?}, resulting in: {:?}", rule, expression, red.new_expression);
150
- 16005
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
stats.rewriter_rule_application_attempts =
+
stats.rewriter_rule_application_attempts =
151
- 16005
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Some(stats.rewriter_rule_application_attempts.unwrap() + 1);
+
Some(stats.rewriter_rule_application_attempts.unwrap() + 1);
152
- 16005
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
stats.rewriter_rule_applications =
+
stats.rewriter_rule_applications =
153
- 16005
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Some(stats.rewriter_rule_applications.unwrap() + 1);
+
Some(stats.rewriter_rule_applications.unwrap() + 1);
154
- 16005
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
// Assert no clean children
+
// Assert no clean children
155
- 16005
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
// assert!(!red.new_expression.children().iter().any(|c| c.is_clean()), "Rule that caused assertion to fail: {:?}", rule.name);
+
// assert!(!red.new_expression.children().iter().any(|c| c.is_clean()), "Rule that caused assertion to fail: {:?}", rule.name);
156
- 16005
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
// assert!(!red.new_expression.children().iter().any(|c| c.children().iter().any(|c| c.is_clean())));
+
// assert!(!red.new_expression.children().iter().any(|c| c.children().iter().any(|c| c.is_clean())));
157
- 16005
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
results.push(RuleResult {
+
results.push(RuleResult {
158
- 16005
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
159
- 16005
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
reduction: red,
+
reduction: red,
160
- 16005
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
163
- 215356605
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
log::trace!(target: "file", "Rule attempted but not applied: {:?}, to Expression: {:?}", rule, expression);
+
log::trace!(target: "file", "Rule attempted but not applied: {:?}, to Expression: {:?}", rule, expression);
164
- 215356605
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
stats.rewriter_rule_application_attempts =
+
stats.rewriter_rule_application_attempts =
165
- 215356605
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Some(stats.rewriter_rule_application_attempts.unwrap() + 1);
+
Some(stats.rewriter_rule_application_attempts.unwrap() + 1);
166
- 215356605
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
170
- 7178565
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
171
- 7178565
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
176
- 7178565
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn choose_rewrite(results: &[RuleResult]) -> Option<Reduction> {
+
fn choose_rewrite(results: &[RuleResult]) -> Option<Reduction> {
177
- 7178565
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if results.is_empty() {
+
if results.is_empty() {
178
- 7162650
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
return None;
+
return None;
179
- 15915
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
180
- 15915
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
// Return the first result for now
+
// Return the first result for now
181
- 15915
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Some(results[0].reduction.clone())
+
Some(results[0].reduction.clone())
182
- 7178565
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
diff --git a/coverage/main/crates/conjure_core/src/rule_engine/rule.rs.html b/coverage/main/crates/conjure_core/src/rule_engine/rule.rs.html
index 640514be32..8705f1a613 100644
--- a/coverage/main/crates/conjure_core/src/rule_engine/rule.rs.html
+++ b/coverage/main/crates/conjure_core/src/rule_engine/rule.rs.html
@@ -15,7 +15,7 @@
@@ -23,7 +23,7 @@
Functions
- 18.18 %
+
0 %
@@ -582,13 +582,13 @@
35
- 20265
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn new(new_expression: Expression, new_top: Expression, symbols: SymbolTable) -> Self {
+
pub fn new(new_expression: Expression, new_top: Expression, symbols: SymbolTable) -> Self {
36
- 20265
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
37
- 20265
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
new_expression,
+
new_expression,
38
- 20265
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
39
- 20265
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
40
- 20265
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
41
- 20265
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
44
- 16140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn pure(new_expression: Expression) -> Self {
+
pub fn pure(new_expression: Expression) -> Self {
45
- 16140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
46
- 16140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
new_expression,
+
new_expression,
47
- 16140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
new_top: Expression::Nothing,
+
new_top: Expression::Nothing,
48
- 16140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
symbols: SymbolTable::new(),
+
symbols: SymbolTable::new(),
49
- 16140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
50
- 16140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
71
- 15915
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn apply(self, model: &mut Model) {
+
pub fn apply(self, model: &mut Model) {
72
- 15915
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
model.variables.extend(self.symbols); // Add new assignments to the symbol table
+
model.variables.extend(self.symbols); // Add new assignments to the symbol table
73
- 15915
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if self.new_top.is_nothing() {
+
if self.new_top.is_nothing() {
74
- 15780
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
model.constraints = self.new_expression.clone();
+
model.constraints = self.new_expression.clone();
75
- 15780
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
76
- 135
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
model.constraints = match self.new_expression {
+
model.constraints = match self.new_expression {
77
- 45
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::And(metadata, mut exprs) => {
+
Expression::And(metadata, mut exprs) => {
78
- 45
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
// Avoid creating a nested conjunction
+
// Avoid creating a nested conjunction
79
- 45
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
exprs.push(self.new_top.clone());
+
exprs.push(self.new_top.clone());
80
- 45
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::And(metadata.clone_dirty(), exprs)
+
Expression::And(metadata.clone_dirty(), exprs)
82
- 90
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => Expression::And(
+
_ => Expression::And(
83
- 90
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
84
- 90
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
vec![self.new_expression.clone(), self.new_top],
+
vec![self.new_expression.clone(), self.new_top],
85
- 90
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
88
- 15915
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
119
- 217468305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn apply(&self, expr: &Expression, mdl: &Model) -> ApplicationResult {
+
pub fn apply(&self, expr: &Expression, mdl: &Model) -> ApplicationResult {
120
- 217468305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
(self.application)(expr, mdl)
+
(self.application)(expr, mdl)
121
- 217468305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
131
- 108240
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn eq(&self, other: &Self) -> bool {
+
fn eq(&self, other: &Self) -> bool {
132
- 108240
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
self.name == other.name
+
self.name == other.name
133
- 108240
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
139
- 179685
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
+
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
140
- 179685
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
self.name.hash(state);
+
self.name.hash(state);
141
- 179685
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
diff --git a/coverage/main/crates/conjure_core/src/rule_engine/rule_set.rs.html b/coverage/main/crates/conjure_core/src/rule_engine/rule_set.rs.html
index 718599dfd7..bb6dc3a8f3 100644
--- a/coverage/main/crates/conjure_core/src/rule_engine/rule_set.rs.html
+++ b/coverage/main/crates/conjure_core/src/rule_engine/rule_set.rs.html
@@ -15,7 +15,7 @@
@@ -23,7 +23,7 @@
Functions
- 23.33 %
+
0 %
@@ -774,13 +774,13 @@
47
- 1290
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn get_rules(&self) -> &HashMap<&'a Rule<'a>, u8> {
+
pub fn get_rules(&self) -> &HashMap<&'a Rule<'a>, u8> {
48
- 1290
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match self.rules.get() {
+
match self.rules.get() {
50
- 150
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let rules = self.resolve_rules();
+
let rules = self.resolve_rules();
51
- 150
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let _ = self.rules.set(rules); // Try to set the rules, but ignore if it fails.
+
let _ = self.rules.set(rules); // Try to set the rules, but ignore if it fails.
52
- 150
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
53
- 150
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
// At this point, the rules cell is guaranteed to be set, so we can unwrap safely.
+
// At this point, the rules cell is guaranteed to be set, so we can unwrap safely.
54
- 150
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
// see: https://doc.rust-lang.org/stable/std/sync/struct.OnceLock.html#method.set
+
// see: https://doc.rust-lang.org/stable/std/sync/struct.OnceLock.html#method.set
55
- 150
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
#[allow(clippy::unwrap_used)]
+
#[allow(clippy::unwrap_used)]
56
- 150
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
self.rules.get().unwrap()
+
self.rules.get().unwrap()
58
- 1140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Some(rules) => rules,
+
Some(rules) => rules,
60
- 1290
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
65
- 750
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn get_dependencies(&self) -> &HashSet<&'static RuleSet> {
+
pub fn get_dependencies(&self) -> &HashSet<&'static RuleSet> {
66
- 750
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match self.dependencies.get() {
+
match self.dependencies.get() {
68
- 105
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let dependencies = self.resolve_dependencies();
+
let dependencies = self.resolve_dependencies();
69
- 105
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let _ = self.dependencies.set(dependencies); // Try to set the dependencies, but ignore if it fails.
+
let _ = self.dependencies.set(dependencies); // Try to set the dependencies, but ignore if it fails.
70
- 105
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
71
- 105
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
// At this point, the dependencies cell is guaranteed to be set, so we can unwrap safely.
+
// At this point, the dependencies cell is guaranteed to be set, so we can unwrap safely.
72
- 105
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
// see: https://doc.rust-lang.org/stable/std/sync/struct.OnceLock.html#method.set
+
// see: https://doc.rust-lang.org/stable/std/sync/struct.OnceLock.html#method.set
73
- 105
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
#[allow(clippy::unwrap_used)]
+
#[allow(clippy::unwrap_used)]
74
- 105
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
self.dependencies.get().unwrap()
+
self.dependencies.get().unwrap()
76
- 645
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Some(dependencies) => dependencies,
+
Some(dependencies) => dependencies,
78
- 750
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
82
- 270
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn with_dependencies(&self) -> HashSet<&'static RuleSet> {
+
pub fn with_dependencies(&self) -> HashSet<&'static RuleSet> {
83
- 270
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut deps = self.get_dependencies().clone();
+
let mut deps = self.get_dependencies().clone();
84
- 270
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
deps.insert(self);
+
deps.insert(self);
85
- 270
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
86
- 270
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
89
- 150
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn resolve_rules(&self) -> HashMap<&'a Rule<'a>, u8> {
+
fn resolve_rules(&self) -> HashMap<&'a Rule<'a>, u8> {
90
- 150
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut rules = HashMap::new();
+
let mut rules = HashMap::new();
92
- 5100
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
for rule in get_rules() {
+
for rule in get_rules() {
93
- 4950
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut found = false;
+
let mut found = false;
94
- 4950
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut priority: u8 = 0;
+
let mut priority: u8 = 0;
96
- 8505
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
for (name, p) in rule.rule_sets {
+
for (name, p) in rule.rule_sets {
97
- 4950
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if *name == self.name {
+
if *name == self.name {
98
- 1395
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
found = true;
+
found = true;
99
- 1395
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
priority = *p;
+
priority = *p;
100
- 1395
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
101
- 3555
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
104
- 4950
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if found {
+
if found {
105
- 1395
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
rules.insert(rule, priority);
+
rules.insert(rule, priority);
106
- 3555
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
109
- 150
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
110
- 150
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
114
- 165
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn resolve_dependencies(&self) -> HashSet<&'static RuleSet> {
+
fn resolve_dependencies(&self) -> HashSet<&'static RuleSet> {
115
- 165
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut dependencies = HashSet::new();
+
let mut dependencies = HashSet::new();
117
- 225
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
for dep in self.dependency_rs_names {
+
for dep in self.dependency_rs_names {
118
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match get_rule_set_by_name(dep) {
+
match get_rule_set_by_name(dep) {
125
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Some(rule_set) => {
+
Some(rule_set) => {
126
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if !dependencies.contains(rule_set) {
+
if !dependencies.contains(rule_set) {
127
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
// Prevent cycles
+
// Prevent cycles
128
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
dependencies.insert(rule_set);
+
dependencies.insert(rule_set);
129
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
dependencies.extend(rule_set.resolve_dependencies());
+
dependencies.extend(rule_set.resolve_dependencies());
130
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
135
- 165
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
dependencies
+
dependencies
136
- 165
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
140
- 225
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn eq(&self, other: &Self) -> bool {
+
fn eq(&self, other: &Self) -> bool {
141
- 225
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
self.name == other.name
+
self.name == other.name
142
- 225
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
148
- 2670
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
+
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
149
- 2670
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
self.name.hash(state);
+
self.name.hash(state);
150
- 2670
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
diff --git a/coverage/main/crates/conjure_core/src/rules/base.rs.html b/coverage/main/crates/conjure_core/src/rules/base.rs.html
index 18905d44ca..2fde55f598 100644
--- a/coverage/main/crates/conjure_core/src/rules/base.rs.html
+++ b/coverage/main/crates/conjure_core/src/rules/base.rs.html
@@ -14,8 +14,8 @@
Lines
-
- 82.74 %
+
+ 0 %
@@ -23,7 +23,7 @@
Functions
- 15.42 %
+
0 %
@@ -390,13 +390,13 @@
23
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
24
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
25
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
27
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn remove_nothings(expr: &Expr, _: &Model) -> ApplicationResult {
+
fn remove_nothings(expr: &Expr, _: &Model) -> ApplicationResult {
28
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn remove_nothings(exprs: Vec<Expr>) -> Result<Vec<Expr>, ApplicationError> {
+
fn remove_nothings(exprs: Vec<Expr>) -> Result<Vec<Expr>, ApplicationError> {
29
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut changed = false;
+
let mut changed = false;
30
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut new_exprs = Vec::new();
+
let mut new_exprs = Vec::new();
32
- 14662305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
for e in exprs {
+
for e in exprs {
33
- 7420245
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match e.clone() {
+
match e.clone() {
37
- 7420245
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => new_exprs.push(e),
+
_ => new_exprs.push(e),
41
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if changed {
+
if changed {
44
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Err(ApplicationError::RuleNotApplicable)
+
Err(ApplicationError::RuleNotApplicable)
46
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
58
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let new_sub = remove_nothings(expr.children())?;
+
let new_sub = remove_nothings(expr.children())?;
78
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
83
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
* [] = Nothing
+
* [] = Nothing
84
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
85
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
87
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn empty_to_nothing(expr: &Expr, _: &Model) -> ApplicationResult {
+
fn empty_to_nothing(expr: &Expr, _: &Model) -> ApplicationResult {
88
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match expr {
+
match expr {
90
- 5408265
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Err(ApplicationError::RuleNotApplicable)
+
Err(ApplicationError::RuleNotApplicable)
93
- 1833795
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if expr.children().is_empty() {
+
if expr.children().is_empty() {
96
- 1833795
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Err(ApplicationError::RuleNotApplicable)
+
Err(ApplicationError::RuleNotApplicable)
100
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
105
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
* sum([1, 2, 3]) = 6
+
* sum([1, 2, 3]) = 6
106
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
107
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
109
- 7242105
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn sum_constants(expr: &Expr, _: &Model) -> ApplicationResult {
+
fn sum_constants(expr: &Expr, _: &Model) -> ApplicationResult {
110
- 7242105
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match expr {
+
match expr {
111
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::Sum(_, exprs) => {
+
Expr::Sum(_, exprs) => {
112
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut sum = 0;
+
let mut sum = 0;
113
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut new_exprs = Vec::new();
+
let mut new_exprs = Vec::new();
114
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut changed = false;
+
let mut changed = false;
115
- 225
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
for e in exprs {
+
for e in exprs {
116
- 120
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
117
- 120
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::Constant(_metadata, Const::Int(i)) => {
+
Expr::Constant(_metadata, Const::Int(i)) => {
118
- 120
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
119
- 120
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
changed = true;
+
changed = true;
120
- 120
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
121
- 45
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => new_exprs.push(e.clone()),
+
_ => new_exprs.push(e.clone()),
124
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if !changed {
+
if !changed {
125
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
return Err(ApplicationError::RuleNotApplicable);
+
return Err(ApplicationError::RuleNotApplicable);
126
- 45
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
127
- 45
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
// TODO (kf77): Get existing metadata instead of creating a new one
+
// TODO (kf77): Get existing metadata instead of creating a new one
128
- 45
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
new_exprs.push(Expr::Constant(Metadata::new(), Const::Int(sum)));
+
new_exprs.push(Expr::Constant(Metadata::new(), Const::Int(sum)));
129
- 45
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok(Reduction::pure(Expr::Sum(Metadata::new(), new_exprs))) // Let other rules handle only one Expr being contained in the sum
+
Ok(Reduction::pure(Expr::Sum(Metadata::new(), new_exprs))) // Let other rules handle only one Expr being contained in the sum
131
- 7242045
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => Err(ApplicationError::RuleNotApplicable),
+
_ => Err(ApplicationError::RuleNotApplicable),
133
- 7242105
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
138
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
* sum([a]) = a
+
* sum([a]) = a
139
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
140
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
142
- 7242090
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn unwrap_sum(expr: &Expr, _: &Model) -> ApplicationResult {
+
fn unwrap_sum(expr: &Expr, _: &Model) -> ApplicationResult {
143
- 45
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match expr {
+
match expr {
144
- 45
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::Sum(_, exprs) if (exprs.len() == 1) => Ok(Reduction::pure(exprs[0].clone())),
+
Expr::Sum(_, exprs) if (exprs.len() == 1) => Ok(Reduction::pure(exprs[0].clone())),
145
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => Err(ApplicationError::RuleNotApplicable),
+
_ => Err(ApplicationError::RuleNotApplicable),
147
- 7242090
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
152
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
* sum(sum(a, b), c) = sum(a, b, c)
+
* sum(sum(a, b), c) = sum(a, b, c)
153
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
154
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
156
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn flatten_nested_sum(expr: &Expr, _: &Model) -> ApplicationResult {
+
pub fn flatten_nested_sum(expr: &Expr, _: &Model) -> ApplicationResult {
157
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match expr {
+
match expr {
158
- 15
-
-
-
Expr::Sum(metadata, exprs) => {
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
+
+
+
Expr::Sum(metadata, exprs) => {
159
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut new_exprs = Vec::new();
+
let mut new_exprs = Vec::new();
160
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut changed = false;
+
let mut changed = false;
161
- 45
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
for e in exprs {
+
for e in exprs {
162
- 30
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
163
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::Sum(_, sub_exprs) => {
+
Expr::Sum(_, sub_exprs) => {
164
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
changed = true;
+
changed = true;
165
- 45
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
for e in sub_exprs {
+
for e in sub_exprs {
166
- 30
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
new_exprs.push(e.clone());
+
new_exprs.push(e.clone());
167
- 30
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
169
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => new_exprs.push(e.clone()),
+
_ => new_exprs.push(e.clone()),
172
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if !changed {
+
if !changed {
174
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
175
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok(Reduction::pure(Expr::Sum(
+
Ok(Reduction::pure(Expr::Sum(
176
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
metadata.clone_dirty(),
+
metadata.clone_dirty(),
177
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
new_exprs,
+
new_exprs,
178
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
180
- 7242045
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => Err(ApplicationError::RuleNotApplicable),
+
_ => Err(ApplicationError::RuleNotApplicable),
182
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
188
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
* or(or(a, b), c) = or(a, b, c)
+
* or(or(a, b), c) = or(a, b, c)
189
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
190
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
192
- 7242090
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn unwrap_nested_or(expr: &Expr, _: &Model) -> ApplicationResult {
+
fn unwrap_nested_or(expr: &Expr, _: &Model) -> ApplicationResult {
193
- 7242090
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match expr {
+
match expr {
194
- 377400
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::Or(metadata, exprs) => {
+
Expr::Or(metadata, exprs) => {
195
- 377400
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut new_exprs = Vec::new();
+
let mut new_exprs = Vec::new();
196
- 377400
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut changed = false;
+
let mut changed = false;
197
- 1845210
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
for e in exprs {
+
for e in exprs {
198
- 1467810
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
199
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::Or(_, exprs) => {
+
Expr::Or(_, exprs) => {
200
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
changed = true;
+
changed = true;
201
- 45
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
for e in exprs {
+
for e in exprs {
202
- 30
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
new_exprs.push(e.clone());
+
new_exprs.push(e.clone());
203
- 30
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
205
- 1467795
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => new_exprs.push(e.clone()),
+
_ => new_exprs.push(e.clone()),
208
- 377400
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if !changed {
+
if !changed {
209
- 377385
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
return Err(ApplicationError::RuleNotApplicable);
+
return Err(ApplicationError::RuleNotApplicable);
210
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
211
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok(Reduction::pure(Expr::Or(metadata.clone_dirty(), new_exprs)))
+
Ok(Reduction::pure(Expr::Or(metadata.clone_dirty(), new_exprs)))
213
- 6864690
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => Err(ApplicationError::RuleNotApplicable),
+
_ => Err(ApplicationError::RuleNotApplicable),
215
- 7242090
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
221
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
* and(and(a, b), c) = and(a, b, c)
+
* and(and(a, b), c) = and(a, b, c)
222
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
223
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
225
- 7242090
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn unwrap_nested_and(expr: &Expr, _: &Model) -> ApplicationResult {
+
fn unwrap_nested_and(expr: &Expr, _: &Model) -> ApplicationResult {
226
- 7242090
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match expr {
+
match expr {
227
- 15855
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::And(metadata, exprs) => {
+
Expr::And(metadata, exprs) => {
228
- 15855
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut new_exprs = Vec::new();
+
let mut new_exprs = Vec::new();
229
- 15855
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut changed = false;
+
let mut changed = false;
230
- 536700
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
for e in exprs {
+
for e in exprs {
231
- 520845
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
232
- 3585
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::And(_, exprs) => {
+
Expr::And(_, exprs) => {
233
- 3585
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
changed = true;
+
changed = true;
234
- 10725
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
for e in exprs {
+
for e in exprs {
235
- 7140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
new_exprs.push(e.clone());
+
new_exprs.push(e.clone());
236
- 7140
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
238
- 517260
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => new_exprs.push(e.clone()),
+
_ => new_exprs.push(e.clone()),
241
- 15855
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if !changed {
+
if !changed {
242
- 12270
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
return Err(ApplicationError::RuleNotApplicable);
+
return Err(ApplicationError::RuleNotApplicable);
243
- 3585
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
244
- 3585
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok(Reduction::pure(Expr::And(
+
Ok(Reduction::pure(Expr::And(
245
- 3585
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
metadata.clone_dirty(),
+
metadata.clone_dirty(),
246
- 3585
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
new_exprs,
+
new_exprs,
247
- 3585
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
249
- 7226235
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => Err(ApplicationError::RuleNotApplicable),
+
_ => Err(ApplicationError::RuleNotApplicable),
251
- 7242090
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
257
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
* not(not(a)) = a
+
* not(not(a)) = a
258
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
259
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
261
- 7242075
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn remove_double_negation(expr: &Expr, _: &Model) -> ApplicationResult {
+
fn remove_double_negation(expr: &Expr, _: &Model) -> ApplicationResult {
262
- 7242075
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match expr {
+
match expr {
263
- 135
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::Not(_, contents) => match contents.as_ref() {
+
Expr::Not(_, contents) => match contents.as_ref() {
264
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::Not(_, expr_box) => Ok(Reduction::pure(*expr_box.clone())),
+
Expr::Not(_, expr_box) => Ok(Reduction::pure(*expr_box.clone())),
265
- 120
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => Err(ApplicationError::RuleNotApplicable),
+
_ => Err(ApplicationError::RuleNotApplicable),
267
- 7241940
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => Err(ApplicationError::RuleNotApplicable),
+
_ => Err(ApplicationError::RuleNotApplicable),
269
- 7242075
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
274
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
* and([a]) = a
+
* and([a]) = a
275
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
276
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
278
- 7242075
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn remove_trivial_and(expr: &Expr, _: &Model) -> ApplicationResult {
+
fn remove_trivial_and(expr: &Expr, _: &Model) -> ApplicationResult {
279
- 7242075
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match expr {
+
match expr {
280
- 15840
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::And(_, exprs) => {
+
Expr::And(_, exprs) => {
281
- 15840
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if exprs.len() == 1 {
+
if exprs.len() == 1 {
282
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
return Ok(Reduction::pure(exprs[0].clone()));
+
return Ok(Reduction::pure(exprs[0].clone()));
283
- 15825
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
284
- 15825
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Err(ApplicationError::RuleNotApplicable)
+
Err(ApplicationError::RuleNotApplicable)
286
- 7226235
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => Err(ApplicationError::RuleNotApplicable),
+
_ => Err(ApplicationError::RuleNotApplicable),
288
- 7242075
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
293
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
* or([a]) = a
+
* or([a]) = a
294
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
295
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
297
- 7242075
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn remove_trivial_or(expr: &Expr, _: &Model) -> ApplicationResult {
+
fn remove_trivial_or(expr: &Expr, _: &Model) -> ApplicationResult {
298
- 7242075
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match expr {
+
match expr {
299
- 377385
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::Or(_, exprs) => {
+
Expr::Or(_, exprs) => {
300
- 377385
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if exprs.len() == 1 {
+
if exprs.len() == 1 {
301
- 105
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
return Ok(Reduction::pure(exprs[0].clone()));
+
return Ok(Reduction::pure(exprs[0].clone()));
302
- 377280
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
303
- 377280
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Err(ApplicationError::RuleNotApplicable)
+
Err(ApplicationError::RuleNotApplicable)
305
- 6864690
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => Err(ApplicationError::RuleNotApplicable),
+
_ => Err(ApplicationError::RuleNotApplicable),
307
- 7242075
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
313
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
* or([false, a]) = a
+
* or([false, a]) = a
314
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
315
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
317
- 7242090
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn remove_constants_from_or(expr: &Expr, _: &Model) -> ApplicationResult {
+
fn remove_constants_from_or(expr: &Expr, _: &Model) -> ApplicationResult {
318
- 7242090
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match expr {
+
match expr {
319
- 377400
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::Or(metadata, exprs) => {
+
Expr::Or(metadata, exprs) => {
320
- 377400
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut new_exprs = Vec::new();
+
let mut new_exprs = Vec::new();
321
- 377400
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut changed = false;
+
let mut changed = false;
322
- 1845180
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
for e in exprs {
+
for e in exprs {
323
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
324
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::Constant(metadata, Const::Bool(val)) => {
+
Expr::Constant(metadata, Const::Bool(val)) => {
325
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
327
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
return Ok(Reduction::pure(Expr::Constant(
+
return Ok(Reduction::pure(Expr::Constant(
328
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
metadata.clone_dirty(),
+
metadata.clone_dirty(),
329
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Const::Bool(true),
+
Const::Bool(true),
330
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
336
- 1467780
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => new_exprs.push(e.clone()),
+
_ => new_exprs.push(e.clone()),
339
- 377385
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if !changed {
+
if !changed {
340
- 377385
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
return Err(ApplicationError::RuleNotApplicable);
+
return Err(ApplicationError::RuleNotApplicable);
344
- 6864690
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => Err(ApplicationError::RuleNotApplicable),
+
_ => Err(ApplicationError::RuleNotApplicable),
346
- 7242090
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
352
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
* and([false, a]) = false
+
* and([false, a]) = false
353
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
354
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
356
- 7242090
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn remove_constants_from_and(expr: &Expr, _: &Model) -> ApplicationResult {
+
fn remove_constants_from_and(expr: &Expr, _: &Model) -> ApplicationResult {
357
- 7242090
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match expr {
+
match expr {
358
- 15855
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::And(metadata, exprs) => {
+
Expr::And(metadata, exprs) => {
359
- 15855
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut new_exprs = Vec::new();
+
let mut new_exprs = Vec::new();
360
- 15855
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut changed = false;
+
let mut changed = false;
361
- 536685
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
for e in exprs {
+
for e in exprs {
362
- 30
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
363
- 30
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::Constant(metadata, Const::Bool(val)) => {
+
Expr::Constant(metadata, Const::Bool(val)) => {
364
- 30
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if !*val {
+
if !*val {
366
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
return Ok(Reduction::pure(Expr::Constant(
+
return Ok(Reduction::pure(Expr::Constant(
367
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
metadata.clone_dirty(),
+
metadata.clone_dirty(),
368
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Const::Bool(false),
+
Const::Bool(false),
369
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
370
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
371
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
// If we find a true, we can ignore it
+
// If we find a true, we can ignore it
372
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
changed = true;
+
changed = true;
373
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
375
- 520815
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => new_exprs.push(e.clone()),
+
_ => new_exprs.push(e.clone()),
378
- 15840
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if !changed {
+
if !changed {
379
- 15840
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
return Err(ApplicationError::RuleNotApplicable);
+
return Err(ApplicationError::RuleNotApplicable);
386
- 7226235
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => Err(ApplicationError::RuleNotApplicable),
+
_ => Err(ApplicationError::RuleNotApplicable),
388
- 7242090
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
394
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
* not(false) = true
+
* not(false) = true
395
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
396
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
398
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn evaluate_constant_not(expr: &Expr, _: &Model) -> ApplicationResult {
+
fn evaluate_constant_not(expr: &Expr, _: &Model) -> ApplicationResult {
399
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match expr {
+
match expr {
400
- 120
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::Not(_, contents) => match contents.as_ref() {
+
Expr::Not(_, contents) => match contents.as_ref() {
405
- 120
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => Err(ApplicationError::RuleNotApplicable),
+
_ => Err(ApplicationError::RuleNotApplicable),
407
- 7241940
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => Err(ApplicationError::RuleNotApplicable),
+
_ => Err(ApplicationError::RuleNotApplicable),
409
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
414
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
* min([a, b]) ~> c ; c <= a & c <= b & (c = a | c = b)
+
* min([a, b]) ~> c ; c <= a & c <= b & (c = a | c = b)
415
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
416
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
418
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn min_to_var(expr: &Expr, mdl: &Model) -> ApplicationResult {
+
fn min_to_var(expr: &Expr, mdl: &Model) -> ApplicationResult {
419
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match expr {
+
match expr {
420
- 75
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::Min(metadata, exprs) => {
+
Expr::Min(metadata, exprs) => {
421
- 75
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let new_name = mdl.gensym();
+
let new_name = mdl.gensym();
422
- 75
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
423
- 75
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut new_top = Vec::new(); // the new variable must be less than or equal to all the other variables
+
let mut new_top = Vec::new(); // the new variable must be less than or equal to all the other variables
424
- 75
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut disjunction = Vec::new(); // the new variable must be equal to one of the variables
+
let mut disjunction = Vec::new(); // the new variable must be equal to one of the variables
425
- 225
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
for e in exprs {
+
for e in exprs {
426
- 150
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
new_top.push(Expr::Leq(
+
new_top.push(Expr::Leq(
427
- 150
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
428
- 150
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expr::Reference(Metadata::new(), new_name.clone())),
+
Box::new(Expr::Reference(Metadata::new(), new_name.clone())),
429
- 150
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(e.clone()),
+
Box::new(e.clone()),
430
- 150
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
431
- 150
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
disjunction.push(Expr::Eq(
+
disjunction.push(Expr::Eq(
432
- 150
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
433
- 150
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expr::Reference(Metadata::new(), new_name.clone())),
+
Box::new(Expr::Reference(Metadata::new(), new_name.clone())),
434
- 150
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(e.clone()),
+
Box::new(e.clone()),
435
- 150
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
436
- 150
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
437
- 75
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
new_top.push(Expr::Or(Metadata::new(), disjunction));
+
new_top.push(Expr::Or(Metadata::new(), disjunction));
438
- 75
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
439
- 75
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut new_vars = SymbolTable::new();
+
let mut new_vars = SymbolTable::new();
440
- 75
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let domain = expr
+
let domain = expr
441
- 75
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.domain_of(&mdl.variables)
+
.domain_of(&mdl.variables)
442
- 75
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.ok_or(ApplicationError::DomainError)?;
+
.ok_or(ApplicationError::DomainError)?;
443
- 75
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
new_vars.insert(new_name.clone(), DecisionVariable::new(domain));
+
new_vars.insert(new_name.clone(), DecisionVariable::new(domain));
444
- 75
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
445
- 75
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok(Reduction::new(
+
Ok(Reduction::new(
446
- 75
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::Reference(Metadata::new(), new_name),
+
Expr::Reference(Metadata::new(), new_name),
447
- 75
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::And(metadata.clone_dirty(), new_top),
+
Expr::And(metadata.clone_dirty(), new_top),
448
- 75
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
449
- 75
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
451
- 7241985
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => Err(ApplicationError::RuleNotApplicable),
+
_ => Err(ApplicationError::RuleNotApplicable),
453
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
459
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
* or(and(a, b), c) = and(or(a, c), or(b, c))
+
* or(and(a, b), c) = and(or(a, c), or(b, c))
460
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
461
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
463
- 7242075
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn distribute_or_over_and(expr: &Expr, _: &Model) -> ApplicationResult {
+
fn distribute_or_over_and(expr: &Expr, _: &Model) -> ApplicationResult {
464
- 7242075
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn find_and(exprs: &[Expr]) -> Option<usize> {
+
fn find_and(exprs: &[Expr]) -> Option<usize> {
465
- 7242075
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
// ToDo: may be better to move this to some kind of utils module?
+
// ToDo: may be better to move this to some kind of utils module?
466
- 7242075
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
for (i, e) in exprs.iter().enumerate() {
+
for (i, e) in exprs.iter().enumerate() {
467
- 7242075
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if let Expr::And(_, _) = e {
+
if let Expr::And(_, _) = e {
468
- 7242075
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
return Some(i);
+
return Some(i);
469
- 7242075
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
470
- 7242075
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
471
- 7242075
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
472
- 7242075
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
473
- 7242075
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
474
- 7242075
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match expr {
+
match expr {
475
- 377385
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::Or(_, exprs) => match find_and(exprs) {
+
Expr::Or(_, exprs) => match find_and(exprs) {
476
- 3465
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Some(idx) => {
+
Some(idx) => {
477
- 3465
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut rest = exprs.clone();
+
let mut rest = exprs.clone();
478
- 3465
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let and_expr = rest.remove(idx);
+
let and_expr = rest.remove(idx);
479
- 3465
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
480
- 3465
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match and_expr {
+
match and_expr {
481
- 3465
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::And(metadata, and_exprs) => {
+
Expr::And(metadata, and_exprs) => {
482
- 3465
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut new_and_contents = Vec::new();
+
let mut new_and_contents = Vec::new();
484
- 10395
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
for e in and_exprs {
+
for e in and_exprs {
486
- 6930
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut new_or_contents = rest.clone();
+
let mut new_or_contents = rest.clone();
487
- 6930
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
new_or_contents.push(e.clone());
+
new_or_contents.push(e.clone());
488
- 6930
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
new_and_contents.push(Expr::Or(metadata.clone_dirty(), new_or_contents))
+
new_and_contents.push(Expr::Or(metadata.clone_dirty(), new_or_contents))
491
- 3465
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok(Reduction::pure(Expr::And(
+
Ok(Reduction::pure(Expr::And(
492
- 3465
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
metadata.clone_dirty(),
+
metadata.clone_dirty(),
493
- 3465
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
new_and_contents,
+
new_and_contents,
494
- 3465
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
499
- 373920
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
None => Err(ApplicationError::RuleNotApplicable),
+
None => Err(ApplicationError::RuleNotApplicable),
501
- 6864690
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => Err(ApplicationError::RuleNotApplicable),
+
_ => Err(ApplicationError::RuleNotApplicable),
503
- 7242075
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
509
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
* not(and(a, b)) = or(not a, not b)
+
* not(and(a, b)) = or(not a, not b)
510
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
511
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
513
- 7242090
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn distribute_not_over_and(expr: &Expr, _: &Model) -> ApplicationResult {
+
fn distribute_not_over_and(expr: &Expr, _: &Model) -> ApplicationResult {
514
- 7242090
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match expr {
+
match expr {
515
- 150
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::Not(_, contents) => match contents.as_ref() {
+
Expr::Not(_, contents) => match contents.as_ref() {
516
- 45
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::And(metadata, exprs) => {
+
Expr::And(metadata, exprs) => {
517
- 45
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if exprs.len() == 1 {
+
if exprs.len() == 1 {
518
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let single_expr = exprs[0].clone();
+
let single_expr = exprs[0].clone();
519
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
return Ok(Reduction::pure(Expr::Not(
+
return Ok(Reduction::pure(Expr::Not(
520
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
521
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(single_expr.clone()),
+
Box::new(single_expr.clone()),
522
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
523
- 30
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
524
- 30
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut new_exprs = Vec::new();
+
let mut new_exprs = Vec::new();
525
- 90
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
for e in exprs {
+
for e in exprs {
526
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
new_exprs.push(Expr::Not(metadata.clone(), Box::new(e.clone())));
+
new_exprs.push(Expr::Not(metadata.clone(), Box::new(e.clone())));
527
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
528
- 30
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok(Reduction::pure(Expr::Or(metadata.clone(), new_exprs)))
+
Ok(Reduction::pure(Expr::Or(metadata.clone(), new_exprs)))
530
- 105
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => Err(ApplicationError::RuleNotApplicable),
+
_ => Err(ApplicationError::RuleNotApplicable),
532
- 7241940
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => Err(ApplicationError::RuleNotApplicable),
+
_ => Err(ApplicationError::RuleNotApplicable),
534
- 7242090
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
540
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
* not(or(a, b)) = and(not a, not b)
+
* not(or(a, b)) = and(not a, not b)
541
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
542
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
544
- 7242090
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn distribute_not_over_or(expr: &Expr, _: &Model) -> ApplicationResult {
+
fn distribute_not_over_or(expr: &Expr, _: &Model) -> ApplicationResult {
545
- 7242090
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match expr {
+
match expr {
546
- 150
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::Not(_, contents) => match contents.as_ref() {
+
Expr::Not(_, contents) => match contents.as_ref() {
547
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::Or(metadata, exprs) => {
+
Expr::Or(metadata, exprs) => {
548
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if exprs.len() == 1 {
+
if exprs.len() == 1 {
554
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
555
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut new_exprs = Vec::new();
+
let mut new_exprs = Vec::new();
556
- 45
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
for e in exprs {
+
for e in exprs {
557
- 30
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
new_exprs.push(Expr::Not(metadata.clone(), Box::new(e.clone())));
+
new_exprs.push(Expr::Not(metadata.clone(), Box::new(e.clone())));
558
- 30
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
559
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok(Reduction::pure(Expr::And(metadata.clone(), new_exprs)))
+
Ok(Reduction::pure(Expr::And(metadata.clone(), new_exprs)))
561
- 135
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => Err(ApplicationError::RuleNotApplicable),
+
_ => Err(ApplicationError::RuleNotApplicable),
563
- 7241940
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => Err(ApplicationError::RuleNotApplicable),
+
_ => Err(ApplicationError::RuleNotApplicable),
565
- 7242090
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
diff --git a/coverage/main/crates/conjure_core/src/rules/bubble.rs.html b/coverage/main/crates/conjure_core/src/rules/bubble.rs.html
index aeb686b1db..c4d5b51127 100644
--- a/coverage/main/crates/conjure_core/src/rules/bubble.rs.html
+++ b/coverage/main/crates/conjure_core/src/rules/bubble.rs.html
@@ -14,8 +14,8 @@
Lines
-
- 91.49 %
+
+ 0 %
@@ -23,7 +23,7 @@
@@ -326,13 +326,13 @@
19
- 68715
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn expand_bubble(expr: &Expression, _: &Model) -> ApplicationResult {
+
fn expand_bubble(expr: &Expression, _: &Model) -> ApplicationResult {
20
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match expr {
+
match expr {
21
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expression::Bubble(_, a, b) if a.return_type() == Some(ReturnType::Bool) => {
+
Expression::Bubble(_, a, b) if a.return_type() == Some(ReturnType::Bool) => {
22
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok(Reduction::pure(Expression::And(
+
Ok(Reduction::pure(Expression::And(
23
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
24
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
vec![*a.clone(), *b.clone()],
+
vec![*a.clone(), *b.clone()],
25
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
27
- 68655
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => Err(ApplicationError::RuleNotApplicable),
+
_ => Err(ApplicationError::RuleNotApplicable),
29
- 68715
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
37
- 68715
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn bubble_up(expr: &Expression, _: &Model) -> ApplicationResult {
+
fn bubble_up(expr: &Expression, _: &Model) -> ApplicationResult {
38
- 68715
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut sub = expr.children();
+
let mut sub = expr.children();
39
- 68715
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut bubbled_conditions = vec![];
+
let mut bubbled_conditions = vec![];
40
- 69840
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
for e in sub.iter_mut() {
+
for e in sub.iter_mut() {
41
- 69840
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if let Expression::Bubble(_, a, b) = e {
+
if let Expression::Bubble(_, a, b) = e {
42
- 75
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if a.return_type() != Some(ReturnType::Bool) {
+
if a.return_type() != Some(ReturnType::Bool) {
43
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
bubbled_conditions.push(*b.clone());
+
bubbled_conditions.push(*b.clone());
44
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
*e = *a.clone();
+
*e = *a.clone();
45
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
46
- 69765
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
48
- 68715
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if bubbled_conditions.is_empty() {
+
if bubbled_conditions.is_empty() {
49
- 68655
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
return Err(ApplicationError::RuleNotApplicable);
+
return Err(ApplicationError::RuleNotApplicable);
50
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
51
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
return Ok(Reduction::pure(Expression::Bubble(
+
return Ok(Reduction::pure(Expression::Bubble(
52
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
53
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
54
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
expr.with_children(sub)
+
expr.with_children(sub)
55
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.or(Err(ApplicationError::RuleNotApplicable))?,
+
.or(Err(ApplicationError::RuleNotApplicable))?,
57
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::And(Metadata::new(), bubbled_conditions)),
+
Box::new(Expression::And(Metadata::new(), bubbled_conditions)),
59
- 68715
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
73
- 68715
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn div_to_bubble(expr: &Expression, _: &Model) -> ApplicationResult {
+
fn div_to_bubble(expr: &Expression, _: &Model) -> ApplicationResult {
74
- 68715
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if let Expression::UnsafeDiv(_, a, b) = expr {
+
if let Expression::UnsafeDiv(_, a, b) = expr {
75
- 75
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
return Ok(Reduction::pure(Expression::Bubble(
+
return Ok(Reduction::pure(Expression::Bubble(
76
- 75
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
77
- 75
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::SafeDiv(Metadata::new(), a.clone(), b.clone())),
+
Box::new(Expression::SafeDiv(Metadata::new(), a.clone(), b.clone())),
78
- 75
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Neq(
+
Box::new(Expression::Neq(
79
- 75
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
80
- 75
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
b.clone(),
+
b.clone(),
81
- 75
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::from(0)),
+
Box::new(Expression::from(0)),
82
- 75
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
83
- 75
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
84
- 68640
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
85
- 68640
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
return Err(ApplicationError::RuleNotApplicable);
+
return Err(ApplicationError::RuleNotApplicable);
86
- 68715
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
diff --git a/coverage/main/crates/conjure_core/src/rules/cnf.rs.html b/coverage/main/crates/conjure_core/src/rules/cnf.rs.html
index 5b97f9ef19..56096e3b3d 100644
--- a/coverage/main/crates/conjure_core/src/rules/cnf.rs.html
+++ b/coverage/main/crates/conjure_core/src/rules/cnf.rs.html
@@ -23,7 +23,7 @@
@@ -226,7 +226,7 @@
diff --git a/coverage/main/crates/conjure_core/src/rules/constant.rs.html b/coverage/main/crates/conjure_core/src/rules/constant.rs.html
index 8b9b9cacb1..cde0d7932d 100644
--- a/coverage/main/crates/conjure_core/src/rules/constant.rs.html
+++ b/coverage/main/crates/conjure_core/src/rules/constant.rs.html
@@ -14,8 +14,8 @@
Lines
-
- 92.04 %
+
+ 0 %
@@ -23,7 +23,7 @@
@@ -198,13 +198,13 @@
11
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn apply_eval_constant(expr: &Expr, _: &Model) -> ApplicationResult {
+
fn apply_eval_constant(expr: &Expr, _: &Model) -> ApplicationResult {
12
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if expr.is_constant() {
+
if expr.is_constant() {
13
- 1431540
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
return Err(ApplicationError::RuleNotApplicable);
+
return Err(ApplicationError::RuleNotApplicable);
14
- 5810520
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
15
- 5810520
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
eval_constant(expr)
+
eval_constant(expr)
16
- 5810520
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.map(|c| Reduction::pure(Expr::Constant(Metadata::new(), c)))
+
.map(|c| Reduction::pure(Expr::Constant(Metadata::new(), c)))
17
- 5810520
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.ok_or(ApplicationError::RuleNotApplicable)
+
.ok_or(ApplicationError::RuleNotApplicable)
18
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
24
- 8071519
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn eval_constant(expr: &Expr) -> Option<Const> {
+
pub fn eval_constant(expr: &Expr) -> Option<Const> {
25
- 8071519
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match expr {
+
match expr {
26
- 902
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::Constant(_, c) => Some(c.clone()),
+
Expr::Constant(_, c) => Some(c.clone()),
27
- 5812530
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::Reference(_, _) => None,
+
Expr::Reference(_, _) => None,
28
- 6690
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::Eq(_, a, b) => bin_op::<i32, bool>(|a, b| a == b, a, b)
+
Expr::Eq(_, a, b) => bin_op::<i32, bool>(|a, b| a == b, a, b)
29
- 6690
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.or_else(|| bin_op::<bool, bool>(|a, b| a == b, a, b))
+
.or_else(|| bin_op::<bool, bool>(|a, b| a == b, a, b))
30
- 6690
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.map(Const::Bool),
+
.map(Const::Bool),
31
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::Neq(_, a, b) => bin_op::<i32, bool>(|a, b| a != b, a, b).map(Const::Bool),
+
Expr::Neq(_, a, b) => bin_op::<i32, bool>(|a, b| a != b, a, b).map(Const::Bool),
32
- 4185
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::Lt(_, a, b) => bin_op::<i32, bool>(|a, b| a < b, a, b).map(Const::Bool),
+
Expr::Lt(_, a, b) => bin_op::<i32, bool>(|a, b| a < b, a, b).map(Const::Bool),
34
- 195
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::Leq(_, a, b) => bin_op::<i32, bool>(|a, b| a <= b, a, b).map(Const::Bool),
+
Expr::Leq(_, a, b) => bin_op::<i32, bool>(|a, b| a <= b, a, b).map(Const::Bool),
35
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::Geq(_, a, b) => bin_op::<i32, bool>(|a, b| a >= b, a, b).map(Const::Bool),
+
Expr::Geq(_, a, b) => bin_op::<i32, bool>(|a, b| a >= b, a, b).map(Const::Bool),
37
- 180
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::Not(_, expr) => un_op::<bool, bool>(|e| !e, expr).map(Const::Bool),
+
Expr::Not(_, expr) => un_op::<bool, bool>(|e| !e, expr).map(Const::Bool),
39
- 19170
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::And(_, exprs) => {
+
Expr::And(_, exprs) => {
40
- 19170
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
vec_op::<bool, bool>(|e| e.iter().all(|&e| e), exprs).map(Const::Bool)
+
vec_op::<bool, bool>(|e| e.iter().all(|&e| e), exprs).map(Const::Bool)
42
- 392340
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::Or(_, exprs) => {
+
Expr::Or(_, exprs) => {
43
- 392340
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
vec_op::<bool, bool>(|e| e.iter().any(|&e| e), exprs).map(Const::Bool)
+
vec_op::<bool, bool>(|e| e.iter().any(|&e| e), exprs).map(Const::Bool)
46
- 11970
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::Sum(_, exprs) => vec_op::<i32, i32>(|e| e.iter().sum(), exprs).map(Const::Int),
+
Expr::Sum(_, exprs) => vec_op::<i32, i32>(|e| e.iter().sum(), exprs).map(Const::Int),
48
- 552990
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::Ineq(_, a, b, c) => {
+
Expr::Ineq(_, a, b, c) => {
49
- 552990
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
tern_op::<i32, bool>(|a, b, c| a <= (b + c), a, b, c).map(Const::Bool)
+
tern_op::<i32, bool>(|a, b, c| a <= (b + c), a, b, c).map(Const::Bool)
52
- 653070
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::SumGeq(_, exprs, a) => {
+
Expr::SumGeq(_, exprs, a) => {
53
- 653070
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
flat_op::<i32, bool>(|e, a| e.iter().sum::<i32>() >= a, exprs, a).map(Const::Bool)
+
flat_op::<i32, bool>(|e, a| e.iter().sum::<i32>() >= a, exprs, a).map(Const::Bool)
55
- 611565
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::SumLeq(_, exprs, a) => {
+
Expr::SumLeq(_, exprs, a) => {
56
- 611565
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
flat_op::<i32, bool>(|e, a| e.iter().sum::<i32>() <= a, exprs, a).map(Const::Bool)
+
flat_op::<i32, bool>(|e, a| e.iter().sum::<i32>() <= a, exprs, a).map(Const::Bool)
60
- 225
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::Min(_, exprs) => {
+
Expr::Min(_, exprs) => {
61
- 225
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
opt_vec_op::<i32, i32>(|e| e.iter().min().copied(), exprs).map(Const::Int)
+
opt_vec_op::<i32, i32>(|e| e.iter().min().copied(), exprs).map(Const::Int)
63
- 226
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::UnsafeDiv(_, a, b) | Expr::SafeDiv(_, a, b) => {
+
Expr::UnsafeDiv(_, a, b) | Expr::SafeDiv(_, a, b) => {
64
- 362
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if unwrap_expr::<i32>(b)? == 0 {
+
if unwrap_expr::<i32>(b)? == 0 {
65
- 2
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
return None;
+
return None;
66
- 30
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
67
- 30
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
bin_op::<i32, i32>(|a, b| a / b, a, b).map(Const::Int)
+
bin_op::<i32, i32>(|a, b| a / b, a, b).map(Const::Int)
69
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::DivEq(_, a, b, c) => {
+
Expr::DivEq(_, a, b, c) => {
70
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
tern_op::<i32, bool>(|a, b, c| a == b * c, a, b, c).map(Const::Bool)
+
tern_op::<i32, bool>(|a, b, c| a == b * c, a, b, c).map(Const::Bool)
72
- 120
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::Bubble(_, a, b) => bin_op::<bool, bool>(|a, b| a && b, a, b).map(Const::Bool),
+
Expr::Bubble(_, a, b) => bin_op::<bool, bool>(|a, b| a && b, a, b).map(Const::Bool),
74
- 4530
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
println!("WARNING: Unimplemented constant eval: {:?}", expr);
+
println!("WARNING: Unimplemented constant eval: {:?}", expr);
75
- 4530
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
78
- 8071519
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
80
- 180
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn un_op<T, A>(f: fn(T) -> A, a: &Expr) -> Option<A>
+
fn un_op<T, A>(f: fn(T) -> A, a: &Expr) -> Option<A>
81
- 180
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
82
- 180
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
T: TryFrom<Const>,
+
T: TryFrom<Const>,
83
- 180
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
84
- 180
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let a = unwrap_expr::<T>(a)?;
+
let a = unwrap_expr::<T>(a)?;
86
- 180
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
88
- 18330
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn bin_op<T, A>(f: fn(T, T) -> A, a: &Expr, b: &Expr) -> Option<A>
+
fn bin_op<T, A>(f: fn(T, T) -> A, a: &Expr, b: &Expr) -> Option<A>
89
- 18330
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
90
- 18330
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
T: TryFrom<Const>,
+
T: TryFrom<Const>,
91
- 18330
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
92
- 18330
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let a = unwrap_expr::<T>(a)?;
+
let a = unwrap_expr::<T>(a)?;
93
- 210
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let b = unwrap_expr::<T>(b)?;
+
let b = unwrap_expr::<T>(b)?;
94
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Some(f(a, b))
+
Some(f(a, b))
95
- 18330
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
97
- 553050
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn tern_op<T, A>(f: fn(T, T, T) -> A, a: &Expr, b: &Expr, c: &Expr) -> Option<A>
+
fn tern_op<T, A>(f: fn(T, T, T) -> A, a: &Expr, b: &Expr, c: &Expr) -> Option<A>
98
- 553050
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
99
- 553050
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
T: TryFrom<Const>,
+
T: TryFrom<Const>,
100
- 553050
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
101
- 553050
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let a = unwrap_expr::<T>(a)?;
+
let a = unwrap_expr::<T>(a)?;
102
- 285
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let b = unwrap_expr::<T>(b)?;
+
let b = unwrap_expr::<T>(b)?;
105
- 553050
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
107
- 423480
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn vec_op<T, A>(f: fn(Vec<T>) -> A, a: &[Expr]) -> Option<A>
+
fn vec_op<T, A>(f: fn(Vec<T>) -> A, a: &[Expr]) -> Option<A>
108
- 423480
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
109
- 423480
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
T: TryFrom<Const>,
+
T: TryFrom<Const>,
110
- 423480
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
111
- 423480
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let a = a.iter().map(unwrap_expr).collect::<Option<Vec<T>>>()?;
+
let a = a.iter().map(unwrap_expr).collect::<Option<Vec<T>>>()?;
112
- 30
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Some(f(a))
+
Some(f(a))
113
- 423480
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
115
- 225
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn opt_vec_op<T, A>(f: fn(Vec<T>) -> Option<A>, a: &[Expr]) -> Option<A>
+
fn opt_vec_op<T, A>(f: fn(Vec<T>) -> Option<A>, a: &[Expr]) -> Option<A>
116
- 225
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
117
- 225
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
T: TryFrom<Const>,
+
T: TryFrom<Const>,
118
- 225
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
119
- 225
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let a = a.iter().map(unwrap_expr).collect::<Option<Vec<T>>>()?;
+
let a = a.iter().map(unwrap_expr).collect::<Option<Vec<T>>>()?;
121
- 225
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
123
- 1264635
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn flat_op<T, A>(f: fn(Vec<T>, T) -> A, a: &[Expr], b: &Expr) -> Option<A>
+
fn flat_op<T, A>(f: fn(Vec<T>, T) -> A, a: &[Expr], b: &Expr) -> Option<A>
124
- 1264635
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
125
- 1264635
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
T: TryFrom<Const>,
+
T: TryFrom<Const>,
126
- 1264635
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
127
- 1264635
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let a = a.iter().map(unwrap_expr).collect::<Option<Vec<T>>>()?;
+
let a = a.iter().map(unwrap_expr).collect::<Option<Vec<T>>>()?;
130
- 1264635
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
132
- 2260832
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn unwrap_expr<T: TryFrom<Const>>(expr: &Expr) -> Option<T> {
+
fn unwrap_expr<T: TryFrom<Const>>(expr: &Expr) -> Option<T> {
133
- 2260832
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let c = eval_constant(expr)?;
+
let c = eval_constant(expr)?;
134
- 887
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
TryInto::<T>::try_into(c).ok()
+
TryInto::<T>::try_into(c).ok()
135
- 2260832
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
142
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn div_by_zero() {
+
fn div_by_zero() {
143
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let expr = Expression::UnsafeDiv(
+
let expr = Expression::UnsafeDiv(
144
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Default::default(),
+
Default::default(),
145
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Constant(Default::default(), Constant::Int(1))),
+
Box::new(Expression::Constant(Default::default(), Constant::Int(1))),
146
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Constant(Default::default(), Constant::Int(0))),
+
Box::new(Expression::Constant(Default::default(), Constant::Int(0))),
147
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
148
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert_eq!(super::eval_constant(&expr), None);
+
assert_eq!(super::eval_constant(&expr), None);
149
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
152
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn safediv_by_zero() {
+
fn safediv_by_zero() {
153
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let expr = Expression::SafeDiv(
+
let expr = Expression::SafeDiv(
154
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Default::default(),
+
Default::default(),
155
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Constant(Default::default(), Constant::Int(1))),
+
Box::new(Expression::Constant(Default::default(), Constant::Int(1))),
156
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expression::Constant(Default::default(), Constant::Int(0))),
+
Box::new(Expression::Constant(Default::default(), Constant::Int(0))),
157
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
158
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
assert_eq!(super::eval_constant(&expr), None);
+
assert_eq!(super::eval_constant(&expr), None);
159
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
diff --git a/coverage/main/crates/conjure_core/src/rules/index.html b/coverage/main/crates/conjure_core/src/rules/index.html
index ce2ac5d6b2..d9d82ca467 100644
--- a/coverage/main/crates/conjure_core/src/rules/index.html
+++ b/coverage/main/crates/conjure_core/src/rules/index.html
@@ -14,8 +14,8 @@
Lines
-
- 86.15 %
+
+ 0 %
@@ -23,7 +23,7 @@
Functions
- 15.31 %
+
0 %
@@ -45,21 +45,21 @@
- 82.74%
+ 0%
-
- 82.74%
+
+ 0%
-
- 326 / 394
+
+ 0 / 343
-
15.42%
-
37 / 240
+
0%
+
0 / 148
@@ -69,21 +69,21 @@
- 91.49%
+ 0%
-
- 91.49%
+
+ 0%
-
- 43 / 47
+
+ 0 / 47
-
6.67%
-
3 / 45
+
0%
+
0 / 30
@@ -107,7 +107,7 @@
0%
-
0 / 9
+
0 / 6
@@ -117,21 +117,21 @@
- 92.04%
+ 0%
-
- 92.04%
+
+ 0%
-
- 104 / 113
+
+ 0 / 113
-
20.8%
-
26 / 125
+
0%
+
0 / 84
@@ -141,21 +141,21 @@
- 88.36%
+ 0%
-
- 88.36%
+
+ 0%
-
- 205 / 232
+
+ 0 / 205
-
14.2%
-
24 / 169
+
0%
+
0 / 106
@@ -163,7 +163,7 @@
diff --git a/coverage/main/crates/conjure_core/src/rules/minion.rs.html b/coverage/main/crates/conjure_core/src/rules/minion.rs.html
index 42570ce9f4..0976e03c6d 100644
--- a/coverage/main/crates/conjure_core/src/rules/minion.rs.html
+++ b/coverage/main/crates/conjure_core/src/rules/minion.rs.html
@@ -14,8 +14,8 @@
Lines
-
- 88.36 %
+
+ 0 %
@@ -23,7 +23,7 @@
@@ -326,13 +326,13 @@
19
- 2775
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn is_nested_sum(exprs: &Vec<Expr>) -> bool {
+
fn is_nested_sum(exprs: &Vec<Expr>) -> bool {
20
- 11040
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
for e in exprs {
+
for e in exprs {
21
- 8280
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if let Expr::Sum(_, _) = e {
+
if let Expr::Sum(_, _) = e {
22
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
return true;
+
return true;
23
- 8265
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
25
- 2760
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
26
- 2775
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
31
- 3705
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn sum_to_vector(expr: &Expr) -> Result<Vec<Expr>, ApplicationError> {
+
fn sum_to_vector(expr: &Expr) -> Result<Vec<Expr>, ApplicationError> {
32
- 3705
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match expr {
+
match expr {
33
- 2775
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::Sum(_, exprs) => {
+
Expr::Sum(_, exprs) => {
34
- 2775
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if is_nested_sum(exprs) {
+
if is_nested_sum(exprs) {
35
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Err(ApplicationError::RuleNotApplicable)
+
Err(ApplicationError::RuleNotApplicable)
37
- 2760
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok(exprs.clone())
+
Ok(exprs.clone())
40
- 930
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => Err(ApplicationError::RuleNotApplicable),
+
_ => Err(ApplicationError::RuleNotApplicable),
42
- 3705
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
67
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
* sum([a, b, c]) >= d => sum_geq([a, b, c], d)
+
* sum([a, b, c]) >= d => sum_geq([a, b, c], d)
68
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
69
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
71
- 7242075
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn flatten_sum_geq(expr: &Expr, _: &Model) -> ApplicationResult {
+
fn flatten_sum_geq(expr: &Expr, _: &Model) -> ApplicationResult {
72
- 7242075
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match expr {
+
match expr {
73
- 75
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::Geq(metadata, a, b) => {
+
Expr::Geq(metadata, a, b) => {
74
- 75
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let exprs = sum_to_vector(a)?;
+
let exprs = sum_to_vector(a)?;
75
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok(Reduction::pure(Expr::SumGeq(
+
Ok(Reduction::pure(Expr::SumGeq(
76
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
metadata.clone_dirty(),
+
metadata.clone_dirty(),
77
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
78
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
b.clone(),
+
b.clone(),
79
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
81
- 7242000
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => Err(ApplicationError::RuleNotApplicable),
+
_ => Err(ApplicationError::RuleNotApplicable),
83
- 7242075
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
88
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
* sum([a, b, c]) <= d => sum_leq([a, b, c], d)
+
* sum([a, b, c]) <= d => sum_leq([a, b, c], d)
89
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
90
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
92
- 7242075
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn sum_leq_to_sumleq(expr: &Expr, _: &Model) -> ApplicationResult {
+
fn sum_leq_to_sumleq(expr: &Expr, _: &Model) -> ApplicationResult {
93
- 7242075
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match expr {
+
match expr {
94
- 210
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::Leq(metadata, a, b) => {
+
Expr::Leq(metadata, a, b) => {
95
- 210
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let exprs = sum_to_vector(a)?;
+
let exprs = sum_to_vector(a)?;
96
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok(Reduction::pure(Expr::SumLeq(
+
Ok(Reduction::pure(Expr::SumLeq(
97
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
metadata.clone_dirty(),
+
metadata.clone_dirty(),
98
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
99
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
b.clone(),
+
b.clone(),
100
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
102
- 7241865
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => Err(ApplicationError::RuleNotApplicable),
+
_ => Err(ApplicationError::RuleNotApplicable),
104
- 7242075
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
109
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
* eq(sum([a, b]), c) => sumeq([a, b], c)
+
* eq(sum([a, b]), c) => sumeq([a, b], c)
110
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
111
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
113
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn sum_eq_to_sumeq(expr: &Expr, _: &Model) -> ApplicationResult {
+
fn sum_eq_to_sumeq(expr: &Expr, _: &Model) -> ApplicationResult {
114
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match expr {
+
match expr {
115
- 3075
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::Eq(metadata, a, b) => {
+
Expr::Eq(metadata, a, b) => {
116
- 3075
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if let Ok(exprs) = sum_to_vector(a) {
+
if let Ok(exprs) = sum_to_vector(a) {
117
- 2730
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok(Reduction::pure(Expr::SumEq(
+
Ok(Reduction::pure(Expr::SumEq(
118
- 2730
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
metadata.clone_dirty(),
+
metadata.clone_dirty(),
119
- 2730
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
120
- 2730
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
b.clone(),
+
b.clone(),
121
- 2730
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
122
- 345
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
} else if let Ok(exprs) = sum_to_vector(b) {
+
} else if let Ok(exprs) = sum_to_vector(b) {
129
- 345
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Err(ApplicationError::RuleNotApplicable)
+
Err(ApplicationError::RuleNotApplicable)
132
- 7238985
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => Err(ApplicationError::RuleNotApplicable),
+
_ => Err(ApplicationError::RuleNotApplicable),
134
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
143
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
144
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
145
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
148
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
* a + b = c
+
* a + b = c
149
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
150
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
152
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn sumeq_to_minion(expr: &Expr, _: &Model) -> ApplicationResult {
+
fn sumeq_to_minion(expr: &Expr, _: &Model) -> ApplicationResult {
153
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match expr {
+
match expr {
154
- 2730
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::SumEq(metadata, exprs, eq_to) => Ok(Reduction::pure(Expr::And(
+
Expr::SumEq(metadata, exprs, eq_to) => Ok(Reduction::pure(Expr::And(
155
- 2730
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
156
- 2730
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
157
- 2730
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::SumGeq(Metadata::new(), exprs.clone(), Box::from(*eq_to.clone())),
+
Expr::SumGeq(Metadata::new(), exprs.clone(), Box::from(*eq_to.clone())),
158
- 2730
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::SumLeq(Metadata::new(), exprs.clone(), Box::from(*eq_to.clone())),
+
Expr::SumLeq(Metadata::new(), exprs.clone(), Box::from(*eq_to.clone())),
159
- 2730
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
160
- 2730
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
161
- 7239330
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => Err(ApplicationError::RuleNotApplicable),
+
_ => Err(ApplicationError::RuleNotApplicable),
163
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
169
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
* a < b => a - b < -1
+
* a < b => a - b < -1
170
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
171
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
173
- 7242075
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn lt_to_ineq(expr: &Expr, _: &Model) -> ApplicationResult {
+
fn lt_to_ineq(expr: &Expr, _: &Model) -> ApplicationResult {
174
- 7242075
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match expr {
+
match expr {
175
- 2730
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::Lt(metadata, a, b) => Ok(Reduction::pure(Expr::Ineq(
+
Expr::Lt(metadata, a, b) => Ok(Reduction::pure(Expr::Ineq(
176
- 2730
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
metadata.clone_dirty(),
+
metadata.clone_dirty(),
177
- 2730
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
a.clone(),
+
a.clone(),
178
- 2730
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
b.clone(),
+
b.clone(),
179
- 2730
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expr::Constant(Metadata::new(), Const::Int(-1))),
+
Box::new(Expr::Constant(Metadata::new(), Const::Int(-1))),
180
- 2730
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
181
- 7239345
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => Err(ApplicationError::RuleNotApplicable),
+
_ => Err(ApplicationError::RuleNotApplicable),
183
- 7242075
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
189
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
* a > b => b - a < -1
+
* a > b => b - a < -1
190
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
191
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
193
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn gt_to_ineq(expr: &Expr, _: &Model) -> ApplicationResult {
+
fn gt_to_ineq(expr: &Expr, _: &Model) -> ApplicationResult {
194
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match expr {
+
match expr {
201
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => Err(ApplicationError::RuleNotApplicable),
+
_ => Err(ApplicationError::RuleNotApplicable),
203
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
209
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
* a >= b => b - a < 0
+
* a >= b => b - a < 0
210
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
211
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
213
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn geq_to_ineq(expr: &Expr, _: &Model) -> ApplicationResult {
+
fn geq_to_ineq(expr: &Expr, _: &Model) -> ApplicationResult {
214
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match expr {
+
match expr {
215
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::Geq(metadata, a, b) => Ok(Reduction::pure(Expr::Ineq(
+
Expr::Geq(metadata, a, b) => Ok(Reduction::pure(Expr::Ineq(
216
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
metadata.clone_dirty(),
+
metadata.clone_dirty(),
217
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
b.clone(),
+
b.clone(),
218
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
a.clone(),
+
a.clone(),
219
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expr::Constant(Metadata::new(), Const::Int(0))),
+
Box::new(Expr::Constant(Metadata::new(), Const::Int(0))),
220
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
221
- 7242000
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => Err(ApplicationError::RuleNotApplicable),
+
_ => Err(ApplicationError::RuleNotApplicable),
223
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
229
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
* a <= b => a - b < 0
+
* a <= b => a - b < 0
230
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
231
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
233
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn leq_to_ineq(expr: &Expr, _: &Model) -> ApplicationResult {
+
fn leq_to_ineq(expr: &Expr, _: &Model) -> ApplicationResult {
234
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match expr {
+
match expr {
235
- 195
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::Leq(metadata, a, b) => Ok(Reduction::pure(Expr::Ineq(
+
Expr::Leq(metadata, a, b) => Ok(Reduction::pure(Expr::Ineq(
236
- 195
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
metadata.clone_dirty(),
+
metadata.clone_dirty(),
237
- 195
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
a.clone(),
+
a.clone(),
238
- 195
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
b.clone(),
+
b.clone(),
239
- 195
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expr::Constant(Metadata::new(), Const::Int(0))),
+
Box::new(Expr::Constant(Metadata::new(), Const::Int(0))),
240
- 195
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
241
- 7241865
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => Err(ApplicationError::RuleNotApplicable),
+
_ => Err(ApplicationError::RuleNotApplicable),
265
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn flatten_safediv(expr: &Expr, mdl: &Model) -> ApplicationResult {
+
fn flatten_safediv(expr: &Expr, mdl: &Model) -> ApplicationResult {
266
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if expr.is_eq() || expr.is_leq() || expr.is_geq() || expr.is_neq() {
+
if expr.is_eq() || expr.is_leq() || expr.is_geq() || expr.is_neq() {
267
- 3510
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut sub = expr.children();
+
let mut sub = expr.children();
268
- 3510
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
269
- 3510
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut new_vars = SymbolTable::new();
+
let mut new_vars = SymbolTable::new();
270
- 3510
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut new_top = vec![];
+
let mut new_top = vec![];
273
- 7020
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
for c in sub.iter_mut() {
+
for c in sub.iter_mut() {
274
- 7020
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if let Expr::SafeDiv(_, a, b) = c.clone() {
+
if let Expr::SafeDiv(_, a, b) = c.clone() {
275
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let new_name = mdl.gensym();
+
let new_name = mdl.gensym();
276
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let domain = c
+
let domain = c
277
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.domain_of(&mdl.variables)
+
.domain_of(&mdl.variables)
278
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.ok_or(ApplicationError::DomainError)?;
+
.ok_or(ApplicationError::DomainError)?;
279
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
new_vars.insert(new_name.clone(), DecisionVariable::new(domain));
+
new_vars.insert(new_name.clone(), DecisionVariable::new(domain));
280
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
281
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
new_top.push(Expr::DivEq(
+
new_top.push(Expr::DivEq(
282
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
283
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
a.clone(),
+
a.clone(),
284
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
b.clone(),
+
b.clone(),
285
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Box::new(Expr::Reference(Metadata::new(), new_name.clone())),
+
Box::new(Expr::Reference(Metadata::new(), new_name.clone())),
286
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
287
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
288
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
*c = Expr::Reference(Metadata::new(), new_name.clone());
+
*c = Expr::Reference(Metadata::new(), new_name.clone());
289
- 6960
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
291
- 3510
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if !new_top.is_empty() {
+
if !new_top.is_empty() {
293
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
expr.with_children(sub)
+
expr.with_children(sub)
294
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.or(Err(ApplicationError::RuleNotApplicable))?,
+
.or(Err(ApplicationError::RuleNotApplicable))?,
295
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::And(Metadata::new(), new_top),
+
Expr::And(Metadata::new(), new_top),
296
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
298
- 3450
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
299
- 7238550
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
300
- 7242000
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Err(ApplicationError::RuleNotApplicable)
+
Err(ApplicationError::RuleNotApplicable)
301
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
304
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn div_eq_to_diveq(expr: &Expr, _: &Model) -> ApplicationResult {
+
fn div_eq_to_diveq(expr: &Expr, _: &Model) -> ApplicationResult {
305
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match expr {
+
match expr {
306
- 3075
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::Eq(metadata, a, b) => {
+
Expr::Eq(metadata, a, b) => {
307
- 3075
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if let Expr::SafeDiv(_, x, y) = a.as_ref() {
+
if let Expr::SafeDiv(_, x, y) = a.as_ref() {
308
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if !(b.is_reference() || b.is_constant()) {
+
if !(b.is_reference() || b.is_constant()) {
310
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
311
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok(Reduction::pure(Expr::DivEq(
+
Ok(Reduction::pure(Expr::DivEq(
312
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
metadata.clone_dirty(),
+
metadata.clone_dirty(),
313
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
x.clone(),
+
x.clone(),
314
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
y.clone(),
+
y.clone(),
315
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
b.clone(),
+
b.clone(),
316
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
317
- 3060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
} else if let Expr::SafeDiv(_, x, y) = b.as_ref() {
+
} else if let Expr::SafeDiv(_, x, y) = b.as_ref() {
318
- 30
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if !(a.is_reference() || a.is_constant()) {
+
if !(a.is_reference() || a.is_constant()) {
320
- 30
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
321
- 30
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok(Reduction::pure(Expr::DivEq(
+
Ok(Reduction::pure(Expr::DivEq(
322
- 30
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
metadata.clone_dirty(),
+
metadata.clone_dirty(),
323
- 30
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
x.clone(),
+
x.clone(),
324
- 30
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
y.clone(),
+
y.clone(),
325
- 30
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
a.clone(),
+
a.clone(),
326
- 30
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
328
- 3030
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Err(ApplicationError::RuleNotApplicable)
+
Err(ApplicationError::RuleNotApplicable)
331
- 7238985
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => Err(ApplicationError::RuleNotApplicable),
+
_ => Err(ApplicationError::RuleNotApplicable),
333
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
336
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn negated_neq_to_eq(expr: &Expr, _: &Model) -> ApplicationResult {
+
fn negated_neq_to_eq(expr: &Expr, _: &Model) -> ApplicationResult {
337
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match expr {
+
match expr {
338
- 120
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::Not(_, a) => match a.as_ref() {
+
Expr::Not(_, a) => match a.as_ref() {
339
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::Neq(_, b, c) => {
+
Expr::Neq(_, b, c) => {
340
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if !b.can_be_undefined() && !c.can_be_undefined() {
+
if !b.can_be_undefined() && !c.can_be_undefined() {
341
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok(Reduction::pure(Expr::Eq(
+
Ok(Reduction::pure(Expr::Eq(
342
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
343
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
b.clone(),
+
b.clone(),
344
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
c.clone(),
+
c.clone(),
345
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
350
- 105
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => Err(ApplicationError::RuleNotApplicable),
+
_ => Err(ApplicationError::RuleNotApplicable),
352
- 7241940
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => Err(ApplicationError::RuleNotApplicable),
+
_ => Err(ApplicationError::RuleNotApplicable),
354
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
357
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn negated_eq_to_neq(expr: &Expr, _: &Model) -> ApplicationResult {
+
fn negated_eq_to_neq(expr: &Expr, _: &Model) -> ApplicationResult {
358
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match expr {
+
match expr {
359
- 120
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::Not(_, a) => match a.as_ref() {
+
Expr::Not(_, a) => match a.as_ref() {
360
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Expr::Eq(_, b, c) => {
+
Expr::Eq(_, b, c) => {
361
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if !b.can_be_undefined() && !c.can_be_undefined() {
+
if !b.can_be_undefined() && !c.can_be_undefined() {
362
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok(Reduction::pure(Expr::Neq(
+
Ok(Reduction::pure(Expr::Neq(
363
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Metadata::new(),
+
Metadata::new(),
364
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
b.clone(),
+
b.clone(),
365
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
c.clone(),
+
c.clone(),
366
- 15
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
368
- 45
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Err(ApplicationError::RuleNotApplicable)
+
Err(ApplicationError::RuleNotApplicable)
371
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => Err(ApplicationError::RuleNotApplicable),
+
_ => Err(ApplicationError::RuleNotApplicable),
373
- 7241940
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_ => Err(ApplicationError::RuleNotApplicable),
+
_ => Err(ApplicationError::RuleNotApplicable),
375
- 7242060
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
diff --git a/coverage/main/crates/conjure_core/src/solver/adaptors/index.html b/coverage/main/crates/conjure_core/src/solver/adaptors/index.html
index 4231c74780..02ccfa8f6f 100644
--- a/coverage/main/crates/conjure_core/src/solver/adaptors/index.html
+++ b/coverage/main/crates/conjure_core/src/solver/adaptors/index.html
@@ -15,7 +15,7 @@
@@ -23,7 +23,7 @@
Functions
- 13.45 %
+
0 %
@@ -59,7 +59,7 @@
0%
-
0 / 18
+
0 / 12
@@ -69,21 +69,21 @@
- 86.75%
+ 0%
-
- 86.75%
+
+ 0%
-
- 216 / 249
+
+ 0 / 249
-
26.44%
-
23 / 87
+
0%
+
0 / 58
@@ -107,7 +107,7 @@
0%
-
0 / 66
+
0 / 44
@@ -115,7 +115,7 @@
diff --git a/coverage/main/crates/conjure_core/src/solver/adaptors/kissat.rs.html b/coverage/main/crates/conjure_core/src/solver/adaptors/kissat.rs.html
index 6ee52caf6f..4e1d66c856 100644
--- a/coverage/main/crates/conjure_core/src/solver/adaptors/kissat.rs.html
+++ b/coverage/main/crates/conjure_core/src/solver/adaptors/kissat.rs.html
@@ -23,7 +23,7 @@
@@ -1042,7 +1042,7 @@
diff --git a/coverage/main/crates/conjure_core/src/solver/adaptors/minion.rs.html b/coverage/main/crates/conjure_core/src/solver/adaptors/minion.rs.html
index 3f57b3a1ce..ab73202d14 100644
--- a/coverage/main/crates/conjure_core/src/solver/adaptors/minion.rs.html
+++ b/coverage/main/crates/conjure_core/src/solver/adaptors/minion.rs.html
@@ -14,8 +14,8 @@
Lines
-
- 86.75 %
+
+ 0 %
@@ -23,7 +23,7 @@
Functions
- 26.44 %
+
0 %
@@ -694,13 +694,13 @@
42
- 2145
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn minion_rs_callback(solutions: HashMap<minion_ast::VarName, minion_ast::Constant>) -> bool {
+
fn minion_rs_callback(solutions: HashMap<minion_ast::VarName, minion_ast::Constant>) -> bool {
43
- 2145
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
*(ANY_SOLUTIONS.lock().unwrap()) = true;
+
*(ANY_SOLUTIONS.lock().unwrap()) = true;
44
- 2145
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let callback = USER_CALLBACK
+
let callback = USER_CALLBACK
45
- 2145
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.get_or_init(|| Mutex::new(Box::new(|x| true)))
+
.get_or_init(|| Mutex::new(Box::new(|x| true)))
46
- 2145
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
47
- 2145
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.unwrap();
+
.unwrap();
48
- 2145
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
49
- 2145
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut conjure_solutions: HashMap<conjure_ast::Name, conjure_ast::Constant> = HashMap::new();
+
let mut conjure_solutions: HashMap<conjure_ast::Name, conjure_ast::Constant> = HashMap::new();
50
- 7485
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
for (minion_name, minion_const) in solutions.into_iter() {
+
for (minion_name, minion_const) in solutions.into_iter() {
51
- 7485
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let conjure_const = match minion_const {
+
let conjure_const = match minion_const {
53
- 7485
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
minion_ast::Constant::Integer(x) => conjure_ast::Constant::Int(x),
+
minion_ast::Constant::Integer(x) => conjure_ast::Constant::Int(x),
57
- 7485
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let machine_name_re = Regex::new(r"__conjure_machine_name_([0-9]+)").unwrap();
+
let machine_name_re = Regex::new(r"__conjure_machine_name_([0-9]+)").unwrap();
58
- 7485
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let conjure_name = if let Some(caps) = machine_name_re.captures(&minion_name) {
+
let conjure_name = if let Some(caps) = machine_name_re.captures(&minion_name) {
59
- 1785
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
conjure_ast::Name::MachineName(caps[1].parse::<i32>().unwrap())
+
conjure_ast::Name::MachineName(caps[1].parse::<i32>().unwrap())
61
- 5700
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
conjure_ast::Name::UserName(minion_name)
+
conjure_ast::Name::UserName(minion_name)
64
- 7485
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
conjure_solutions.insert(conjure_name, conjure_const);
+
conjure_solutions.insert(conjure_name, conjure_const);
67
- 2145
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let continue_search = (**callback)(conjure_solutions);
+
let continue_search = (**callback)(conjure_solutions);
68
- 2145
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if !continue_search {
+
if !continue_search {
70
- 2145
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
72
- 2145
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
continue_search
+
continue_search
73
- 2145
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
78
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn new() -> Minion {
+
pub fn new() -> Minion {
79
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
80
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
__non_constructable: private::Internal,
+
__non_constructable: private::Internal,
81
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
model: None,
+
model: None,
82
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
83
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
94
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
95
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
&mut self,
+
&mut self,
96
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
callback: SolverCallback,
+
callback: SolverCallback,
97
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_: private::Internal,
+
_: private::Internal,
98
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
) -> Result<SolveSuccess, SolverError> {
+
) -> Result<SolveSuccess, SolverError> {
99
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
// our minion callback is global state, so single threading the adaptor as a whole is
+
// our minion callback is global state, so single threading the adaptor as a whole is
100
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
// probably a good move...
+
// probably a good move...
101
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
#[allow(clippy::unwrap_used)]
+
#[allow(clippy::unwrap_used)]
102
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut minion_lock = MINION_LOCK.lock().unwrap();
+
let mut minion_lock = MINION_LOCK.lock().unwrap();
103
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
104
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
#[allow(clippy::unwrap_used)]
+
#[allow(clippy::unwrap_used)]
105
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut user_callback = USER_CALLBACK
+
let mut user_callback = USER_CALLBACK
106
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.get_or_init(|| Mutex::new(Box::new(|x| true)))
+
.get_or_init(|| Mutex::new(Box::new(|x| true)))
107
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
108
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.unwrap();
+
.unwrap();
109
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
*user_callback = callback;
+
*user_callback = callback;
110
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
drop(user_callback); // release mutex. REQUIRED so that run_minion can use the
+
drop(user_callback); // release mutex. REQUIRED so that run_minion can use the
111
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
// user callback and not deadlock.
+
// user callback and not deadlock.
112
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
113
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
run_minion(
+
run_minion(
114
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
self.model.clone().expect("STATE MACHINE ERR"),
+
self.model.clone().expect("STATE MACHINE ERR"),
115
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
minion_rs_callback,
+
minion_rs_callback,
116
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
117
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.map_err(|err| match err {
+
.map_err(|err| match err {
122
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
124
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut status = Complete(HasSolutions);
+
let mut status = Complete(HasSolutions);
125
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if *(USER_TERMINATED.lock()).unwrap() {
+
if *(USER_TERMINATED.lock()).unwrap() {
127
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
} else if *(ANY_SOLUTIONS.lock()).unwrap() {
+
} else if *(ANY_SOLUTIONS.lock()).unwrap() {
128
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
status = Complete(NoSolutions);
+
status = Complete(NoSolutions);
129
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
130
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok(SolveSuccess {
+
Ok(SolveSuccess {
131
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
stats: get_solver_stats(),
+
stats: get_solver_stats(),
132
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
133
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
134
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
144
- 375
-
-
+
+
+
-
fn load_model(&mut self, model: ConjureModel, _: private::Internal) -> Result<(), SolverError> {
+
fn load_model(&mut self, model: ConjureModel, _: private::Internal) -> Result<(), SolverError> {
145
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut minion_model = MinionModel::new();
+
let mut minion_model = MinionModel::new();
146
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
parse_vars(&model, &mut minion_model)?;
+
parse_vars(&model, &mut minion_model)?;
147
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
parse_exprs(&model, &mut minion_model)?;
+
parse_exprs(&model, &mut minion_model)?;
148
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
self.model = Some(minion_model);
+
self.model = Some(minion_model);
149
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
150
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
152
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn get_family(&self) -> SolverFamily {
+
fn get_family(&self) -> SolverFamily {
153
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
SolverFamily::Minion
+
SolverFamily::Minion
154
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
156
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn get_name(&self) -> Option<String> {
+
fn get_name(&self) -> Option<String> {
157
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Some("Minion".to_owned())
+
Some("Minion".to_owned())
158
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
161
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn parse_vars(
+
fn parse_vars(
162
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
conjure_model: &ConjureModel,
+
conjure_model: &ConjureModel,
163
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
minion_model: &mut MinionModel,
+
minion_model: &mut MinionModel,
164
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
) -> Result<(), SolverError> {
+
) -> Result<(), SolverError> {
168
- 1035
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
for (name, variable) in conjure_model.variables.iter() {
+
for (name, variable) in conjure_model.variables.iter() {
169
- 1035
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
parse_var(name, variable, minion_model)?;
+
parse_var(name, variable, minion_model)?;
171
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
172
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
174
- 1035
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn parse_var(
+
fn parse_var(
175
- 1035
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
name: &conjure_ast::Name,
+
name: &conjure_ast::Name,
176
- 1035
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
var: &conjure_ast::DecisionVariable,
+
var: &conjure_ast::DecisionVariable,
177
- 1035
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
minion_model: &mut MinionModel,
+
minion_model: &mut MinionModel,
178
- 1035
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
) -> Result<(), SolverError> {
+
) -> Result<(), SolverError> {
179
- 1035
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match &var.domain {
+
match &var.domain {
180
- 930
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
conjure_ast::Domain::IntDomain(ranges) => _parse_intdomain_var(name, ranges, minion_model),
+
conjure_ast::Domain::IntDomain(ranges) => _parse_intdomain_var(name, ranges, minion_model),
181
- 105
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
conjure_ast::Domain::BoolDomain => _parse_booldomain_var(name, minion_model),
+
conjure_ast::Domain::BoolDomain => _parse_booldomain_var(name, minion_model),
184
- 1035
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
186
- 930
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn _parse_intdomain_var(
+
fn _parse_intdomain_var(
187
- 930
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
name: &conjure_ast::Name,
+
name: &conjure_ast::Name,
188
- 930
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
ranges: &[conjure_ast::Range<i32>],
+
ranges: &[conjure_ast::Range<i32>],
189
- 930
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
minion_model: &mut MinionModel,
+
minion_model: &mut MinionModel,
190
- 930
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
) -> Result<(), SolverError> {
+
) -> Result<(), SolverError> {
191
- 930
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let str_name = _name_to_string(name.to_owned());
+
let str_name = _name_to_string(name.to_owned());
192
- 930
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
193
- 930
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
if ranges.len() != 1 {
+
if ranges.len() != 1 {
199
- 930
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
201
- 930
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let range = ranges.first().ok_or(ModelInvalid(format!(
+
let range = ranges.first().ok_or(ModelInvalid(format!(
202
- 930
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
"variable {:?} has no range",
+
"variable {:?} has no range",
203
- 930
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
204
- 930
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
206
- 930
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let (low, high) = match range {
+
let (low, high) = match range {
207
- 930
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
conjure_ast::Range::Bounded(x, y) => Ok((x.to_owned(), y.to_owned())),
+
conjure_ast::Range::Bounded(x, y) => Ok((x.to_owned(), y.to_owned())),
213
- 930
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_try_add_var(
+
_try_add_var(
214
- 930
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
str_name.to_owned(),
+
str_name.to_owned(),
215
- 930
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
minion_ast::VarDomain::Bound(low, high),
+
minion_ast::VarDomain::Bound(low, high),
216
- 930
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
minion_model,
+
minion_model,
217
- 930
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
218
- 930
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
220
- 105
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn _parse_booldomain_var(
+
fn _parse_booldomain_var(
221
- 105
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
name: &conjure_ast::Name,
+
name: &conjure_ast::Name,
222
- 105
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
minion_model: &mut MinionModel,
+
minion_model: &mut MinionModel,
223
- 105
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
) -> Result<(), SolverError> {
+
) -> Result<(), SolverError> {
224
- 105
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let str_name = _name_to_string(name.to_owned());
+
let str_name = _name_to_string(name.to_owned());
225
- 105
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_try_add_var(
+
_try_add_var(
226
- 105
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
str_name.to_owned(),
+
str_name.to_owned(),
227
- 105
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
minion_ast::VarDomain::Bool,
+
minion_ast::VarDomain::Bool,
228
- 105
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
minion_model,
+
minion_model,
229
- 105
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
230
- 105
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
232
- 1035
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn _try_add_var(
+
fn _try_add_var(
233
- 1035
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
name: minion_ast::VarName,
+
name: minion_ast::VarName,
234
- 1035
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
domain: minion_ast::VarDomain,
+
domain: minion_ast::VarDomain,
235
- 1035
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
minion_model: &mut MinionModel,
+
minion_model: &mut MinionModel,
236
- 1035
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
) -> Result<(), SolverError> {
+
) -> Result<(), SolverError> {
237
- 1035
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
minion_model
+
minion_model
238
- 1035
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.named_variables
+
.named_variables
239
- 1035
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.add_var(name.clone(), domain)
+
.add_var(name.clone(), domain)
240
- 1035
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.ok_or(ModelInvalid(format!(
+
.ok_or(ModelInvalid(format!(
241
- 1035
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
"variable {:?} is defined twice",
+
"variable {:?} is defined twice",
242
- 1035
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
243
- 1035
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
244
- 1035
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
246
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn parse_exprs(
+
fn parse_exprs(
247
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
conjure_model: &ConjureModel,
+
conjure_model: &ConjureModel,
248
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
minion_model: &mut MinionModel,
+
minion_model: &mut MinionModel,
249
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
) -> Result<(), SolverError> {
+
) -> Result<(), SolverError> {
250
- 4230
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
for expr in conjure_model.get_constraints_vec().iter() {
+
for expr in conjure_model.get_constraints_vec().iter() {
251
- 4230
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
parse_expr(expr.to_owned(), minion_model)?;
+
parse_expr(expr.to_owned(), minion_model)?;
253
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
254
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
256
- 4230
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn parse_expr(
+
fn parse_expr(
257
- 4230
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
expr: conjure_ast::Expression,
+
expr: conjure_ast::Expression,
258
- 4230
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
minion_model: &mut MinionModel,
+
minion_model: &mut MinionModel,
259
- 4230
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
) -> Result<(), SolverError> {
+
) -> Result<(), SolverError> {
260
- 4230
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
minion_model.constraints.push(read_expr(expr)?);
+
minion_model.constraints.push(read_expr(expr)?);
261
- 4230
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
262
- 4230
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
264
- 17100
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn read_expr(expr: conjure_ast::Expression) -> Result<minion_ast::Constraint, SolverError> {
+
fn read_expr(expr: conjure_ast::Expression) -> Result<minion_ast::Constraint, SolverError> {
265
- 17100
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match expr {
+
match expr {
266
- 4305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
conjure_ast::Expression::SumLeq(_metadata, lhs, rhs) => Ok(minion_ast::Constraint::SumLeq(
+
conjure_ast::Expression::SumLeq(_metadata, lhs, rhs) => Ok(minion_ast::Constraint::SumLeq(
267
- 4305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
read_vars(lhs)?,
+
read_vars(lhs)?,
268
- 4305
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
read_var(*rhs)?,
+
read_var(*rhs)?,
270
- 4290
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
conjure_ast::Expression::SumGeq(_metadata, lhs, rhs) => Ok(minion_ast::Constraint::SumGeq(
+
conjure_ast::Expression::SumGeq(_metadata, lhs, rhs) => Ok(minion_ast::Constraint::SumGeq(
271
- 4290
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
read_vars(lhs)?,
+
read_vars(lhs)?,
272
- 4290
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
read_var(*rhs)?,
+
read_var(*rhs)?,
274
- 4545
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
conjure_ast::Expression::Ineq(_metadata, a, b, c) => Ok(minion_ast::Constraint::Ineq(
+
conjure_ast::Expression::Ineq(_metadata, a, b, c) => Ok(minion_ast::Constraint::Ineq(
275
- 4545
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
read_var(*a)?,
+
read_var(*a)?,
276
- 4545
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
read_var(*b)?,
+
read_var(*b)?,
277
- 4545
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
minion_ast::Constant::Integer(read_const(*c)?),
+
minion_ast::Constant::Integer(read_const(*c)?),
279
- 105
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
conjure_ast::Expression::Neq(_metadata, a, b) => {
+
conjure_ast::Expression::Neq(_metadata, a, b) => {
280
- 105
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok(minion_ast::Constraint::DisEq(read_var(*a)?, read_var(*b)?))
+
Ok(minion_ast::Constraint::DisEq(read_var(*a)?, read_var(*b)?))
282
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
conjure_ast::Expression::DivEq(_metadata, a, b, c) => Ok(
+
conjure_ast::Expression::DivEq(_metadata, a, b, c) => Ok(
283
- 60
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
minion_ast::Constraint::DivUndefZero((read_var(*a)?, read_var(*b)?), read_var(*c)?),
+
minion_ast::Constraint::DivUndefZero((read_var(*a)?, read_var(*b)?), read_var(*c)?),
285
- 3600
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
conjure_ast::Expression::Or(_metadata, exprs) => Ok(minion_ast::Constraint::WatchedOr(
+
conjure_ast::Expression::Or(_metadata, exprs) => Ok(minion_ast::Constraint::WatchedOr(
286
- 3600
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
287
- 3600
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
288
- 12870
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.map(|x| read_expr(x.to_owned()))
+
.map(|x| read_expr(x.to_owned()))
289
- 3600
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.collect::<Result<Vec<minion_ast::Constraint>, SolverError>>()?,
+
.collect::<Result<Vec<minion_ast::Constraint>, SolverError>>()?,
291
- 195
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
conjure_ast::Expression::Eq(_metadata, a, b) => {
+
conjure_ast::Expression::Eq(_metadata, a, b) => {
292
- 195
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok(minion_ast::Constraint::Eq(read_var(*a)?, read_var(*b)?))
+
Ok(minion_ast::Constraint::Eq(read_var(*a)?, read_var(*b)?))
296
- 17100
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
297
- 8595
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn read_vars(exprs: Vec<conjure_ast::Expression>) -> Result<Vec<minion_ast::Var>, SolverError> {
+
fn read_vars(exprs: Vec<conjure_ast::Expression>) -> Result<Vec<minion_ast::Var>, SolverError> {
298
- 8595
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut minion_vars: Vec<minion_ast::Var> = vec![];
+
let mut minion_vars: Vec<minion_ast::Var> = vec![];
299
- 34380
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
for expr in exprs {
+
for expr in exprs {
300
- 25785
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let minion_var = read_var(expr)?;
+
let minion_var = read_var(expr)?;
301
- 25785
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
minion_vars.push(minion_var);
+
minion_vars.push(minion_var);
303
- 8595
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok(minion_vars)
+
Ok(minion_vars)
304
- 8595
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
306
- 44250
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn read_var(e: conjure_ast::Expression) -> Result<minion_ast::Var, SolverError> {
+
fn read_var(e: conjure_ast::Expression) -> Result<minion_ast::Var, SolverError> {
307
- 44250
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
// a minion var is either a reference or a "var as const"
+
// a minion var is either a reference or a "var as const"
308
- 44250
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match _read_ref(e.clone()) {
+
match _read_ref(e.clone()) {
309
- 35460
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok(name) => Ok(minion_ast::Var::NameRef(name)),
+
Ok(name) => Ok(minion_ast::Var::NameRef(name)),
310
- 8790
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Err(_) => match read_const(e) {
+
Err(_) => match read_const(e) {
311
- 8790
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok(n) => Ok(minion_ast::Var::ConstantAsVar(n)),
+
Ok(n) => Ok(minion_ast::Var::ConstantAsVar(n)),
315
- 44250
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
317
- 44250
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn _read_ref(e: conjure_ast::Expression) -> Result<String, SolverError> {
+
fn _read_ref(e: conjure_ast::Expression) -> Result<String, SolverError> {
318
- 44250
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let name = match e {
+
let name = match e {
319
- 35460
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
conjure_ast::Expression::Reference(_metadata, n) => Ok(n),
+
conjure_ast::Expression::Reference(_metadata, n) => Ok(n),
320
- 8790
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
x => Err(ModelInvalid(format!(
+
x => Err(ModelInvalid(format!(
321
- 8790
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
"expected a reference, but got `{0:?}`",
+
"expected a reference, but got `{0:?}`",
322
- 8790
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
323
- 8790
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
324
- 8790
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
326
- 35460
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let str_name = _name_to_string(name);
+
let str_name = _name_to_string(name);
327
- 35460
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok(str_name)
+
Ok(str_name)
328
- 44250
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
330
- 13335
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn read_const(e: conjure_ast::Expression) -> Result<i32, SolverError> {
+
fn read_const(e: conjure_ast::Expression) -> Result<i32, SolverError> {
331
- 13335
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
332
- 13335
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
conjure_ast::Expression::Constant(_, conjure_ast::Constant::Int(n)) => Ok(n),
+
conjure_ast::Expression::Constant(_, conjure_ast::Constant::Int(n)) => Ok(n),
338
- 13335
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
340
- 36495
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn _name_to_string(name: conjure_ast::Name) -> String {
+
fn _name_to_string(name: conjure_ast::Name) -> String {
341
- 36495
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match name {
+
match name {
342
- 35865
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
conjure_ast::Name::UserName(x) => x,
+
conjure_ast::Name::UserName(x) => x,
343
- 630
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
conjure_ast::Name::MachineName(x) => format!("__conjure_machine_name_{}", x),
+
conjure_ast::Name::MachineName(x) => format!("__conjure_machine_name_{}", x),
345
- 36495
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
348
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn get_solver_stats() -> SolverStats {
+
fn get_solver_stats() -> SolverStats {
349
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
SolverStats {
+
SolverStats {
350
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
nodes: get_from_table("Nodes".into()).map(|x| x.parse::<u64>().unwrap()),
+
nodes: get_from_table("Nodes".into()).map(|x| x.parse::<u64>().unwrap()),
351
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
..Default::default()
+
..Default::default()
352
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
353
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
diff --git a/coverage/main/crates/conjure_core/src/solver/adaptors/sat_common.rs.html b/coverage/main/crates/conjure_core/src/solver/adaptors/sat_common.rs.html
index a23f52df25..e3546e3a06 100644
--- a/coverage/main/crates/conjure_core/src/solver/adaptors/sat_common.rs.html
+++ b/coverage/main/crates/conjure_core/src/solver/adaptors/sat_common.rs.html
@@ -23,7 +23,7 @@
@@ -5218,7 +5218,7 @@
diff --git a/coverage/main/crates/conjure_core/src/solver/index.html b/coverage/main/crates/conjure_core/src/solver/index.html
index 2a61f90358..956bcd01f0 100644
--- a/coverage/main/crates/conjure_core/src/solver/index.html
+++ b/coverage/main/crates/conjure_core/src/solver/index.html
@@ -15,7 +15,7 @@
@@ -23,7 +23,7 @@
@@ -46,20 +46,20 @@
- 71.34%
+ 0%
- 71.34%
+ 0%
- 112 / 157
+ 0 / 114
-
13.04%
-
15 / 115
+
0%
+
0 / 69
@@ -83,7 +83,7 @@
0%
-
0 / 6
+
0 / 4
@@ -91,7 +91,7 @@
diff --git a/coverage/main/crates/conjure_core/src/solver/mod.rs.html b/coverage/main/crates/conjure_core/src/solver/mod.rs.html
index 9f9c8fcddf..3842b154ae 100644
--- a/coverage/main/crates/conjure_core/src/solver/mod.rs.html
+++ b/coverage/main/crates/conjure_core/src/solver/mod.rs.html
@@ -15,7 +15,7 @@
@@ -23,7 +23,7 @@
Functions
- 13.04 %
+
0 %
@@ -422,13 +422,13 @@
25
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
//! use std::sync::{Arc,Mutex};
+
//! use std::sync::{Arc,Mutex};
26
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
//! use conjure_core::parse::get_example_model;
+
//! use conjure_core::parse::get_example_model;
27
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
//! use conjure_core::rule_engine::resolve_rule_sets;
+
//! use conjure_core::rule_engine::resolve_rule_sets;
28
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
//! use conjure_core::rule_engine::rewrite_model;
+
//! use conjure_core::rule_engine::rewrite_model;
29
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
//! use conjure_core::solver::{adaptors, Solver, SolverAdaptor};
+
//! use conjure_core::solver::{adaptors, Solver, SolverAdaptor};
30
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
//! use conjure_core::solver::states::ModelLoaded;
+
//! use conjure_core::solver::states::ModelLoaded;
31
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
//! use conjure_core::solver::SolverFamily;
+
//! use conjure_core::solver::SolverFamily;
32
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
33
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
//! // Define and rewrite a model for minion.
+
//! // Define and rewrite a model for minion.
34
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
//! let model = get_example_model("bool-03").unwrap();
+
//! let model = get_example_model("bool-03").unwrap();
35
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
//! let rule_sets = resolve_rule_sets(SolverFamily::Minion, &vec!["Constant".to_string()]).unwrap();
+
//! let rule_sets = resolve_rule_sets(SolverFamily::Minion, &vec!["Constant".to_string()]).unwrap();
36
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
//! let model = rewrite_model(&model,&rule_sets).unwrap();
+
//! let model = rewrite_model(&model,&rule_sets).unwrap();
37
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
38
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
39
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
//! // Solve using Minion.
+
//! // Solve using Minion.
40
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
//! let solver = Solver::new(adaptors::Minion::new());
+
//! let solver = Solver::new(adaptors::Minion::new());
41
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
//! let solver: Solver<adaptors::Minion,ModelLoaded> = solver.load_model(model).unwrap();
+
//! let solver: Solver<adaptors::Minion,ModelLoaded> = solver.load_model(model).unwrap();
42
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
43
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
//! // In this example, we will count solutions.
+
//! // In this example, we will count solutions.
44
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
45
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
//! // The solver interface is designed to allow adaptors to use multiple-threads / processes if
+
//! // The solver interface is designed to allow adaptors to use multiple-threads / processes if
46
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
//! // necessary. Therefore, the callback type requires all variables inside it to have a static
+
//! // necessary. Therefore, the callback type requires all variables inside it to have a static
47
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
//! // lifetime and to implement Send (i.e. the variable can be safely shared between theads).
+
//! // lifetime and to implement Send (i.e. the variable can be safely shared between theads).
48
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
49
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
//! // We use Arc<Mutex<T>> to create multiple references to a threadsafe mutable
+
//! // We use Arc<Mutex<T>> to create multiple references to a threadsafe mutable
50
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
//! // variable of type T.
+
//! // variable of type T.
51
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
52
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
//! // Using the move |x| ... closure syntax, we move one of these references into the closure.
+
//! // Using the move |x| ... closure syntax, we move one of these references into the closure.
53
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
//! // Note that a normal closure borrow variables from the parent so is not
+
//! // Note that a normal closure borrow variables from the parent so is not
54
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
//! // thread-safe.
+
//! // thread-safe.
55
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
56
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
//! let counter_ref = Arc::new(Mutex::new(0));
+
//! let counter_ref = Arc::new(Mutex::new(0));
57
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
//! let counter_ref_2 = counter_ref.clone();
+
//! let counter_ref_2 = counter_ref.clone();
58
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
//! solver.solve(Box::new(move |_| {
+
//! solver.solve(Box::new(move |_| {
59
- 2
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
//! let mut counter = (*counter_ref_2).lock().unwrap();
+
//! let mut counter = (*counter_ref_2).lock().unwrap();
60
- 2
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
//! *counter += 1;
+
//! *counter += 1;
61
- 2
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
62
- 2
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
63
- 2
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
64
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
//! let mut counter = (*counter_ref).lock().unwrap();
+
//! let mut counter = (*counter_ref).lock().unwrap();
65
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
//! assert_eq!(*counter,2);
+
//! assert_eq!(*counter,2);
66
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
67
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
215
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn init_solver(&mut self, _: private::Internal) {}
+
fn init_solver(&mut self, _: private::Internal) {}
226
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn add_adaptor_info_to_stats(&self, stats: SolverStats) -> SolverStats {
+
fn add_adaptor_info_to_stats(&self, stats: SolverStats) -> SolverStats {
227
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
SolverStats {
+
SolverStats {
228
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
solver_adaptor: self.get_name(),
+
solver_adaptor: self.get_name(),
229
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
solver_family: Some(self.get_family()),
+
solver_family: Some(self.get_family()),
230
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
231
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
232
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
256
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn new(solver_adaptor: Adaptor) -> Solver<Adaptor> {
+
pub fn new(solver_adaptor: Adaptor) -> Solver<Adaptor> {
257
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut solver = Solver {
+
let mut solver = Solver {
258
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
state: Init,
+
state: Init,
259
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
adaptor: solver_adaptor,
+
adaptor: solver_adaptor,
260
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
context: None,
+
context: None,
261
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
262
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
263
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
solver.adaptor.init_solver(private::Internal);
+
solver.adaptor.init_solver(private::Internal);
264
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
265
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
273
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn load_model(mut self, model: Model) -> Result<Solver<A, ModelLoaded>, SolverError> {
+
pub fn load_model(mut self, model: Model) -> Result<Solver<A, ModelLoaded>, SolverError> {
274
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let solver_model = &mut self.adaptor.load_model(model.clone(), private::Internal)?;
+
let solver_model = &mut self.adaptor.load_model(model.clone(), private::Internal)?;
275
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok(Solver {
+
Ok(Solver {
276
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
state: ModelLoaded,
+
state: ModelLoaded,
277
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
adaptor: self.adaptor,
+
adaptor: self.adaptor,
278
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
context: Some(model.context.clone()),
+
context: Some(model.context.clone()),
279
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
280
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
284
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn solve(
+
pub fn solve(
285
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
286
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
callback: SolverCallback,
+
callback: SolverCallback,
287
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
) -> Result<Solver<A, ExecutionSuccess>, SolverError> {
+
) -> Result<Solver<A, ExecutionSuccess>, SolverError> {
288
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
#[allow(clippy::unwrap_used)]
+
#[allow(clippy::unwrap_used)]
289
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let start_time = Instant::now();
+
let start_time = Instant::now();
290
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
291
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
#[allow(clippy::unwrap_used)]
+
#[allow(clippy::unwrap_used)]
292
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let result = self.adaptor.solve(callback, private::Internal);
+
let result = self.adaptor.solve(callback, private::Internal);
293
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
294
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let duration = start_time.elapsed();
+
let duration = start_time.elapsed();
295
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
296
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
match result {
+
match result {
297
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok(x) => {
+
Ok(x) => {
298
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let stats = self
+
let stats = self
299
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
300
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.add_adaptor_info_to_stats(x.stats)
+
.add_adaptor_info_to_stats(x.stats)
301
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.with_timings(duration.as_secs_f64());
+
.with_timings(duration.as_secs_f64());
302
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
303
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
Ok(Solver {
+
Ok(Solver {
304
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
adaptor: self.adaptor,
+
adaptor: self.adaptor,
305
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
state: ExecutionSuccess {
+
state: ExecutionSuccess {
306
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
307
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
status: x.status,
+
status: x.status,
308
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
_sealed: private::Internal,
+
_sealed: private::Internal,
309
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
310
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
context: self.context,
+
context: self.context,
311
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
315
- 121
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
352
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn stats(&self) -> SolverStats {
+
pub fn stats(&self) -> SolverStats {
353
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
self.state.stats.clone()
+
self.state.stats.clone()
354
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
357
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn save_stats_to_context(&self) {
+
pub fn save_stats_to_context(&self) {
358
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
#[allow(clippy::unwrap_used)]
+
#[allow(clippy::unwrap_used)]
359
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
#[allow(clippy::expect_used)]
+
#[allow(clippy::expect_used)]
360
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
self.context
+
self.context
361
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
362
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.expect("")
+
.expect("")
363
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
364
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
365
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
366
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.add_solver_run(self.stats());
+
.add_solver_run(self.stats());
367
- 70
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
diff --git a/coverage/main/crates/conjure_core/src/solver/model_modifier.rs.html b/coverage/main/crates/conjure_core/src/solver/model_modifier.rs.html
index 567eef96f4..fc2f23ae38 100644
--- a/coverage/main/crates/conjure_core/src/solver/model_modifier.rs.html
+++ b/coverage/main/crates/conjure_core/src/solver/model_modifier.rs.html
@@ -23,7 +23,7 @@
@@ -898,7 +898,7 @@
diff --git a/coverage/main/crates/conjure_core/src/stats/index.html b/coverage/main/crates/conjure_core/src/stats/index.html
index 88916ea472..c91b6f41ab 100644
--- a/coverage/main/crates/conjure_core/src/stats/index.html
+++ b/coverage/main/crates/conjure_core/src/stats/index.html
@@ -14,8 +14,8 @@
@@ -23,7 +23,7 @@
@@ -46,20 +46,20 @@
- 66.67%
+ 0%
- 66.67%
+ 0%
- 6 / 9
+ 0 / 9
-
22.22%
-
2 / 9
+
0%
+
0 / 6
@@ -69,21 +69,21 @@
- 100%
+ 0%
-
- 100%
+
+ 0%
-
- 6 / 6
+
+ 0 / 6
-
33.33%
-
1 / 3
+
0%
+
0 / 2
@@ -91,7 +91,7 @@
diff --git a/coverage/main/crates/conjure_core/src/stats/mod.rs.html b/coverage/main/crates/conjure_core/src/stats/mod.rs.html
index 5b8c3e188a..c41619fa36 100644
--- a/coverage/main/crates/conjure_core/src/stats/mod.rs.html
+++ b/coverage/main/crates/conjure_core/src/stats/mod.rs.html
@@ -15,7 +15,7 @@
@@ -23,7 +23,7 @@
Functions
- 22.22 %
+
0 %
@@ -406,13 +406,13 @@
24
- 210
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn add_solver_run(&mut self, solver_stats: SolverStats) {
+
pub fn add_solver_run(&mut self, solver_stats: SolverStats) {
25
- 210
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
self.solver_runs.push(solver_stats);
+
self.solver_runs.push(solver_stats);
26
- 210
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
28
- 360
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn add_rewriter_run(&mut self, rewriter_stats: RewriterStats) {
+
pub fn add_rewriter_run(&mut self, rewriter_stats: RewriterStats) {
29
- 360
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
self.rewriter_runs.push(rewriter_stats);
+
self.rewriter_runs.push(rewriter_stats);
30
- 360
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
diff --git a/coverage/main/crates/conjure_core/src/stats/solver_stats.rs.html b/coverage/main/crates/conjure_core/src/stats/solver_stats.rs.html
index ba4ffd61d4..09cb9cce7a 100644
--- a/coverage/main/crates/conjure_core/src/stats/solver_stats.rs.html
+++ b/coverage/main/crates/conjure_core/src/stats/solver_stats.rs.html
@@ -14,8 +14,8 @@
@@ -23,7 +23,7 @@
Functions
- 33.33 %
+
0 %
@@ -550,13 +550,13 @@
33
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
pub fn with_timings(self, wall_time_s: f64) -> SolverStats {
+
pub fn with_timings(self, wall_time_s: f64) -> SolverStats {
34
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
SolverStats {
+
SolverStats {
35
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
conjure_solver_wall_time_s: wall_time_s,
+
conjure_solver_wall_time_s: wall_time_s,
36
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
..self.clone()
+
..self.clone()
37
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
38
- 375
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
diff --git a/coverage/main/crates/conjure_macros/src/index.html b/coverage/main/crates/conjure_macros/src/index.html
index f4599f66c6..f5d9efc90c 100644
--- a/coverage/main/crates/conjure_macros/src/index.html
+++ b/coverage/main/crates/conjure_macros/src/index.html
@@ -15,7 +15,7 @@
Lines
- 94.96 %
+
92.92 %
@@ -23,7 +23,7 @@
Functions
- 55.88 %
+
51.61 %
@@ -46,20 +46,20 @@
- 94.96%
+ 92.92%
- 94.96%
+ 92.92%
- 113 / 119
+ 105 / 113
-
55.88%
-
19 / 34
+
51.61%
+
16 / 31
@@ -67,7 +67,7 @@
diff --git a/coverage/main/crates/conjure_macros/src/lib.rs.html b/coverage/main/crates/conjure_macros/src/lib.rs.html
index 49ca02f62b..f446e0d77a 100644
--- a/coverage/main/crates/conjure_macros/src/lib.rs.html
+++ b/coverage/main/crates/conjure_macros/src/lib.rs.html
@@ -15,7 +15,7 @@
Lines
- 94.96 %
+
92.92 %
@@ -23,7 +23,7 @@
Functions
- 55.88 %
+
51.61 %
@@ -327,8 +327,8 @@
- 199
+ role="cell" aria-label="165">
+ 165
@@ -343,8 +343,8 @@
- 199
+ role="cell" aria-label="165">
+ 165
@@ -359,8 +359,8 @@
- 199
+ role="cell" aria-label="165">
+ 165
@@ -375,8 +375,8 @@
- 199
+ role="cell" aria-label="165">
+ 165
@@ -391,8 +391,8 @@
- 199
+ role="cell" aria-label="165">
+ 165
@@ -407,8 +407,8 @@
- 199
+ role="cell" aria-label="165">
+ 165
@@ -423,8 +423,8 @@
- 199
+ role="cell" aria-label="165">
+ 165
@@ -439,8 +439,8 @@
- 199
+ role="cell" aria-label="165">
+ 165
@@ -583,8 +583,8 @@
- 201
+ role="cell" aria-label="165">
+ 165
@@ -599,8 +599,8 @@
- 201
+ role="cell" aria-label="165">
+ 165
@@ -615,8 +615,8 @@
- 201
+ role="cell" aria-label="165">
+ 165
@@ -631,8 +631,8 @@
- 201
+ role="cell" aria-label="165">
+ 165
@@ -647,8 +647,8 @@
- 201
+ role="cell" aria-label="165">
+ 165
@@ -663,8 +663,8 @@
- 201
+ role="cell" aria-label="165">
+ 165
@@ -775,8 +775,8 @@
- 201
+ role="cell" aria-label="165">
+ 165
@@ -791,8 +791,8 @@
- 201
+ role="cell" aria-label="165">
+ 165
@@ -807,8 +807,8 @@
- 201
+ role="cell" aria-label="165">
+ 165
@@ -823,8 +823,8 @@
- 201
+ role="cell" aria-label="165">
+ 165
@@ -839,8 +839,8 @@
- 201
+ role="cell" aria-label="165">
+ 165
@@ -871,8 +871,8 @@
- 201
+ role="cell" aria-label="165">
+ 165
@@ -887,8 +887,8 @@
- 201
+ role="cell" aria-label="165">
+ 165
@@ -903,8 +903,8 @@
- 201
+ role="cell" aria-label="165">
+ 165
@@ -919,8 +919,8 @@
- 201
+ role="cell" aria-label="165">
+ 165
@@ -935,8 +935,8 @@
- 201
+ role="cell" aria-label="165">
+ 165
@@ -951,8 +951,8 @@
- 199
+ role="cell" aria-label="165">
+ 165
@@ -967,8 +967,8 @@
- 199
+ role="cell" aria-label="165">
+ 165
@@ -983,8 +983,8 @@
- 199
+ role="cell" aria-label="165">
+ 165
@@ -999,8 +999,8 @@
- 199
+ role="cell" aria-label="165">
+ 165
@@ -1015,8 +1015,8 @@
- 199
+ role="cell" aria-label="165">
+ 165
@@ -1031,8 +1031,8 @@
- 201
+ role="cell" aria-label="165">
+ 165
@@ -1047,8 +1047,8 @@
- 201
+ role="cell" aria-label="165">
+ 165
@@ -1079,8 +1079,8 @@
- 201
+ role="cell" aria-label="165">
+ 165
@@ -1095,8 +1095,8 @@
- 201
+ role="cell" aria-label="165">
+ 165
@@ -1111,8 +1111,8 @@
- 201
+ role="cell" aria-label="165">
+ 165
@@ -1127,8 +1127,8 @@
- 201
+ role="cell" aria-label="165">
+ 165
@@ -1143,8 +1143,8 @@
- 201
+ role="cell" aria-label="165">
+ 165
@@ -1159,8 +1159,8 @@
- 201
+ role="cell" aria-label="165">
+ 165
@@ -1175,8 +1175,8 @@
- 201
+ role="cell" aria-label="165">
+ 165
@@ -1191,8 +1191,8 @@
- 201
+ role="cell" aria-label="165">
+ 165
@@ -1207,8 +1207,8 @@
- 201
+ role="cell" aria-label="165">
+ 165
@@ -1223,8 +1223,8 @@
- 201
+ role="cell" aria-label="165">
+ 165
@@ -1239,8 +1239,8 @@
- 201
+ role="cell" aria-label="165">
+ 165
@@ -1255,8 +1255,8 @@
- 201
+ role="cell" aria-label="165">
+ 165
@@ -1287,8 +1287,8 @@
- 201
+ role="cell" aria-label="165">
+ 165
@@ -1303,8 +1303,8 @@
- 201
+ role="cell" aria-label="165">
+ 165
@@ -1335,8 +1335,8 @@
- 46
+ role="cell" aria-label="35">
+ 35
@@ -1351,8 +1351,8 @@
- 46
+ role="cell" aria-label="35">
+ 35
@@ -1367,8 +1367,8 @@
- 46
+ role="cell" aria-label="35">
+ 35
@@ -1399,8 +1399,8 @@
- 46
+ role="cell" aria-label="35">
+ 35
@@ -1415,8 +1415,8 @@
- 48
+ role="cell" aria-label="35">
+ 35
@@ -1431,8 +1431,8 @@
- 35
+ role="cell" aria-label="25">
+ 25
@@ -1447,8 +1447,8 @@
- 35
+ role="cell" aria-label="25">
+ 25
@@ -1463,8 +1463,8 @@
- 35
+ role="cell" aria-label="25">
+ 25
@@ -1479,8 +1479,8 @@
- 33
+ role="cell" aria-label="25">
+ 25
@@ -1494,13 +1494,13 @@
92
- 2
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
93
- 2
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
content.parse::<Comma>()?;
+
content.parse::<Comma>()?;
- 46
+ role="cell" aria-label="35">
+ 35
@@ -1575,8 +1575,8 @@
- 46
+ role="cell" aria-label="35">
+ 35
@@ -1735,8 +1735,8 @@
- 34
+ role="cell" aria-label="25">
+ 25
@@ -1751,8 +1751,8 @@
- 34
+ role="cell" aria-label="25">
+ 25
@@ -1767,8 +1767,8 @@
- 34
+ role="cell" aria-label="25">
+ 25
@@ -1783,8 +1783,8 @@
- 34
+ role="cell" aria-label="25">
+ 25
@@ -1815,8 +1815,8 @@
- 34
+ role="cell" aria-label="25">
+ 25
@@ -1927,8 +1927,8 @@
- 34
+ role="cell" aria-label="25">
+ 25
@@ -1943,8 +1943,8 @@
- 34
+ role="cell" aria-label="25">
+ 25
@@ -1959,8 +1959,8 @@
- 34
+ role="cell" aria-label="25">
+ 25
@@ -1975,8 +1975,8 @@
- 34
+ role="cell" aria-label="25">
+ 25
@@ -2007,8 +2007,8 @@
- 34
+ role="cell" aria-label="25">
+ 25
@@ -2023,8 +2023,8 @@
- 22
+ role="cell" aria-label="15">
+ 15
@@ -2039,8 +2039,8 @@
- 22
+ role="cell" aria-label="15">
+ 15
@@ -2055,8 +2055,8 @@
- 22
+ role="cell" aria-label="15">
+ 15
@@ -2071,8 +2071,8 @@
- 22
+ role="cell" aria-label="15">
+ 15
@@ -2087,8 +2087,8 @@
- 22
+ role="cell" aria-label="15">
+ 15
@@ -2103,8 +2103,8 @@
- 22
+ role="cell" aria-label="15">
+ 15
@@ -2119,8 +2119,8 @@
- 12
+ role="cell" aria-label="10">
+ 10
@@ -2135,8 +2135,8 @@
- 12
+ role="cell" aria-label="10">
+ 10
@@ -2151,8 +2151,8 @@
- 12
+ role="cell" aria-label="10">
+ 10
@@ -2167,8 +2167,8 @@
- 12
+ role="cell" aria-label="10">
+ 10
@@ -2199,8 +2199,8 @@
- 12
+ role="cell" aria-label="10">
+ 10
@@ -2215,8 +2215,8 @@
- 12
+ role="cell" aria-label="10">
+ 10
@@ -2231,8 +2231,8 @@
- 12
+ role="cell" aria-label="10">
+ 10
@@ -2247,8 +2247,8 @@
- 12
+ role="cell" aria-label="10">
+ 10
@@ -2263,8 +2263,8 @@
- 12
+ role="cell" aria-label="10">
+ 10
@@ -2279,8 +2279,8 @@
- 12
+ role="cell" aria-label="10">
+ 10
@@ -2295,8 +2295,8 @@
- 34
+ role="cell" aria-label="25">
+ 25
@@ -2390,13 +2390,13 @@
148
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
* # Example
+
* # Example
149
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
150
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
* use conjure_macros::register_rule_set;
+
* use conjure_macros::register_rule_set;
151
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
* register_rule_set!("MyRuleSet", 10, ("DependencyRuleSet", "AnotherRuleSet"));
+
* register_rule_set!("MyRuleSet", 10, ("DependencyRuleSet", "AnotherRuleSet"));
152
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
153
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
- 34
+ role="cell" aria-label="25">
+ 25
@@ -2535,8 +2535,8 @@
- 34
+ role="cell" aria-label="25">
+ 25
@@ -2551,8 +2551,8 @@
- 34
+ role="cell" aria-label="25">
+ 25
@@ -2567,8 +2567,8 @@
- 34
+ role="cell" aria-label="25">
+ 25
@@ -2583,8 +2583,8 @@
- 34
+ role="cell" aria-label="25">
+ 25
@@ -2599,8 +2599,8 @@
- 34
+ role="cell" aria-label="25">
+ 25
@@ -2631,8 +2631,8 @@
- 34
+ role="cell" aria-label="25">
+ 25
@@ -2647,8 +2647,8 @@
- 34
+ role="cell" aria-label="25">
+ 25
@@ -2679,8 +2679,8 @@
- 34
+ role="cell" aria-label="25">
+ 25
@@ -2695,8 +2695,8 @@
- 34
+ role="cell" aria-label="25">
+ 25
@@ -2711,8 +2711,8 @@
- 34
+ role="cell" aria-label="25">
+ 25
@@ -2743,8 +2743,8 @@
- 34
+ role="cell" aria-label="25">
+ 25
@@ -2759,8 +2759,8 @@
- 34
+ role="cell" aria-label="25">
+ 25
@@ -2775,8 +2775,8 @@
- 34
+ role="cell" aria-label="25">
+ 25
@@ -2807,8 +2807,8 @@
- 34
+ role="cell" aria-label="25">
+ 25
@@ -2823,8 +2823,8 @@
- 34
+ role="cell" aria-label="25">
+ 25
@@ -2839,8 +2839,8 @@
- 34
+ role="cell" aria-label="25">
+ 25
@@ -2855,8 +2855,8 @@
- 34
+ role="cell" aria-label="25">
+ 25
@@ -2871,8 +2871,8 @@
- 34
+ role="cell" aria-label="25">
+ 25
@@ -2887,8 +2887,8 @@
- 34
+ role="cell" aria-label="25">
+ 25
@@ -2903,8 +2903,8 @@
- 34
+ role="cell" aria-label="25">
+ 25
@@ -2919,8 +2919,8 @@
- 34
+ role="cell" aria-label="25">
+ 25
@@ -2930,7 +2930,7 @@
diff --git a/coverage/main/crates/enum_compatability_macro/src/index.html b/coverage/main/crates/enum_compatability_macro/src/index.html
index 0f4a803c7b..73bd7a4e1b 100644
--- a/coverage/main/crates/enum_compatability_macro/src/index.html
+++ b/coverage/main/crates/enum_compatability_macro/src/index.html
@@ -15,7 +15,7 @@
@@ -23,7 +23,7 @@
@@ -55,11 +55,11 @@
100%
- 115 / 115
+ 77 / 77
-
60%
-
12 / 20
+
50%
+
8 / 16
@@ -67,7 +67,7 @@
diff --git a/coverage/main/crates/enum_compatability_macro/src/lib.rs.html b/coverage/main/crates/enum_compatability_macro/src/lib.rs.html
index 605985ae46..d78040e8fb 100644
--- a/coverage/main/crates/enum_compatability_macro/src/lib.rs.html
+++ b/coverage/main/crates/enum_compatability_macro/src/lib.rs.html
@@ -15,7 +15,7 @@
@@ -23,7 +23,7 @@
@@ -631,8 +631,8 @@
- 144
+ role="cell" aria-label="115">
+ 115
@@ -647,8 +647,8 @@
- 144
+ role="cell" aria-label="115">
+ 115
@@ -663,8 +663,8 @@
- 144
+ role="cell" aria-label="115">
+ 115
@@ -679,8 +679,8 @@
- 144
+ role="cell" aria-label="115">
+ 115
@@ -695,8 +695,8 @@
- 144
+ role="cell" aria-label="115">
+ 115
@@ -711,8 +711,8 @@
- 144
+ role="cell" aria-label="115">
+ 115
@@ -727,8 +727,8 @@
- 144
+ role="cell" aria-label="115">
+ 115
@@ -743,8 +743,8 @@
- 152
+ role="cell" aria-label="120">
+ 120
@@ -759,8 +759,8 @@
- 152
+ role="cell" aria-label="120">
+ 120
@@ -775,8 +775,8 @@
- 30
+ role="cell" aria-label="25">
+ 25
@@ -791,8 +791,8 @@
- 122
+ role="cell" aria-label="95">
+ 95
@@ -807,8 +807,8 @@
- 122
+ role="cell" aria-label="95">
+ 95
@@ -823,8 +823,8 @@
- 122
+ role="cell" aria-label="95">
+ 95
@@ -839,8 +839,8 @@
- 122
+ role="cell" aria-label="95">
+ 95
@@ -855,8 +855,8 @@
- 287
+ role="cell" aria-label="225">
+ 225
@@ -871,8 +871,8 @@
- 165
+ role="cell" aria-label="130">
+ 130
@@ -887,8 +887,8 @@
- 165
+ role="cell" aria-label="130">
+ 130
@@ -903,8 +903,8 @@
- 165
+ role="cell" aria-label="130">
+ 130
@@ -919,8 +919,8 @@
- 165
+ role="cell" aria-label="130">
+ 130
@@ -967,8 +967,8 @@
- 144
+ role="cell" aria-label="115">
+ 115
@@ -983,8 +983,8 @@
- 120
+ role="cell" aria-label="95">
+ 95
@@ -999,8 +999,8 @@
- 120
+ role="cell" aria-label="95">
+ 95
@@ -1015,8 +1015,8 @@
- 120
+ role="cell" aria-label="95">
+ 95
@@ -1031,8 +1031,8 @@
- 120
+ role="cell" aria-label="95">
+ 95
@@ -1047,8 +1047,8 @@
- 120
+ role="cell" aria-label="95">
+ 95
@@ -1079,8 +1079,8 @@
- 272
+ role="cell" aria-label="215">
+ 215
@@ -1095,8 +1095,8 @@
- 144
+ role="cell" aria-label="115">
+ 115
@@ -1222,13 +1222,13 @@
75
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
/// use enum_compatability_macro::document_compatibility;
+
/// use enum_compatability_macro::document_compatibility;
76
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
77
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
/// #[document_compatibility]
+
/// #[document_compatibility]
78
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
/// pub enum Expression {
+
/// pub enum Expression {
79
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
/// #[compatible(Minion)]
+
/// #[compatible(Minion)]
80
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
/// ConstantInt(i32),
+
/// ConstantInt(i32),
81
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
/// // ...
+
/// // ...
82
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
/// #[compatible(Chuffed)]
+
/// #[compatible(Chuffed)]
83
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
/// #[compatible(Minion)]
+
/// #[compatible(Minion)]
84
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
/// Sum(Vec<Expression>)
+
/// Sum(Vec<Expression>)
85
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
86
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
87
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
104
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
///# use enum_compatability_macro::document_compatibility;
+
///# use enum_compatability_macro::document_compatibility;
105
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
106
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
///# #[document_compatibility]
+
///# #[document_compatibility]
107
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
///# pub enum Expression {
+
///# pub enum Expression {
108
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
///# #[compatible(Minion)]
+
///# #[compatible(Minion)]
109
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
///# ConstantInt(i32),
+
///# ConstantInt(i32),
110
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
///# // ...
+
///# // ...
111
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
/// #[compatible(Chuffed)]
+
/// #[compatible(Chuffed)]
112
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
/// #[compatible(Minion)]
+
/// #[compatible(Minion)]
113
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
/// Sum(Vec<Expression>)
+
/// Sum(Vec<Expression>)
114
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
115
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
116
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
118
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
///# use enum_compatability_macro::document_compatibility;
+
///# use enum_compatability_macro::document_compatibility;
119
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
120
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
///# #[document_compatibility]
+
///# #[document_compatibility]
121
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
///# pub enum Expression {
+
///# pub enum Expression {
122
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
///# #[compatible(Minion)]
+
///# #[compatible(Minion)]
123
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
///# ConstantInt(i32),
+
///# ConstantInt(i32),
124
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
///# // ...
+
///# // ...
125
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
/// #[compatible(Minion,Chuffed)]
+
/// #[compatible(Minion,Chuffed)]
126
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
-
/// Sum(Vec<Expression>)
+
/// Sum(Vec<Expression>)
127
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
128
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
129
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-white has-background-white"
+ role="cell" aria-label="no coverage">
+
-
- 9
+ role="cell" aria-label="5">
+ 5
@@ -2151,8 +2151,8 @@
- 9
+ role="cell" aria-label="5">
+ 5
@@ -2167,8 +2167,8 @@
- 9
+ role="cell" aria-label="5">
+ 5
@@ -2215,8 +2215,8 @@
- 144
+ role="cell" aria-label="115">
+ 115
@@ -2231,8 +2231,8 @@
- 144
+ role="cell" aria-label="115">
+ 115
@@ -2247,8 +2247,8 @@
- 152
+ role="cell" aria-label="120">
+ 120
@@ -2263,8 +2263,8 @@
- 152
+ role="cell" aria-label="120">
+ 120
@@ -2279,8 +2279,8 @@
- 30
+ role="cell" aria-label="25">
+ 25
@@ -2295,8 +2295,8 @@
- 122
+ role="cell" aria-label="95">
+ 95
@@ -2311,8 +2311,8 @@
- 122
+ role="cell" aria-label="95">
+ 95
@@ -2327,8 +2327,8 @@
- 122
+ role="cell" aria-label="95">
+ 95
@@ -2343,8 +2343,8 @@
- 122
+ role="cell" aria-label="95">
+ 95
@@ -2359,8 +2359,8 @@
- 122
+ role="cell" aria-label="95">
+ 95
@@ -2375,8 +2375,8 @@
- 287
+ role="cell" aria-label="225">
+ 225
@@ -2391,8 +2391,8 @@
- 165
+ role="cell" aria-label="130">
+ 130
@@ -2407,8 +2407,8 @@
- 165
+ role="cell" aria-label="130">
+ 130
@@ -2423,8 +2423,8 @@
- 165
+ role="cell" aria-label="130">
+ 130
@@ -2439,8 +2439,8 @@
- 24
+ role="cell" aria-label="15">
+ 15
@@ -2455,8 +2455,8 @@
- 24
+ role="cell" aria-label="15">
+ 15
@@ -2471,8 +2471,8 @@
- 24
+ role="cell" aria-label="15">
+ 15
@@ -2487,8 +2487,8 @@
- 141
+ role="cell" aria-label="115">
+ 115
@@ -2503,8 +2503,8 @@
- 141
+ role="cell" aria-label="115">
+ 115
@@ -2519,8 +2519,8 @@
- 141
+ role="cell" aria-label="115">
+ 115
@@ -2647,8 +2647,8 @@
- 9
+ role="cell" aria-label="5">
+ 5
@@ -2663,8 +2663,8 @@
- 9
+ role="cell" aria-label="5">
+ 5
@@ -2679,8 +2679,8 @@
- 9
+ role="cell" aria-label="5">
+ 5
@@ -2695,8 +2695,8 @@
- 9
+ role="cell" aria-label="5">
+ 5
@@ -2711,8 +2711,8 @@
- 9
+ role="cell" aria-label="5">
+ 5
@@ -2727,8 +2727,8 @@
- 9
+ role="cell" aria-label="5">
+ 5
@@ -2743,8 +2743,8 @@
- 9
+ role="cell" aria-label="5">
+ 5
@@ -2759,8 +2759,8 @@
- 9
+ role="cell" aria-label="5">
+ 5
@@ -2775,8 +2775,8 @@
- 24
+ role="cell" aria-label="15">
+ 15
@@ -2807,8 +2807,8 @@
- 24
+ role="cell" aria-label="15">
+ 15
@@ -2855,8 +2855,8 @@
- 165
+ role="cell" aria-label="130">
+ 130
@@ -2871,8 +2871,8 @@
- 24
+ role="cell" aria-label="15">
+ 15
@@ -2887,8 +2887,8 @@
- 24
+ role="cell" aria-label="15">
+ 15
@@ -2903,8 +2903,8 @@
- 24
+ role="cell" aria-label="15">
+ 15
@@ -2919,8 +2919,8 @@
- 165
+ role="cell" aria-label="130">
+ 130
@@ -2935,8 +2935,8 @@
- 24
+ role="cell" aria-label="15">
+ 15
@@ -2951,8 +2951,8 @@
- 165
+ role="cell" aria-label="130">
+ 130
@@ -2967,8 +2967,8 @@
- 165
+ role="cell" aria-label="130">
+ 130
@@ -2983,8 +2983,8 @@
- 165
+ role="cell" aria-label="130">
+ 130
@@ -3031,8 +3031,8 @@
- 24
+ role="cell" aria-label="15">
+ 15
@@ -3079,8 +3079,8 @@
- 9
+ role="cell" aria-label="5">
+ 5
@@ -3095,8 +3095,8 @@
- 9
+ role="cell" aria-label="5">
+ 5
@@ -3111,8 +3111,8 @@
- 9
+ role="cell" aria-label="5">
+ 5
@@ -3127,8 +3127,8 @@
- 9
+ role="cell" aria-label="5">
+ 5
@@ -3143,8 +3143,8 @@
- 9
+ role="cell" aria-label="5">
+ 5
@@ -3159,8 +3159,8 @@
- 9
+ role="cell" aria-label="5">
+ 5
@@ -3175,8 +3175,8 @@
- 9
+ role="cell" aria-label="5">
+ 5
@@ -3186,7 +3186,7 @@
diff --git a/coverage/main/crates/uniplate/src/biplate.rs.html b/coverage/main/crates/uniplate/src/biplate.rs.html
index 290b54f1b5..de4d734b5e 100644
--- a/coverage/main/crates/uniplate/src/biplate.rs.html
+++ b/coverage/main/crates/uniplate/src/biplate.rs.html
@@ -15,7 +15,7 @@
@@ -23,7 +23,7 @@
Functions
- 23.81 %
+
0 %
@@ -662,13 +662,13 @@
40
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn universe_bi(&self) -> im::Vector<To> {
+
fn universe_bi(&self) -> im::Vector<To> {
41
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
self.children_bi()
+
self.children_bi()
42
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.into_iter()
+
.into_iter()
43
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.flat_map(|child| child.universe())
+
.flat_map(|child| child.universe())
44
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
.collect()
+
.collect()
45
- 1
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
48
- 2
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn children_bi(&self) -> im::Vector<To> {
+
fn children_bi(&self) -> im::Vector<To> {
49
- 2
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
self.biplate().0.list().0
+
self.biplate().0.list().0
50
- 2
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
70
- 8
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn universe(&self) -> im::Vector<Self> {
+
fn universe(&self) -> im::Vector<Self> {
71
- 8
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let mut results = vector![self.clone()];
+
let mut results = vector![self.clone()];
72
- 8
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
for child in self.children() {
+
for child in self.children() {
73
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
results.append(child.universe());
+
results.append(child.universe());
74
- 4
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
75
- 8
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
76
- 8
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
79
- 8
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
fn children(&self) -> im::Vector<Self> {
+
fn children(&self) -> im::Vector<Self> {
80
- 8
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
let (children, _) = self.uniplate();
+
let (children, _) = self.uniplate();
81
- 8
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
-
children.list().0.clone()
+
children.list().0.clone()
82
- 8
+ class="column is-1 is-narrow p-0 has-text-centered has-text-danger-light has-background-danger"
+ role="cell" aria-label="0">
+
-
diff --git a/coverage/main/crates/uniplate/src/index.html b/coverage/main/crates/uniplate/src/index.html
index c2dbc44a4c..93608717df 100644
--- a/coverage/main/crates/uniplate/src/index.html
+++ b/coverage/main/crates/uniplate/src/index.html
@@ -15,7 +15,7 @@
@@ -23,7 +23,7 @@
Functions
- 47.83 %
+
0 %
@@ -46,44 +46,20 @@
- 28.99%
+ 0%
- 28.99%
+ 0%
- 20 / 69
+ 0 / 69
-
23.81%
-
5 / 21
-
-
-
-
-
- lib.rs
-
-
-
- 93.62%
-
-
-
- 93.62%
-
-
- 44 / 47
-
-
- 88.89%
- 8 / 9
+ 0%
+ 0 / 21
@@ -93,21 +69,21 @@
- 96.25%
+ 0%
-
- 96.25%
+
+ 0%
-
- 77 / 80
+
+ 0 / 80
-
78.95%
-
15 / 19
+
0%
+
0 / 19
@@ -118,20 +94,20 @@
- 26.98%
+ 0%
- 26.98%
+ 0%
- 17 / 63
+ 0 / 63
-
25%
-
5 / 20
+
0%
+
0 / 16
@@ -139,7 +115,7 @@
diff --git a/coverage/main/crates/uniplate/src/lib.rs.html b/coverage/main/crates/uniplate/src/lib.rs.html
deleted file mode 100644
index 48c46b85cb..0000000000
--- a/coverage/main/crates/uniplate/src/lib.rs.html
+++ /dev/null
@@ -1,1881 +0,0 @@
-
-
-
-
-
Grcov report - lib.rs
-
-
-