diff --git a/Cargo.lock b/Cargo.lock index 6aa4a0ddea..0b50419673 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -308,6 +308,9 @@ dependencies = [ "strum", "strum_macros", "thiserror", + "tracing", + "tracing-appender", + "tracing-subscriber", "uniplate", "walkdir", ] @@ -329,6 +332,7 @@ dependencies = [ "anyhow", "clap", "conjure_core", + "env_logger", "glob", "linkme", "log", @@ -345,6 +349,10 @@ dependencies = [ "strum_macros", "thiserror", "toml", + "tracing", + "tracing-appender", + "tracing-log 0.1.4", + "tracing-subscriber", "uniplate", "versions", "walkdir", @@ -356,6 +364,21 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" +[[package]] +name = "crossbeam-channel" +version = "0.5.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" + [[package]] name = "darling" version = "0.20.10" @@ -450,6 +473,29 @@ dependencies = [ "syn 2.0.85", ] +[[package]] +name = "env_filter" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab" +dependencies = [ + "log", + "regex", +] + +[[package]] +name = "env_logger" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d" +dependencies = [ + "anstream", + "anstyle", + "env_filter", + "humantime", + "log", +] + [[package]] name = "equivalent" version = "1.0.1" @@ -535,6 +581,12 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + [[package]] name = "iana-time-zone" version = "0.1.61" @@ -740,6 +792,15 @@ dependencies = [ "value-bag", ] +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + [[package]] name = "memchr" version = "2.7.4" @@ -782,6 +843,16 @@ dependencies = [ "minimal-lexical", ] +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + [[package]] name = "num-conv" version = "0.1.0" @@ -813,6 +884,12 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + [[package]] name = "parking_lot" version = "0.12.3" @@ -906,7 +983,7 @@ dependencies = [ "rand", "rand_chacha", "rand_xorshift", - "regex-syntax", + "regex-syntax 0.8.5", "rusty-fork", "tempfile", "unarray", @@ -1003,8 +1080,17 @@ checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", - "regex-automata", - "regex-syntax", + "regex-automata 0.4.8", + "regex-syntax 0.8.5", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", ] [[package]] @@ -1015,9 +1101,15 @@ checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" dependencies = [ "aho-corasick", "memchr", - "regex-syntax", + "regex-syntax 0.8.5", ] +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + [[package]] name = "regex-syntax" version = "0.8.5" @@ -1203,6 +1295,15 @@ dependencies = [ "syn 2.0.85", ] +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + [[package]] name = "shlex" version = "1.3.0" @@ -1396,6 +1497,16 @@ dependencies = [ "syn 2.0.85", ] +[[package]] +name = "thread_local" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +dependencies = [ + "cfg-if", + "once_cell", +] + [[package]] name = "time" version = "0.3.36" @@ -1473,6 +1584,90 @@ dependencies = [ "winnow", ] +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-appender" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3566e8ce28cc0a3fe42519fc80e6b4c943cc4c8cef275620eb8dac2d3d4e06cf" +dependencies = [ + "crossbeam-channel", + "thiserror", + "time", + "tracing-subscriber", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.85", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f751112709b4e791d8ce53e32c4ed2d353565a795ce84da2285393f41557bdf2" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log 0.2.0", +] + [[package]] name = "typeid" version = "1.0.2" @@ -1530,6 +1725,12 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + [[package]] name = "value-bag" version = "1.9.0" @@ -1662,6 +1863,22 @@ version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + [[package]] name = "winapi-util" version = "0.1.9" @@ -1671,6 +1888,12 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + [[package]] name = "windows-core" version = "0.52.0" diff --git a/conjure_oxide/Cargo.toml b/conjure_oxide/Cargo.toml index c0797c9a6f..7135e775b5 100644 --- a/conjure_oxide/Cargo.toml +++ b/conjure_oxide/Cargo.toml @@ -12,6 +12,7 @@ walkdir = "2.5.0" conjure_core = { path = "../crates/conjure_core" } minion_rs = { path = "../solvers/minion" } + uniplate = "0.1.2" serde = { version = "1.0.213", features = ["derive"] } serde_json = "1.0.132" @@ -26,11 +27,17 @@ linkme = "0.3.29" walkdir = "2.5.0" regex = "1.11.1" log = "0.4.22" +env_logger = "0.11.5" structured-logger = "1.0.3" schemars = "0.8.21" toml = "0.8.19" glob = "0.3.1" rand = "0.8.5" +tracing = "0.1" +tracing-subscriber = { version = "0.3", features = ["env-filter"] } +tracing-appender = "0.2" +tracing-log = "0.1" + [features] diff --git a/conjure_oxide/src/main.rs b/conjure_oxide/src/main.rs index 897da87ecf..22d899cc89 100644 --- a/conjure_oxide/src/main.rs +++ b/conjure_oxide/src/main.rs @@ -126,8 +126,8 @@ pub fn main() -> AnyhowResult<()> { let rule_priorities = get_rule_priorities(&rule_sets)?; let rules_vec = get_rules_vec(&rule_priorities); - log::info!(target: "file", - "Rules and priorities: {}", + log::info!(target: "file", + "Rules and priorities: {}", rules_vec.iter() .map(|rule| format!("{}: {}", rule.name, rule_priorities.get(rule).unwrap_or(&0))) .collect::>() diff --git a/conjure_oxide/src/utils/testing.rs b/conjure_oxide/src/utils/testing.rs index 9effe629d3..ff5e782603 100644 --- a/conjure_oxide/src/utils/testing.rs +++ b/conjure_oxide/src/utils/testing.rs @@ -1,5 +1,6 @@ use std::collections::{HashMap, HashSet}; use std::fmt::Debug; +use std::fs; use std::fs::File; use std::hash::Hash; use std::io::Write; @@ -183,3 +184,14 @@ pub fn read_minion_solutions_json( Ok(expected_solutions) } + +pub fn read_rule_trace( + path: &str, + test_name: &str, + prefix: &str, +) -> Result { + let file_path = format!("{path}/{test_name}.{prefix}-rule-trace.txt"); + let contents = fs::read_to_string(file_path)?; + + Ok(contents) +} diff --git a/conjure_oxide/tests/generated_tests.rs b/conjure_oxide/tests/generated_tests.rs index 544d6714c0..2dbd6e18d7 100644 --- a/conjure_oxide/tests/generated_tests.rs +++ b/conjure_oxide/tests/generated_tests.rs @@ -1,11 +1,26 @@ +use conjure_core::Model; +use glob::glob; +use serde_json::json; use std::collections::HashMap; use std::env; use std::error::Error; use std::fs; +use std::fs::File; + +use tracing_appender; + +use std::io::BufWriter; use std::path::Path; use std::sync::Arc; use std::sync::Mutex; use std::sync::RwLock; +use structured_logger::{json::new_writer, Builder}; +use tracing::{span, trace, Level}; + +use tracing_appender::non_blocking::WorkerGuard; +use tracing_subscriber::{ + filter::EnvFilter, fmt, layer::SubscriberExt, util::SubscriberInitExt, Registry, +}; use conjure_core::ast::{Constant, Expression, Name}; use conjure_core::context::Context; @@ -20,12 +35,14 @@ use conjure_oxide::utils::testing::{ read_minion_solutions_json, read_model_json, save_minion_solutions_json, save_model_json, }; use conjure_oxide::SolverFamily; - -use uniplate::Uniplate; - use serde::Deserialize; +use uniplate::Uniplate; use pretty_assertions::assert_eq; +use tracing::Event; +use tracing_subscriber::fmt::format::Writer; +use tracing_subscriber::fmt::FormatEvent; +use tracing_subscriber::registry::LookupSpan; #[derive(Deserialize, Default)] struct TestConfig { @@ -33,7 +50,22 @@ struct TestConfig { } fn main() { - let file_path = Path::new("/path/to/your/file.txt"); + let _guard = create_scoped_subscriber("./logs", "test_log"); + + // creating a span and log a message + let test_span = span!(Level::TRACE, "test_span"); + let _enter: span::Entered<'_> = test_span.enter(); + trace!("trace test"); // this will log without the "test_span: " prefix. just a test + + for entry in glob("conjure_oxide/tests/integration/*").expect("Failed to read glob pattern") { + match entry { + Ok(path) => println!("File: {:?}", path), + Err(e) => println!("Error: {:?}", e), + } + } + + let file_path = Path::new("conjure_oxide/tests/integration/*"); // using relative path + let base_name = file_path.file_stem().and_then(|stem| stem.to_str()); match base_name { @@ -50,16 +82,32 @@ static GUARD: Mutex<()> = Mutex::new(()); fn integration_test(path: &str, essence_base: &str, extension: &str) -> Result<(), Box> { let verbose = env::var("VERBOSE").unwrap_or("false".to_string()) == "true"; + // Lock here to ensure sequential execution + let _guard = GUARD.lock().unwrap(); + // run tests in sequence not parallel when verbose logging, to ensure the logs are ordered // correctly - if verbose { - #[allow(clippy::unwrap_used)] - #[allow(unused_variables)] - let guard = GUARD.lock().unwrap(); - integration_test_inner(path, essence_base, extension) - } else { - integration_test_inner(path, essence_base, extension) - } + + let (subscriber, _guard) = create_scoped_subscriber(path, essence_base); + + // set the subscriber as default + tracing::subscriber::with_default(subscriber, || { + // create a span for the trace + let test_span = span!(target: "rule_engine", Level::TRACE, "test_span"); + let _enter = test_span.enter(); + // trace!(target: "rule_engine", "trace test"); + + // execute tests based on verbosity + if verbose { + #[allow(clippy::unwrap_used)] + let _guard = GUARD.lock().unwrap(); + integration_test_inner(path, essence_base, extension)? + } else { + integration_test_inner(path, essence_base, extension)? + } + + Ok(()) + }) } /// Runs an integration test for a given Conjure model by: @@ -127,7 +175,9 @@ fn integration_test_inner( SolverFamily::Minion, &vec!["Constant".to_string(), "Bubble".to_string()], )?; + let model = rewrite_model(&model, &rule_sets)?; + if verbose { println!("Rewritten model: {:#?}", model) } @@ -213,7 +263,7 @@ fn integration_test_inner( assert_eq!( username_solutions_json, conjure_solutions_json, - "Solutions (left) do not match conjure (right)!" + "Solutions do not match conjure!" ); } @@ -275,6 +325,60 @@ fn assert_constants_leq_one(parent_expr: &Expression, exprs: &[Expression]) { assert!(count <= 1, "assert_vector_operators_have_partially_evaluated: expression {} is not partially evaluated",parent_expr) } +// using a custom formatter to omit the span name in the log +struct JsonFormatter; + +impl FormatEvent for JsonFormatter +where + S: tracing::Subscriber + for<'span> LookupSpan<'span>, + N: for<'a> tracing_subscriber::fmt::FormatFields<'a> + 'static, +{ + fn format_event( + &self, + _ctx: &fmt::FmtContext<'_, S, N>, + mut writer: Writer<'_>, + event: &Event<'_>, + ) -> std::fmt::Result { + // convert the event into JSON format + let log = json!({ + "level": event.metadata().level().to_string(), + "target": event.metadata().target(), + "message": format!("{:?}", event), + }); + + // write JSON formatted log to file + write!(writer, "{}\n", log) + } +} + +pub fn create_scoped_subscriber( + path: &str, + test_name: &str, +) -> (impl tracing::Subscriber + Send + Sync, WorkerGuard) { + // Change the file extension to .json for JSON log output + let file = + File::create(format!("{path}/{test_name}-rules.json")).expect("Unable to create log file"); + let writer = BufWriter::new(file); + let (non_blocking, guard) = tracing_appender::non_blocking(writer); + + // subscriber setup with the JSON formatter + let subscriber = Registry::default() + .with(EnvFilter::new("rule_engine=trace")) + .with( + fmt::layer() + .with_writer(non_blocking) + .event_format(JsonFormatter), + ); + + // wrapping the subscriber in an Arc to share across multiple threads + let subscriber = Arc::new(subscriber) as Arc; + + // setting this subscriber as the default + let _default = tracing::subscriber::set_default(subscriber.clone()); + + (subscriber, guard) +} + #[test] fn assert_conjure_present() { conjure_oxide::find_conjure::conjure_executable().unwrap(); diff --git a/conjure_oxide/tests/integration/basic/bool/01/bool-01-expected-rule-trace.json b/conjure_oxide/tests/integration/basic/bool/01/bool-01-expected-rule-trace.json new file mode 100644 index 0000000000..e69de29bb2 diff --git a/conjure_oxide/tests/integration/basic/bool/01/bool-01-generated-rule-trace.json b/conjure_oxide/tests/integration/basic/bool/01/bool-01-generated-rule-trace.json new file mode 100644 index 0000000000..e69de29bb2 diff --git a/conjure_oxide/tests/integration/basic/bool/01/bool-01-rules.json b/conjure_oxide/tests/integration/basic/bool/01/bool-01-rules.json new file mode 100644 index 0000000000..e69de29bb2 diff --git a/conjure_oxide/tests/integration/basic/bool/02/bool-02-expected-rule-trace.json b/conjure_oxide/tests/integration/basic/bool/02/bool-02-expected-rule-trace.json new file mode 100644 index 0000000000..e69de29bb2 diff --git a/conjure_oxide/tests/integration/basic/bool/02/bool-02-generated-rule-trace.json b/conjure_oxide/tests/integration/basic/bool/02/bool-02-generated-rule-trace.json new file mode 100644 index 0000000000..e69de29bb2 diff --git a/conjure_oxide/tests/integration/basic/bool/02/bool-02-rules.json b/conjure_oxide/tests/integration/basic/bool/02/bool-02-rules.json new file mode 100644 index 0000000000..e69de29bb2 diff --git a/conjure_oxide/tests/integration/basic/bool/03/bool-03-expected-rule-trace.json b/conjure_oxide/tests/integration/basic/bool/03/bool-03-expected-rule-trace.json new file mode 100644 index 0000000000..e69de29bb2 diff --git a/conjure_oxide/tests/integration/basic/bool/03/bool-03-generated-rule-trace.json b/conjure_oxide/tests/integration/basic/bool/03/bool-03-generated-rule-trace.json new file mode 100644 index 0000000000..e69de29bb2 diff --git a/conjure_oxide/tests/integration/basic/bool/03/bool-03-rules.json b/conjure_oxide/tests/integration/basic/bool/03/bool-03-rules.json new file mode 100644 index 0000000000..e69de29bb2 diff --git a/conjure_oxide/tests/integration/basic/bool/04/bool-04-expected-rule-trace.json b/conjure_oxide/tests/integration/basic/bool/04/bool-04-expected-rule-trace.json new file mode 100644 index 0000000000..e69de29bb2 diff --git a/conjure_oxide/tests/integration/basic/bool/04/bool-04-generated-rule-trace.json b/conjure_oxide/tests/integration/basic/bool/04/bool-04-generated-rule-trace.json new file mode 100644 index 0000000000..e69de29bb2 diff --git a/conjure_oxide/tests/integration/basic/bool/04/bool-04-rules.json b/conjure_oxide/tests/integration/basic/bool/04/bool-04-rules.json new file mode 100644 index 0000000000..e69de29bb2 diff --git a/conjure_oxide/tests/integration/basic/div/01/input-expected-rule-trace.json b/conjure_oxide/tests/integration/basic/div/01/input-expected-rule-trace.json new file mode 100644 index 0000000000..6be0fa41e8 --- /dev/null +++ b/conjure_oxide/tests/integration/basic/div/01/input-expected-rule-trace.json @@ -0,0 +1,5 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"div_to_bubble\", to Expression: UnsafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), resulting in: Bubble(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Constant(Metadata { clean: false, etype: None }, Int(0)))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"bubble_up\", to Expression: Eq(Metadata { clean: false, etype: None }, Bubble(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Constant(Metadata { clean: false, etype: None }, Int(0)))), Constant(Metadata { clean: false, etype: None }, Int(1))), resulting in: Bubble(Metadata { clean: false, etype: None }, Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Constant(Metadata { clean: false, etype: None }, Int(1))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"expand_bubble\", to Expression: Bubble(Metadata { clean: false, etype: None }, Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Constant(Metadata { clean: false, etype: None }, Int(1))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])), resulting in: And(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Constant(Metadata { clean: false, etype: None }, Int(1))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"unwrap_nested_and\", to Expression: And(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Constant(Metadata { clean: false, etype: None }, Int(1))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])]), resulting in: And(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Constant(Metadata { clean: false, etype: None }, Int(1))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Constant(Metadata { clean: false, etype: None }, Int(0)))]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"div_eq_to_diveq\", to Expression: Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Constant(Metadata { clean: false, etype: None }, Int(1))), resulting in: DivEq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Constant(Metadata { clean: false, etype: None }, Int(1))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/basic/div/01/input-generated-rule-trace.json b/conjure_oxide/tests/integration/basic/div/01/input-generated-rule-trace.json new file mode 100644 index 0000000000..97875db16d --- /dev/null +++ b/conjure_oxide/tests/integration/basic/div/01/input-generated-rule-trace.json @@ -0,0 +1,5 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"div_to_bubble\", to Expression: UnsafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), resulting in: Bubble(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Constant(Metadata { clean: false, etype: None }, Int(0)))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"bubble_up\", to Expression: Eq(Metadata { clean: false, etype: None }, Bubble(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Constant(Metadata { clean: false, etype: None }, Int(0)))), Constant(Metadata { clean: false, etype: None }, Int(1))), resulting in: Bubble(Metadata { clean: false, etype: None }, Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Constant(Metadata { clean: false, etype: None }, Int(1))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"expand_bubble\", to Expression: Bubble(Metadata { clean: false, etype: None }, Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Constant(Metadata { clean: false, etype: None }, Int(1))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])), resulting in: And(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Constant(Metadata { clean: false, etype: None }, Int(1))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"unwrap_nested_and\", to Expression: And(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Constant(Metadata { clean: false, etype: None }, Int(1))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])]), resulting in: And(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Constant(Metadata { clean: false, etype: None }, Int(1))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Constant(Metadata { clean: false, etype: None }, Int(0)))]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"div_eq_to_diveq\", to Expression: Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Constant(Metadata { clean: false, etype: None }, Int(1))), resulting in: DivEq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Constant(Metadata { clean: false, etype: None }, Int(1))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/basic/div/01/input-rules.json b/conjure_oxide/tests/integration/basic/div/01/input-rules.json new file mode 100644 index 0000000000..8211539401 --- /dev/null +++ b/conjure_oxide/tests/integration/basic/div/01/input-rules.json @@ -0,0 +1,5 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"div_to_bubble\", application: 0x1032ad764, rule_sets: [(\"Bubble\", 6000)] }, to Expression: UnsafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), resulting in: Bubble(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Constant(Metadata { clean: false, etype: None }, Int(0)))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"bubble_up\", application: 0x1032ad1c0, rule_sets: [(\"Bubble\", 8900)] }, to Expression: Eq(Metadata { clean: false, etype: None }, Bubble(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Constant(Metadata { clean: false, etype: None }, Int(0)))), Constant(Metadata { clean: false, etype: None }, Int(1))), resulting in: Bubble(Metadata { clean: false, etype: None }, Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Constant(Metadata { clean: false, etype: None }, Int(1))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"expand_bubble\", application: 0x1032acec8, rule_sets: [(\"Bubble\", 8900)] }, to Expression: Bubble(Metadata { clean: false, etype: None }, Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Constant(Metadata { clean: false, etype: None }, Int(1))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])), resulting in: And(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Constant(Metadata { clean: false, etype: None }, Int(1))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"unwrap_nested_and\", application: 0x1032aa170, rule_sets: [(\"Base\", 8800)] }, to Expression: And(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Constant(Metadata { clean: false, etype: None }, Int(1))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])]), resulting in: And(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Constant(Metadata { clean: false, etype: None }, Int(1))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Constant(Metadata { clean: false, etype: None }, Int(0)))]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"div_eq_to_diveq\", application: 0x1032b00e8, rule_sets: [(\"Minion\", 4400)] }, to Expression: Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Constant(Metadata { clean: false, etype: None }, Int(1))), resulting in: DivEq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Constant(Metadata { clean: false, etype: None }, Int(1))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/basic/div/02/input-expected-rule-trace.json b/conjure_oxide/tests/integration/basic/div/02/input-expected-rule-trace.json new file mode 100644 index 0000000000..13a9a0c84e --- /dev/null +++ b/conjure_oxide/tests/integration/basic/div/02/input-expected-rule-trace.json @@ -0,0 +1,2 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"geq_to_ineq\", to Expression: Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), UnsafeDiv(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(4)), Constant(Metadata { clean: false, etype: None }, Int(2)))), resulting in: Ineq(Metadata { clean: false, etype: None }, UnsafeDiv(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(4)), Constant(Metadata { clean: false, etype: None }, Int(2))), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"apply_eval_constant\", to Expression: UnsafeDiv(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(4)), Constant(Metadata { clean: false, etype: None }, Int(2))), resulting in: Constant(Metadata { clean: false, etype: None }, Int(2)), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/basic/div/02/input-generated-rule-trace.json b/conjure_oxide/tests/integration/basic/div/02/input-generated-rule-trace.json new file mode 100644 index 0000000000..5660899329 --- /dev/null +++ b/conjure_oxide/tests/integration/basic/div/02/input-generated-rule-trace.json @@ -0,0 +1,2 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"geq_to_ineq\", to Expression: Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), UnsafeDiv(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(4)), Constant(Metadata { clean: false, etype: None }, Int(2)))), resulting in: Ineq(Metadata { clean: false, etype: None }, UnsafeDiv(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(4)), Constant(Metadata { clean: false, etype: None }, Int(2))), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"apply_eval_constant\", to Expression: UnsafeDiv(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(4)), Constant(Metadata { clean: false, etype: None }, Int(2))), resulting in: Constant(Metadata { clean: false, etype: None }, Int(2)), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/basic/div/02/input-rules.json b/conjure_oxide/tests/integration/basic/div/02/input-rules.json new file mode 100644 index 0000000000..b3691d724c --- /dev/null +++ b/conjure_oxide/tests/integration/basic/div/02/input-rules.json @@ -0,0 +1,2 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"geq_to_ineq\", application: 0x1032aec4c, rule_sets: [(\"Minion\", 4100)] }, to Expression: Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), UnsafeDiv(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(4)), Constant(Metadata { clean: false, etype: None }, Int(2)))), resulting in: Ineq(Metadata { clean: false, etype: None }, UnsafeDiv(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(4)), Constant(Metadata { clean: false, etype: None }, Int(2))), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"apply_eval_constant\", application: 0x1032adac0, rule_sets: [(\"Constant\", 9001)] }, to Expression: UnsafeDiv(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(4)), Constant(Metadata { clean: false, etype: None }, Int(2))), resulting in: Constant(Metadata { clean: false, etype: None }, Int(2)), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/basic/div/03/input-expected-rule-trace.json b/conjure_oxide/tests/integration/basic/div/03/input-expected-rule-trace.json new file mode 100644 index 0000000000..a9fdeeba29 --- /dev/null +++ b/conjure_oxide/tests/integration/basic/div/03/input-expected-rule-trace.json @@ -0,0 +1,5 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"div_to_bubble\", to Expression: UnsafeDiv(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(8)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), resulting in: Bubble(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(8)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(0)))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"bubble_up\", to Expression: Eq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), Bubble(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(8)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(0))))), resulting in: Bubble(Metadata { clean: false, etype: None }, Eq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), SafeDiv(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(8)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"expand_bubble\", to Expression: Bubble(Metadata { clean: false, etype: None }, Eq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), SafeDiv(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(8)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])), resulting in: And(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), SafeDiv(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(8)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"unwrap_nested_and\", to Expression: And(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), SafeDiv(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(8)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])]), resulting in: And(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), SafeDiv(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(8)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(0)))]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"div_eq_to_diveq\", to Expression: Eq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), SafeDiv(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(8)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")))), resulting in: DivEq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(8)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(2))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/basic/div/03/input-generated-rule-trace.json b/conjure_oxide/tests/integration/basic/div/03/input-generated-rule-trace.json new file mode 100644 index 0000000000..529b5002d2 --- /dev/null +++ b/conjure_oxide/tests/integration/basic/div/03/input-generated-rule-trace.json @@ -0,0 +1,5 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"div_to_bubble\", to Expression: UnsafeDiv(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(8)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), resulting in: Bubble(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(8)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(0)))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"bubble_up\", to Expression: Eq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), Bubble(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(8)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(0))))), resulting in: Bubble(Metadata { clean: false, etype: None }, Eq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), SafeDiv(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(8)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"expand_bubble\", to Expression: Bubble(Metadata { clean: false, etype: None }, Eq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), SafeDiv(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(8)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])), resulting in: And(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), SafeDiv(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(8)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"unwrap_nested_and\", to Expression: And(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), SafeDiv(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(8)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])]), resulting in: And(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), SafeDiv(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(8)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(0)))]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"div_eq_to_diveq\", to Expression: Eq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), SafeDiv(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(8)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")))), resulting in: DivEq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(8)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(2))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/basic/div/03/input-rules.json b/conjure_oxide/tests/integration/basic/div/03/input-rules.json new file mode 100644 index 0000000000..8ac72af772 --- /dev/null +++ b/conjure_oxide/tests/integration/basic/div/03/input-rules.json @@ -0,0 +1,5 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"div_to_bubble\", application: 0x1032ad764, rule_sets: [(\"Bubble\", 6000)] }, to Expression: UnsafeDiv(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(8)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), resulting in: Bubble(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(8)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(0)))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"bubble_up\", application: 0x1032ad1c0, rule_sets: [(\"Bubble\", 8900)] }, to Expression: Eq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), Bubble(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(8)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(0))))), resulting in: Bubble(Metadata { clean: false, etype: None }, Eq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), SafeDiv(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(8)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"expand_bubble\", application: 0x1032acec8, rule_sets: [(\"Bubble\", 8900)] }, to Expression: Bubble(Metadata { clean: false, etype: None }, Eq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), SafeDiv(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(8)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])), resulting in: And(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), SafeDiv(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(8)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"unwrap_nested_and\", application: 0x1032aa170, rule_sets: [(\"Base\", 8800)] }, to Expression: And(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), SafeDiv(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(8)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])]), resulting in: And(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), SafeDiv(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(8)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(0)))]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"div_eq_to_diveq\", application: 0x1032b00e8, rule_sets: [(\"Minion\", 4400)] }, to Expression: Eq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), SafeDiv(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(8)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")))), resulting in: DivEq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(8)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(2))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/basic/div/04/input-expected-rule-trace.json b/conjure_oxide/tests/integration/basic/div/04/input-expected-rule-trace.json new file mode 100644 index 0000000000..fc38415177 --- /dev/null +++ b/conjure_oxide/tests/integration/basic/div/04/input-expected-rule-trace.json @@ -0,0 +1,6 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"not_constraint_to_reify\", to Expression: Not(Metadata { clean: false, etype: None }, Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), UnsafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))))), resulting in: Reify(Metadata { clean: false, etype: None }, Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), UnsafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")))), Constant(Metadata { clean: false, etype: None }, Bool(false))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"div_to_bubble\", to Expression: UnsafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), resulting in: Bubble(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0)))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"bubble_up\", to Expression: Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Bubble(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0))))), resulting in: Bubble(Metadata { clean: false, etype: None }, Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"expand_bubble\", to Expression: Bubble(Metadata { clean: false, etype: None }, Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])), resulting in: And(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"unwrap_nested_and\", to Expression: And(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])]), resulting in: And(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0)))]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"div_eq_to_diveq\", to Expression: Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")))), resulting in: DivEq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/basic/div/04/input-generated-rule-trace.json b/conjure_oxide/tests/integration/basic/div/04/input-generated-rule-trace.json new file mode 100644 index 0000000000..e6da3daa62 --- /dev/null +++ b/conjure_oxide/tests/integration/basic/div/04/input-generated-rule-trace.json @@ -0,0 +1,6 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"not_constraint_to_reify\", to Expression: Not(Metadata { clean: false, etype: None }, Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), UnsafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))))), resulting in: Reify(Metadata { clean: false, etype: None }, Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), UnsafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")))), Constant(Metadata { clean: false, etype: None }, Bool(false))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"div_to_bubble\", to Expression: UnsafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), resulting in: Bubble(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0)))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"bubble_up\", to Expression: Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Bubble(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0))))), resulting in: Bubble(Metadata { clean: false, etype: None }, Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"expand_bubble\", to Expression: Bubble(Metadata { clean: false, etype: None }, Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])), resulting in: And(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"unwrap_nested_and\", to Expression: And(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])]), resulting in: And(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0)))]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"div_eq_to_diveq\", to Expression: Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")))), resulting in: DivEq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/basic/div/04/input-rules.json b/conjure_oxide/tests/integration/basic/div/04/input-rules.json new file mode 100644 index 0000000000..576eda4b16 --- /dev/null +++ b/conjure_oxide/tests/integration/basic/div/04/input-rules.json @@ -0,0 +1,6 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"not_constraint_to_reify\", application: 0x1032b112c, rule_sets: [(\"Minion\", 4090)] }, to Expression: Not(Metadata { clean: false, etype: None }, Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), UnsafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))))), resulting in: Reify(Metadata { clean: false, etype: None }, Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), UnsafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")))), Constant(Metadata { clean: false, etype: None }, Bool(false))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"div_to_bubble\", application: 0x1032ad764, rule_sets: [(\"Bubble\", 6000)] }, to Expression: UnsafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), resulting in: Bubble(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0)))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"bubble_up\", application: 0x1032ad1c0, rule_sets: [(\"Bubble\", 8900)] }, to Expression: Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Bubble(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0))))), resulting in: Bubble(Metadata { clean: false, etype: None }, Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"expand_bubble\", application: 0x1032acec8, rule_sets: [(\"Bubble\", 8900)] }, to Expression: Bubble(Metadata { clean: false, etype: None }, Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])), resulting in: And(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"unwrap_nested_and\", application: 0x1032aa170, rule_sets: [(\"Base\", 8800)] }, to Expression: And(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])]), resulting in: And(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0)))]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"div_eq_to_diveq\", application: 0x1032b00e8, rule_sets: [(\"Minion\", 4400)] }, to Expression: Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")))), resulting in: DivEq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/basic/div/05/input-expected-rule-trace.json b/conjure_oxide/tests/integration/basic/div/05/input-expected-rule-trace.json new file mode 100644 index 0000000000..762631b84b --- /dev/null +++ b/conjure_oxide/tests/integration/basic/div/05/input-expected-rule-trace.json @@ -0,0 +1,6 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"div_to_bubble\", to Expression: UnsafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), resulting in: Bubble(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0)))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"bubble_up\", to Expression: Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Bubble(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0))))), resulting in: Bubble(Metadata { clean: false, etype: None }, Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"expand_bubble\", to Expression: Bubble(Metadata { clean: false, etype: None }, Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])), resulting in: And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"unwrap_nested_and\", to Expression: And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])]), resulting in: And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0)))]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"flatten_safediv\", to Expression: Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")))), resulting in: Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, MachineName(0))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"unwrap_nested_and\", to Expression: And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, MachineName(0))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0))), And(Metadata { clean: false, etype: None }, [DivEq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Reference(Metadata { clean: false, etype: None }, MachineName(0)))])]), resulting in: And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, MachineName(0))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0))), DivEq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Reference(Metadata { clean: false, etype: None }, MachineName(0)))]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/basic/div/05/input-generated-rule-trace.json b/conjure_oxide/tests/integration/basic/div/05/input-generated-rule-trace.json new file mode 100644 index 0000000000..7ccfafb46b --- /dev/null +++ b/conjure_oxide/tests/integration/basic/div/05/input-generated-rule-trace.json @@ -0,0 +1,6 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"div_to_bubble\", to Expression: UnsafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), resulting in: Bubble(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0)))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"bubble_up\", to Expression: Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Bubble(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0))))), resulting in: Bubble(Metadata { clean: false, etype: None }, Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"expand_bubble\", to Expression: Bubble(Metadata { clean: false, etype: None }, Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])), resulting in: And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"unwrap_nested_and\", to Expression: And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])]), resulting in: And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0)))]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"flatten_safediv\", to Expression: Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")))), resulting in: Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, MachineName(0))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"unwrap_nested_and\", to Expression: And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, MachineName(0))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0))), And(Metadata { clean: false, etype: None }, [DivEq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Reference(Metadata { clean: false, etype: None }, MachineName(0)))])]), resulting in: And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, MachineName(0))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0))), DivEq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Reference(Metadata { clean: false, etype: None }, MachineName(0)))]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/basic/div/05/input-rules.json b/conjure_oxide/tests/integration/basic/div/05/input-rules.json new file mode 100644 index 0000000000..4ea433ad91 --- /dev/null +++ b/conjure_oxide/tests/integration/basic/div/05/input-rules.json @@ -0,0 +1,6 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"div_to_bubble\", application: 0x1032ad764, rule_sets: [(\"Bubble\", 6000)] }, to Expression: UnsafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), resulting in: Bubble(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0)))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"bubble_up\", application: 0x1032ad1c0, rule_sets: [(\"Bubble\", 8900)] }, to Expression: Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Bubble(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0))))), resulting in: Bubble(Metadata { clean: false, etype: None }, Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"expand_bubble\", application: 0x1032acec8, rule_sets: [(\"Bubble\", 8900)] }, to Expression: Bubble(Metadata { clean: false, etype: None }, Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])), resulting in: And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"unwrap_nested_and\", application: 0x1032aa170, rule_sets: [(\"Base\", 8800)] }, to Expression: And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])]), resulting in: And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0)))]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"flatten_safediv\", application: 0x1032af664, rule_sets: [(\"Minion\", 4400)] }, to Expression: Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")))), resulting in: Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, MachineName(0))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"unwrap_nested_and\", application: 0x1032aa170, rule_sets: [(\"Base\", 8800)] }, to Expression: And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, MachineName(0))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0))), And(Metadata { clean: false, etype: None }, [DivEq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Reference(Metadata { clean: false, etype: None }, MachineName(0)))])]), resulting in: And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, MachineName(0))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Int(0))), DivEq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Reference(Metadata { clean: false, etype: None }, MachineName(0)))]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/basic/max/02/input-expected-rule-trace.json b/conjure_oxide/tests/integration/basic/max/02/input-expected-rule-trace.json new file mode 100644 index 0000000000..5548744a10 --- /dev/null +++ b/conjure_oxide/tests/integration/basic/max/02/input-expected-rule-trace.json @@ -0,0 +1,5 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"leq_to_ineq\", to Expression: Leq(Metadata { clean: false, etype: None }, Max(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(2)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))]), Constant(Metadata { clean: false, etype: None }, Int(2))), resulting in: Ineq(Metadata { clean: false, etype: None }, Max(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(2)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))]), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"max_to_var\", to Expression: Max(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(2)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))]), resulting in: Reference(Metadata { clean: false, etype: None }, MachineName(0)), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"unwrap_nested_and\", to Expression: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(0))), And(Metadata { clean: false, etype: None }, [Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(2))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(2))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")))])])]), resulting in: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(0))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(2))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(2))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")))])]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"geq_to_ineq\", to Expression: Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(2))), resulting in: Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"geq_to_ineq\", to Expression: Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/basic/max/02/input-generated-rule-trace.json b/conjure_oxide/tests/integration/basic/max/02/input-generated-rule-trace.json new file mode 100644 index 0000000000..65e0f7f8ec --- /dev/null +++ b/conjure_oxide/tests/integration/basic/max/02/input-generated-rule-trace.json @@ -0,0 +1,5 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"leq_to_ineq\", to Expression: Leq(Metadata { clean: false, etype: None }, Max(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(2)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))]), Constant(Metadata { clean: false, etype: None }, Int(2))), resulting in: Ineq(Metadata { clean: false, etype: None }, Max(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(2)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))]), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"max_to_var\", to Expression: Max(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(2)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))]), resulting in: Reference(Metadata { clean: false, etype: None }, MachineName(0)), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"unwrap_nested_and\", to Expression: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(0))), And(Metadata { clean: false, etype: None }, [Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(2))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(2))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")))])])]), resulting in: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(0))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(2))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(2))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")))])]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"geq_to_ineq\", to Expression: Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(2))), resulting in: Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"geq_to_ineq\", to Expression: Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/basic/max/02/input-rules.json b/conjure_oxide/tests/integration/basic/max/02/input-rules.json new file mode 100644 index 0000000000..759d3d11d2 --- /dev/null +++ b/conjure_oxide/tests/integration/basic/max/02/input-rules.json @@ -0,0 +1,5 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"leq_to_ineq\", application: 0x1032aee68, rule_sets: [(\"Minion\", 4100)] }, to Expression: Leq(Metadata { clean: false, etype: None }, Max(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(2)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))]), Constant(Metadata { clean: false, etype: None }, Int(2))), resulting in: Ineq(Metadata { clean: false, etype: None }, Max(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(2)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))]), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"max_to_var\", application: 0x1032ab81c, rule_sets: [(\"Base\", 100)] }, to Expression: Max(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(2)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))]), resulting in: Reference(Metadata { clean: false, etype: None }, MachineName(0)), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"unwrap_nested_and\", application: 0x1032aa170, rule_sets: [(\"Base\", 8800)] }, to Expression: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(0))), And(Metadata { clean: false, etype: None }, [Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(2))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(2))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")))])])]), resulting in: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(0))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(2))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(2))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")))])]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"geq_to_ineq\", application: 0x1032aec4c, rule_sets: [(\"Minion\", 4100)] }, to Expression: Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(2))), resulting in: Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"geq_to_ineq\", application: 0x1032aec4c, rule_sets: [(\"Minion\", 4100)] }, to Expression: Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/basic/min/01/input-expected-rule-trace.json b/conjure_oxide/tests/integration/basic/min/01/input-expected-rule-trace.json new file mode 100644 index 0000000000..801e840702 --- /dev/null +++ b/conjure_oxide/tests/integration/basic/min/01/input-expected-rule-trace.json @@ -0,0 +1,5 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"geq_to_ineq\", to Expression: Geq(Metadata { clean: false, etype: None }, Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(3))), resulting in: Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(3)), Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"min_to_var\", to Expression: Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), resulting in: Reference(Metadata { clean: false, etype: None }, MachineName(0)), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"unwrap_nested_and\", to Expression: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(3)), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), And(Metadata { clean: false, etype: None }, [Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])])]), resulting in: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(3)), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"leq_to_ineq\", to Expression: Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"leq_to_ineq\", to Expression: Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/basic/min/01/input-generated-rule-trace.json b/conjure_oxide/tests/integration/basic/min/01/input-generated-rule-trace.json new file mode 100644 index 0000000000..e7bd33bcba --- /dev/null +++ b/conjure_oxide/tests/integration/basic/min/01/input-generated-rule-trace.json @@ -0,0 +1,5 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"geq_to_ineq\", to Expression: Geq(Metadata { clean: false, etype: None }, Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(3))), resulting in: Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(3)), Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"min_to_var\", to Expression: Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), resulting in: Reference(Metadata { clean: false, etype: None }, MachineName(0)), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"unwrap_nested_and\", to Expression: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(3)), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), And(Metadata { clean: false, etype: None }, [Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])])]), resulting in: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(3)), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"leq_to_ineq\", to Expression: Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"leq_to_ineq\", to Expression: Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/basic/min/01/input-rules.json b/conjure_oxide/tests/integration/basic/min/01/input-rules.json new file mode 100644 index 0000000000..7161362e92 --- /dev/null +++ b/conjure_oxide/tests/integration/basic/min/01/input-rules.json @@ -0,0 +1,5 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"geq_to_ineq\", application: 0x1032aec4c, rule_sets: [(\"Minion\", 4100)] }, to Expression: Geq(Metadata { clean: false, etype: None }, Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(3))), resulting in: Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(3)), Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"min_to_var\", application: 0x1032aaefc, rule_sets: [(\"Base\", 2000)] }, to Expression: Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), resulting in: Reference(Metadata { clean: false, etype: None }, MachineName(0)), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"unwrap_nested_and\", application: 0x1032aa170, rule_sets: [(\"Base\", 8800)] }, to Expression: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(3)), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), And(Metadata { clean: false, etype: None }, [Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])])]), resulting in: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(3)), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"leq_to_ineq\", application: 0x1032aee68, rule_sets: [(\"Minion\", 4100)] }, to Expression: Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"leq_to_ineq\", application: 0x1032aee68, rule_sets: [(\"Minion\", 4100)] }, to Expression: Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/basic/min/02/input-expected-rule-trace.json b/conjure_oxide/tests/integration/basic/min/02/input-expected-rule-trace.json new file mode 100644 index 0000000000..11f278f5bf --- /dev/null +++ b/conjure_oxide/tests/integration/basic/min/02/input-expected-rule-trace.json @@ -0,0 +1,5 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"leq_to_ineq\", to Expression: Leq(Metadata { clean: false, etype: None }, Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(2))), resulting in: Ineq(Metadata { clean: false, etype: None }, Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"min_to_var\", to Expression: Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), resulting in: Reference(Metadata { clean: false, etype: None }, MachineName(0)), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"unwrap_nested_and\", to Expression: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(0))), And(Metadata { clean: false, etype: None }, [Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])])]), resulting in: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(0))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"leq_to_ineq\", to Expression: Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"leq_to_ineq\", to Expression: Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/basic/min/02/input-generated-rule-trace.json b/conjure_oxide/tests/integration/basic/min/02/input-generated-rule-trace.json new file mode 100644 index 0000000000..9deae33926 --- /dev/null +++ b/conjure_oxide/tests/integration/basic/min/02/input-generated-rule-trace.json @@ -0,0 +1,5 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"leq_to_ineq\", to Expression: Leq(Metadata { clean: false, etype: None }, Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(2))), resulting in: Ineq(Metadata { clean: false, etype: None }, Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"min_to_var\", to Expression: Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), resulting in: Reference(Metadata { clean: false, etype: None }, MachineName(0)), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"unwrap_nested_and\", to Expression: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(0))), And(Metadata { clean: false, etype: None }, [Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])])]), resulting in: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(0))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"leq_to_ineq\", to Expression: Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"leq_to_ineq\", to Expression: Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/basic/min/02/input-rules.json b/conjure_oxide/tests/integration/basic/min/02/input-rules.json new file mode 100644 index 0000000000..c854c73ea5 --- /dev/null +++ b/conjure_oxide/tests/integration/basic/min/02/input-rules.json @@ -0,0 +1,5 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"leq_to_ineq\", application: 0x1032aee68, rule_sets: [(\"Minion\", 4100)] }, to Expression: Leq(Metadata { clean: false, etype: None }, Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(2))), resulting in: Ineq(Metadata { clean: false, etype: None }, Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"min_to_var\", application: 0x1032aaefc, rule_sets: [(\"Base\", 2000)] }, to Expression: Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), resulting in: Reference(Metadata { clean: false, etype: None }, MachineName(0)), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"unwrap_nested_and\", application: 0x1032aa170, rule_sets: [(\"Base\", 8800)] }, to Expression: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(0))), And(Metadata { clean: false, etype: None }, [Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])])]), resulting in: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(0))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"leq_to_ineq\", application: 0x1032aee68, rule_sets: [(\"Minion\", 4100)] }, to Expression: Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"leq_to_ineq\", application: 0x1032aee68, rule_sets: [(\"Minion\", 4100)] }, to Expression: Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/basic/min/03/input-expected-rule-trace.json b/conjure_oxide/tests/integration/basic/min/03/input-expected-rule-trace.json new file mode 100644 index 0000000000..11f278f5bf --- /dev/null +++ b/conjure_oxide/tests/integration/basic/min/03/input-expected-rule-trace.json @@ -0,0 +1,5 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"leq_to_ineq\", to Expression: Leq(Metadata { clean: false, etype: None }, Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(2))), resulting in: Ineq(Metadata { clean: false, etype: None }, Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"min_to_var\", to Expression: Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), resulting in: Reference(Metadata { clean: false, etype: None }, MachineName(0)), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"unwrap_nested_and\", to Expression: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(0))), And(Metadata { clean: false, etype: None }, [Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])])]), resulting in: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(0))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"leq_to_ineq\", to Expression: Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"leq_to_ineq\", to Expression: Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/basic/min/03/input-generated-rule-trace.json b/conjure_oxide/tests/integration/basic/min/03/input-generated-rule-trace.json new file mode 100644 index 0000000000..9deae33926 --- /dev/null +++ b/conjure_oxide/tests/integration/basic/min/03/input-generated-rule-trace.json @@ -0,0 +1,5 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"leq_to_ineq\", to Expression: Leq(Metadata { clean: false, etype: None }, Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(2))), resulting in: Ineq(Metadata { clean: false, etype: None }, Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"min_to_var\", to Expression: Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), resulting in: Reference(Metadata { clean: false, etype: None }, MachineName(0)), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"unwrap_nested_and\", to Expression: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(0))), And(Metadata { clean: false, etype: None }, [Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])])]), resulting in: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(0))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"leq_to_ineq\", to Expression: Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"leq_to_ineq\", to Expression: Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/basic/min/03/input-rules.json b/conjure_oxide/tests/integration/basic/min/03/input-rules.json new file mode 100644 index 0000000000..c854c73ea5 --- /dev/null +++ b/conjure_oxide/tests/integration/basic/min/03/input-rules.json @@ -0,0 +1,5 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"leq_to_ineq\", application: 0x1032aee68, rule_sets: [(\"Minion\", 4100)] }, to Expression: Leq(Metadata { clean: false, etype: None }, Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(2))), resulting in: Ineq(Metadata { clean: false, etype: None }, Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"min_to_var\", application: 0x1032aaefc, rule_sets: [(\"Base\", 2000)] }, to Expression: Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), resulting in: Reference(Metadata { clean: false, etype: None }, MachineName(0)), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"unwrap_nested_and\", application: 0x1032aa170, rule_sets: [(\"Base\", 8800)] }, to Expression: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(0))), And(Metadata { clean: false, etype: None }, [Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])])]), resulting in: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(0))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"leq_to_ineq\", application: 0x1032aee68, rule_sets: [(\"Minion\", 4100)] }, to Expression: Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"leq_to_ineq\", application: 0x1032aee68, rule_sets: [(\"Minion\", 4100)] }, to Expression: Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/basic/min/04/input-expected-rule-trace.json b/conjure_oxide/tests/integration/basic/min/04/input-expected-rule-trace.json new file mode 100644 index 0000000000..801e840702 --- /dev/null +++ b/conjure_oxide/tests/integration/basic/min/04/input-expected-rule-trace.json @@ -0,0 +1,5 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"geq_to_ineq\", to Expression: Geq(Metadata { clean: false, etype: None }, Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(3))), resulting in: Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(3)), Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"min_to_var\", to Expression: Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), resulting in: Reference(Metadata { clean: false, etype: None }, MachineName(0)), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"unwrap_nested_and\", to Expression: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(3)), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), And(Metadata { clean: false, etype: None }, [Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])])]), resulting in: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(3)), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"leq_to_ineq\", to Expression: Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"leq_to_ineq\", to Expression: Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/basic/min/04/input-generated-rule-trace.json b/conjure_oxide/tests/integration/basic/min/04/input-generated-rule-trace.json new file mode 100644 index 0000000000..e7bd33bcba --- /dev/null +++ b/conjure_oxide/tests/integration/basic/min/04/input-generated-rule-trace.json @@ -0,0 +1,5 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"geq_to_ineq\", to Expression: Geq(Metadata { clean: false, etype: None }, Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(3))), resulting in: Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(3)), Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"min_to_var\", to Expression: Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), resulting in: Reference(Metadata { clean: false, etype: None }, MachineName(0)), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"unwrap_nested_and\", to Expression: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(3)), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), And(Metadata { clean: false, etype: None }, [Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])])]), resulting in: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(3)), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"leq_to_ineq\", to Expression: Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"leq_to_ineq\", to Expression: Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/basic/min/04/input-rules.json b/conjure_oxide/tests/integration/basic/min/04/input-rules.json new file mode 100644 index 0000000000..7161362e92 --- /dev/null +++ b/conjure_oxide/tests/integration/basic/min/04/input-rules.json @@ -0,0 +1,5 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"geq_to_ineq\", application: 0x1032aec4c, rule_sets: [(\"Minion\", 4100)] }, to Expression: Geq(Metadata { clean: false, etype: None }, Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(3))), resulting in: Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(3)), Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"min_to_var\", application: 0x1032aaefc, rule_sets: [(\"Base\", 2000)] }, to Expression: Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), resulting in: Reference(Metadata { clean: false, etype: None }, MachineName(0)), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"unwrap_nested_and\", application: 0x1032aa170, rule_sets: [(\"Base\", 8800)] }, to Expression: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(3)), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), And(Metadata { clean: false, etype: None }, [Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])])]), resulting in: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(3)), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"leq_to_ineq\", application: 0x1032aee68, rule_sets: [(\"Minion\", 4100)] }, to Expression: Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"leq_to_ineq\", application: 0x1032aee68, rule_sets: [(\"Minion\", 4100)] }, to Expression: Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/basic/min/05/input-expected-rule-trace.json b/conjure_oxide/tests/integration/basic/min/05/input-expected-rule-trace.json new file mode 100644 index 0000000000..11f278f5bf --- /dev/null +++ b/conjure_oxide/tests/integration/basic/min/05/input-expected-rule-trace.json @@ -0,0 +1,5 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"leq_to_ineq\", to Expression: Leq(Metadata { clean: false, etype: None }, Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(2))), resulting in: Ineq(Metadata { clean: false, etype: None }, Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"min_to_var\", to Expression: Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), resulting in: Reference(Metadata { clean: false, etype: None }, MachineName(0)), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"unwrap_nested_and\", to Expression: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(0))), And(Metadata { clean: false, etype: None }, [Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])])]), resulting in: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(0))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"leq_to_ineq\", to Expression: Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"leq_to_ineq\", to Expression: Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/basic/min/05/input-generated-rule-trace.json b/conjure_oxide/tests/integration/basic/min/05/input-generated-rule-trace.json new file mode 100644 index 0000000000..9deae33926 --- /dev/null +++ b/conjure_oxide/tests/integration/basic/min/05/input-generated-rule-trace.json @@ -0,0 +1,5 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"leq_to_ineq\", to Expression: Leq(Metadata { clean: false, etype: None }, Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(2))), resulting in: Ineq(Metadata { clean: false, etype: None }, Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"min_to_var\", to Expression: Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), resulting in: Reference(Metadata { clean: false, etype: None }, MachineName(0)), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"unwrap_nested_and\", to Expression: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(0))), And(Metadata { clean: false, etype: None }, [Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])])]), resulting in: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(0))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"leq_to_ineq\", to Expression: Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"leq_to_ineq\", to Expression: Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/basic/min/05/input-rules.json b/conjure_oxide/tests/integration/basic/min/05/input-rules.json new file mode 100644 index 0000000000..c854c73ea5 --- /dev/null +++ b/conjure_oxide/tests/integration/basic/min/05/input-rules.json @@ -0,0 +1,5 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"leq_to_ineq\", application: 0x1032aee68, rule_sets: [(\"Minion\", 4100)] }, to Expression: Leq(Metadata { clean: false, etype: None }, Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(2))), resulting in: Ineq(Metadata { clean: false, etype: None }, Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"min_to_var\", application: 0x1032aaefc, rule_sets: [(\"Base\", 2000)] }, to Expression: Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), resulting in: Reference(Metadata { clean: false, etype: None }, MachineName(0)), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"unwrap_nested_and\", application: 0x1032aa170, rule_sets: [(\"Base\", 8800)] }, to Expression: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(0))), And(Metadata { clean: false, etype: None }, [Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])])]), resulting in: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(0))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"leq_to_ineq\", application: 0x1032aee68, rule_sets: [(\"Minion\", 4100)] }, to Expression: Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"leq_to_ineq\", application: 0x1032aee68, rule_sets: [(\"Minion\", 4100)] }, to Expression: Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/bugs/issue-336-empty-or-should-be-false/input-expected-rule-trace.json b/conjure_oxide/tests/integration/bugs/issue-336-empty-or-should-be-false/input-expected-rule-trace.json new file mode 100644 index 0000000000..4c7b589c8c --- /dev/null +++ b/conjure_oxide/tests/integration/bugs/issue-336-empty-or-should-be-false/input-expected-rule-trace.json @@ -0,0 +1 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"apply_eval_constant\", to Expression: Or(Metadata { clean: false, etype: None }, []), resulting in: Constant(Metadata { clean: false, etype: None }, Bool(false)), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/bugs/issue-336-empty-or-should-be-false/input-generated-rule-trace.json b/conjure_oxide/tests/integration/bugs/issue-336-empty-or-should-be-false/input-generated-rule-trace.json new file mode 100644 index 0000000000..0091df416b --- /dev/null +++ b/conjure_oxide/tests/integration/bugs/issue-336-empty-or-should-be-false/input-generated-rule-trace.json @@ -0,0 +1 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"apply_eval_constant\", to Expression: Or(Metadata { clean: false, etype: None }, []), resulting in: Constant(Metadata { clean: false, etype: None }, Bool(false)), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/bugs/issue-336-empty-or-should-be-false/input-rules.json b/conjure_oxide/tests/integration/bugs/issue-336-empty-or-should-be-false/input-rules.json new file mode 100644 index 0000000000..b3c5487d8c --- /dev/null +++ b/conjure_oxide/tests/integration/bugs/issue-336-empty-or-should-be-false/input-rules.json @@ -0,0 +1 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"apply_eval_constant\", application: 0x1032adac0, rule_sets: [(\"Constant\", 9001)] }, to Expression: Or(Metadata { clean: false, etype: None }, []), resulting in: Constant(Metadata { clean: false, etype: None }, Bool(false)), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/bugs/sm600-non-terminating-min/input-expected-rule-trace.json b/conjure_oxide/tests/integration/bugs/sm600-non-terminating-min/input-expected-rule-trace.json new file mode 100644 index 0000000000..c5ad7337ac --- /dev/null +++ b/conjure_oxide/tests/integration/bugs/sm600-non-terminating-min/input-expected-rule-trace.json @@ -0,0 +1,6 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"sum_leq_to_sumleq\", to Expression: Leq(Metadata { clean: false, etype: None }, Sum(Metadata { clean: false, etype: None }, [Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(6))]), Constant(Metadata { clean: false, etype: None }, Int(10))), resulting in: SumLeq(Metadata { clean: false, etype: None }, [Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(6))], Constant(Metadata { clean: false, etype: None }, Int(10))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"partial_evaluator\", to Expression: SumLeq(Metadata { clean: false, etype: None }, [Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(6))], Constant(Metadata { clean: false, etype: None }, Int(10))), resulting in: SumLeq(Metadata { clean: false, etype: None }, [Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))])], Constant(Metadata { clean: false, etype: None }, Int(4))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"min_to_var\", to Expression: Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), resulting in: Reference(Metadata { clean: false, etype: None }, MachineName(0)), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"unwrap_nested_and\", to Expression: And(Metadata { clean: false, etype: None }, [SumLeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, MachineName(0))], Constant(Metadata { clean: false, etype: None }, Int(4))), And(Metadata { clean: false, etype: None }, [Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])])]), resulting in: And(Metadata { clean: false, etype: None }, [SumLeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, MachineName(0))], Constant(Metadata { clean: false, etype: None }, Int(4))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"leq_to_ineq\", to Expression: Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"leq_to_ineq\", to Expression: Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/bugs/sm600-non-terminating-min/input-generated-rule-trace.json b/conjure_oxide/tests/integration/bugs/sm600-non-terminating-min/input-generated-rule-trace.json new file mode 100644 index 0000000000..d97b397fd8 --- /dev/null +++ b/conjure_oxide/tests/integration/bugs/sm600-non-terminating-min/input-generated-rule-trace.json @@ -0,0 +1,6 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"sum_leq_to_sumleq\", to Expression: Leq(Metadata { clean: false, etype: None }, Sum(Metadata { clean: false, etype: None }, [Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(6))]), Constant(Metadata { clean: false, etype: None }, Int(10))), resulting in: SumLeq(Metadata { clean: false, etype: None }, [Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(6))], Constant(Metadata { clean: false, etype: None }, Int(10))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"partial_evaluator\", to Expression: SumLeq(Metadata { clean: false, etype: None }, [Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(6))], Constant(Metadata { clean: false, etype: None }, Int(10))), resulting in: SumLeq(Metadata { clean: false, etype: None }, [Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))])], Constant(Metadata { clean: false, etype: None }, Int(4))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"min_to_var\", to Expression: Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), resulting in: Reference(Metadata { clean: false, etype: None }, MachineName(0)), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"unwrap_nested_and\", to Expression: And(Metadata { clean: false, etype: None }, [SumLeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, MachineName(0))], Constant(Metadata { clean: false, etype: None }, Int(4))), And(Metadata { clean: false, etype: None }, [Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])])]), resulting in: And(Metadata { clean: false, etype: None }, [SumLeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, MachineName(0))], Constant(Metadata { clean: false, etype: None }, Int(4))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"leq_to_ineq\", to Expression: Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"leq_to_ineq\", to Expression: Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/bugs/sm600-non-terminating-min/input-rules.json b/conjure_oxide/tests/integration/bugs/sm600-non-terminating-min/input-rules.json new file mode 100644 index 0000000000..29a3353cf0 --- /dev/null +++ b/conjure_oxide/tests/integration/bugs/sm600-non-terminating-min/input-rules.json @@ -0,0 +1,6 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"sum_leq_to_sumleq\", application: 0x1032addcc, rule_sets: [(\"Minion\", 4400)] }, to Expression: Leq(Metadata { clean: false, etype: None }, Sum(Metadata { clean: false, etype: None }, [Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(6))]), Constant(Metadata { clean: false, etype: None }, Int(10))), resulting in: SumLeq(Metadata { clean: false, etype: None }, [Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(6))], Constant(Metadata { clean: false, etype: None }, Int(10))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"partial_evaluator\", application: 0x1032b13d4, rule_sets: [(\"Base\", 9000)] }, to Expression: SumLeq(Metadata { clean: false, etype: None }, [Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(6))], Constant(Metadata { clean: false, etype: None }, Int(10))), resulting in: SumLeq(Metadata { clean: false, etype: None }, [Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))])], Constant(Metadata { clean: false, etype: None }, Int(4))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"min_to_var\", application: 0x1032aaefc, rule_sets: [(\"Base\", 2000)] }, to Expression: Min(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), resulting in: Reference(Metadata { clean: false, etype: None }, MachineName(0)), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"unwrap_nested_and\", application: 0x1032aa170, rule_sets: [(\"Base\", 8800)] }, to Expression: And(Metadata { clean: false, etype: None }, [SumLeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, MachineName(0))], Constant(Metadata { clean: false, etype: None }, Int(4))), And(Metadata { clean: false, etype: None }, [Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])])]), resulting in: And(Metadata { clean: false, etype: None }, [SumLeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, MachineName(0))], Constant(Metadata { clean: false, etype: None }, Int(4))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"leq_to_ineq\", application: 0x1032aee68, rule_sets: [(\"Minion\", 4100)] }, to Expression: Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"leq_to_ineq\", application: 0x1032aee68, rule_sets: [(\"Minion\", 4100)] }, to Expression: Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/bugs/yb33-min-of-constants-parses-as-nothing/input-expected-rule-trace.json b/conjure_oxide/tests/integration/bugs/yb33-min-of-constants-parses-as-nothing/input-expected-rule-trace.json new file mode 100644 index 0000000000..15b0d265a9 --- /dev/null +++ b/conjure_oxide/tests/integration/bugs/yb33-min-of-constants-parses-as-nothing/input-expected-rule-trace.json @@ -0,0 +1,3 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"sum_leq_to_sumleq\", to Expression: Leq(Metadata { clean: false, etype: None }, Sum(Metadata { clean: false, etype: None }, [Min(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(5)), Constant(Metadata { clean: false, etype: None }, Int(7))]), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))]), Constant(Metadata { clean: false, etype: None }, Int(10))), resulting in: SumLeq(Metadata { clean: false, etype: None }, [Min(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(5)), Constant(Metadata { clean: false, etype: None }, Int(7))]), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(10))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"apply_eval_constant\", to Expression: Min(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(5)), Constant(Metadata { clean: false, etype: None }, Int(7))]), resulting in: Constant(Metadata { clean: false, etype: None }, Int(5)), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"partial_evaluator\", to Expression: SumLeq(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(5)), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(10))), resulting in: SumLeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(5))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/bugs/yb33-min-of-constants-parses-as-nothing/input-generated-rule-trace.json b/conjure_oxide/tests/integration/bugs/yb33-min-of-constants-parses-as-nothing/input-generated-rule-trace.json new file mode 100644 index 0000000000..4f49ebebc5 --- /dev/null +++ b/conjure_oxide/tests/integration/bugs/yb33-min-of-constants-parses-as-nothing/input-generated-rule-trace.json @@ -0,0 +1,3 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"sum_leq_to_sumleq\", to Expression: Leq(Metadata { clean: false, etype: None }, Sum(Metadata { clean: false, etype: None }, [Min(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(5)), Constant(Metadata { clean: false, etype: None }, Int(7))]), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))]), Constant(Metadata { clean: false, etype: None }, Int(10))), resulting in: SumLeq(Metadata { clean: false, etype: None }, [Min(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(5)), Constant(Metadata { clean: false, etype: None }, Int(7))]), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(10))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"apply_eval_constant\", to Expression: Min(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(5)), Constant(Metadata { clean: false, etype: None }, Int(7))]), resulting in: Constant(Metadata { clean: false, etype: None }, Int(5)), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"partial_evaluator\", to Expression: SumLeq(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(5)), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(10))), resulting in: SumLeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(5))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/bugs/yb33-min-of-constants-parses-as-nothing/input-rules.json b/conjure_oxide/tests/integration/bugs/yb33-min-of-constants-parses-as-nothing/input-rules.json new file mode 100644 index 0000000000..ee4526bcfb --- /dev/null +++ b/conjure_oxide/tests/integration/bugs/yb33-min-of-constants-parses-as-nothing/input-rules.json @@ -0,0 +1,3 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"sum_leq_to_sumleq\", application: 0x1032addcc, rule_sets: [(\"Minion\", 4400)] }, to Expression: Leq(Metadata { clean: false, etype: None }, Sum(Metadata { clean: false, etype: None }, [Min(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(5)), Constant(Metadata { clean: false, etype: None }, Int(7))]), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))]), Constant(Metadata { clean: false, etype: None }, Int(10))), resulting in: SumLeq(Metadata { clean: false, etype: None }, [Min(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(5)), Constant(Metadata { clean: false, etype: None }, Int(7))]), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(10))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"apply_eval_constant\", application: 0x1032adac0, rule_sets: [(\"Constant\", 9001)] }, to Expression: Min(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(5)), Constant(Metadata { clean: false, etype: None }, Int(7))]), resulting in: Constant(Metadata { clean: false, etype: None }, Int(5)), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"partial_evaluator\", application: 0x1032b13d4, rule_sets: [(\"Base\", 9000)] }, to Expression: SumLeq(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(5)), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(10))), resulting in: SumLeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(5))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/eprime-minion/bool/literals-to-wlit-1/input-expected-rule-trace.json b/conjure_oxide/tests/integration/eprime-minion/bool/literals-to-wlit-1/input-expected-rule-trace.json new file mode 100644 index 0000000000..fa1af343a2 --- /dev/null +++ b/conjure_oxide/tests/integration/eprime-minion/bool/literals-to-wlit-1/input-expected-rule-trace.json @@ -0,0 +1,9 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"boolean_literal_to_wliteral\", to Expression: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Or(Metadata { clean: false, etype: None }, [Not(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), And(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"d\"))])]), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"d\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))])]), resulting in: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Or(Metadata { clean: false, etype: None }, [Not(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), And(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"d\"))])]), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"b\"), Bool(true)), Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"d\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))])]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"boolean_literal_to_wliteral\", to Expression: Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), resulting in: Or(Metadata { clean: false, etype: None }, [WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"a\"), Bool(true)), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"b\"), Bool(true))]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"distribute_or_over_and\", to Expression: Or(Metadata { clean: false, etype: None }, [Not(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), And(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"d\"))])]), resulting in: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Not(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Or(Metadata { clean: false, etype: None }, [Not(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), Reference(Metadata { clean: false, etype: None }, UserName(\"d\"))])]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"unwrap_nested_and\", to Expression: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"a\"), Bool(true)), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"b\"), Bool(true))]), And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Not(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Or(Metadata { clean: false, etype: None }, [Not(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), Reference(Metadata { clean: false, etype: None }, UserName(\"d\"))])]), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"b\"), Bool(true)), Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"d\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))])]), resulting in: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"a\"), Bool(true)), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"b\"), Bool(true))]), Or(Metadata { clean: false, etype: None }, [Not(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Or(Metadata { clean: false, etype: None }, [Not(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), Reference(Metadata { clean: false, etype: None }, UserName(\"d\"))]), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"b\"), Bool(true)), Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"d\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))])]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"boolean_literal_to_wliteral\", to Expression: Or(Metadata { clean: false, etype: None }, [Not(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), resulting in: Or(Metadata { clean: false, etype: None }, [Not(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"b\"), Bool(true))]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"boolean_literal_to_wliteral\", to Expression: Not(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), resulting in: WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"c\"), Bool(false)), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"boolean_literal_to_wliteral\", to Expression: Or(Metadata { clean: false, etype: None }, [Not(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), Reference(Metadata { clean: false, etype: None }, UserName(\"d\"))]), resulting in: Or(Metadata { clean: false, etype: None }, [Not(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"d\"), Bool(true))]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"boolean_literal_to_wliteral\", to Expression: Not(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), resulting in: WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"c\"), Bool(false)), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"boolean_literal_to_wliteral\", to Expression: Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"d\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))]), resulting in: Or(Metadata { clean: false, etype: None }, [WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"d\"), Bool(true)), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"c\"), Bool(true))]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/eprime-minion/bool/literals-to-wlit-1/input-generated-rule-trace.json b/conjure_oxide/tests/integration/eprime-minion/bool/literals-to-wlit-1/input-generated-rule-trace.json new file mode 100644 index 0000000000..c640f26cf7 --- /dev/null +++ b/conjure_oxide/tests/integration/eprime-minion/bool/literals-to-wlit-1/input-generated-rule-trace.json @@ -0,0 +1,9 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"boolean_literal_to_wliteral\", to Expression: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Or(Metadata { clean: false, etype: None }, [Not(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), And(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"d\"))])]), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"d\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))])]), resulting in: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Or(Metadata { clean: false, etype: None }, [Not(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), And(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"d\"))])]), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"b\"), Bool(true)), Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"d\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))])]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"boolean_literal_to_wliteral\", to Expression: Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), resulting in: Or(Metadata { clean: false, etype: None }, [WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"a\"), Bool(true)), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"b\"), Bool(true))]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"distribute_or_over_and\", to Expression: Or(Metadata { clean: false, etype: None }, [Not(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), And(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"d\"))])]), resulting in: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Not(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Or(Metadata { clean: false, etype: None }, [Not(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), Reference(Metadata { clean: false, etype: None }, UserName(\"d\"))])]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"unwrap_nested_and\", to Expression: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"a\"), Bool(true)), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"b\"), Bool(true))]), And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Not(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Or(Metadata { clean: false, etype: None }, [Not(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), Reference(Metadata { clean: false, etype: None }, UserName(\"d\"))])]), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"b\"), Bool(true)), Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"d\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))])]), resulting in: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"a\"), Bool(true)), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"b\"), Bool(true))]), Or(Metadata { clean: false, etype: None }, [Not(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Or(Metadata { clean: false, etype: None }, [Not(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), Reference(Metadata { clean: false, etype: None }, UserName(\"d\"))]), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"b\"), Bool(true)), Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"d\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))])]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"boolean_literal_to_wliteral\", to Expression: Or(Metadata { clean: false, etype: None }, [Not(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), resulting in: Or(Metadata { clean: false, etype: None }, [Not(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"b\"), Bool(true))]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"boolean_literal_to_wliteral\", to Expression: Not(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), resulting in: WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"c\"), Bool(false)), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"boolean_literal_to_wliteral\", to Expression: Or(Metadata { clean: false, etype: None }, [Not(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), Reference(Metadata { clean: false, etype: None }, UserName(\"d\"))]), resulting in: Or(Metadata { clean: false, etype: None }, [Not(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"d\"), Bool(true))]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"boolean_literal_to_wliteral\", to Expression: Not(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), resulting in: WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"c\"), Bool(false)), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"boolean_literal_to_wliteral\", to Expression: Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"d\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))]), resulting in: Or(Metadata { clean: false, etype: None }, [WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"d\"), Bool(true)), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"c\"), Bool(true))]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/eprime-minion/bool/literals-to-wlit-1/input-rules.json b/conjure_oxide/tests/integration/eprime-minion/bool/literals-to-wlit-1/input-rules.json new file mode 100644 index 0000000000..839eb34df9 --- /dev/null +++ b/conjure_oxide/tests/integration/eprime-minion/bool/literals-to-wlit-1/input-rules.json @@ -0,0 +1,9 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"boolean_literal_to_wliteral\", application: 0x1032b0800, rule_sets: [(\"Minion\", 4100)] }, to Expression: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Or(Metadata { clean: false, etype: None }, [Not(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), And(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"d\"))])]), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"d\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))])]), resulting in: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Or(Metadata { clean: false, etype: None }, [Not(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), And(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"d\"))])]), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"b\"), Bool(true)), Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"d\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))])]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"boolean_literal_to_wliteral\", application: 0x1032b0800, rule_sets: [(\"Minion\", 4100)] }, to Expression: Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), resulting in: Or(Metadata { clean: false, etype: None }, [WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"a\"), Bool(true)), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"b\"), Bool(true))]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"distribute_or_over_and\", application: 0x1032ac13c, rule_sets: [(\"Base\", 8400)] }, to Expression: Or(Metadata { clean: false, etype: None }, [Not(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), And(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"d\"))])]), resulting in: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Not(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Or(Metadata { clean: false, etype: None }, [Not(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), Reference(Metadata { clean: false, etype: None }, UserName(\"d\"))])]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"unwrap_nested_and\", application: 0x1032aa170, rule_sets: [(\"Base\", 8800)] }, to Expression: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"a\"), Bool(true)), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"b\"), Bool(true))]), And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Not(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Or(Metadata { clean: false, etype: None }, [Not(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), Reference(Metadata { clean: false, etype: None }, UserName(\"d\"))])]), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"b\"), Bool(true)), Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"d\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))])]), resulting in: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"a\"), Bool(true)), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"b\"), Bool(true))]), Or(Metadata { clean: false, etype: None }, [Not(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Or(Metadata { clean: false, etype: None }, [Not(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), Reference(Metadata { clean: false, etype: None }, UserName(\"d\"))]), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"b\"), Bool(true)), Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"d\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))])]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"boolean_literal_to_wliteral\", application: 0x1032b0800, rule_sets: [(\"Minion\", 4100)] }, to Expression: Or(Metadata { clean: false, etype: None }, [Not(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), resulting in: Or(Metadata { clean: false, etype: None }, [Not(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"b\"), Bool(true))]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"boolean_literal_to_wliteral\", application: 0x1032b0800, rule_sets: [(\"Minion\", 4100)] }, to Expression: Not(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), resulting in: WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"c\"), Bool(false)), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"boolean_literal_to_wliteral\", application: 0x1032b0800, rule_sets: [(\"Minion\", 4100)] }, to Expression: Or(Metadata { clean: false, etype: None }, [Not(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), Reference(Metadata { clean: false, etype: None }, UserName(\"d\"))]), resulting in: Or(Metadata { clean: false, etype: None }, [Not(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"d\"), Bool(true))]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"boolean_literal_to_wliteral\", application: 0x1032b0800, rule_sets: [(\"Minion\", 4100)] }, to Expression: Not(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))), resulting in: WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"c\"), Bool(false)), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"boolean_literal_to_wliteral\", application: 0x1032b0800, rule_sets: [(\"Minion\", 4100)] }, to Expression: Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"d\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))]), resulting in: Or(Metadata { clean: false, etype: None }, [WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"d\"), Bool(true)), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"c\"), Bool(true))]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/eprime-minion/partial-eval-01-add/input-expected-rule-trace.json b/conjure_oxide/tests/integration/eprime-minion/partial-eval-01-add/input-expected-rule-trace.json new file mode 100644 index 0000000000..ed8d077a51 --- /dev/null +++ b/conjure_oxide/tests/integration/eprime-minion/partial-eval-01-add/input-expected-rule-trace.json @@ -0,0 +1,7 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"flatten_nested_sum\", to Expression: Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10))]), Constant(Metadata { clean: false, etype: None }, Int(20))]), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))]), Constant(Metadata { clean: false, etype: None }, Int(5))]), resulting in: Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10))]), Constant(Metadata { clean: false, etype: None }, Int(20))]), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(5))]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"flatten_nested_sum\", to Expression: Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10))]), Constant(Metadata { clean: false, etype: None }, Int(20))]), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(5))]), resulting in: Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10))]), Constant(Metadata { clean: false, etype: None }, Int(20)), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(5))]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"partial_evaluator\", to Expression: Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10))]), Constant(Metadata { clean: false, etype: None }, Int(20)), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(5))]), resulting in: Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10))]), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(25))]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"flatten_nested_sum\", to Expression: Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10))]), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(25))]), resulting in: Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10)), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(25))]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"sum_eq_to_sumeq\", to Expression: Eq(Metadata { clean: false, etype: None }, Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10)), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(25))]), Constant(Metadata { clean: false, etype: None }, Int(100))), resulting in: SumEq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10)), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(25))], Constant(Metadata { clean: false, etype: None }, Int(100))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"partial_evaluator\", to Expression: SumEq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10)), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(25))], Constant(Metadata { clean: false, etype: None }, Int(100))), resulting in: SumEq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))], Constant(Metadata { clean: false, etype: None }, Int(65))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"sumeq_to_minion\", to Expression: SumEq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))], Constant(Metadata { clean: false, etype: None }, Int(65))), resulting in: And(Metadata { clean: false, etype: None }, [SumGeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))], Constant(Metadata { clean: false, etype: None }, Int(65))), SumLeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))], Constant(Metadata { clean: false, etype: None }, Int(65)))]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/eprime-minion/partial-eval-01-add/input-generated-rule-trace.json b/conjure_oxide/tests/integration/eprime-minion/partial-eval-01-add/input-generated-rule-trace.json new file mode 100644 index 0000000000..482da2a21e --- /dev/null +++ b/conjure_oxide/tests/integration/eprime-minion/partial-eval-01-add/input-generated-rule-trace.json @@ -0,0 +1,7 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"flatten_nested_sum\", to Expression: Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10))]), Constant(Metadata { clean: false, etype: None }, Int(20))]), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))]), Constant(Metadata { clean: false, etype: None }, Int(5))]), resulting in: Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10))]), Constant(Metadata { clean: false, etype: None }, Int(20))]), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(5))]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"flatten_nested_sum\", to Expression: Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10))]), Constant(Metadata { clean: false, etype: None }, Int(20))]), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(5))]), resulting in: Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10))]), Constant(Metadata { clean: false, etype: None }, Int(20)), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(5))]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"partial_evaluator\", to Expression: Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10))]), Constant(Metadata { clean: false, etype: None }, Int(20)), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(5))]), resulting in: Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10))]), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(25))]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"flatten_nested_sum\", to Expression: Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10))]), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(25))]), resulting in: Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10)), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(25))]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"sum_eq_to_sumeq\", to Expression: Eq(Metadata { clean: false, etype: None }, Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10)), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(25))]), Constant(Metadata { clean: false, etype: None }, Int(100))), resulting in: SumEq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10)), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(25))], Constant(Metadata { clean: false, etype: None }, Int(100))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"partial_evaluator\", to Expression: SumEq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10)), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(25))], Constant(Metadata { clean: false, etype: None }, Int(100))), resulting in: SumEq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))], Constant(Metadata { clean: false, etype: None }, Int(65))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"sumeq_to_minion\", to Expression: SumEq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))], Constant(Metadata { clean: false, etype: None }, Int(65))), resulting in: And(Metadata { clean: false, etype: None }, [SumGeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))], Constant(Metadata { clean: false, etype: None }, Int(65))), SumLeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))], Constant(Metadata { clean: false, etype: None }, Int(65)))]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/eprime-minion/partial-eval-01-add/input-rules.json b/conjure_oxide/tests/integration/eprime-minion/partial-eval-01-add/input-rules.json new file mode 100644 index 0000000000..5b855cecc7 --- /dev/null +++ b/conjure_oxide/tests/integration/eprime-minion/partial-eval-01-add/input-rules.json @@ -0,0 +1,7 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"flatten_nested_sum\", application: 0x1032a9b78, rule_sets: [(\"Base\", 8800)] }, to Expression: Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10))]), Constant(Metadata { clean: false, etype: None }, Int(20))]), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))]), Constant(Metadata { clean: false, etype: None }, Int(5))]), resulting in: Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10))]), Constant(Metadata { clean: false, etype: None }, Int(20))]), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(5))]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"flatten_nested_sum\", application: 0x1032a9b78, rule_sets: [(\"Base\", 8800)] }, to Expression: Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10))]), Constant(Metadata { clean: false, etype: None }, Int(20))]), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(5))]), resulting in: Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10))]), Constant(Metadata { clean: false, etype: None }, Int(20)), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(5))]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"partial_evaluator\", application: 0x1032b13d4, rule_sets: [(\"Base\", 9000)] }, to Expression: Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10))]), Constant(Metadata { clean: false, etype: None }, Int(20)), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(5))]), resulting in: Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10))]), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(25))]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"flatten_nested_sum\", application: 0x1032a9b78, rule_sets: [(\"Base\", 8800)] }, to Expression: Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10))]), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(25))]), resulting in: Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10)), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(25))]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"sum_eq_to_sumeq\", application: 0x1032adfcc, rule_sets: [(\"Minion\", 4400)] }, to Expression: Eq(Metadata { clean: false, etype: None }, Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10)), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(25))]), Constant(Metadata { clean: false, etype: None }, Int(100))), resulting in: SumEq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10)), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(25))], Constant(Metadata { clean: false, etype: None }, Int(100))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"partial_evaluator\", application: 0x1032b13d4, rule_sets: [(\"Base\", 9000)] }, to Expression: SumEq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10)), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(25))], Constant(Metadata { clean: false, etype: None }, Int(100))), resulting in: SumEq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))], Constant(Metadata { clean: false, etype: None }, Int(65))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"sumeq_to_minion\", application: 0x1032ae3cc, rule_sets: [(\"Minion\", 4400)] }, to Expression: SumEq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))], Constant(Metadata { clean: false, etype: None }, Int(65))), resulting in: And(Metadata { clean: false, etype: None }, [SumGeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))], Constant(Metadata { clean: false, etype: None }, Int(65))), SumLeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))], Constant(Metadata { clean: false, etype: None }, Int(65)))]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/eprime-minion/partial-eval-02-or-and/input-expected-rule-trace.json b/conjure_oxide/tests/integration/eprime-minion/partial-eval-02-or-and/input-expected-rule-trace.json new file mode 100644 index 0000000000..e4893b70f4 --- /dev/null +++ b/conjure_oxide/tests/integration/eprime-minion/partial-eval-02-or-and/input-expected-rule-trace.json @@ -0,0 +1,8 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"unwrap_nested_and\", to Expression: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Bool(false))]), Or(Metadata { clean: false, etype: None }, [AllDiff(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(1)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(3))]), Constant(Metadata { clean: false, etype: None }, Bool(true))]), And(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Bool(true))])]), resulting in: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Bool(false))]), Or(Metadata { clean: false, etype: None }, [AllDiff(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(1)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(3))]), Constant(Metadata { clean: false, etype: None }, Bool(true))]), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Bool(true))]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"partial_evaluator\", to Expression: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Bool(false))]), Or(Metadata { clean: false, etype: None }, [AllDiff(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(1)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(3))]), Constant(Metadata { clean: false, etype: None }, Bool(true))]), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Bool(true))]), resulting in: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Bool(false))]), Or(Metadata { clean: false, etype: None }, [AllDiff(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(1)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(3))]), Constant(Metadata { clean: false, etype: None }, Bool(true))]), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"boolean_literal_to_wliteral\", to Expression: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Bool(false))]), Or(Metadata { clean: false, etype: None }, [AllDiff(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(1)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(3))]), Constant(Metadata { clean: false, etype: None }, Bool(true))]), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))]), resulting in: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Bool(false))]), Or(Metadata { clean: false, etype: None }, [AllDiff(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(1)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(3))]), Constant(Metadata { clean: false, etype: None }, Bool(true))]), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"c\"), Bool(true))]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"partial_evaluator\", to Expression: Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Bool(false))]), resulting in: Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))])]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"remove_trivial_or\", to Expression: Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))])]), resulting in: Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"boolean_literal_to_wliteral\", to Expression: Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), resulting in: Or(Metadata { clean: false, etype: None }, [WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"a\"), Bool(true)), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"b\"), Bool(true))]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"partial_evaluator\", to Expression: Or(Metadata { clean: false, etype: None }, [AllDiff(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(1)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(3))]), Constant(Metadata { clean: false, etype: None }, Bool(true))]), resulting in: Constant(Metadata { clean: false, etype: None }, Bool(true)), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"partial_evaluator\", to Expression: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"a\"), Bool(true)), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"b\"), Bool(true))]), Constant(Metadata { clean: false, etype: None }, Bool(true)), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"c\"), Bool(true))]), resulting in: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"a\"), Bool(true)), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"b\"), Bool(true))]), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"c\"), Bool(true))]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/eprime-minion/partial-eval-02-or-and/input-generated-rule-trace.json b/conjure_oxide/tests/integration/eprime-minion/partial-eval-02-or-and/input-generated-rule-trace.json new file mode 100644 index 0000000000..9845c0fc37 --- /dev/null +++ b/conjure_oxide/tests/integration/eprime-minion/partial-eval-02-or-and/input-generated-rule-trace.json @@ -0,0 +1,8 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"unwrap_nested_and\", to Expression: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Bool(false))]), Or(Metadata { clean: false, etype: None }, [AllDiff(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(1)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(3))]), Constant(Metadata { clean: false, etype: None }, Bool(true))]), And(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Bool(true))])]), resulting in: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Bool(false))]), Or(Metadata { clean: false, etype: None }, [AllDiff(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(1)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(3))]), Constant(Metadata { clean: false, etype: None }, Bool(true))]), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Bool(true))]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"partial_evaluator\", to Expression: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Bool(false))]), Or(Metadata { clean: false, etype: None }, [AllDiff(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(1)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(3))]), Constant(Metadata { clean: false, etype: None }, Bool(true))]), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Bool(true))]), resulting in: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Bool(false))]), Or(Metadata { clean: false, etype: None }, [AllDiff(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(1)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(3))]), Constant(Metadata { clean: false, etype: None }, Bool(true))]), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"boolean_literal_to_wliteral\", to Expression: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Bool(false))]), Or(Metadata { clean: false, etype: None }, [AllDiff(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(1)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(3))]), Constant(Metadata { clean: false, etype: None }, Bool(true))]), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))]), resulting in: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Bool(false))]), Or(Metadata { clean: false, etype: None }, [AllDiff(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(1)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(3))]), Constant(Metadata { clean: false, etype: None }, Bool(true))]), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"c\"), Bool(true))]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"partial_evaluator\", to Expression: Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Bool(false))]), resulting in: Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))])]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"remove_trivial_or\", to Expression: Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))])]), resulting in: Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"boolean_literal_to_wliteral\", to Expression: Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), resulting in: Or(Metadata { clean: false, etype: None }, [WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"a\"), Bool(true)), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"b\"), Bool(true))]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"partial_evaluator\", to Expression: Or(Metadata { clean: false, etype: None }, [AllDiff(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(1)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(3))]), Constant(Metadata { clean: false, etype: None }, Bool(true))]), resulting in: Constant(Metadata { clean: false, etype: None }, Bool(true)), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"partial_evaluator\", to Expression: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"a\"), Bool(true)), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"b\"), Bool(true))]), Constant(Metadata { clean: false, etype: None }, Bool(true)), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"c\"), Bool(true))]), resulting in: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"a\"), Bool(true)), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"b\"), Bool(true))]), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"c\"), Bool(true))]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/eprime-minion/partial-eval-02-or-and/input-rules.json b/conjure_oxide/tests/integration/eprime-minion/partial-eval-02-or-and/input-rules.json new file mode 100644 index 0000000000..391cb677a6 --- /dev/null +++ b/conjure_oxide/tests/integration/eprime-minion/partial-eval-02-or-and/input-rules.json @@ -0,0 +1,8 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"unwrap_nested_and\", application: 0x1032aa170, rule_sets: [(\"Base\", 8800)] }, to Expression: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Bool(false))]), Or(Metadata { clean: false, etype: None }, [AllDiff(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(1)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(3))]), Constant(Metadata { clean: false, etype: None }, Bool(true))]), And(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Bool(true))])]), resulting in: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Bool(false))]), Or(Metadata { clean: false, etype: None }, [AllDiff(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(1)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(3))]), Constant(Metadata { clean: false, etype: None }, Bool(true))]), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Bool(true))]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"partial_evaluator\", application: 0x1032b13d4, rule_sets: [(\"Base\", 9000)] }, to Expression: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Bool(false))]), Or(Metadata { clean: false, etype: None }, [AllDiff(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(1)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(3))]), Constant(Metadata { clean: false, etype: None }, Bool(true))]), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Bool(true))]), resulting in: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Bool(false))]), Or(Metadata { clean: false, etype: None }, [AllDiff(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(1)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(3))]), Constant(Metadata { clean: false, etype: None }, Bool(true))]), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"boolean_literal_to_wliteral\", application: 0x1032b0800, rule_sets: [(\"Minion\", 4100)] }, to Expression: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Bool(false))]), Or(Metadata { clean: false, etype: None }, [AllDiff(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(1)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(3))]), Constant(Metadata { clean: false, etype: None }, Bool(true))]), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))]), resulting in: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Bool(false))]), Or(Metadata { clean: false, etype: None }, [AllDiff(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(1)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(3))]), Constant(Metadata { clean: false, etype: None }, Bool(true))]), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"c\"), Bool(true))]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"partial_evaluator\", application: 0x1032b13d4, rule_sets: [(\"Base\", 9000)] }, to Expression: Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Bool(false))]), resulting in: Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))])]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"remove_trivial_or\", application: 0x1032aa6bc, rule_sets: [(\"Base\", 8800)] }, to Expression: Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))])]), resulting in: Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"boolean_literal_to_wliteral\", application: 0x1032b0800, rule_sets: [(\"Minion\", 4100)] }, to Expression: Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), resulting in: Or(Metadata { clean: false, etype: None }, [WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"a\"), Bool(true)), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"b\"), Bool(true))]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"partial_evaluator\", application: 0x1032b13d4, rule_sets: [(\"Base\", 9000)] }, to Expression: Or(Metadata { clean: false, etype: None }, [AllDiff(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(1)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(3))]), Constant(Metadata { clean: false, etype: None }, Bool(true))]), resulting in: Constant(Metadata { clean: false, etype: None }, Bool(true)), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"partial_evaluator\", application: 0x1032b13d4, rule_sets: [(\"Base\", 9000)] }, to Expression: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"a\"), Bool(true)), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"b\"), Bool(true))]), Constant(Metadata { clean: false, etype: None }, Bool(true)), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"c\"), Bool(true))]), resulting in: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"a\"), Bool(true)), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"b\"), Bool(true))]), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"c\"), Bool(true))]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/eprime-minion/partial-eval-add/input-expected-rule-trace.json b/conjure_oxide/tests/integration/eprime-minion/partial-eval-add/input-expected-rule-trace.json new file mode 100644 index 0000000000..ed8d077a51 --- /dev/null +++ b/conjure_oxide/tests/integration/eprime-minion/partial-eval-add/input-expected-rule-trace.json @@ -0,0 +1,7 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"flatten_nested_sum\", to Expression: Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10))]), Constant(Metadata { clean: false, etype: None }, Int(20))]), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))]), Constant(Metadata { clean: false, etype: None }, Int(5))]), resulting in: Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10))]), Constant(Metadata { clean: false, etype: None }, Int(20))]), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(5))]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"flatten_nested_sum\", to Expression: Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10))]), Constant(Metadata { clean: false, etype: None }, Int(20))]), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(5))]), resulting in: Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10))]), Constant(Metadata { clean: false, etype: None }, Int(20)), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(5))]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"partial_evaluator\", to Expression: Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10))]), Constant(Metadata { clean: false, etype: None }, Int(20)), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(5))]), resulting in: Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10))]), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(25))]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"flatten_nested_sum\", to Expression: Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10))]), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(25))]), resulting in: Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10)), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(25))]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"sum_eq_to_sumeq\", to Expression: Eq(Metadata { clean: false, etype: None }, Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10)), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(25))]), Constant(Metadata { clean: false, etype: None }, Int(100))), resulting in: SumEq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10)), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(25))], Constant(Metadata { clean: false, etype: None }, Int(100))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"partial_evaluator\", to Expression: SumEq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10)), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(25))], Constant(Metadata { clean: false, etype: None }, Int(100))), resulting in: SumEq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))], Constant(Metadata { clean: false, etype: None }, Int(65))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"sumeq_to_minion\", to Expression: SumEq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))], Constant(Metadata { clean: false, etype: None }, Int(65))), resulting in: And(Metadata { clean: false, etype: None }, [SumGeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))], Constant(Metadata { clean: false, etype: None }, Int(65))), SumLeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))], Constant(Metadata { clean: false, etype: None }, Int(65)))]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/eprime-minion/partial-eval-add/input-generated-rule-trace.json b/conjure_oxide/tests/integration/eprime-minion/partial-eval-add/input-generated-rule-trace.json new file mode 100644 index 0000000000..482da2a21e --- /dev/null +++ b/conjure_oxide/tests/integration/eprime-minion/partial-eval-add/input-generated-rule-trace.json @@ -0,0 +1,7 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"flatten_nested_sum\", to Expression: Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10))]), Constant(Metadata { clean: false, etype: None }, Int(20))]), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))]), Constant(Metadata { clean: false, etype: None }, Int(5))]), resulting in: Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10))]), Constant(Metadata { clean: false, etype: None }, Int(20))]), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(5))]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"flatten_nested_sum\", to Expression: Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10))]), Constant(Metadata { clean: false, etype: None }, Int(20))]), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(5))]), resulting in: Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10))]), Constant(Metadata { clean: false, etype: None }, Int(20)), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(5))]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"partial_evaluator\", to Expression: Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10))]), Constant(Metadata { clean: false, etype: None }, Int(20)), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(5))]), resulting in: Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10))]), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(25))]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"flatten_nested_sum\", to Expression: Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10))]), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(25))]), resulting in: Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10)), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(25))]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"sum_eq_to_sumeq\", to Expression: Eq(Metadata { clean: false, etype: None }, Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10)), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(25))]), Constant(Metadata { clean: false, etype: None }, Int(100))), resulting in: SumEq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10)), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(25))], Constant(Metadata { clean: false, etype: None }, Int(100))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"partial_evaluator\", to Expression: SumEq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10)), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(25))], Constant(Metadata { clean: false, etype: None }, Int(100))), resulting in: SumEq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))], Constant(Metadata { clean: false, etype: None }, Int(65))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"sumeq_to_minion\", to Expression: SumEq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))], Constant(Metadata { clean: false, etype: None }, Int(65))), resulting in: And(Metadata { clean: false, etype: None }, [SumGeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))], Constant(Metadata { clean: false, etype: None }, Int(65))), SumLeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))], Constant(Metadata { clean: false, etype: None }, Int(65)))]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/eprime-minion/partial-eval-add/input-rules.json b/conjure_oxide/tests/integration/eprime-minion/partial-eval-add/input-rules.json new file mode 100644 index 0000000000..5b855cecc7 --- /dev/null +++ b/conjure_oxide/tests/integration/eprime-minion/partial-eval-add/input-rules.json @@ -0,0 +1,7 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"flatten_nested_sum\", application: 0x1032a9b78, rule_sets: [(\"Base\", 8800)] }, to Expression: Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10))]), Constant(Metadata { clean: false, etype: None }, Int(20))]), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))]), Constant(Metadata { clean: false, etype: None }, Int(5))]), resulting in: Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10))]), Constant(Metadata { clean: false, etype: None }, Int(20))]), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(5))]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"flatten_nested_sum\", application: 0x1032a9b78, rule_sets: [(\"Base\", 8800)] }, to Expression: Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10))]), Constant(Metadata { clean: false, etype: None }, Int(20))]), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(5))]), resulting in: Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10))]), Constant(Metadata { clean: false, etype: None }, Int(20)), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(5))]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"partial_evaluator\", application: 0x1032b13d4, rule_sets: [(\"Base\", 9000)] }, to Expression: Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10))]), Constant(Metadata { clean: false, etype: None }, Int(20)), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(5))]), resulting in: Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10))]), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(25))]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"flatten_nested_sum\", application: 0x1032a9b78, rule_sets: [(\"Base\", 8800)] }, to Expression: Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10))]), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(25))]), resulting in: Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10)), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(25))]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"sum_eq_to_sumeq\", application: 0x1032adfcc, rule_sets: [(\"Minion\", 4400)] }, to Expression: Eq(Metadata { clean: false, etype: None }, Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10)), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(25))]), Constant(Metadata { clean: false, etype: None }, Int(100))), resulting in: SumEq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10)), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(25))], Constant(Metadata { clean: false, etype: None }, Int(100))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"partial_evaluator\", application: 0x1032b13d4, rule_sets: [(\"Base\", 9000)] }, to Expression: SumEq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Constant(Metadata { clean: false, etype: None }, Int(10)), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(25))], Constant(Metadata { clean: false, etype: None }, Int(100))), resulting in: SumEq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))], Constant(Metadata { clean: false, etype: None }, Int(65))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"sumeq_to_minion\", application: 0x1032ae3cc, rule_sets: [(\"Minion\", 4400)] }, to Expression: SumEq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))], Constant(Metadata { clean: false, etype: None }, Int(65))), resulting in: And(Metadata { clean: false, etype: None }, [SumGeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))], Constant(Metadata { clean: false, etype: None }, Int(65))), SumLeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))], Constant(Metadata { clean: false, etype: None }, Int(65)))]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/eprime-minion/partial-eval-or-and/input-expected-rule-trace.json b/conjure_oxide/tests/integration/eprime-minion/partial-eval-or-and/input-expected-rule-trace.json new file mode 100644 index 0000000000..e4893b70f4 --- /dev/null +++ b/conjure_oxide/tests/integration/eprime-minion/partial-eval-or-and/input-expected-rule-trace.json @@ -0,0 +1,8 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"unwrap_nested_and\", to Expression: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Bool(false))]), Or(Metadata { clean: false, etype: None }, [AllDiff(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(1)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(3))]), Constant(Metadata { clean: false, etype: None }, Bool(true))]), And(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Bool(true))])]), resulting in: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Bool(false))]), Or(Metadata { clean: false, etype: None }, [AllDiff(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(1)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(3))]), Constant(Metadata { clean: false, etype: None }, Bool(true))]), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Bool(true))]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"partial_evaluator\", to Expression: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Bool(false))]), Or(Metadata { clean: false, etype: None }, [AllDiff(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(1)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(3))]), Constant(Metadata { clean: false, etype: None }, Bool(true))]), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Bool(true))]), resulting in: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Bool(false))]), Or(Metadata { clean: false, etype: None }, [AllDiff(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(1)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(3))]), Constant(Metadata { clean: false, etype: None }, Bool(true))]), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"boolean_literal_to_wliteral\", to Expression: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Bool(false))]), Or(Metadata { clean: false, etype: None }, [AllDiff(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(1)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(3))]), Constant(Metadata { clean: false, etype: None }, Bool(true))]), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))]), resulting in: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Bool(false))]), Or(Metadata { clean: false, etype: None }, [AllDiff(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(1)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(3))]), Constant(Metadata { clean: false, etype: None }, Bool(true))]), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"c\"), Bool(true))]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"partial_evaluator\", to Expression: Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Bool(false))]), resulting in: Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))])]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"remove_trivial_or\", to Expression: Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))])]), resulting in: Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"boolean_literal_to_wliteral\", to Expression: Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), resulting in: Or(Metadata { clean: false, etype: None }, [WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"a\"), Bool(true)), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"b\"), Bool(true))]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"partial_evaluator\", to Expression: Or(Metadata { clean: false, etype: None }, [AllDiff(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(1)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(3))]), Constant(Metadata { clean: false, etype: None }, Bool(true))]), resulting in: Constant(Metadata { clean: false, etype: None }, Bool(true)), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"partial_evaluator\", to Expression: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"a\"), Bool(true)), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"b\"), Bool(true))]), Constant(Metadata { clean: false, etype: None }, Bool(true)), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"c\"), Bool(true))]), resulting in: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"a\"), Bool(true)), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"b\"), Bool(true))]), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"c\"), Bool(true))]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/eprime-minion/partial-eval-or-and/input-generated-rule-trace.json b/conjure_oxide/tests/integration/eprime-minion/partial-eval-or-and/input-generated-rule-trace.json new file mode 100644 index 0000000000..9845c0fc37 --- /dev/null +++ b/conjure_oxide/tests/integration/eprime-minion/partial-eval-or-and/input-generated-rule-trace.json @@ -0,0 +1,8 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"unwrap_nested_and\", to Expression: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Bool(false))]), Or(Metadata { clean: false, etype: None }, [AllDiff(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(1)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(3))]), Constant(Metadata { clean: false, etype: None }, Bool(true))]), And(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Bool(true))])]), resulting in: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Bool(false))]), Or(Metadata { clean: false, etype: None }, [AllDiff(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(1)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(3))]), Constant(Metadata { clean: false, etype: None }, Bool(true))]), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Bool(true))]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"partial_evaluator\", to Expression: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Bool(false))]), Or(Metadata { clean: false, etype: None }, [AllDiff(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(1)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(3))]), Constant(Metadata { clean: false, etype: None }, Bool(true))]), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Bool(true))]), resulting in: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Bool(false))]), Or(Metadata { clean: false, etype: None }, [AllDiff(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(1)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(3))]), Constant(Metadata { clean: false, etype: None }, Bool(true))]), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"boolean_literal_to_wliteral\", to Expression: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Bool(false))]), Or(Metadata { clean: false, etype: None }, [AllDiff(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(1)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(3))]), Constant(Metadata { clean: false, etype: None }, Bool(true))]), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))]), resulting in: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Bool(false))]), Or(Metadata { clean: false, etype: None }, [AllDiff(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(1)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(3))]), Constant(Metadata { clean: false, etype: None }, Bool(true))]), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"c\"), Bool(true))]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"partial_evaluator\", to Expression: Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Bool(false))]), resulting in: Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))])]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"remove_trivial_or\", to Expression: Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))])]), resulting in: Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"boolean_literal_to_wliteral\", to Expression: Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), resulting in: Or(Metadata { clean: false, etype: None }, [WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"a\"), Bool(true)), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"b\"), Bool(true))]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"partial_evaluator\", to Expression: Or(Metadata { clean: false, etype: None }, [AllDiff(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(1)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(3))]), Constant(Metadata { clean: false, etype: None }, Bool(true))]), resulting in: Constant(Metadata { clean: false, etype: None }, Bool(true)), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"partial_evaluator\", to Expression: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"a\"), Bool(true)), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"b\"), Bool(true))]), Constant(Metadata { clean: false, etype: None }, Bool(true)), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"c\"), Bool(true))]), resulting in: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"a\"), Bool(true)), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"b\"), Bool(true))]), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"c\"), Bool(true))]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/eprime-minion/partial-eval-or-and/input-rules.json b/conjure_oxide/tests/integration/eprime-minion/partial-eval-or-and/input-rules.json new file mode 100644 index 0000000000..391cb677a6 --- /dev/null +++ b/conjure_oxide/tests/integration/eprime-minion/partial-eval-or-and/input-rules.json @@ -0,0 +1,8 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"unwrap_nested_and\", application: 0x1032aa170, rule_sets: [(\"Base\", 8800)] }, to Expression: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Bool(false))]), Or(Metadata { clean: false, etype: None }, [AllDiff(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(1)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(3))]), Constant(Metadata { clean: false, etype: None }, Bool(true))]), And(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Bool(true))])]), resulting in: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Bool(false))]), Or(Metadata { clean: false, etype: None }, [AllDiff(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(1)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(3))]), Constant(Metadata { clean: false, etype: None }, Bool(true))]), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Bool(true))]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"partial_evaluator\", application: 0x1032b13d4, rule_sets: [(\"Base\", 9000)] }, to Expression: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Bool(false))]), Or(Metadata { clean: false, etype: None }, [AllDiff(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(1)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(3))]), Constant(Metadata { clean: false, etype: None }, Bool(true))]), Reference(Metadata { clean: false, etype: None }, UserName(\"c\")), Constant(Metadata { clean: false, etype: None }, Bool(true))]), resulting in: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Bool(false))]), Or(Metadata { clean: false, etype: None }, [AllDiff(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(1)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(3))]), Constant(Metadata { clean: false, etype: None }, Bool(true))]), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"boolean_literal_to_wliteral\", application: 0x1032b0800, rule_sets: [(\"Minion\", 4100)] }, to Expression: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Bool(false))]), Or(Metadata { clean: false, etype: None }, [AllDiff(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(1)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(3))]), Constant(Metadata { clean: false, etype: None }, Bool(true))]), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))]), resulting in: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Bool(false))]), Or(Metadata { clean: false, etype: None }, [AllDiff(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(1)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(3))]), Constant(Metadata { clean: false, etype: None }, Bool(true))]), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"c\"), Bool(true))]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"partial_evaluator\", application: 0x1032b13d4, rule_sets: [(\"Base\", 9000)] }, to Expression: Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Bool(false))]), resulting in: Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))])]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"remove_trivial_or\", application: 0x1032aa6bc, rule_sets: [(\"Base\", 8800)] }, to Expression: Or(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))])]), resulting in: Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"boolean_literal_to_wliteral\", application: 0x1032b0800, rule_sets: [(\"Minion\", 4100)] }, to Expression: Or(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), resulting in: Or(Metadata { clean: false, etype: None }, [WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"a\"), Bool(true)), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"b\"), Bool(true))]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"partial_evaluator\", application: 0x1032b13d4, rule_sets: [(\"Base\", 9000)] }, to Expression: Or(Metadata { clean: false, etype: None }, [AllDiff(Metadata { clean: false, etype: None }, [Constant(Metadata { clean: false, etype: None }, Int(1)), Constant(Metadata { clean: false, etype: None }, Int(2)), Constant(Metadata { clean: false, etype: None }, Int(3))]), Constant(Metadata { clean: false, etype: None }, Bool(true))]), resulting in: Constant(Metadata { clean: false, etype: None }, Bool(true)), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"partial_evaluator\", application: 0x1032b13d4, rule_sets: [(\"Base\", 9000)] }, to Expression: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"a\"), Bool(true)), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"b\"), Bool(true))]), Constant(Metadata { clean: false, etype: None }, Bool(true)), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"c\"), Bool(true))]), resulting in: And(Metadata { clean: false, etype: None }, [Or(Metadata { clean: false, etype: None }, [WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"a\"), Bool(true)), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"b\"), Bool(true))]), WatchedLiteral(Metadata { clean: false, etype: None }, UserName(\"c\"), Bool(true))]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/eprime-minion/xyz/input-expected-rule-trace.json b/conjure_oxide/tests/integration/eprime-minion/xyz/input-expected-rule-trace.json new file mode 100644 index 0000000000..bf71240136 --- /dev/null +++ b/conjure_oxide/tests/integration/eprime-minion/xyz/input-expected-rule-trace.json @@ -0,0 +1,5 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"flatten_nested_sum\", to Expression: Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))]), resulting in: Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"sum_eq_to_sumeq\", to Expression: Eq(Metadata { clean: false, etype: None }, Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))]), Constant(Metadata { clean: false, etype: None }, Int(4))), resulting in: SumEq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(4))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"sumeq_to_minion\", to Expression: SumEq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(4))), resulting in: And(Metadata { clean: false, etype: None }, [SumGeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(4))), SumLeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(4)))]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"unwrap_nested_and\", to Expression: And(Metadata { clean: false, etype: None }, [And(Metadata { clean: false, etype: None }, [SumGeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(4))), SumLeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(4)))]), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))]), resulting in: And(Metadata { clean: false, etype: None }, [SumGeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(4))), SumLeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(4))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"geq_to_ineq\", to Expression: Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/eprime-minion/xyz/input-generated-rule-trace.json b/conjure_oxide/tests/integration/eprime-minion/xyz/input-generated-rule-trace.json new file mode 100644 index 0000000000..289957e6ca --- /dev/null +++ b/conjure_oxide/tests/integration/eprime-minion/xyz/input-generated-rule-trace.json @@ -0,0 +1,5 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"flatten_nested_sum\", to Expression: Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))]), resulting in: Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"sum_eq_to_sumeq\", to Expression: Eq(Metadata { clean: false, etype: None }, Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))]), Constant(Metadata { clean: false, etype: None }, Int(4))), resulting in: SumEq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(4))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"sumeq_to_minion\", to Expression: SumEq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(4))), resulting in: And(Metadata { clean: false, etype: None }, [SumGeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(4))), SumLeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(4)))]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"unwrap_nested_and\", to Expression: And(Metadata { clean: false, etype: None }, [And(Metadata { clean: false, etype: None }, [SumGeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(4))), SumLeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(4)))]), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))]), resulting in: And(Metadata { clean: false, etype: None }, [SumGeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(4))), SumLeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(4))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"geq_to_ineq\", to Expression: Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/eprime-minion/xyz/input-rules.json b/conjure_oxide/tests/integration/eprime-minion/xyz/input-rules.json new file mode 100644 index 0000000000..7293476659 --- /dev/null +++ b/conjure_oxide/tests/integration/eprime-minion/xyz/input-rules.json @@ -0,0 +1,5 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"flatten_nested_sum\", application: 0x1032a9b78, rule_sets: [(\"Base\", 8800)] }, to Expression: Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))]), resulting in: Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"sum_eq_to_sumeq\", application: 0x1032adfcc, rule_sets: [(\"Minion\", 4400)] }, to Expression: Eq(Metadata { clean: false, etype: None }, Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))]), Constant(Metadata { clean: false, etype: None }, Int(4))), resulting in: SumEq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(4))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"sumeq_to_minion\", application: 0x1032ae3cc, rule_sets: [(\"Minion\", 4400)] }, to Expression: SumEq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(4))), resulting in: And(Metadata { clean: false, etype: None }, [SumGeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(4))), SumLeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(4)))]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"unwrap_nested_and\", application: 0x1032aa170, rule_sets: [(\"Base\", 8800)] }, to Expression: And(Metadata { clean: false, etype: None }, [And(Metadata { clean: false, etype: None }, [SumGeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(4))), SumLeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(4)))]), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))]), resulting in: And(Metadata { clean: false, etype: None }, [SumGeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(4))), SumLeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(4))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"geq_to_ineq\", application: 0x1032aec4c, rule_sets: [(\"Minion\", 4100)] }, to Expression: Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/experiment/works/max2/input-expected-rule-trace.json b/conjure_oxide/tests/integration/experiment/works/max2/input-expected-rule-trace.json new file mode 100644 index 0000000000..d91cf22d2d --- /dev/null +++ b/conjure_oxide/tests/integration/experiment/works/max2/input-expected-rule-trace.json @@ -0,0 +1,16 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"geq_to_ineq\", to Expression: Geq(Metadata { clean: false, etype: None }, Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(2))), resulting in: Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"max_to_var\", to Expression: Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), resulting in: Reference(Metadata { clean: false, etype: None }, MachineName(0)), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"unwrap_nested_and\", to Expression: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Sum(Metadata { clean: false, etype: None }, [Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(1))])), And(Metadata { clean: false, etype: None }, [Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])])]), resulting in: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Sum(Metadata { clean: false, etype: None }, [Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(1))])), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"sum_eq_to_sumeq\", to Expression: Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Sum(Metadata { clean: false, etype: None }, [Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(1))])), resulting in: SumEq(Metadata { clean: false, etype: None }, [Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\"))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"sumeq_to_minion\", to Expression: SumEq(Metadata { clean: false, etype: None }, [Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\"))), resulting in: And(Metadata { clean: false, etype: None }, [SumGeq(Metadata { clean: false, etype: None }, [Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\"))), SumLeq(Metadata { clean: false, etype: None }, [Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\")))]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"unwrap_nested_and\", to Expression: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), And(Metadata { clean: false, etype: None }, [SumGeq(Metadata { clean: false, etype: None }, [Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\"))), SumLeq(Metadata { clean: false, etype: None }, [Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\")))]), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])]), resulting in: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), SumGeq(Metadata { clean: false, etype: None }, [Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\"))), SumLeq(Metadata { clean: false, etype: None }, [Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"max_to_var\", to Expression: Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), resulting in: Reference(Metadata { clean: false, etype: None }, MachineName(1)), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"unwrap_nested_and\", to Expression: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), SumGeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, MachineName(1)), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\"))), SumLeq(Metadata { clean: false, etype: None }, [Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))]), And(Metadata { clean: false, etype: None }, [Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])])]), resulting in: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), SumGeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, MachineName(1)), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\"))), SumLeq(Metadata { clean: false, etype: None }, [Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))]), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"max_to_var\", to Expression: Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), resulting in: Reference(Metadata { clean: false, etype: None }, MachineName(2)), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"unwrap_nested_and\", to Expression: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), SumGeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, MachineName(1)), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\"))), SumLeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, MachineName(2)), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))]), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))]), And(Metadata { clean: false, etype: None }, [Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(2)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(2)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(2)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(2)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])])]), resulting in: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), SumGeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, MachineName(1)), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\"))), SumLeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, MachineName(2)), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))]), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))]), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(2)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(2)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(2)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(2)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"geq_to_ineq\", to Expression: Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"geq_to_ineq\", to Expression: Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"geq_to_ineq\", to Expression: Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, MachineName(1)), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"geq_to_ineq\", to Expression: Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, MachineName(1)), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"geq_to_ineq\", to Expression: Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(2)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, MachineName(2)), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"geq_to_ineq\", to Expression: Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(2)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, MachineName(2)), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/experiment/works/max2/input-generated-rule-trace.json b/conjure_oxide/tests/integration/experiment/works/max2/input-generated-rule-trace.json new file mode 100644 index 0000000000..6af13c2c5c --- /dev/null +++ b/conjure_oxide/tests/integration/experiment/works/max2/input-generated-rule-trace.json @@ -0,0 +1,16 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"geq_to_ineq\", to Expression: Geq(Metadata { clean: false, etype: None }, Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(2))), resulting in: Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"max_to_var\", to Expression: Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), resulting in: Reference(Metadata { clean: false, etype: None }, MachineName(0)), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"unwrap_nested_and\", to Expression: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Sum(Metadata { clean: false, etype: None }, [Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(1))])), And(Metadata { clean: false, etype: None }, [Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])])]), resulting in: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Sum(Metadata { clean: false, etype: None }, [Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(1))])), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"sum_eq_to_sumeq\", to Expression: Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Sum(Metadata { clean: false, etype: None }, [Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(1))])), resulting in: SumEq(Metadata { clean: false, etype: None }, [Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\"))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"sumeq_to_minion\", to Expression: SumEq(Metadata { clean: false, etype: None }, [Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\"))), resulting in: And(Metadata { clean: false, etype: None }, [SumGeq(Metadata { clean: false, etype: None }, [Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\"))), SumLeq(Metadata { clean: false, etype: None }, [Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\")))]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"unwrap_nested_and\", to Expression: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), And(Metadata { clean: false, etype: None }, [SumGeq(Metadata { clean: false, etype: None }, [Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\"))), SumLeq(Metadata { clean: false, etype: None }, [Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\")))]), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])]), resulting in: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), SumGeq(Metadata { clean: false, etype: None }, [Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\"))), SumLeq(Metadata { clean: false, etype: None }, [Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"max_to_var\", to Expression: Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), resulting in: Reference(Metadata { clean: false, etype: None }, MachineName(1)), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"unwrap_nested_and\", to Expression: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), SumGeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, MachineName(1)), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\"))), SumLeq(Metadata { clean: false, etype: None }, [Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))]), And(Metadata { clean: false, etype: None }, [Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])])]), resulting in: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), SumGeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, MachineName(1)), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\"))), SumLeq(Metadata { clean: false, etype: None }, [Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))]), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"max_to_var\", to Expression: Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), resulting in: Reference(Metadata { clean: false, etype: None }, MachineName(2)), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"unwrap_nested_and\", to Expression: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), SumGeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, MachineName(1)), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\"))), SumLeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, MachineName(2)), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))]), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))]), And(Metadata { clean: false, etype: None }, [Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(2)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(2)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(2)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(2)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])])]), resulting in: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), SumGeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, MachineName(1)), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\"))), SumLeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, MachineName(2)), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))]), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))]), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(2)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(2)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(2)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(2)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"geq_to_ineq\", to Expression: Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"geq_to_ineq\", to Expression: Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"geq_to_ineq\", to Expression: Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, MachineName(1)), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"geq_to_ineq\", to Expression: Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, MachineName(1)), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"geq_to_ineq\", to Expression: Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(2)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, MachineName(2)), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"geq_to_ineq\", to Expression: Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(2)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, MachineName(2)), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/experiment/works/max2/input-rules.json b/conjure_oxide/tests/integration/experiment/works/max2/input-rules.json new file mode 100644 index 0000000000..e0d49ec305 --- /dev/null +++ b/conjure_oxide/tests/integration/experiment/works/max2/input-rules.json @@ -0,0 +1,16 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"geq_to_ineq\", application: 0x1032aec4c, rule_sets: [(\"Minion\", 4100)] }, to Expression: Geq(Metadata { clean: false, etype: None }, Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(2))), resulting in: Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"max_to_var\", application: 0x1032ab81c, rule_sets: [(\"Base\", 100)] }, to Expression: Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), resulting in: Reference(Metadata { clean: false, etype: None }, MachineName(0)), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"unwrap_nested_and\", application: 0x1032aa170, rule_sets: [(\"Base\", 8800)] }, to Expression: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Sum(Metadata { clean: false, etype: None }, [Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(1))])), And(Metadata { clean: false, etype: None }, [Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])])]), resulting in: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Sum(Metadata { clean: false, etype: None }, [Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(1))])), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"sum_eq_to_sumeq\", application: 0x1032adfcc, rule_sets: [(\"Minion\", 4400)] }, to Expression: Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Sum(Metadata { clean: false, etype: None }, [Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(1))])), resulting in: SumEq(Metadata { clean: false, etype: None }, [Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\"))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"sumeq_to_minion\", application: 0x1032ae3cc, rule_sets: [(\"Minion\", 4400)] }, to Expression: SumEq(Metadata { clean: false, etype: None }, [Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\"))), resulting in: And(Metadata { clean: false, etype: None }, [SumGeq(Metadata { clean: false, etype: None }, [Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\"))), SumLeq(Metadata { clean: false, etype: None }, [Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\")))]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"unwrap_nested_and\", application: 0x1032aa170, rule_sets: [(\"Base\", 8800)] }, to Expression: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), And(Metadata { clean: false, etype: None }, [SumGeq(Metadata { clean: false, etype: None }, [Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\"))), SumLeq(Metadata { clean: false, etype: None }, [Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\")))]), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])]), resulting in: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), SumGeq(Metadata { clean: false, etype: None }, [Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\"))), SumLeq(Metadata { clean: false, etype: None }, [Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"max_to_var\", application: 0x1032ab81c, rule_sets: [(\"Base\", 100)] }, to Expression: Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), resulting in: Reference(Metadata { clean: false, etype: None }, MachineName(1)), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"unwrap_nested_and\", application: 0x1032aa170, rule_sets: [(\"Base\", 8800)] }, to Expression: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), SumGeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, MachineName(1)), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\"))), SumLeq(Metadata { clean: false, etype: None }, [Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))]), And(Metadata { clean: false, etype: None }, [Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])])]), resulting in: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), SumGeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, MachineName(1)), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\"))), SumLeq(Metadata { clean: false, etype: None }, [Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))]), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"max_to_var\", application: 0x1032ab81c, rule_sets: [(\"Base\", 100)] }, to Expression: Max(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), resulting in: Reference(Metadata { clean: false, etype: None }, MachineName(2)), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"unwrap_nested_and\", application: 0x1032aa170, rule_sets: [(\"Base\", 8800)] }, to Expression: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), SumGeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, MachineName(1)), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\"))), SumLeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, MachineName(2)), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))]), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))]), And(Metadata { clean: false, etype: None }, [Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(2)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(2)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(2)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(2)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])])]), resulting in: And(Metadata { clean: false, etype: None }, [Ineq(Metadata { clean: false, etype: None }, Constant(Metadata { clean: false, etype: None }, Int(2)), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), SumGeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, MachineName(1)), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\"))), SumLeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, MachineName(2)), Constant(Metadata { clean: false, etype: None }, Int(1))], Reference(Metadata { clean: false, etype: None }, UserName(\"x\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))]), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))]), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(2)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(2)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), Or(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(2)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), Eq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(2)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))])]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"geq_to_ineq\", application: 0x1032aec4c, rule_sets: [(\"Minion\", 4100)] }, to Expression: Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"geq_to_ineq\", application: 0x1032aec4c, rule_sets: [(\"Minion\", 4100)] }, to Expression: Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(0)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, MachineName(0)), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"geq_to_ineq\", application: 0x1032aec4c, rule_sets: [(\"Minion\", 4100)] }, to Expression: Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, MachineName(1)), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"geq_to_ineq\", application: 0x1032aec4c, rule_sets: [(\"Minion\", 4100)] }, to Expression: Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(1)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, MachineName(1)), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"geq_to_ineq\", application: 0x1032aec4c, rule_sets: [(\"Minion\", 4100)] }, to Expression: Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(2)), Reference(Metadata { clean: false, etype: None }, UserName(\"a\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, MachineName(2)), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"geq_to_ineq\", application: 0x1032aec4c, rule_sets: [(\"Minion\", 4100)] }, to Expression: Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, MachineName(2)), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, MachineName(2)), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/minion_constraints/diseq/input-expected-rule-trace.json b/conjure_oxide/tests/integration/minion_constraints/diseq/input-expected-rule-trace.json new file mode 100644 index 0000000000..e69de29bb2 diff --git a/conjure_oxide/tests/integration/minion_constraints/diseq/input-generated-rule-trace.json b/conjure_oxide/tests/integration/minion_constraints/diseq/input-generated-rule-trace.json new file mode 100644 index 0000000000..e69de29bb2 diff --git a/conjure_oxide/tests/integration/minion_constraints/diseq/input-rules.json b/conjure_oxide/tests/integration/minion_constraints/diseq/input-rules.json new file mode 100644 index 0000000000..e69de29bb2 diff --git a/conjure_oxide/tests/integration/minion_constraints/div_undefzero-01-simple/input-expected-rule-trace.json b/conjure_oxide/tests/integration/minion_constraints/div_undefzero-01-simple/input-expected-rule-trace.json new file mode 100644 index 0000000000..69a064902c --- /dev/null +++ b/conjure_oxide/tests/integration/minion_constraints/div_undefzero-01-simple/input-expected-rule-trace.json @@ -0,0 +1,5 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"div_to_bubble\", to Expression: UnsafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), resulting in: Bubble(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(0)))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"bubble_up\", to Expression: Eq(Metadata { clean: false, etype: None }, Bubble(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(0)))), Constant(Metadata { clean: false, etype: None }, Int(5))), resulting in: Bubble(Metadata { clean: false, etype: None }, Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Constant(Metadata { clean: false, etype: None }, Int(5))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"expand_bubble\", to Expression: Bubble(Metadata { clean: false, etype: None }, Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Constant(Metadata { clean: false, etype: None }, Int(5))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])), resulting in: And(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Constant(Metadata { clean: false, etype: None }, Int(5))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"unwrap_nested_and\", to Expression: And(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Constant(Metadata { clean: false, etype: None }, Int(5))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])]), resulting in: And(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Constant(Metadata { clean: false, etype: None }, Int(5))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(0)))]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"div_eq_to_diveq\", to Expression: Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Constant(Metadata { clean: false, etype: None }, Int(5))), resulting in: DivEq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(5))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/minion_constraints/div_undefzero-01-simple/input-generated-rule-trace.json b/conjure_oxide/tests/integration/minion_constraints/div_undefzero-01-simple/input-generated-rule-trace.json new file mode 100644 index 0000000000..0bdb18f04a --- /dev/null +++ b/conjure_oxide/tests/integration/minion_constraints/div_undefzero-01-simple/input-generated-rule-trace.json @@ -0,0 +1,5 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"div_to_bubble\", to Expression: UnsafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), resulting in: Bubble(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(0)))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"bubble_up\", to Expression: Eq(Metadata { clean: false, etype: None }, Bubble(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(0)))), Constant(Metadata { clean: false, etype: None }, Int(5))), resulting in: Bubble(Metadata { clean: false, etype: None }, Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Constant(Metadata { clean: false, etype: None }, Int(5))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"expand_bubble\", to Expression: Bubble(Metadata { clean: false, etype: None }, Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Constant(Metadata { clean: false, etype: None }, Int(5))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])), resulting in: And(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Constant(Metadata { clean: false, etype: None }, Int(5))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"unwrap_nested_and\", to Expression: And(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Constant(Metadata { clean: false, etype: None }, Int(5))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])]), resulting in: And(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Constant(Metadata { clean: false, etype: None }, Int(5))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(0)))]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"div_eq_to_diveq\", to Expression: Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Constant(Metadata { clean: false, etype: None }, Int(5))), resulting in: DivEq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(5))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/minion_constraints/div_undefzero-01-simple/input-rules.json b/conjure_oxide/tests/integration/minion_constraints/div_undefzero-01-simple/input-rules.json new file mode 100644 index 0000000000..aeb3559c67 --- /dev/null +++ b/conjure_oxide/tests/integration/minion_constraints/div_undefzero-01-simple/input-rules.json @@ -0,0 +1,5 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"div_to_bubble\", application: 0x1032ad764, rule_sets: [(\"Bubble\", 6000)] }, to Expression: UnsafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), resulting in: Bubble(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(0)))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"bubble_up\", application: 0x1032ad1c0, rule_sets: [(\"Bubble\", 8900)] }, to Expression: Eq(Metadata { clean: false, etype: None }, Bubble(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(0)))), Constant(Metadata { clean: false, etype: None }, Int(5))), resulting in: Bubble(Metadata { clean: false, etype: None }, Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Constant(Metadata { clean: false, etype: None }, Int(5))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"expand_bubble\", application: 0x1032acec8, rule_sets: [(\"Bubble\", 8900)] }, to Expression: Bubble(Metadata { clean: false, etype: None }, Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Constant(Metadata { clean: false, etype: None }, Int(5))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])), resulting in: And(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Constant(Metadata { clean: false, etype: None }, Int(5))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"unwrap_nested_and\", application: 0x1032aa170, rule_sets: [(\"Base\", 8800)] }, to Expression: And(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Constant(Metadata { clean: false, etype: None }, Int(5))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])]), resulting in: And(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Constant(Metadata { clean: false, etype: None }, Int(5))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(0)))]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"div_eq_to_diveq\", application: 0x1032b00e8, rule_sets: [(\"Minion\", 4400)] }, to Expression: Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Constant(Metadata { clean: false, etype: None }, Int(5))), resulting in: DivEq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(5))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/minion_constraints/div_undefzero-02-zero/input-expected-rule-trace.json b/conjure_oxide/tests/integration/minion_constraints/div_undefzero-02-zero/input-expected-rule-trace.json new file mode 100644 index 0000000000..9b6a574186 --- /dev/null +++ b/conjure_oxide/tests/integration/minion_constraints/div_undefzero-02-zero/input-expected-rule-trace.json @@ -0,0 +1,5 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"div_to_bubble\", to Expression: UnsafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), resulting in: Bubble(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(0)))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"bubble_up\", to Expression: Eq(Metadata { clean: false, etype: None }, Bubble(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(0)))), Reference(Metadata { clean: false, etype: None }, UserName(\"z\"))), resulting in: Bubble(Metadata { clean: false, etype: None }, Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Reference(Metadata { clean: false, etype: None }, UserName(\"z\"))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"expand_bubble\", to Expression: Bubble(Metadata { clean: false, etype: None }, Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Reference(Metadata { clean: false, etype: None }, UserName(\"z\"))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])), resulting in: And(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Reference(Metadata { clean: false, etype: None }, UserName(\"z\"))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"unwrap_nested_and\", to Expression: And(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Reference(Metadata { clean: false, etype: None }, UserName(\"z\"))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])]), resulting in: And(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Reference(Metadata { clean: false, etype: None }, UserName(\"z\"))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(0)))]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"div_eq_to_diveq\", to Expression: Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Reference(Metadata { clean: false, etype: None }, UserName(\"z\"))), resulting in: DivEq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Reference(Metadata { clean: false, etype: None }, UserName(\"z\"))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/minion_constraints/div_undefzero-02-zero/input-generated-rule-trace.json b/conjure_oxide/tests/integration/minion_constraints/div_undefzero-02-zero/input-generated-rule-trace.json new file mode 100644 index 0000000000..c889ea78b2 --- /dev/null +++ b/conjure_oxide/tests/integration/minion_constraints/div_undefzero-02-zero/input-generated-rule-trace.json @@ -0,0 +1,5 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"div_to_bubble\", to Expression: UnsafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), resulting in: Bubble(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(0)))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"bubble_up\", to Expression: Eq(Metadata { clean: false, etype: None }, Bubble(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(0)))), Reference(Metadata { clean: false, etype: None }, UserName(\"z\"))), resulting in: Bubble(Metadata { clean: false, etype: None }, Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Reference(Metadata { clean: false, etype: None }, UserName(\"z\"))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"expand_bubble\", to Expression: Bubble(Metadata { clean: false, etype: None }, Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Reference(Metadata { clean: false, etype: None }, UserName(\"z\"))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])), resulting in: And(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Reference(Metadata { clean: false, etype: None }, UserName(\"z\"))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"unwrap_nested_and\", to Expression: And(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Reference(Metadata { clean: false, etype: None }, UserName(\"z\"))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])]), resulting in: And(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Reference(Metadata { clean: false, etype: None }, UserName(\"z\"))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(0)))]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"div_eq_to_diveq\", to Expression: Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Reference(Metadata { clean: false, etype: None }, UserName(\"z\"))), resulting in: DivEq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Reference(Metadata { clean: false, etype: None }, UserName(\"z\"))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/minion_constraints/div_undefzero-02-zero/input-rules.json b/conjure_oxide/tests/integration/minion_constraints/div_undefzero-02-zero/input-rules.json new file mode 100644 index 0000000000..e4151e6b90 --- /dev/null +++ b/conjure_oxide/tests/integration/minion_constraints/div_undefzero-02-zero/input-rules.json @@ -0,0 +1,5 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"div_to_bubble\", application: 0x1032ad764, rule_sets: [(\"Bubble\", 6000)] }, to Expression: UnsafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), resulting in: Bubble(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(0)))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"bubble_up\", application: 0x1032ad1c0, rule_sets: [(\"Bubble\", 8900)] }, to Expression: Eq(Metadata { clean: false, etype: None }, Bubble(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(0)))), Reference(Metadata { clean: false, etype: None }, UserName(\"z\"))), resulting in: Bubble(Metadata { clean: false, etype: None }, Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Reference(Metadata { clean: false, etype: None }, UserName(\"z\"))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"expand_bubble\", application: 0x1032acec8, rule_sets: [(\"Bubble\", 8900)] }, to Expression: Bubble(Metadata { clean: false, etype: None }, Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Reference(Metadata { clean: false, etype: None }, UserName(\"z\"))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])), resulting in: And(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Reference(Metadata { clean: false, etype: None }, UserName(\"z\"))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"unwrap_nested_and\", application: 0x1032aa170, rule_sets: [(\"Base\", 8800)] }, to Expression: And(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Reference(Metadata { clean: false, etype: None }, UserName(\"z\"))), And(Metadata { clean: false, etype: None }, [Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(0)))])]), resulting in: And(Metadata { clean: false, etype: None }, [Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Reference(Metadata { clean: false, etype: None }, UserName(\"z\"))), Neq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(0)))]), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"div_eq_to_diveq\", application: 0x1032b00e8, rule_sets: [(\"Minion\", 4400)] }, to Expression: Eq(Metadata { clean: false, etype: None }, SafeDiv(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), Reference(Metadata { clean: false, etype: None }, UserName(\"z\"))), resulting in: DivEq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Reference(Metadata { clean: false, etype: None }, UserName(\"z\"))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/minion_constraints/eq/input-expected-rule-trace.json b/conjure_oxide/tests/integration/minion_constraints/eq/input-expected-rule-trace.json new file mode 100644 index 0000000000..e69de29bb2 diff --git a/conjure_oxide/tests/integration/minion_constraints/eq/input-generated-rule-trace.json b/conjure_oxide/tests/integration/minion_constraints/eq/input-generated-rule-trace.json new file mode 100644 index 0000000000..e69de29bb2 diff --git a/conjure_oxide/tests/integration/minion_constraints/eq/input-rules.json b/conjure_oxide/tests/integration/minion_constraints/eq/input-rules.json new file mode 100644 index 0000000000..e69de29bb2 diff --git a/conjure_oxide/tests/integration/minion_constraints/ineq-01-strict-less-than/input-expected-rule-trace.json b/conjure_oxide/tests/integration/minion_constraints/ineq-01-strict-less-than/input-expected-rule-trace.json new file mode 100644 index 0000000000..24ccd8b5d0 --- /dev/null +++ b/conjure_oxide/tests/integration/minion_constraints/ineq-01-strict-less-than/input-expected-rule-trace.json @@ -0,0 +1 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"lt_to_ineq\", to Expression: Lt(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(-1))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/minion_constraints/ineq-01-strict-less-than/input-generated-rule-trace.json b/conjure_oxide/tests/integration/minion_constraints/ineq-01-strict-less-than/input-generated-rule-trace.json new file mode 100644 index 0000000000..20fcde2009 --- /dev/null +++ b/conjure_oxide/tests/integration/minion_constraints/ineq-01-strict-less-than/input-generated-rule-trace.json @@ -0,0 +1 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"lt_to_ineq\", to Expression: Lt(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(-1))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/minion_constraints/ineq-01-strict-less-than/input-rules.json b/conjure_oxide/tests/integration/minion_constraints/ineq-01-strict-less-than/input-rules.json new file mode 100644 index 0000000000..29b2349ef1 --- /dev/null +++ b/conjure_oxide/tests/integration/minion_constraints/ineq-01-strict-less-than/input-rules.json @@ -0,0 +1 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"lt_to_ineq\", application: 0x1032ae80c, rule_sets: [(\"Minion\", 4100)] }, to Expression: Lt(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(-1))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/minion_constraints/ineq-02-leq/input-expected-rule-trace.json b/conjure_oxide/tests/integration/minion_constraints/ineq-02-leq/input-expected-rule-trace.json new file mode 100644 index 0000000000..68ee96aead --- /dev/null +++ b/conjure_oxide/tests/integration/minion_constraints/ineq-02-leq/input-expected-rule-trace.json @@ -0,0 +1 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"leq_to_ineq\", to Expression: Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/minion_constraints/ineq-02-leq/input-generated-rule-trace.json b/conjure_oxide/tests/integration/minion_constraints/ineq-02-leq/input-generated-rule-trace.json new file mode 100644 index 0000000000..ab5c54cf9e --- /dev/null +++ b/conjure_oxide/tests/integration/minion_constraints/ineq-02-leq/input-generated-rule-trace.json @@ -0,0 +1 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"leq_to_ineq\", to Expression: Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/minion_constraints/ineq-02-leq/input-rules.json b/conjure_oxide/tests/integration/minion_constraints/ineq-02-leq/input-rules.json new file mode 100644 index 0000000000..13c97158cd --- /dev/null +++ b/conjure_oxide/tests/integration/minion_constraints/ineq-02-leq/input-rules.json @@ -0,0 +1 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"leq_to_ineq\", application: 0x1032aee68, rule_sets: [(\"Minion\", 4100)] }, to Expression: Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/minion_constraints/ineq-03-leq-plus-k/input-expected-rule-trace.json b/conjure_oxide/tests/integration/minion_constraints/ineq-03-leq-plus-k/input-expected-rule-trace.json new file mode 100644 index 0000000000..b31bc8e509 --- /dev/null +++ b/conjure_oxide/tests/integration/minion_constraints/ineq-03-leq-plus-k/input-expected-rule-trace.json @@ -0,0 +1 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"x_leq_y_plus_k_to_ineq\", to Expression: Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(2))])), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(2))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/minion_constraints/ineq-03-leq-plus-k/input-generated-rule-trace.json b/conjure_oxide/tests/integration/minion_constraints/ineq-03-leq-plus-k/input-generated-rule-trace.json new file mode 100644 index 0000000000..44515b23d1 --- /dev/null +++ b/conjure_oxide/tests/integration/minion_constraints/ineq-03-leq-plus-k/input-generated-rule-trace.json @@ -0,0 +1 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"x_leq_y_plus_k_to_ineq\", to Expression: Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(2))])), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(2))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/minion_constraints/ineq-03-leq-plus-k/input-rules.json b/conjure_oxide/tests/integration/minion_constraints/ineq-03-leq-plus-k/input-rules.json new file mode 100644 index 0000000000..ac5d6d83d6 --- /dev/null +++ b/conjure_oxide/tests/integration/minion_constraints/ineq-03-leq-plus-k/input-rules.json @@ -0,0 +1 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"x_leq_y_plus_k_to_ineq\", application: 0x1032af084, rule_sets: [(\"Minion\", 4400)] }, to Expression: Leq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(2))])), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\")), Constant(Metadata { clean: false, etype: None }, Int(2))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/minion_constraints/sumgeq/input-expected-rule-trace.json b/conjure_oxide/tests/integration/minion_constraints/sumgeq/input-expected-rule-trace.json new file mode 100644 index 0000000000..fcfec6754f --- /dev/null +++ b/conjure_oxide/tests/integration/minion_constraints/sumgeq/input-expected-rule-trace.json @@ -0,0 +1 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"flatten_sum_geq\", to Expression: Geq(Metadata { clean: false, etype: None }, Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))]), Reference(Metadata { clean: false, etype: None }, UserName(\"z\"))), resulting in: SumGeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))], Reference(Metadata { clean: false, etype: None }, UserName(\"z\"))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/minion_constraints/sumgeq/input-generated-rule-trace.json b/conjure_oxide/tests/integration/minion_constraints/sumgeq/input-generated-rule-trace.json new file mode 100644 index 0000000000..9365af0af0 --- /dev/null +++ b/conjure_oxide/tests/integration/minion_constraints/sumgeq/input-generated-rule-trace.json @@ -0,0 +1 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"flatten_sum_geq\", to Expression: Geq(Metadata { clean: false, etype: None }, Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))]), Reference(Metadata { clean: false, etype: None }, UserName(\"z\"))), resulting in: SumGeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))], Reference(Metadata { clean: false, etype: None }, UserName(\"z\"))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/minion_constraints/sumgeq/input-rules.json b/conjure_oxide/tests/integration/minion_constraints/sumgeq/input-rules.json new file mode 100644 index 0000000000..dbfb5ec213 --- /dev/null +++ b/conjure_oxide/tests/integration/minion_constraints/sumgeq/input-rules.json @@ -0,0 +1 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"flatten_sum_geq\", application: 0x1032adbcc, rule_sets: [(\"Minion\", 4400)] }, to Expression: Geq(Metadata { clean: false, etype: None }, Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))]), Reference(Metadata { clean: false, etype: None }, UserName(\"z\"))), resulting in: SumGeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))], Reference(Metadata { clean: false, etype: None }, UserName(\"z\"))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/minion_constraints/sumleq/input-expected-rule-trace.json b/conjure_oxide/tests/integration/minion_constraints/sumleq/input-expected-rule-trace.json new file mode 100644 index 0000000000..3f76d35ac6 --- /dev/null +++ b/conjure_oxide/tests/integration/minion_constraints/sumleq/input-expected-rule-trace.json @@ -0,0 +1 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"sum_leq_to_sumleq\", to Expression: Leq(Metadata { clean: false, etype: None }, Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))]), Reference(Metadata { clean: false, etype: None }, UserName(\"z\"))), resulting in: SumLeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))], Reference(Metadata { clean: false, etype: None }, UserName(\"z\"))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/minion_constraints/sumleq/input-generated-rule-trace.json b/conjure_oxide/tests/integration/minion_constraints/sumleq/input-generated-rule-trace.json new file mode 100644 index 0000000000..5c45eaaa81 --- /dev/null +++ b/conjure_oxide/tests/integration/minion_constraints/sumleq/input-generated-rule-trace.json @@ -0,0 +1 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"sum_leq_to_sumleq\", to Expression: Leq(Metadata { clean: false, etype: None }, Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))]), Reference(Metadata { clean: false, etype: None }, UserName(\"z\"))), resulting in: SumLeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))], Reference(Metadata { clean: false, etype: None }, UserName(\"z\"))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/minion_constraints/sumleq/input-rules.json b/conjure_oxide/tests/integration/minion_constraints/sumleq/input-rules.json new file mode 100644 index 0000000000..438b4165b4 --- /dev/null +++ b/conjure_oxide/tests/integration/minion_constraints/sumleq/input-rules.json @@ -0,0 +1 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: Rule { name: \"sum_leq_to_sumleq\", application: 0x1032addcc, rule_sets: [(\"Minion\", 4400)] }, to Expression: Leq(Metadata { clean: false, etype: None }, Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))]), Reference(Metadata { clean: false, etype: None }, UserName(\"z\"))), resulting in: SumLeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"x\")), Reference(Metadata { clean: false, etype: None }, UserName(\"y\"))], Reference(Metadata { clean: false, etype: None }, UserName(\"z\"))), callsite: Identifier(0x103a140f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x103a140f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/xyz/input-expected-rule-trace.json b/conjure_oxide/tests/integration/xyz/input-expected-rule-trace.json new file mode 100644 index 0000000000..bf71240136 --- /dev/null +++ b/conjure_oxide/tests/integration/xyz/input-expected-rule-trace.json @@ -0,0 +1,5 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"flatten_nested_sum\", to Expression: Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))]), resulting in: Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"sum_eq_to_sumeq\", to Expression: Eq(Metadata { clean: false, etype: None }, Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))]), Constant(Metadata { clean: false, etype: None }, Int(4))), resulting in: SumEq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(4))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"sumeq_to_minion\", to Expression: SumEq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(4))), resulting in: And(Metadata { clean: false, etype: None }, [SumGeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(4))), SumLeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(4)))]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"unwrap_nested_and\", to Expression: And(Metadata { clean: false, etype: None }, [And(Metadata { clean: false, etype: None }, [SumGeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(4))), SumLeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(4)))]), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))]), resulting in: And(Metadata { clean: false, etype: None }, [SumGeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(4))), SumLeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(4))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))]), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"geq_to_ineq\", to Expression: Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1035a80f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1035a80f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/conjure_oxide/tests/integration/xyz/input-generated-rule-trace.json b/conjure_oxide/tests/integration/xyz/input-generated-rule-trace.json new file mode 100644 index 0000000000..289957e6ca --- /dev/null +++ b/conjure_oxide/tests/integration/xyz/input-generated-rule-trace.json @@ -0,0 +1,5 @@ +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"flatten_nested_sum\", to Expression: Sum(Metadata { clean: false, etype: None }, [Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))]), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))]), resulting in: Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"sum_eq_to_sumeq\", to Expression: Eq(Metadata { clean: false, etype: None }, Sum(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))]), Constant(Metadata { clean: false, etype: None }, Int(4))), resulting in: SumEq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(4))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"sumeq_to_minion\", to Expression: SumEq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(4))), resulting in: And(Metadata { clean: false, etype: None }, [SumGeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(4))), SumLeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(4)))]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"unwrap_nested_and\", to Expression: And(Metadata { clean: false, etype: None }, [And(Metadata { clean: false, etype: None }, [SumGeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(4))), SumLeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(4)))]), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))]), resulting in: And(Metadata { clean: false, etype: None }, [SumGeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(4))), SumLeq(Metadata { clean: false, etype: None }, [Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"c\"))], Constant(Metadata { clean: false, etype: None }, Int(4))), Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\")))]), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} +{"level":"TRACE","message":"Event { fields: ValueSet { message: Rule applied: \"geq_to_ineq\", to Expression: Geq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Reference(Metadata { clean: false, etype: None }, UserName(\"b\"))), resulting in: Ineq(Metadata { clean: false, etype: None }, Reference(Metadata { clean: false, etype: None }, UserName(\"b\")), Reference(Metadata { clean: false, etype: None }, UserName(\"a\")), Constant(Metadata { clean: false, etype: None }, Int(0))), callsite: Identifier(0x1051740f8) }, metadata: Metadata { name: \"event crates/conjure_core/src/rule_engine/rewrite.rs:366\", target: \"rule_engine\", level: Level(Trace), module_path: \"conjure_core::rule_engine::rewrite\", location: crates/conjure_core/src/rule_engine/rewrite.rs:366, fields: {message}, callsite: Identifier(0x1051740f8), kind: Kind(EVENT) }, parent: Current }","target":"rule_engine"} diff --git a/crates/conjure_core/Cargo.toml b/crates/conjure_core/Cargo.toml index 4c85b585f6..5a8d253f00 100644 --- a/crates/conjure_core/Cargo.toml +++ b/crates/conjure_core/Cargo.toml @@ -18,6 +18,9 @@ strum = "0.26.3" strum_macros = "0.26.4" thiserror = "1.0.65" log = "0.4.22" +tracing = "0.1" +tracing-subscriber = { version = "0.3", features = ["env-filter"] } +tracing-appender = "0.2" anyhow = "1.0.91" regex = "1.11.1" walkdir = "2.5.0" diff --git a/crates/conjure_core/src/rule_engine/rewrite.rs b/crates/conjure_core/src/rule_engine/rewrite.rs index fab5a9eda8..d8fe1c86a1 100644 --- a/crates/conjure_core/src/rule_engine/rewrite.rs +++ b/crates/conjure_core/src/rule_engine/rewrite.rs @@ -1,9 +1,13 @@ -use std::env; use std::fmt::Display; +use std::fs::File; +use std::io::Write; +use std::{env, io}; use thiserror::Error; +use crate::bug; use crate::stats::RewriterStats; +use tracing::{span, trace, Level}; use uniplate::Uniplate; use crate::rule_engine::{Reduction, Rule, RuleSet}; @@ -89,13 +93,13 @@ fn optimizations_enabled() -> bool { /// Initial expression: a + min(x, y) /// A model containing the expression is created. The variables of the model are represented by a SymbolTable and contain a,x,y. /// The contraints of the initail model is the expression itself. -/// +/// /// After getting the rules by their priorities and getting additional statistics the while loop of single interations is executed. /// Details for this process can be found in [`rewrite_iteration`] documentation. /// /// The loop is exited only when no more rules can be applied, when rewrite_iteration returns None and [`while let Some(step) = None`] occurs -/// -/// +/// +/// /// Will result in side effects ((d<=x ^ d<=y) being the [`new_top`] and the model will now be a conjuction of that and (a+d) /// Rewritten expression: ((a + d) ^ (d<=x ^ d<=y)) /// @@ -197,7 +201,7 @@ pub fn rewrite_model<'a>( /// /// No more rules in our example can apply to the modified model -> mark all the children as clean and return a pure [`Reduction`]. /// [`return Some(Reduction::pure(expression))`] -/// +/// /// On the last execution of rewrite_iteration condition [`apply_optimizations && expression.is_clean()`] is met, [`None`] is returned. /// /// @@ -221,6 +225,7 @@ fn rewrite_iteration<'a>( let mut expression = expression.clone(); let rule_results = apply_all_rules(&expression, model, rules, stats); + trace_rules(&rule_results, expression.clone()); if let Some(new) = choose_rewrite(&rule_results) { // If a rule is applied, mark the expression as dirty return Some(new); @@ -350,6 +355,14 @@ fn choose_rewrite(results: &[RuleResult]) -> Option { if results.is_empty() { return None; } - // Return the first result for now + Some(results[0].reduction.clone()) } + +fn trace_rules(results: &[RuleResult], expression: Expression) { + if !results.is_empty() { + let rule = results[0].rule; + let new_expression = results[0].reduction.new_expression.clone(); + trace!(target: "rule_engine", "Rule applied: {:?}, to Expression: {:?}, resulting in: {:?}", rule, expression, new_expression); + } +} diff --git a/readme 2.md b/readme 2.md new file mode 100644 index 0000000000..ebc57f6558 --- /dev/null +++ b/readme 2.md @@ -0,0 +1,38 @@ +# Conjure Oxide + +This repository contains the in-progress Conjure Oxide constraints modelling +tool and its dependencies. + +This repository hosts the following projects: + +* [Conjure Oxide](https://github.com/conjure-cp/conjure-oxide/tree/main/conjure_oxide) +* [`minion_rs` - Rust bindings to Minion](https://github.com/conjure-cp/conjure-oxide/tree/main/solvers/minion) +* [`chuffed_rs` - Rust bindings to Chuffed](https://github.com/conjure-cp/conjure-oxide/tree/main/solvers/chuffed) + +This project is being produced by staff and students of University of St +Andrews, and is licenced under the [MPL 2.0](./LICENCE). + +## Rust Nightly Support + +The following compiler flags are required for Conjure-Oxide to work with +Nightly Rust: + +```sh +export RUSTFLAGS="-Zlinker-features=-lld" +export RUSTDOCFLAGS="-Zlinker-features=-lld" +cargo build <...> +``` + +This is because of current incompatibilities with linkme and the new default +linker ([link](https://github.com/dtolnay/linkme/issues/94)). + + +## Documentation + +API documentation can be found [here](https://conjure-cp.github.io/conjure-oxide/docs/). + +## Contributing + +See the [project wiki](https://github.com/conjure-cp/conjure-oxide/wiki) +