From e615d7dbc080c92db875a55a1ea3a30b7cfed097 Mon Sep 17 00:00:00 2001 From: Niklas Dewally Date: Fri, 24 Jan 2025 17:40:27 +0000 Subject: [PATCH] refactor(ast)!: refactor `SymbolTable` interface to hide implementation details Change the `SymbolTable` to be a struct with private members, and create a new interface to interact with it. This hides the fact that the `SymbolTable` is a `BTreeMap`. While the symbol table is a simple `BTreeMap` both before and after this commit, the implementation of this is likely to change multiple times in the future. In particular, this commit is preparation for adding `lettings` and `givens` to the symbol table. --- conjure_oxide/src/utils/essence_parser.rs | 10 +- .../input.expected-parse.serialised.json | 38 +- .../input.expected-rewrite.serialised.json | 38 +- .../input.expected-parse.serialised.json | 70 +- .../input.expected-rewrite.serialised.json | 134 ++-- .../input.expected-parse.serialised.json | 70 +- .../input.expected-rewrite.serialised.json | 134 ++-- .../input.expected-parse.serialised.json | 102 +-- .../input.expected-rewrite.serialised.json | 262 ++++---- .../input.expected-parse.serialised.json | 70 +- .../input.expected-rewrite.serialised.json | 102 +-- .../01/bool-01.expected-parse.serialised.json | 22 +- .../bool-01.expected-rewrite.serialised.json | 22 +- .../02/bool-02.expected-parse.serialised.json | 38 +- .../bool-02.expected-rewrite.serialised.json | 38 +- .../03/bool-03.expected-parse.serialised.json | 38 +- .../bool-03.expected-rewrite.serialised.json | 38 +- .../04/bool-04.expected-parse.serialised.json | 64 +- .../bool-04.expected-rewrite.serialised.json | 64 +- .../01/input.expected-parse.serialised.json | 70 +- .../01/input.expected-rewrite.serialised.json | 70 +- .../02/input.expected-parse.serialised.json | 38 +- .../02/input.expected-rewrite.serialised.json | 38 +- .../03/input.expected-parse.serialised.json | 38 +- .../03/input.expected-rewrite.serialised.json | 38 +- .../04/input.expected-parse.serialised.json | 102 +-- .../04/input.expected-rewrite.serialised.json | 134 ++-- .../05/div-05.expected-parse.serialised.json | 102 +-- .../div-05.expected-rewrite.serialised.json | 134 ++-- .../06/div-06.expected-parse.serialised.json | 102 +-- .../div-06.expected-rewrite.serialised.json | 134 ++-- .../input.expected-parse.serialised.json | 38 +- .../input.expected-rewrite.serialised.json | 38 +- .../input.expected-parse.serialised.json | 102 +-- .../input.expected-rewrite.serialised.json | 134 ++-- .../input.expected-parse.serialised.json | 102 +-- .../input.expected-rewrite.serialised.json | 102 +-- .../input.expected-parse.serialised.json | 166 ++--- .../input.expected-rewrite.serialised.json | 198 +++--- .../02/input.expected-parse.serialised.json | 38 +- .../02/input.expected-rewrite.serialised.json | 70 +- .../01/input.expected-parse.serialised.json | 70 +- .../01/input.expected-rewrite.serialised.json | 102 +-- .../02/input.expected-parse.serialised.json | 70 +- .../02/input.expected-rewrite.serialised.json | 102 +-- .../03/input.expected-parse.serialised.json | 70 +- .../03/input.expected-rewrite.serialised.json | 102 +-- .../04/input.expected-parse.serialised.json | 70 +- .../04/input.expected-rewrite.serialised.json | 102 +-- .../05/input.expected-parse.serialised.json | 70 +- .../05/input.expected-rewrite.serialised.json | 102 +-- .../01/input.expected-parse.serialised.json | 70 +- .../01/input.expected-rewrite.serialised.json | 70 +- .../02/input.expected-parse.serialised.json | 38 +- .../02/input.expected-rewrite.serialised.json | 38 +- .../03/input.expected-parse.serialised.json | 38 +- .../03/input.expected-rewrite.serialised.json | 38 +- .../04/input.expected-parse.serialised.json | 102 +-- .../04/input.expected-rewrite.serialised.json | 134 ++-- .../05/mod-05.expected-parse.serialised.json | 102 +-- .../mod-05.expected-rewrite.serialised.json | 134 ++-- .../06/mod-06.expected-parse.serialised.json | 102 +-- .../mod-06.expected-rewrite.serialised.json | 134 ++-- .../input.expected-parse.serialised.json | 70 +- .../input.expected-rewrite.serialised.json | 70 +- .../input.expected-parse.serialised.json | 102 +-- .../input.expected-rewrite.serialised.json | 134 ++-- .../input.expected-parse.serialised.json | 102 +-- .../input.expected-rewrite.serialised.json | 134 ++-- .../input.expected-parse.serialised.json | 102 +-- .../input.expected-rewrite.serialised.json | 166 ++--- .../input.expected-parse.serialised.json | 102 +-- .../input.expected-rewrite.serialised.json | 102 +-- .../input.expected-parse.serialised.json | 166 ++--- .../input.expected-rewrite.serialised.json | 166 ++--- .../input.expected-parse.serialised.json | 70 +- .../input.expected-rewrite.serialised.json | 70 +- .../input.expected-parse.serialised.json | 70 +- .../input.expected-rewrite.serialised.json | 70 +- .../input.expected-parse.serialised.json | 70 +- .../input.expected-rewrite.serialised.json | 70 +- .../input.expected-parse.serialised.json | 70 +- .../input.expected-rewrite.serialised.json | 230 +++---- .../input.expected-parse.serialised.json | 102 +-- .../input.expected-rewrite.serialised.json | 102 +-- .../input.expected-parse.serialised.json | 102 +-- .../input.expected-rewrite.serialised.json | 166 ++--- .../input.expected-parse.serialised.json | 136 ++-- .../input.expected-rewrite.serialised.json | 136 ++-- .../input.expected-parse.serialised.json | 134 ++-- .../input.expected-rewrite.serialised.json | 166 ++--- .../input.expected-parse.serialised.json | 102 +-- .../input.expected-rewrite.serialised.json | 102 +-- .../input.expected-parse.serialised.json | 70 +- .../input.expected-rewrite.serialised.json | 70 +- .../input.expected-parse.serialised.json | 70 +- .../input.expected-rewrite.serialised.json | 70 +- .../input.expected-parse.serialised.json | 102 +-- .../input.expected-rewrite.serialised.json | 102 +-- .../input.expected-parse.serialised.json | 262 ++++---- .../input.expected-rewrite.serialised.json | 390 ++++++------ .../input.expected-parse.serialised.json | 38 +- .../input.expected-rewrite.serialised.json | 38 +- .../input.expected-parse.serialised.json | 70 +- .../input.expected-rewrite.serialised.json | 102 +-- .../input.expected-parse.serialised.json | 38 +- .../input.expected-rewrite.serialised.json | 38 +- .../input.expected-parse.serialised.json | 70 +- .../input.expected-rewrite.serialised.json | 70 +- .../input.expected-parse.serialised.json | 70 +- .../input.expected-rewrite.serialised.json | 70 +- .../input.expected-parse.serialised.json | 54 +- .../input.expected-rewrite.serialised.json | 54 +- .../input.expected-parse.serialised.json | 70 +- .../input.expected-rewrite.serialised.json | 70 +- .../input.expected-parse.serialised.json | 54 +- .../input.expected-rewrite.serialised.json | 54 +- .../xyz/input.expected-parse.serialised.json | 102 +-- .../input.expected-rewrite.serialised.json | 102 +-- .../max2/input.expected-parse.serialised.json | 102 +-- .../input.expected-rewrite.serialised.json | 166 ++--- .../input.expected-parse.serialised.json | 70 +- .../input.expected-rewrite.serialised.json | 70 +- .../input.expected-parse.serialised.json | 70 +- .../input.expected-rewrite.serialised.json | 70 +- .../input.expected-parse.serialised.json | 102 +-- .../input.expected-rewrite.serialised.json | 102 +-- .../input.expected-parse.serialised.json | 102 +-- .../input.expected-rewrite.serialised.json | 166 ++--- .../input.expected-parse.serialised.json | 102 +-- .../input.expected-rewrite.serialised.json | 198 +++--- .../input.expected-parse.serialised.json | 102 +-- .../input.expected-rewrite.serialised.json | 166 ++--- .../eq/input.expected-parse.serialised.json | 70 +- .../eq/input.expected-rewrite.serialised.json | 70 +- .../input.expected-parse.serialised.json | 70 +- .../input.expected-rewrite.serialised.json | 70 +- .../input.expected-parse.serialised.json | 70 +- .../input.expected-rewrite.serialised.json | 70 +- .../input.expected-parse.serialised.json | 70 +- .../input.expected-rewrite.serialised.json | 70 +- .../input.expected-parse.serialised.json | 70 +- .../input.expected-rewrite.serialised.json | 70 +- .../input.expected-parse.serialised.json | 70 +- .../input.expected-rewrite.serialised.json | 70 +- .../input.expected-parse.serialised.json | 70 +- .../input.expected-rewrite.serialised.json | 70 +- .../input.expected-parse.serialised.json | 70 +- .../input.expected-rewrite.serialised.json | 70 +- .../input.expected-parse.serialised.json | 102 +-- .../input.expected-rewrite.serialised.json | 102 +-- .../input.expected-parse.serialised.json | 102 +-- .../input.expected-rewrite.serialised.json | 166 ++--- .../input.expected-parse.serialised.json | 102 +-- .../input.expected-rewrite.serialised.json | 198 +++--- .../input.expected-parse.serialised.json | 102 +-- .../input.expected-rewrite.serialised.json | 166 ++--- .../input.expected-parse.serialised.json | 102 +-- .../input.expected-rewrite.serialised.json | 102 +-- .../input.expected-parse.serialised.json | 102 +-- .../input.expected-rewrite.serialised.json | 102 +-- .../input.expected-parse.serialised.json | 358 +++++------ .../input.expected-rewrite.serialised.json | 598 +++++++++--------- ...e-mod-novar.expected-parse.serialised.json | 6 +- ...mod-novar.expected-rewrite.serialised.json | 6 +- .../divide-mod.expected-parse.serialised.json | 38 +- ...ivide-mod.expected-rewrite.serialised.json | 38 +- .../xyz/input.expected-parse.serialised.json | 102 +-- .../input.expected-rewrite.serialised.json | 102 +-- conjure_oxide/tests/model_tests.rs | 12 +- conjure_oxide/tests/rewrite_tests.rs | 20 +- crates/conjure_core/src/ast/domains.rs | 5 +- crates/conjure_core/src/ast/expressions.rs | 48 +- crates/conjure_core/src/ast/pretty.rs | 2 +- crates/conjure_core/src/ast/symbol_table.rs | 174 ++++- crates/conjure_core/src/ast/variables.rs | 2 +- crates/conjure_core/src/model.rs | 80 +-- .../src/rule_engine/rewriter_common.rs | 2 +- crates/conjure_core/src/rule_engine/rule.rs | 8 +- crates/conjure_core/src/rules/base.rs | 8 +- crates/conjure_core/src/rules/minion.rs | 16 +- crates/conjure_core/src/rules/utils.rs | 2 +- .../src/solver/adaptors/minion/parse_model.rs | 2 +- .../src/solver/adaptors/sat_common.rs | 4 +- 184 files changed, 8581 insertions(+), 8094 deletions(-) diff --git a/conjure_oxide/src/utils/essence_parser.rs b/conjure_oxide/src/utils/essence_parser.rs index d0544e7512..66673d792b 100644 --- a/conjure_oxide/src/utils/essence_parser.rs +++ b/conjure_oxide/src/utils/essence_parser.rs @@ -5,9 +5,7 @@ use std::sync::{Arc, RwLock}; use tree_sitter::{Node, Parser, Tree}; use tree_sitter_essence::LANGUAGE; -use conjure_core::ast::{ - Atom, DecisionVariable, Domain, Expression, Literal, Name, Range, SymbolTable, -}; +use conjure_core::ast::{Atom, DecisionVariable, Domain, Expression, Literal, Name, Range}; use crate::utils::conjure::EssenceParseError; use conjure_core::context::Context; @@ -72,7 +70,7 @@ fn parse_find_statement( find_statement_list: Node, source_code: &str, ) -> BTreeMap { - let mut symbol_table = SymbolTable::new(); + let mut vars = BTreeMap::new(); for find_statement in named_children(&find_statement_list) { let mut temp_symbols = BTreeSet::new(); @@ -92,10 +90,10 @@ fn parse_find_statement( for name in temp_symbols { let decision_variable = DecisionVariable::new(domain.clone()); - symbol_table.insert(Name::UserName(String::from(name)), decision_variable); + vars.insert(Name::UserName(String::from(name)), decision_variable); } } - symbol_table + vars } fn parse_domain(domain: Node, source_code: &str) -> Domain { diff --git a/conjure_oxide/tests/integration/basic/abs/0-simple/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/abs/0-simple/input.expected-parse.serialised.json index 109e23fd19..7a79d02268 100644 --- a/conjure_oxide/tests/integration/basic/abs/0-simple/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/abs/0-simple/input.expected-parse.serialised.json @@ -43,24 +43,26 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -2, - 3 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -2, + 3 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/abs/0-simple/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/abs/0-simple/input.expected-rewrite.serialised.json index ce12c68b6f..07d52f554e 100644 --- a/conjure_oxide/tests/integration/basic/abs/0-simple/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/abs/0-simple/input.expected-rewrite.serialised.json @@ -19,24 +19,26 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -2, - 3 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -2, + 3 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/abs/01-simple/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/abs/01-simple/input.expected-parse.serialised.json index 3b85444ab2..60061c4f05 100644 --- a/conjure_oxide/tests/integration/basic/abs/01-simple/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/abs/01-simple/input.expected-parse.serialised.json @@ -74,41 +74,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -5, - 5 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -5, + 5 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -5, - 5 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -5, + 5 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/abs/01-simple/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/abs/01-simple/input.expected-rewrite.serialised.json index c4278959b2..c1fefc8ea9 100644 --- a/conjure_oxide/tests/integration/basic/abs/01-simple/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/abs/01-simple/input.expected-rewrite.serialised.json @@ -97,75 +97,77 @@ ] } ], - "next_var": 2, - "variables": [ - [ - { - "MachineName": 0 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 5 - ] - } - ] + "symbols": { + "next_machine_name": 2, + "variables": [ + [ + { + "MachineName": 0 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 5 + ] + } + ] + } } - } - ], - [ - { - "MachineName": 1 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 5 - ] - } - ] + ], + [ + { + "MachineName": 1 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 5 + ] + } + ] + } } - } - ], - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -5, - 5 - ] - } - ] + ], + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -5, + 5 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -5, - 5 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -5, + 5 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/abs/02-neg/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/abs/02-neg/input.expected-parse.serialised.json index 4106ba1516..933d804842 100644 --- a/conjure_oxide/tests/integration/basic/abs/02-neg/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/abs/02-neg/input.expected-parse.serialised.json @@ -90,41 +90,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -5, - 5 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -5, + 5 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -5, - 5 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -5, + 5 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/abs/02-neg/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/abs/02-neg/input.expected-rewrite.serialised.json index c4278959b2..c1fefc8ea9 100644 --- a/conjure_oxide/tests/integration/basic/abs/02-neg/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/abs/02-neg/input.expected-rewrite.serialised.json @@ -97,75 +97,77 @@ ] } ], - "next_var": 2, - "variables": [ - [ - { - "MachineName": 0 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 5 - ] - } - ] + "symbols": { + "next_machine_name": 2, + "variables": [ + [ + { + "MachineName": 0 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 5 + ] + } + ] + } } - } - ], - [ - { - "MachineName": 1 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 5 - ] - } - ] + ], + [ + { + "MachineName": 1 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 5 + ] + } + ] + } } - } - ], - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -5, - 5 - ] - } - ] + ], + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -5, + 5 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -5, - 5 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -5, + 5 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/abs/03-nested/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/abs/03-nested/input.expected-parse.serialised.json index ec7b17294a..183d6abf3e 100644 --- a/conjure_oxide/tests/integration/basic/abs/03-nested/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/abs/03-nested/input.expected-parse.serialised.json @@ -160,58 +160,60 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -5, - 2 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -5, + 2 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -5, - 2 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -5, + 2 + ] + } + ] + } } - } - ], - [ - { - "UserName": "z" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -5, - 2 - ] - } - ] + ], + [ + { + "UserName": "z" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -5, + 2 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/abs/03-nested/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/abs/03-nested/input.expected-rewrite.serialised.json index 5b51ea3211..265de81029 100644 --- a/conjure_oxide/tests/integration/basic/abs/03-nested/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/abs/03-nested/input.expected-rewrite.serialised.json @@ -235,143 +235,145 @@ ] } ], - "next_var": 5, - "variables": [ - [ - { - "MachineName": 0 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 10 - ] - } - ] + "symbols": { + "next_machine_name": 5, + "variables": [ + [ + { + "MachineName": 0 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 10 + ] + } + ] + } } - } - ], - [ - { - "MachineName": 1 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 2 - ] - } - ] + ], + [ + { + "MachineName": 1 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 2 + ] + } + ] + } } - } - ], - [ - { - "MachineName": 2 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -10, - 8 - ] - } - ] + ], + [ + { + "MachineName": 2 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -10, + 8 + ] + } + ] + } } - } - ], - [ - { - "MachineName": 3 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -3, - 1 - ] - } - ] + ], + [ + { + "MachineName": 3 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -3, + 1 + ] + } + ] + } } - } - ], - [ - { - "MachineName": 4 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 5 - ] - } - ] + ], + [ + { + "MachineName": 4 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 5 + ] + } + ] + } } - } - ], - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -5, - 2 - ] - } - ] + ], + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -5, + 2 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -5, - 2 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -5, + 2 + ] + } + ] + } } - } - ], - [ - { - "UserName": "z" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -5, - 2 - ] - } - ] + ], + [ + { + "UserName": "z" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -5, + 2 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/abs/04-bounds/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/abs/04-bounds/input.expected-parse.serialised.json index 1ee6cc3e98..c910fcd321 100644 --- a/conjure_oxide/tests/integration/basic/abs/04-bounds/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/abs/04-bounds/input.expected-parse.serialised.json @@ -66,41 +66,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -2, - 3 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -2, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/abs/04-bounds/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/abs/04-bounds/input.expected-rewrite.serialised.json index c22167f72b..1d490c3838 100644 --- a/conjure_oxide/tests/integration/basic/abs/04-bounds/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/abs/04-bounds/input.expected-rewrite.serialised.json @@ -42,58 +42,60 @@ ] } ], - "next_var": 1, - "variables": [ - [ - { - "MachineName": 0 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + "symbols": { + "next_machine_name": 1, + "variables": [ + [ + { + "MachineName": 0 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -2, - 3 - ] - } - ] + ], + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -2, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/bool/01/bool-01.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/bool/01/bool-01.expected-parse.serialised.json index 88c4800f69..eb3f8e8e15 100644 --- a/conjure_oxide/tests/integration/basic/bool/01/bool-01.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/bool/01/bool-01.expected-parse.serialised.json @@ -1,14 +1,16 @@ { "constraints": [], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": "BoolDomain" - } + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": "BoolDomain" + } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/bool/01/bool-01.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/bool/01/bool-01.expected-rewrite.serialised.json index 88c4800f69..eb3f8e8e15 100644 --- a/conjure_oxide/tests/integration/basic/bool/01/bool-01.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/bool/01/bool-01.expected-rewrite.serialised.json @@ -1,14 +1,16 @@ { "constraints": [], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": "BoolDomain" - } + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": "BoolDomain" + } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/bool/02/bool-02.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/bool/02/bool-02.expected-parse.serialised.json index 7cf88c0524..cd110ffde0 100644 --- a/conjure_oxide/tests/integration/basic/bool/02/bool-02.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/bool/02/bool-02.expected-parse.serialised.json @@ -1,22 +1,24 @@ { "constraints": [], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "y" - }, - { - "domain": "BoolDomain" - } + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "y" + }, + { + "domain": "BoolDomain" + } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/bool/02/bool-02.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/bool/02/bool-02.expected-rewrite.serialised.json index 7cf88c0524..cd110ffde0 100644 --- a/conjure_oxide/tests/integration/basic/bool/02/bool-02.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/bool/02/bool-02.expected-rewrite.serialised.json @@ -1,22 +1,24 @@ { "constraints": [], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "y" - }, - { - "domain": "BoolDomain" - } + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "y" + }, + { + "domain": "BoolDomain" + } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/bool/03/bool-03.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/bool/03/bool-03.expected-parse.serialised.json index 0eeb864a8d..44d92d5aae 100644 --- a/conjure_oxide/tests/integration/basic/bool/03/bool-03.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/bool/03/bool-03.expected-parse.serialised.json @@ -35,23 +35,25 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "y" - }, - { - "domain": "BoolDomain" - } + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "y" + }, + { + "domain": "BoolDomain" + } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/bool/03/bool-03.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/bool/03/bool-03.expected-rewrite.serialised.json index 0eeb864a8d..44d92d5aae 100644 --- a/conjure_oxide/tests/integration/basic/bool/03/bool-03.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/bool/03/bool-03.expected-rewrite.serialised.json @@ -35,23 +35,25 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "y" - }, - { - "domain": "BoolDomain" - } + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "y" + }, + { + "domain": "BoolDomain" + } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/bool/04/bool-04.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/bool/04/bool-04.expected-parse.serialised.json index 74db9e5ed9..a1bb671bc6 100644 --- a/conjure_oxide/tests/integration/basic/bool/04/bool-04.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/bool/04/bool-04.expected-parse.serialised.json @@ -69,37 +69,39 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "y" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "z" - }, - { - "domain": { - "IntDomain": [ - { - "Single": 42 - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "y" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "z" + }, + { + "domain": { + "IntDomain": [ + { + "Single": 42 + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/bool/04/bool-04.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/bool/04/bool-04.expected-rewrite.serialised.json index 06c44846c8..8da5562f75 100644 --- a/conjure_oxide/tests/integration/basic/bool/04/bool-04.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/bool/04/bool-04.expected-rewrite.serialised.json @@ -61,37 +61,39 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "y" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "z" - }, - { - "domain": { - "IntDomain": [ - { - "Single": 42 - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": "BoolDomain" } - } + ], + [ + { + "UserName": "y" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "z" + }, + { + "domain": { + "IntDomain": [ + { + "Single": 42 + } + ] + } + } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/div/01/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/div/01/input.expected-parse.serialised.json index 12e129451e..31a9b71f89 100644 --- a/conjure_oxide/tests/integration/basic/div/01/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/div/01/input.expected-parse.serialised.json @@ -56,41 +56,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "b" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + ], + [ + { + "UserName": "b" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/div/01/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/div/01/input.expected-rewrite.serialised.json index ad7c6c5ec1..aa54354cc2 100644 --- a/conjure_oxide/tests/integration/basic/div/01/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/div/01/input.expected-rewrite.serialised.json @@ -68,41 +68,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "b" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + ], + [ + { + "UserName": "b" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/div/02/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/div/02/input.expected-parse.serialised.json index f4f2e5055d..8ad1933b15 100644 --- a/conjure_oxide/tests/integration/basic/div/02/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/div/02/input.expected-parse.serialised.json @@ -56,24 +56,26 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/div/02/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/div/02/input.expected-rewrite.serialised.json index bbd1bf6638..38ad1215cc 100644 --- a/conjure_oxide/tests/integration/basic/div/02/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/div/02/input.expected-rewrite.serialised.json @@ -22,24 +22,26 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/div/03/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/div/03/input.expected-parse.serialised.json index 1bcdb0375e..b89f6aa5e7 100644 --- a/conjure_oxide/tests/integration/basic/div/03/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/div/03/input.expected-parse.serialised.json @@ -56,24 +56,26 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 9 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 9 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/div/03/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/div/03/input.expected-rewrite.serialised.json index 587b1d1ae5..bcab27fdcb 100644 --- a/conjure_oxide/tests/integration/basic/div/03/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/div/03/input.expected-rewrite.serialised.json @@ -68,24 +68,26 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 9 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 9 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/div/04/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/div/04/input.expected-parse.serialised.json index 8fbe2e39a3..9f9482a7f7 100644 --- a/conjure_oxide/tests/integration/basic/div/04/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/div/04/input.expected-parse.serialised.json @@ -64,58 +64,60 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "b" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + ], + [ + { + "UserName": "b" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "c" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + ], + [ + { + "UserName": "c" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/div/04/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/div/04/input.expected-rewrite.serialised.json index 0892efedaf..6f192c9d8e 100644 --- a/conjure_oxide/tests/integration/basic/div/04/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/div/04/input.expected-rewrite.serialised.json @@ -102,75 +102,77 @@ ] } ], - "next_var": 1, - "variables": [ - [ - { - "MachineName": 0 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + "symbols": { + "next_machine_name": 1, + "variables": [ + [ + { + "MachineName": 0 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + ], + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "b" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + ], + [ + { + "UserName": "b" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "c" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + ], + [ + { + "UserName": "c" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/div/05/div-05.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/div/05/div-05.expected-parse.serialised.json index e17b66982f..4333385875 100644 --- a/conjure_oxide/tests/integration/basic/div/05/div-05.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/div/05/div-05.expected-parse.serialised.json @@ -56,58 +56,60 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "b" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + ], + [ + { + "UserName": "b" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "c" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + ], + [ + { + "UserName": "c" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/div/05/div-05.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/div/05/div-05.expected-rewrite.serialised.json index fba38b5af9..0a78170500 100644 --- a/conjure_oxide/tests/integration/basic/div/05/div-05.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/div/05/div-05.expected-rewrite.serialised.json @@ -102,75 +102,77 @@ ] } ], - "next_var": 1, - "variables": [ - [ - { - "MachineName": 0 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + "symbols": { + "next_machine_name": 1, + "variables": [ + [ + { + "MachineName": 0 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + ], + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "b" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + ], + [ + { + "UserName": "b" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "c" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + ], + [ + { + "UserName": "c" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/div/06/div-06.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/div/06/div-06.expected-parse.serialised.json index 8fbe2e39a3..9f9482a7f7 100644 --- a/conjure_oxide/tests/integration/basic/div/06/div-06.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/div/06/div-06.expected-parse.serialised.json @@ -64,58 +64,60 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "b" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + ], + [ + { + "UserName": "b" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "c" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + ], + [ + { + "UserName": "c" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/div/06/div-06.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/div/06/div-06.expected-rewrite.serialised.json index 0892efedaf..6f192c9d8e 100644 --- a/conjure_oxide/tests/integration/basic/div/06/div-06.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/div/06/div-06.expected-rewrite.serialised.json @@ -102,75 +102,77 @@ ] } ], - "next_var": 1, - "variables": [ - [ - { - "MachineName": 0 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + "symbols": { + "next_machine_name": 1, + "variables": [ + [ + { + "MachineName": 0 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + ], + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "b" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + ], + [ + { + "UserName": "b" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "c" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + ], + [ + { + "UserName": "c" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/implies/01-basic/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/implies/01-basic/input.expected-parse.serialised.json index 1e363b3887..06faea71f2 100644 --- a/conjure_oxide/tests/integration/basic/implies/01-basic/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/implies/01-basic/input.expected-parse.serialised.json @@ -35,23 +35,25 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "y" - }, - { - "domain": "BoolDomain" - } + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "y" + }, + { + "domain": "BoolDomain" + } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/implies/01-basic/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/implies/01-basic/input.expected-rewrite.serialised.json index 02c499bfe4..a1c533ff8a 100644 --- a/conjure_oxide/tests/integration/basic/implies/01-basic/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/implies/01-basic/input.expected-rewrite.serialised.json @@ -22,23 +22,25 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "y" - }, - { - "domain": "BoolDomain" - } + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "y" + }, + { + "domain": "BoolDomain" + } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/implies/02-flattening/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/implies/02-flattening/input.expected-parse.serialised.json index ccea9d2a4a..b0be1d8b83 100644 --- a/conjure_oxide/tests/integration/basic/implies/02-flattening/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/implies/02-flattening/input.expected-parse.serialised.json @@ -199,58 +199,60 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 5 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 5 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 5 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 5 + ] + } + ] + } } - } - ], - [ - { - "UserName": "z" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 5 - ] - } - ] + ], + [ + { + "UserName": "z" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 5 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/implies/02-flattening/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/implies/02-flattening/input.expected-rewrite.serialised.json index 064c8e21d6..1cda4e818d 100644 --- a/conjure_oxide/tests/integration/basic/implies/02-flattening/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/implies/02-flattening/input.expected-rewrite.serialised.json @@ -215,74 +215,76 @@ ] } ], - "next_var": 2, - "variables": [ - [ - { - "MachineName": 0 - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "MachineName": 1 - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 5 - ] - } - ] + "symbols": { + "next_machine_name": 2, + "variables": [ + [ + { + "MachineName": 0 + }, + { + "domain": "BoolDomain" } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 5 - ] - } - ] + ], + [ + { + "MachineName": 1 + }, + { + "domain": "BoolDomain" } - } - ], - [ - { - "UserName": "z" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 5 - ] - } - ] + ], + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 5 + ] + } + ] + } + } + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 5 + ] + } + ] + } } - } + ], + [ + { + "UserName": "z" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 5 + ] + } + ] + } + } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/implies/03-tautologies/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/implies/03-tautologies/input.expected-parse.serialised.json index c96d7c8934..2b81630084 100644 --- a/conjure_oxide/tests/integration/basic/implies/03-tautologies/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/implies/03-tautologies/input.expected-parse.serialised.json @@ -199,55 +199,57 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "b" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "c" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "x" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "y" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "z" - }, - { - "domain": "BoolDomain" - } + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "b" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "c" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "x" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "y" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "z" + }, + { + "domain": "BoolDomain" + } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/implies/03-tautologies/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/implies/03-tautologies/input.expected-rewrite.serialised.json index 767c64ce56..93f9c64fff 100644 --- a/conjure_oxide/tests/integration/basic/implies/03-tautologies/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/implies/03-tautologies/input.expected-rewrite.serialised.json @@ -40,55 +40,57 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "b" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "c" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "x" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "y" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "z" - }, - { - "domain": "BoolDomain" - } + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "b" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "c" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "x" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "y" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "z" + }, + { + "domain": "BoolDomain" + } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/implies/04-needs-normalising/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/implies/04-needs-normalising/input.expected-parse.serialised.json index 7a37b80cb0..2ee51fd344 100644 --- a/conjure_oxide/tests/integration/basic/implies/04-needs-normalising/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/implies/04-needs-normalising/input.expected-parse.serialised.json @@ -240,87 +240,89 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "b" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "c" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "d" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "e" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "f" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "g" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "h" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "x" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "y" - }, - { - "domain": "BoolDomain" - } + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "b" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "c" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "d" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "e" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "f" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "g" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "h" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "x" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "y" + }, + { + "domain": "BoolDomain" + } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/implies/04-needs-normalising/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/implies/04-needs-normalising/input.expected-rewrite.serialised.json index 0ee173f51e..d345e3cb3c 100644 --- a/conjure_oxide/tests/integration/basic/implies/04-needs-normalising/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/implies/04-needs-normalising/input.expected-rewrite.serialised.json @@ -199,103 +199,105 @@ ] } ], - "next_var": 2, - "variables": [ - [ - { - "MachineName": 0 - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "MachineName": 1 - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "a" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "b" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "c" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "d" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "e" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "f" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "g" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "h" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "x" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "y" - }, - { - "domain": "BoolDomain" - } + "symbols": { + "next_machine_name": 2, + "variables": [ + [ + { + "MachineName": 0 + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "MachineName": 1 + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "a" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "b" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "c" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "d" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "e" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "f" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "g" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "h" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "x" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "y" + }, + { + "domain": "BoolDomain" + } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/max/02/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/max/02/input.expected-parse.serialised.json index b33e1e9001..773aac7230 100644 --- a/conjure_oxide/tests/integration/basic/max/02/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/max/02/input.expected-parse.serialised.json @@ -58,24 +58,26 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/max/02/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/max/02/input.expected-rewrite.serialised.json index 351503a241..1fb2b5b89a 100644 --- a/conjure_oxide/tests/integration/basic/max/02/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/max/02/input.expected-rewrite.serialised.json @@ -142,41 +142,43 @@ ] } ], - "next_var": 1, - "variables": [ - [ - { - "MachineName": 0 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 3 - ] - } - ] + "symbols": { + "next_machine_name": 1, + "variables": [ + [ + { + "MachineName": 0 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + ], + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/min/01/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/min/01/input.expected-parse.serialised.json index 119c6889d3..dd8efc8718 100644 --- a/conjure_oxide/tests/integration/basic/min/01/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/min/01/input.expected-parse.serialised.json @@ -58,41 +58,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "b" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + ], + [ + { + "UserName": "b" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/min/01/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/min/01/input.expected-rewrite.serialised.json index d6e4635e69..99f5e277e7 100644 --- a/conjure_oxide/tests/integration/basic/min/01/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/min/01/input.expected-rewrite.serialised.json @@ -142,58 +142,60 @@ ] } ], - "next_var": 1, - "variables": [ - [ - { - "MachineName": 0 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + "symbols": { + "next_machine_name": 1, + "variables": [ + [ + { + "MachineName": 0 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + ], + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "b" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + ], + [ + { + "UserName": "b" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/min/02/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/min/02/input.expected-parse.serialised.json index 4844e3deae..10ab432cfc 100644 --- a/conjure_oxide/tests/integration/basic/min/02/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/min/02/input.expected-parse.serialised.json @@ -58,41 +58,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "b" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + ], + [ + { + "UserName": "b" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/min/02/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/min/02/input.expected-rewrite.serialised.json index fa42a8a4b9..539cce0df2 100644 --- a/conjure_oxide/tests/integration/basic/min/02/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/min/02/input.expected-rewrite.serialised.json @@ -142,58 +142,60 @@ ] } ], - "next_var": 1, - "variables": [ - [ - { - "MachineName": 0 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + "symbols": { + "next_machine_name": 1, + "variables": [ + [ + { + "MachineName": 0 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + ], + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "b" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + ], + [ + { + "UserName": "b" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/min/03/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/min/03/input.expected-parse.serialised.json index 3b064d476a..c7ddd7dbcc 100644 --- a/conjure_oxide/tests/integration/basic/min/03/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/min/03/input.expected-parse.serialised.json @@ -58,41 +58,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "b" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 4 - ] - } - ] + ], + [ + { + "UserName": "b" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 4 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/min/03/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/min/03/input.expected-rewrite.serialised.json index 27a6093ecb..f5ae863f65 100644 --- a/conjure_oxide/tests/integration/basic/min/03/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/min/03/input.expected-rewrite.serialised.json @@ -142,58 +142,60 @@ ] } ], - "next_var": 1, - "variables": [ - [ - { - "MachineName": 0 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + "symbols": { + "next_machine_name": 1, + "variables": [ + [ + { + "MachineName": 0 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + ], + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "b" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 4 - ] - } - ] + ], + [ + { + "UserName": "b" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 4 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/min/04/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/min/04/input.expected-parse.serialised.json index cefab9e3a8..81118b828d 100644 --- a/conjure_oxide/tests/integration/basic/min/04/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/min/04/input.expected-parse.serialised.json @@ -58,41 +58,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 2 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 2 + ] + } + ] + } } - } - ], - [ - { - "UserName": "b" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 4, - 7 - ] - } - ] + ], + [ + { + "UserName": "b" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 4, + 7 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/min/04/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/min/04/input.expected-rewrite.serialised.json index 0141cc5cdc..b8f50d2893 100644 --- a/conjure_oxide/tests/integration/basic/min/04/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/min/04/input.expected-rewrite.serialised.json @@ -142,58 +142,60 @@ ] } ], - "next_var": 1, - "variables": [ - [ - { - "MachineName": 0 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 2 - ] - } - ] + "symbols": { + "next_machine_name": 1, + "variables": [ + [ + { + "MachineName": 0 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 2 + ] + } + ] + } } - } - ], - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 2 - ] - } - ] + ], + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 2 + ] + } + ] + } } - } - ], - [ - { - "UserName": "b" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 4, - 7 - ] - } - ] + ], + [ + { + "UserName": "b" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 4, + 7 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/min/05/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/min/05/input.expected-parse.serialised.json index f97ed517fd..f69b3e3d25 100644 --- a/conjure_oxide/tests/integration/basic/min/05/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/min/05/input.expected-parse.serialised.json @@ -58,41 +58,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 5 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 5 + ] + } + ] + } } - } - ], - [ - { - "UserName": "b" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 4 - ] - } - ] + ], + [ + { + "UserName": "b" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 4 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/min/05/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/min/05/input.expected-rewrite.serialised.json index b37d7147c7..2332ab3830 100644 --- a/conjure_oxide/tests/integration/basic/min/05/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/min/05/input.expected-rewrite.serialised.json @@ -142,58 +142,60 @@ ] } ], - "next_var": 1, - "variables": [ - [ - { - "MachineName": 0 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 4 - ] - } - ] + "symbols": { + "next_machine_name": 1, + "variables": [ + [ + { + "MachineName": 0 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 4 + ] + } + ] + } } - } - ], - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 5 - ] - } - ] + ], + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 5 + ] + } + ] + } } - } - ], - [ - { - "UserName": "b" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 4 - ] - } - ] + ], + [ + { + "UserName": "b" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 4 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/mod/01/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/mod/01/input.expected-parse.serialised.json index bce029d7b9..b262079470 100644 --- a/conjure_oxide/tests/integration/basic/mod/01/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/mod/01/input.expected-parse.serialised.json @@ -56,41 +56,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "b" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + ], + [ + { + "UserName": "b" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/mod/01/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/mod/01/input.expected-rewrite.serialised.json index 3bbbc2e7c4..7cdfc142ba 100644 --- a/conjure_oxide/tests/integration/basic/mod/01/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/mod/01/input.expected-rewrite.serialised.json @@ -68,41 +68,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "b" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + ], + [ + { + "UserName": "b" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/mod/02/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/mod/02/input.expected-parse.serialised.json index 7935f9aeed..c1f910cd82 100644 --- a/conjure_oxide/tests/integration/basic/mod/02/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/mod/02/input.expected-parse.serialised.json @@ -56,24 +56,26 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/mod/02/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/mod/02/input.expected-rewrite.serialised.json index 0a64b17310..b10df847a3 100644 --- a/conjure_oxide/tests/integration/basic/mod/02/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/mod/02/input.expected-rewrite.serialised.json @@ -22,24 +22,26 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/mod/03/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/mod/03/input.expected-parse.serialised.json index 2b1896d4db..b64c525b44 100644 --- a/conjure_oxide/tests/integration/basic/mod/03/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/mod/03/input.expected-parse.serialised.json @@ -56,24 +56,26 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 9 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 9 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/mod/03/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/mod/03/input.expected-rewrite.serialised.json index e820be38f8..4c72d24742 100644 --- a/conjure_oxide/tests/integration/basic/mod/03/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/mod/03/input.expected-rewrite.serialised.json @@ -68,24 +68,26 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 9 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 9 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/mod/04/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/mod/04/input.expected-parse.serialised.json index 21f9d86bef..d2267809cf 100644 --- a/conjure_oxide/tests/integration/basic/mod/04/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/mod/04/input.expected-parse.serialised.json @@ -64,58 +64,60 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "b" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + ], + [ + { + "UserName": "b" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "c" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + ], + [ + { + "UserName": "c" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/mod/04/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/mod/04/input.expected-rewrite.serialised.json index b3d0ee42d2..b010d11a98 100644 --- a/conjure_oxide/tests/integration/basic/mod/04/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/mod/04/input.expected-rewrite.serialised.json @@ -102,75 +102,77 @@ ] } ], - "next_var": 1, - "variables": [ - [ - { - "MachineName": 0 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 2 - ] - } - ] + "symbols": { + "next_machine_name": 1, + "variables": [ + [ + { + "MachineName": 0 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 2 + ] + } + ] + } } - } - ], - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + ], + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "b" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + ], + [ + { + "UserName": "b" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "c" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + ], + [ + { + "UserName": "c" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/mod/05/mod-05.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/mod/05/mod-05.expected-parse.serialised.json index 494fbf16b8..fad7332198 100644 --- a/conjure_oxide/tests/integration/basic/mod/05/mod-05.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/mod/05/mod-05.expected-parse.serialised.json @@ -56,58 +56,60 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "b" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + ], + [ + { + "UserName": "b" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "c" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + ], + [ + { + "UserName": "c" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/mod/05/mod-05.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/mod/05/mod-05.expected-rewrite.serialised.json index 0988118d51..90c7b55354 100644 --- a/conjure_oxide/tests/integration/basic/mod/05/mod-05.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/mod/05/mod-05.expected-rewrite.serialised.json @@ -102,75 +102,77 @@ ] } ], - "next_var": 1, - "variables": [ - [ - { - "MachineName": 0 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 2 - ] - } - ] + "symbols": { + "next_machine_name": 1, + "variables": [ + [ + { + "MachineName": 0 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 2 + ] + } + ] + } } - } - ], - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + ], + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "b" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + ], + [ + { + "UserName": "b" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "c" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + ], + [ + { + "UserName": "c" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/mod/06/mod-06.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/mod/06/mod-06.expected-parse.serialised.json index 21f9d86bef..d2267809cf 100644 --- a/conjure_oxide/tests/integration/basic/mod/06/mod-06.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/mod/06/mod-06.expected-parse.serialised.json @@ -64,58 +64,60 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "b" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + ], + [ + { + "UserName": "b" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "c" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + ], + [ + { + "UserName": "c" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/mod/06/mod-06.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/mod/06/mod-06.expected-rewrite.serialised.json index b3d0ee42d2..b010d11a98 100644 --- a/conjure_oxide/tests/integration/basic/mod/06/mod-06.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/mod/06/mod-06.expected-rewrite.serialised.json @@ -102,75 +102,77 @@ ] } ], - "next_var": 1, - "variables": [ - [ - { - "MachineName": 0 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 2 - ] - } - ] + "symbols": { + "next_machine_name": 1, + "variables": [ + [ + { + "MachineName": 0 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 2 + ] + } + ] + } } - } - ], - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + ], + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "b" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + ], + [ + { + "UserName": "b" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "c" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + ], + [ + { + "UserName": "c" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/neg/01-negeq/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/neg/01-negeq/input.expected-parse.serialised.json index fe24de5c89..5e02adddb4 100644 --- a/conjure_oxide/tests/integration/basic/neg/01-negeq/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/neg/01-negeq/input.expected-parse.serialised.json @@ -43,41 +43,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 2 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 2 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -1, - 1 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -1, + 1 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/neg/01-negeq/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/neg/01-negeq/input.expected-rewrite.serialised.json index d6ed1dcc13..9df3542a40 100644 --- a/conjure_oxide/tests/integration/basic/neg/01-negeq/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/neg/01-negeq/input.expected-rewrite.serialised.json @@ -19,41 +19,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 2 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 2 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -1, - 1 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -1, + 1 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/neg/02-nested-neg/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/neg/02-nested-neg/input.expected-parse.serialised.json index fe265509d3..f3187b20cf 100644 --- a/conjure_oxide/tests/integration/basic/neg/02-nested-neg/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/neg/02-nested-neg/input.expected-parse.serialised.json @@ -64,58 +64,60 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 2 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 2 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -1, - 1 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -1, + 1 + ] + } + ] + } } - } - ], - [ - { - "UserName": "z" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -1, - 1 - ] - } - ] + ], + [ + { + "UserName": "z" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -1, + 1 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/neg/02-nested-neg/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/neg/02-nested-neg/input.expected-rewrite.serialised.json index 3a49f71f85..9fd190b79a 100644 --- a/conjure_oxide/tests/integration/basic/neg/02-nested-neg/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/neg/02-nested-neg/input.expected-rewrite.serialised.json @@ -86,75 +86,77 @@ ] } ], - "next_var": 1, - "variables": [ - [ - { - "MachineName": 0 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -1, - 1 - ] - } - ] + "symbols": { + "next_machine_name": 1, + "variables": [ + [ + { + "MachineName": 0 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -1, + 1 + ] + } + ] + } } - } - ], - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 2 - ] - } - ] + ], + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 2 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -1, - 1 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -1, + 1 + ] + } + ] + } } - } - ], - [ - { - "UserName": "z" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -1, - 1 - ] - } - ] + ], + [ + { + "UserName": "z" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -1, + 1 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/neg/03-negated-expression/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/neg/03-negated-expression/input.expected-parse.serialised.json index 4b6f02bfe9..7b5b7d3f3c 100644 --- a/conjure_oxide/tests/integration/basic/neg/03-negated-expression/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/neg/03-negated-expression/input.expected-parse.serialised.json @@ -64,58 +64,60 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 2 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 2 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -1, - 1 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -1, + 1 + ] + } + ] + } } - } - ], - [ - { - "UserName": "z" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -1, - 1 - ] - } - ] + ], + [ + { + "UserName": "z" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -1, + 1 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/neg/03-negated-expression/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/neg/03-negated-expression/input.expected-rewrite.serialised.json index 8506deaba4..d134928fd8 100644 --- a/conjure_oxide/tests/integration/basic/neg/03-negated-expression/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/neg/03-negated-expression/input.expected-rewrite.serialised.json @@ -86,75 +86,77 @@ ] } ], - "next_var": 1, - "variables": [ - [ - { - "MachineName": 0 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -1, - 1 - ] - } - ] + "symbols": { + "next_machine_name": 1, + "variables": [ + [ + { + "MachineName": 0 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -1, + 1 + ] + } + ] + } } - } - ], - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 2 - ] - } - ] + ], + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 2 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -1, - 1 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -1, + 1 + ] + } + ] + } } - } - ], - [ - { - "UserName": "z" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -1, - 1 - ] - } - ] + ], + [ + { + "UserName": "z" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -1, + 1 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/neg/04-negated-expression-nested/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/neg/04-negated-expression-nested/input.expected-parse.serialised.json index 42d7ba4208..796e08aac2 100644 --- a/conjure_oxide/tests/integration/basic/neg/04-negated-expression-nested/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/neg/04-negated-expression-nested/input.expected-parse.serialised.json @@ -85,58 +85,60 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -1, - 1 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -1, + 1 + ] + } + ] + } } - } - ], - [ - { - "UserName": "z" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -1, - 1 - ] - } - ] + ], + [ + { + "UserName": "z" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -1, + 1 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/neg/04-negated-expression-nested/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/neg/04-negated-expression-nested/input.expected-rewrite.serialised.json index 43d13551fe..7128ed27df 100644 --- a/conjure_oxide/tests/integration/basic/neg/04-negated-expression-nested/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/neg/04-negated-expression-nested/input.expected-rewrite.serialised.json @@ -143,92 +143,94 @@ ] } ], - "next_var": 2, - "variables": [ - [ - { - "MachineName": 0 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -1, - 1 - ] - } - ] + "symbols": { + "next_machine_name": 2, + "variables": [ + [ + { + "MachineName": 0 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -1, + 1 + ] + } + ] + } } - } - ], - [ - { - "MachineName": 1 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -1, - 1 - ] - } - ] + ], + [ + { + "MachineName": 1 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -1, + 1 + ] + } + ] + } } - } - ], - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + ], + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -1, - 1 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -1, + 1 + ] + } + ] + } } - } - ], - [ - { - "UserName": "z" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -1, - 1 - ] - } - ] + ], + [ + { + "UserName": "z" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -1, + 1 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/neg/05-sum/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/neg/05-sum/input.expected-parse.serialised.json index ac9d0e488c..8834d3baae 100644 --- a/conjure_oxide/tests/integration/basic/neg/05-sum/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/neg/05-sum/input.expected-parse.serialised.json @@ -66,58 +66,60 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -1, - 1 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -1, + 1 + ] + } + ] + } } - } - ], - [ - { - "UserName": "z" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -1, - 1 - ] - } - ] + ], + [ + { + "UserName": "z" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -1, + 1 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/neg/05-sum/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/neg/05-sum/input.expected-rewrite.serialised.json index 6972d55349..befc7efe7b 100644 --- a/conjure_oxide/tests/integration/basic/neg/05-sum/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/neg/05-sum/input.expected-rewrite.serialised.json @@ -77,58 +77,60 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -1, - 1 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -1, + 1 + ] + } + ] + } } - } - ], - [ - { - "UserName": "z" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -1, - 1 - ] - } - ] + ], + [ + { + "UserName": "z" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -1, + 1 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/neg/06-sum-nested/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/neg/06-sum-nested/input.expected-parse.serialised.json index 0889e87585..a79ccd6ace 100644 --- a/conjure_oxide/tests/integration/basic/neg/06-sum-nested/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/neg/06-sum-nested/input.expected-parse.serialised.json @@ -141,92 +141,94 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -1, - 1 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -1, + 1 + ] + } + ] + } } - } - ], - [ - { - "UserName": "b" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -1, - 1 - ] - } - ] + ], + [ + { + "UserName": "b" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -1, + 1 + ] + } + ] + } } - } - ], - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + ], + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -1, - 1 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -1, + 1 + ] + } + ] + } } - } - ], - [ - { - "UserName": "z" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -1, - 1 - ] - } - ] + ], + [ + { + "UserName": "z" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -1, + 1 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/neg/06-sum-nested/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/neg/06-sum-nested/input.expected-rewrite.serialised.json index f809b85124..3c573ab0c3 100644 --- a/conjure_oxide/tests/integration/basic/neg/06-sum-nested/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/neg/06-sum-nested/input.expected-rewrite.serialised.json @@ -125,92 +125,94 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -1, - 1 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -1, + 1 + ] + } + ] + } } - } - ], - [ - { - "UserName": "b" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -1, - 1 - ] - } - ] + ], + [ + { + "UserName": "b" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -1, + 1 + ] + } + ] + } } - } - ], - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + ], + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -1, - 1 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -1, + 1 + ] + } + ] + } } - } - ], - [ - { - "UserName": "z" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -1, - 1 - ] - } - ] + ], + [ + { + "UserName": "z" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -1, + 1 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/pow/01-simple/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/pow/01-simple/input.expected-parse.serialised.json index 122417901b..bcefec657d 100644 --- a/conjure_oxide/tests/integration/basic/pow/01-simple/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/pow/01-simple/input.expected-parse.serialised.json @@ -56,41 +56,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 5 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 5 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 5 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 5 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/pow/01-simple/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/pow/01-simple/input.expected-rewrite.serialised.json index 892032e700..77bf7d6b14 100644 --- a/conjure_oxide/tests/integration/basic/pow/01-simple/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/pow/01-simple/input.expected-rewrite.serialised.json @@ -133,41 +133,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 5 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 5 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 5 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 5 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/pow/02-exponent-zero/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/pow/02-exponent-zero/input.expected-parse.serialised.json index e859d5494c..3f364186c4 100644 --- a/conjure_oxide/tests/integration/basic/pow/02-exponent-zero/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/pow/02-exponent-zero/input.expected-parse.serialised.json @@ -56,41 +56,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 5 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 5 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 5 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 5 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/pow/02-exponent-zero/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/pow/02-exponent-zero/input.expected-rewrite.serialised.json index ea7718a596..160c243841 100644 --- a/conjure_oxide/tests/integration/basic/pow/02-exponent-zero/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/pow/02-exponent-zero/input.expected-rewrite.serialised.json @@ -133,41 +133,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 5 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 5 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 5 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 5 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/pow/03-negative-exponent/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/pow/03-negative-exponent/input.expected-parse.serialised.json index 54d2b6d2b9..0b9000ab1a 100644 --- a/conjure_oxide/tests/integration/basic/pow/03-negative-exponent/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/pow/03-negative-exponent/input.expected-parse.serialised.json @@ -56,41 +56,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 5 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 5 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -5, - 5 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -5, + 5 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/pow/03-negative-exponent/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/pow/03-negative-exponent/input.expected-rewrite.serialised.json index 448e62c726..7518c90a21 100644 --- a/conjure_oxide/tests/integration/basic/pow/03-negative-exponent/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/pow/03-negative-exponent/input.expected-rewrite.serialised.json @@ -133,41 +133,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 5 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 5 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -5, - 5 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -5, + 5 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/pow/04-flatten/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/pow/04-flatten/input.expected-parse.serialised.json index bcafa7cb1f..97cab2a997 100644 --- a/conjure_oxide/tests/integration/basic/pow/04-flatten/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/pow/04-flatten/input.expected-parse.serialised.json @@ -100,41 +100,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 20 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 20 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 20 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 20 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/pow/04-flatten/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/pow/04-flatten/input.expected-rewrite.serialised.json index 6badb78b62..96cfd043b1 100644 --- a/conjure_oxide/tests/integration/basic/pow/04-flatten/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/pow/04-flatten/input.expected-rewrite.serialised.json @@ -322,126 +322,128 @@ ] } ], - "next_var": 5, - "variables": [ - [ - { - "MachineName": 0 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 4, - 22 - ] - } - ] + "symbols": { + "next_machine_name": 5, + "variables": [ + [ + { + "MachineName": 0 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 4, + 22 + ] + } + ] + } } - } - ], - [ - { - "MachineName": 1 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 10 - ] - } - ] + ], + [ + { + "MachineName": 1 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 10 + ] + } + ] + } } - } - ], - [ - { - "MachineName": 2 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 4, - 22 - ] - } - ] + ], + [ + { + "MachineName": 2 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 4, + 22 + ] + } + ] + } } - } - ], - [ - { - "MachineName": 3 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 10 - ] - } - ] + ], + [ + { + "MachineName": 3 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 10 + ] + } + ] + } } - } - ], - [ - { - "MachineName": 4 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 10 - ] - } - ] + ], + [ + { + "MachineName": 4 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 10 + ] + } + ] + } } - } - ], - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 20 - ] - } - ] + ], + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 20 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 20 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 20 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/pow/05-negative-base/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/pow/05-negative-base/input.expected-parse.serialised.json index 29f1b12fff..644e4bede3 100644 --- a/conjure_oxide/tests/integration/basic/pow/05-negative-base/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/pow/05-negative-base/input.expected-parse.serialised.json @@ -56,58 +56,60 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -2, - 0 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -2, + 0 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 3 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "z" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -10, - -1 - ] - } - ] + ], + [ + { + "UserName": "z" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -10, + -1 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/pow/05-negative-base/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/pow/05-negative-base/input.expected-rewrite.serialised.json index ef38e62a31..628f6a6c5e 100644 --- a/conjure_oxide/tests/integration/basic/pow/05-negative-base/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/pow/05-negative-base/input.expected-rewrite.serialised.json @@ -133,58 +133,60 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -2, - 0 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -2, + 0 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 3 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "z" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - -10, - -1 - ] - } - ] + ], + [ + { + "UserName": "z" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + -10, + -1 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/product/01-simple/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/product/01-simple/input.expected-parse.serialised.json index 137bdec63c..2ed3443253 100644 --- a/conjure_oxide/tests/integration/basic/product/01-simple/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/product/01-simple/input.expected-parse.serialised.json @@ -81,58 +81,60 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 4 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 4 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 4 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 4 + ] + } + ] + } } - } - ], - [ - { - "UserName": "z" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 4 - ] - } - ] + ], + [ + { + "UserName": "z" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 4 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/product/01-simple/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/product/01-simple/input.expected-rewrite.serialised.json index 23734f4c07..20320f3fc3 100644 --- a/conjure_oxide/tests/integration/basic/product/01-simple/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/product/01-simple/input.expected-rewrite.serialised.json @@ -68,92 +68,94 @@ ] } ], - "next_var": 2, - "variables": [ - [ - { - "MachineName": 0 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 8, - 64 - ] - } - ] + "symbols": { + "next_machine_name": 2, + "variables": [ + [ + { + "MachineName": 0 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 8, + 64 + ] + } + ] + } } - } - ], - [ - { - "MachineName": 1 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 4, - 16 - ] - } - ] + ], + [ + { + "MachineName": 1 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 4, + 16 + ] + } + ] + } } - } - ], - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 4 - ] - } - ] + ], + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 4 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 4 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 4 + ] + } + ] + } } - } - ], - [ - { - "UserName": "z" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 4 - ] - } - ] + ], + [ + { + "UserName": "z" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 4 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/sum/01-deeply-nested/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/sum/01-deeply-nested/input.expected-parse.serialised.json index 66f00a4dbd..f367e071d4 100644 --- a/conjure_oxide/tests/integration/basic/sum/01-deeply-nested/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/sum/01-deeply-nested/input.expected-parse.serialised.json @@ -117,77 +117,79 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Single": 1 - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Single": 1 + } + ] + } } - } - ], - [ - { - "UserName": "b" - }, - { - "domain": { - "IntDomain": [ - { - "Single": 1 - } - ] + ], + [ + { + "UserName": "b" + }, + { + "domain": { + "IntDomain": [ + { + "Single": 1 + } + ] + } } - } - ], - [ - { - "UserName": "c" - }, - { - "domain": { - "IntDomain": [ - { - "Single": 1 - } - ] + ], + [ + { + "UserName": "c" + }, + { + "domain": { + "IntDomain": [ + { + "Single": 1 + } + ] + } } - } - ], - [ - { - "UserName": "d" - }, - { - "domain": { - "IntDomain": [ - { - "Single": 1 - } - ] + ], + [ + { + "UserName": "d" + }, + { + "domain": { + "IntDomain": [ + { + "Single": 1 + } + ] + } } - } - ], - [ - { - "UserName": "e" - }, - { - "domain": { - "IntDomain": [ - { - "Single": 1 - } - ] + ], + [ + { + "UserName": "e" + }, + { + "domain": { + "IntDomain": [ + { + "Single": 1 + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/sum/01-deeply-nested/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/sum/01-deeply-nested/input.expected-rewrite.serialised.json index 2acd01c2f1..87a2044973 100644 --- a/conjure_oxide/tests/integration/basic/sum/01-deeply-nested/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/sum/01-deeply-nested/input.expected-rewrite.serialised.json @@ -91,77 +91,79 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Single": 1 - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Single": 1 + } + ] + } } - } - ], - [ - { - "UserName": "b" - }, - { - "domain": { - "IntDomain": [ - { - "Single": 1 - } - ] + ], + [ + { + "UserName": "b" + }, + { + "domain": { + "IntDomain": [ + { + "Single": 1 + } + ] + } } - } - ], - [ - { - "UserName": "c" - }, - { - "domain": { - "IntDomain": [ - { - "Single": 1 - } - ] + ], + [ + { + "UserName": "c" + }, + { + "domain": { + "IntDomain": [ + { + "Single": 1 + } + ] + } } - } - ], - [ - { - "UserName": "d" - }, - { - "domain": { - "IntDomain": [ - { - "Single": 1 - } - ] + ], + [ + { + "UserName": "d" + }, + { + "domain": { + "IntDomain": [ + { + "Single": 1 + } + ] + } } - } - ], - [ - { - "UserName": "e" - }, - { - "domain": { - "IntDomain": [ - { - "Single": 1 - } - ] + ], + [ + { + "UserName": "e" + }, + { + "domain": { + "IntDomain": [ + { + "Single": 1 + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/sum/02-sum-put-in-aux-var/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/sum/02-sum-put-in-aux-var/input.expected-parse.serialised.json index 554c596d7c..d580cb1534 100644 --- a/conjure_oxide/tests/integration/basic/sum/02-sum-put-in-aux-var/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/sum/02-sum-put-in-aux-var/input.expected-parse.serialised.json @@ -102,75 +102,77 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 3, - 5 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 3, + 5 + ] + } + ] + } } - } - ], - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 3, - 4 - ] - } - ] + ], + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 3, + 4 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 5 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 5 + ] + } + ] + } } - } - ], - [ - { - "UserName": "z" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 5 - ] - } - ] + ], + [ + { + "UserName": "z" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 5 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/sum/02-sum-put-in-aux-var/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/sum/02-sum-put-in-aux-var/input.expected-rewrite.serialised.json index dd819e33b9..88528c42b9 100644 --- a/conjure_oxide/tests/integration/basic/sum/02-sum-put-in-aux-var/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/sum/02-sum-put-in-aux-var/input.expected-rewrite.serialised.json @@ -138,92 +138,94 @@ ] } ], - "next_var": 1, - "variables": [ - [ - { - "MachineName": 0 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 6, - 14 - ] - } - ] + "symbols": { + "next_machine_name": 1, + "variables": [ + [ + { + "MachineName": 0 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 6, + 14 + ] + } + ] + } } - } - ], - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 3, - 5 - ] - } - ] + ], + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 3, + 5 + ] + } + ] + } } - } - ], - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 3, - 4 - ] - } - ] + ], + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 3, + 4 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 5 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 5 + ] + } + ] + } } - } - ], - [ - { - "UserName": "z" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 5 - ] - } - ] + ], + [ + { + "UserName": "z" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 5 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/weighted-sum/01-simple-lt/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/weighted-sum/01-simple-lt/input.expected-parse.serialised.json index 3f661215d0..9718d276ac 100644 --- a/conjure_oxide/tests/integration/basic/weighted-sum/01-simple-lt/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/weighted-sum/01-simple-lt/input.expected-parse.serialised.json @@ -127,58 +127,60 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 4 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 4 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 4 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 4 + ] + } + ] + } } - } - ], - [ - { - "UserName": "z" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 4 - ] - } - ] + ], + [ + { + "UserName": "z" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 4 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/weighted-sum/01-simple-lt/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/weighted-sum/01-simple-lt/input.expected-rewrite.serialised.json index dd6baf2389..7b1d91a66f 100644 --- a/conjure_oxide/tests/integration/basic/weighted-sum/01-simple-lt/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/weighted-sum/01-simple-lt/input.expected-rewrite.serialised.json @@ -42,58 +42,60 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 4 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 4 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 4 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 4 + ] + } + ] + } } - } - ], - [ - { - "UserName": "z" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 4 - ] - } - ] + ], + [ + { + "UserName": "z" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 4 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/weighted-sum/02-simple-gt/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/weighted-sum/02-simple-gt/input.expected-parse.serialised.json index c55cef984a..072abf381a 100644 --- a/conjure_oxide/tests/integration/basic/weighted-sum/02-simple-gt/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/weighted-sum/02-simple-gt/input.expected-parse.serialised.json @@ -104,41 +104,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 4 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 4 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 4 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 4 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/weighted-sum/02-simple-gt/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/weighted-sum/02-simple-gt/input.expected-rewrite.serialised.json index 18d41557b5..f117f03302 100644 --- a/conjure_oxide/tests/integration/basic/weighted-sum/02-simple-gt/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/weighted-sum/02-simple-gt/input.expected-rewrite.serialised.json @@ -42,41 +42,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 4 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 4 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 4 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 4 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/weighted-sum/03-simple-eq/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/weighted-sum/03-simple-eq/input.expected-parse.serialised.json index 585f554953..1d110b95eb 100644 --- a/conjure_oxide/tests/integration/basic/weighted-sum/03-simple-eq/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/weighted-sum/03-simple-eq/input.expected-parse.serialised.json @@ -104,41 +104,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 4 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 4 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 4 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 4 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/weighted-sum/03-simple-eq/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/weighted-sum/03-simple-eq/input.expected-rewrite.serialised.json index 88144c1def..f262f9f8be 100644 --- a/conjure_oxide/tests/integration/basic/weighted-sum/03-simple-eq/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/weighted-sum/03-simple-eq/input.expected-rewrite.serialised.json @@ -77,41 +77,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 4 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 4 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 4 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 4 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/weighted-sum/04-needs-normalising/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/weighted-sum/04-needs-normalising/input.expected-parse.serialised.json index 4a17406db3..6f364f39df 100644 --- a/conjure_oxide/tests/integration/basic/weighted-sum/04-needs-normalising/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/weighted-sum/04-needs-normalising/input.expected-parse.serialised.json @@ -312,58 +312,60 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 5 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 5 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 5 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 5 + ] + } + ] + } } - } - ], - [ - { - "UserName": "z" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 5 - ] - } - ] + ], + [ + { + "UserName": "z" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 5 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/weighted-sum/04-needs-normalising/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/weighted-sum/04-needs-normalising/input.expected-rewrite.serialised.json index 3d872a277f..b8139271b3 100644 --- a/conjure_oxide/tests/integration/basic/weighted-sum/04-needs-normalising/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/weighted-sum/04-needs-normalising/input.expected-rewrite.serialised.json @@ -58,58 +58,60 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 5 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 5 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 5 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 5 + ] + } + ] + } } - } - ], - [ - { - "UserName": "z" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 5 - ] - } - ] + ], + [ + { + "UserName": "z" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 5 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/weighted-sum/05-flattening/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/basic/weighted-sum/05-flattening/input.expected-parse.serialised.json index 1a0490499b..03ebdf6e25 100644 --- a/conjure_oxide/tests/integration/basic/weighted-sum/05-flattening/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/basic/weighted-sum/05-flattening/input.expected-parse.serialised.json @@ -367,143 +367,145 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 10 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 10 + ] + } + ] + } } - } - ], - [ - { - "UserName": "b" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 10 - ] - } - ] + ], + [ + { + "UserName": "b" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 10 + ] + } + ] + } } - } - ], - [ - { - "UserName": "c" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 10 - ] - } - ] + ], + [ + { + "UserName": "c" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 10 + ] + } + ] + } } - } - ], - [ - { - "UserName": "d" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 10 - ] - } - ] + ], + [ + { + "UserName": "d" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 10 + ] + } + ] + } } - } - ], - [ - { - "UserName": "e" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 10 - ] - } - ] + ], + [ + { + "UserName": "e" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 10 + ] + } + ] + } } - } - ], - [ - { - "UserName": "f" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 10 - ] - } - ] + ], + [ + { + "UserName": "f" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 10 + ] + } + ] + } } - } - ], - [ - { - "UserName": "g" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 10 - ] - } - ] + ], + [ + { + "UserName": "g" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 10 + ] + } + ] + } } - } - ], - [ - { - "UserName": "h" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 10 - ] - } - ] + ], + [ + { + "UserName": "h" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 10 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/basic/weighted-sum/05-flattening/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/basic/weighted-sum/05-flattening/input.expected-rewrite.serialised.json index c74b3afc1d..66ebaa8cea 100644 --- a/conjure_oxide/tests/integration/basic/weighted-sum/05-flattening/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/basic/weighted-sum/05-flattening/input.expected-rewrite.serialised.json @@ -278,211 +278,213 @@ ] } ], - "next_var": 4, - "variables": [ - [ - { - "MachineName": 0 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 4, - 100 - ] - } - ] + "symbols": { + "next_machine_name": 4, + "variables": [ + [ + { + "MachineName": 0 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 4, + 100 + ] + } + ] + } } - } - ], - [ - { - "MachineName": 1 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 5 - ] - } - ] + ], + [ + { + "MachineName": 1 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 5 + ] + } + ] + } } - } - ], - [ - { - "MachineName": 2 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 5 - ] - } - ] + ], + [ + { + "MachineName": 2 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 5 + ] + } + ] + } } - } - ], - [ - { - "MachineName": 3 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 5 - ] - } - ] + ], + [ + { + "MachineName": 3 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 5 + ] + } + ] + } } - } - ], - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 10 - ] - } - ] + ], + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 10 + ] + } + ] + } } - } - ], - [ - { - "UserName": "b" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 10 - ] - } - ] + ], + [ + { + "UserName": "b" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 10 + ] + } + ] + } } - } - ], - [ - { - "UserName": "c" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 10 - ] - } - ] + ], + [ + { + "UserName": "c" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 10 + ] + } + ] + } } - } - ], - [ - { - "UserName": "d" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 10 - ] - } - ] + ], + [ + { + "UserName": "d" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 10 + ] + } + ] + } } - } - ], - [ - { - "UserName": "e" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 10 - ] - } - ] + ], + [ + { + "UserName": "e" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 10 + ] + } + ] + } } - } - ], - [ - { - "UserName": "f" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 10 - ] - } - ] + ], + [ + { + "UserName": "f" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 10 + ] + } + ] + } } - } - ], - [ - { - "UserName": "g" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 10 - ] - } - ] + ], + [ + { + "UserName": "g" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 10 + ] + } + ] + } } - } - ], - [ - { - "UserName": "h" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 10 - ] - } - ] + ], + [ + { + "UserName": "h" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 10 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/bugs/issue-336-empty-or-should-be-false/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/bugs/issue-336-empty-or-should-be-false/input.expected-parse.serialised.json index d27c826132..a868cc35d1 100644 --- a/conjure_oxide/tests/integration/bugs/issue-336-empty-or-should-be-false/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/bugs/issue-336-empty-or-should-be-false/input.expected-parse.serialised.json @@ -10,24 +10,26 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 5 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 5 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/bugs/issue-336-empty-or-should-be-false/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/bugs/issue-336-empty-or-should-be-false/input.expected-rewrite.serialised.json index d48e2fa4d3..dd50b977fc 100644 --- a/conjure_oxide/tests/integration/bugs/issue-336-empty-or-should-be-false/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/bugs/issue-336-empty-or-should-be-false/input.expected-rewrite.serialised.json @@ -14,24 +14,26 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 5 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 5 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/bugs/sm600-non-terminating-min/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/bugs/sm600-non-terminating-min/input.expected-parse.serialised.json index 53d50f82ef..97a294890b 100644 --- a/conjure_oxide/tests/integration/bugs/sm600-non-terminating-min/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/bugs/sm600-non-terminating-min/input.expected-parse.serialised.json @@ -81,41 +81,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 7 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 7 + ] + } + ] + } } - } - ], - [ - { - "UserName": "b" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 7 - ] - } - ] + ], + [ + { + "UserName": "b" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 7 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/bugs/sm600-non-terminating-min/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/bugs/sm600-non-terminating-min/input.expected-rewrite.serialised.json index 02a0e6e030..c59d030a6c 100644 --- a/conjure_oxide/tests/integration/bugs/sm600-non-terminating-min/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/bugs/sm600-non-terminating-min/input.expected-rewrite.serialised.json @@ -146,58 +146,60 @@ ] } ], - "next_var": 1, - "variables": [ - [ - { - "MachineName": 0 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 7 - ] - } - ] + "symbols": { + "next_machine_name": 1, + "variables": [ + [ + { + "MachineName": 0 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 7 + ] + } + ] + } } - } - ], - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 7 - ] - } - ] + ], + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 7 + ] + } + ] + } } - } - ], - [ - { - "UserName": "b" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 7 - ] - } - ] + ], + [ + { + "UserName": "b" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 7 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/bugs/yb33-min-of-constants-parses-as-nothing/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/bugs/yb33-min-of-constants-parses-as-nothing/input.expected-parse.serialised.json index d3558a58fe..7a7b5c8258 100644 --- a/conjure_oxide/tests/integration/bugs/yb33-min-of-constants-parses-as-nothing/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/bugs/yb33-min-of-constants-parses-as-nothing/input.expected-parse.serialised.json @@ -81,24 +81,26 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "c" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 7 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "c" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 7 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/bugs/yb33-min-of-constants-parses-as-nothing/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/bugs/yb33-min-of-constants-parses-as-nothing/input.expected-rewrite.serialised.json index 9d07a984e1..9254d9a839 100644 --- a/conjure_oxide/tests/integration/bugs/yb33-min-of-constants-parses-as-nothing/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/bugs/yb33-min-of-constants-parses-as-nothing/input.expected-rewrite.serialised.json @@ -26,24 +26,26 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "c" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 7 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "c" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 7 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/eprime-minion/bool/literals-to-wlit-1/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/eprime-minion/bool/literals-to-wlit-1/input.expected-parse.serialised.json index c4f9307335..1f082ad47a 100644 --- a/conjure_oxide/tests/integration/eprime-minion/bool/literals-to-wlit-1/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/eprime-minion/bool/literals-to-wlit-1/input.expected-parse.serialised.json @@ -153,39 +153,41 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "b" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "c" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "d" - }, - { - "domain": "BoolDomain" - } + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "b" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "c" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "d" + }, + { + "domain": "BoolDomain" + } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/eprime-minion/bool/literals-to-wlit-1/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/eprime-minion/bool/literals-to-wlit-1/input.expected-rewrite.serialised.json index d4566c95c4..b651d0c43a 100644 --- a/conjure_oxide/tests/integration/eprime-minion/bool/literals-to-wlit-1/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/eprime-minion/bool/literals-to-wlit-1/input.expected-rewrite.serialised.json @@ -170,39 +170,41 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "b" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "c" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "d" - }, - { - "domain": "BoolDomain" - } + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "b" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "c" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "d" + }, + { + "domain": "BoolDomain" + } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/eprime-minion/partial-eval-01-add/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/eprime-minion/partial-eval-01-add/input.expected-parse.serialised.json index fdeefab1f6..dee79f7472 100644 --- a/conjure_oxide/tests/integration/eprime-minion/partial-eval-01-add/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/eprime-minion/partial-eval-01-add/input.expected-parse.serialised.json @@ -127,41 +127,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 50 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 50 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 50 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 50 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/eprime-minion/partial-eval-01-add/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/eprime-minion/partial-eval-01-add/input.expected-rewrite.serialised.json index 2d45eba597..f86a858ced 100644 --- a/conjure_oxide/tests/integration/eprime-minion/partial-eval-01-add/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/eprime-minion/partial-eval-01-add/input.expected-rewrite.serialised.json @@ -71,41 +71,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 50 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 50 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 50 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 50 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/eprime-minion/partial-eval-02-or-and/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/eprime-minion/partial-eval-02-or-and/input.expected-parse.serialised.json index def3e228b6..d2a97ae33b 100644 --- a/conjure_oxide/tests/integration/eprime-minion/partial-eval-02-or-and/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/eprime-minion/partial-eval-02-or-and/input.expected-parse.serialised.json @@ -168,31 +168,33 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "b" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "c" - }, - { - "domain": "BoolDomain" - } + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "b" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "c" + }, + { + "domain": "BoolDomain" + } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/eprime-minion/partial-eval-02-or-and/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/eprime-minion/partial-eval-02-or-and/input.expected-rewrite.serialised.json index b0df590d4b..ab1f25faaf 100644 --- a/conjure_oxide/tests/integration/eprime-minion/partial-eval-02-or-and/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/eprime-minion/partial-eval-02-or-and/input.expected-rewrite.serialised.json @@ -63,31 +63,33 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "b" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "c" - }, - { - "domain": "BoolDomain" - } + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "b" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "c" + }, + { + "domain": "BoolDomain" + } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/eprime-minion/partial-eval-add/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/eprime-minion/partial-eval-add/input.expected-parse.serialised.json index fdeefab1f6..dee79f7472 100644 --- a/conjure_oxide/tests/integration/eprime-minion/partial-eval-add/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/eprime-minion/partial-eval-add/input.expected-parse.serialised.json @@ -127,41 +127,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 50 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 50 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 50 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 50 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/eprime-minion/partial-eval-add/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/eprime-minion/partial-eval-add/input.expected-rewrite.serialised.json index 2d45eba597..f86a858ced 100644 --- a/conjure_oxide/tests/integration/eprime-minion/partial-eval-add/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/eprime-minion/partial-eval-add/input.expected-rewrite.serialised.json @@ -71,41 +71,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 50 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 50 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 50 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 50 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/eprime-minion/partial-eval-or-and/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/eprime-minion/partial-eval-or-and/input.expected-parse.serialised.json index def3e228b6..d2a97ae33b 100644 --- a/conjure_oxide/tests/integration/eprime-minion/partial-eval-or-and/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/eprime-minion/partial-eval-or-and/input.expected-parse.serialised.json @@ -168,31 +168,33 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "b" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "c" - }, - { - "domain": "BoolDomain" - } + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "b" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "c" + }, + { + "domain": "BoolDomain" + } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/eprime-minion/partial-eval-or-and/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/eprime-minion/partial-eval-or-and/input.expected-rewrite.serialised.json index b0df590d4b..ab1f25faaf 100644 --- a/conjure_oxide/tests/integration/eprime-minion/partial-eval-or-and/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/eprime-minion/partial-eval-or-and/input.expected-rewrite.serialised.json @@ -63,31 +63,33 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "b" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "c" - }, - { - "domain": "BoolDomain" - } + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "b" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "c" + }, + { + "domain": "BoolDomain" + } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/eprime-minion/xyz/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/eprime-minion/xyz/input.expected-parse.serialised.json index 42fe616658..18967166be 100644 --- a/conjure_oxide/tests/integration/eprime-minion/xyz/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/eprime-minion/xyz/input.expected-parse.serialised.json @@ -115,58 +115,60 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "b" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + ], + [ + { + "UserName": "b" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "c" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + ], + [ + { + "UserName": "c" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/eprime-minion/xyz/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/eprime-minion/xyz/input.expected-rewrite.serialised.json index d18b9969af..85e2af3c5e 100644 --- a/conjure_oxide/tests/integration/eprime-minion/xyz/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/eprime-minion/xyz/input.expected-rewrite.serialised.json @@ -92,58 +92,60 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "b" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + ], + [ + { + "UserName": "b" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "c" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + ], + [ + { + "UserName": "c" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/experiment/works/max2/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/experiment/works/max2/input.expected-parse.serialised.json index 4a8528cce6..e90add3079 100644 --- a/conjure_oxide/tests/integration/experiment/works/max2/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/experiment/works/max2/input.expected-parse.serialised.json @@ -138,58 +138,60 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 4 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 4 + ] + } + ] + } } - } - ], - [ - { - "UserName": "b" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 4 - ] - } - ] + ], + [ + { + "UserName": "b" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 4 + ] + } + ] + } } - } - ], - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 4 - ] - } - ] + ], + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 4 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/experiment/works/max2/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/experiment/works/max2/input.expected-rewrite.serialised.json index 3a78abcad9..b792dd987d 100644 --- a/conjure_oxide/tests/integration/experiment/works/max2/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/experiment/works/max2/input.expected-rewrite.serialised.json @@ -322,92 +322,94 @@ ] } ], - "next_var": 2, - "variables": [ - [ - { - "MachineName": 0 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 4 - ] - } - ] + "symbols": { + "next_machine_name": 2, + "variables": [ + [ + { + "MachineName": 0 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 4 + ] + } + ] + } } - } - ], - [ - { - "MachineName": 1 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 4 - ] - } - ] + ], + [ + { + "MachineName": 1 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 4 + ] + } + ] + } } - } - ], - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 4 - ] - } - ] + ], + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 4 + ] + } + ] + } } - } - ], - [ - { - "UserName": "b" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 4 - ] - } - ] + ], + [ + { + "UserName": "b" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 4 + ] + } + ] + } } - } - ], - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 4 - ] - } - ] + ], + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 4 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/minion_constraints/diseq/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/minion_constraints/diseq/input.expected-parse.serialised.json index 10c2a2b9a8..6e4125bbe1 100644 --- a/conjure_oxide/tests/integration/minion_constraints/diseq/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/minion_constraints/diseq/input.expected-parse.serialised.json @@ -35,41 +35,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/minion_constraints/diseq/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/minion_constraints/diseq/input.expected-rewrite.serialised.json index 10c2a2b9a8..6e4125bbe1 100644 --- a/conjure_oxide/tests/integration/minion_constraints/diseq/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/minion_constraints/diseq/input.expected-rewrite.serialised.json @@ -35,41 +35,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/minion_constraints/div_undefzero-01-simple/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/minion_constraints/div_undefzero-01-simple/input.expected-parse.serialised.json index b24d34ec89..94c7421153 100644 --- a/conjure_oxide/tests/integration/minion_constraints/div_undefzero-01-simple/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/minion_constraints/div_undefzero-01-simple/input.expected-parse.serialised.json @@ -56,41 +56,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 10 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 10 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 4 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 4 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/minion_constraints/div_undefzero-01-simple/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/minion_constraints/div_undefzero-01-simple/input.expected-rewrite.serialised.json index 9664db4a0d..bf3aaa983d 100644 --- a/conjure_oxide/tests/integration/minion_constraints/div_undefzero-01-simple/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/minion_constraints/div_undefzero-01-simple/input.expected-rewrite.serialised.json @@ -68,41 +68,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 10 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 10 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 4 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 4 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/minion_constraints/div_undefzero-02-zero/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/minion_constraints/div_undefzero-02-zero/input.expected-parse.serialised.json index 709f63919d..944c6e60cd 100644 --- a/conjure_oxide/tests/integration/minion_constraints/div_undefzero-02-zero/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/minion_constraints/div_undefzero-02-zero/input.expected-parse.serialised.json @@ -56,58 +56,60 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 5 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 5 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 2 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 2 + ] + } + ] + } } - } - ], - [ - { - "UserName": "z" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 2 - ] - } - ] + ], + [ + { + "UserName": "z" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 2 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/minion_constraints/div_undefzero-02-zero/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/minion_constraints/div_undefzero-02-zero/input.expected-rewrite.serialised.json index a72a7575e9..f5ddd35e7b 100644 --- a/conjure_oxide/tests/integration/minion_constraints/div_undefzero-02-zero/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/minion_constraints/div_undefzero-02-zero/input.expected-rewrite.serialised.json @@ -68,58 +68,60 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 5 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 5 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 2 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 2 + ] + } + ] + } } - } - ], - [ - { - "UserName": "z" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 2 - ] - } - ] + ], + [ + { + "UserName": "z" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 2 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/minion_constraints/div_undefzero-03-nested/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/minion_constraints/div_undefzero-03-nested/input.expected-parse.serialised.json index 27c51a0078..28c725c717 100644 --- a/conjure_oxide/tests/integration/minion_constraints/div_undefzero-03-nested/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/minion_constraints/div_undefzero-03-nested/input.expected-parse.serialised.json @@ -77,58 +77,60 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 5, - 20 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 5, + 20 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 5 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 5 + ] + } + ] + } } - } - ], - [ - { - "UserName": "z" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 6 - ] - } - ] + ], + [ + { + "UserName": "z" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 6 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/minion_constraints/div_undefzero-03-nested/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/minion_constraints/div_undefzero-03-nested/input.expected-rewrite.serialised.json index 4998a3c04b..9ddbc38101 100644 --- a/conjure_oxide/tests/integration/minion_constraints/div_undefzero-03-nested/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/minion_constraints/div_undefzero-03-nested/input.expected-rewrite.serialised.json @@ -148,92 +148,94 @@ ] } ], - "next_var": 2, - "variables": [ - [ - { - "MachineName": 0 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 5 - ] - } - ] + "symbols": { + "next_machine_name": 2, + "variables": [ + [ + { + "MachineName": 0 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 5 + ] + } + ] + } } - } - ], - [ - { - "MachineName": 1 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 5 - ] - } - ] + ], + [ + { + "MachineName": 1 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 5 + ] + } + ] + } } - } - ], - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 5, - 20 - ] - } - ] + ], + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 5, + 20 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 5 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 5 + ] + } + ] + } } - } - ], - [ - { - "UserName": "z" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 6 - ] - } - ] + ], + [ + { + "UserName": "z" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 6 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/minion_constraints/div_undefzero-04-nested-neq/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/minion_constraints/div_undefzero-04-nested-neq/input.expected-parse.serialised.json index c7aa28c134..99ea0898b9 100644 --- a/conjure_oxide/tests/integration/minion_constraints/div_undefzero-04-nested-neq/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/minion_constraints/div_undefzero-04-nested-neq/input.expected-parse.serialised.json @@ -77,58 +77,60 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 5, - 20 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 5, + 20 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 5 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 5 + ] + } + ] + } } - } - ], - [ - { - "UserName": "z" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 6 - ] - } - ] + ], + [ + { + "UserName": "z" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 6 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/minion_constraints/div_undefzero-04-nested-neq/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/minion_constraints/div_undefzero-04-nested-neq/input.expected-rewrite.serialised.json index 251115e0ca..2f8ebd7d91 100644 --- a/conjure_oxide/tests/integration/minion_constraints/div_undefzero-04-nested-neq/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/minion_constraints/div_undefzero-04-nested-neq/input.expected-rewrite.serialised.json @@ -182,109 +182,111 @@ ] } ], - "next_var": 3, - "variables": [ - [ - { - "MachineName": 0 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 20 - ] - } - ] + "symbols": { + "next_machine_name": 3, + "variables": [ + [ + { + "MachineName": 0 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 20 + ] + } + ] + } } - } - ], - [ - { - "MachineName": 1 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 5 - ] - } - ] + ], + [ + { + "MachineName": 1 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 5 + ] + } + ] + } } - } - ], - [ - { - "MachineName": 2 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 5 - ] - } - ] + ], + [ + { + "MachineName": 2 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 5 + ] + } + ] + } } - } - ], - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 5, - 20 - ] - } - ] + ], + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 5, + 20 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 5 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 5 + ] + } + ] + } } - } - ], - [ - { - "UserName": "z" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 6 - ] - } - ] + ], + [ + { + "UserName": "z" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 6 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/minion_constraints/div_undefzero-05-nested-noteq/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/minion_constraints/div_undefzero-05-nested-noteq/input.expected-parse.serialised.json index 83d4a7fc64..6c03dd0310 100644 --- a/conjure_oxide/tests/integration/minion_constraints/div_undefzero-05-nested-noteq/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/minion_constraints/div_undefzero-05-nested-noteq/input.expected-parse.serialised.json @@ -85,58 +85,60 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 5, - 20 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 5, + 20 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 5 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 5 + ] + } + ] + } } - } - ], - [ - { - "UserName": "z" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 6 - ] - } - ] + ], + [ + { + "UserName": "z" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 6 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/minion_constraints/div_undefzero-05-nested-noteq/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/minion_constraints/div_undefzero-05-nested-noteq/input.expected-rewrite.serialised.json index d93f0af439..433f163168 100644 --- a/conjure_oxide/tests/integration/minion_constraints/div_undefzero-05-nested-noteq/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/minion_constraints/div_undefzero-05-nested-noteq/input.expected-rewrite.serialised.json @@ -148,92 +148,94 @@ ] } ], - "next_var": 2, - "variables": [ - [ - { - "MachineName": 0 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 20 - ] - } - ] + "symbols": { + "next_machine_name": 2, + "variables": [ + [ + { + "MachineName": 0 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 20 + ] + } + ] + } } - } - ], - [ - { - "MachineName": 1 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 5 - ] - } - ] + ], + [ + { + "MachineName": 1 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 5 + ] + } + ] + } } - } - ], - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 5, - 20 - ] - } - ] + ], + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 5, + 20 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 5 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 5 + ] + } + ] + } } - } - ], - [ - { - "UserName": "z" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 6 - ] - } - ] + ], + [ + { + "UserName": "z" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 6 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/minion_constraints/eq/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/minion_constraints/eq/input.expected-parse.serialised.json index a6e9843d8f..eb43b295e9 100644 --- a/conjure_oxide/tests/integration/minion_constraints/eq/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/minion_constraints/eq/input.expected-parse.serialised.json @@ -35,41 +35,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 2 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 2 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/minion_constraints/eq/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/minion_constraints/eq/input.expected-rewrite.serialised.json index a6e9843d8f..eb43b295e9 100644 --- a/conjure_oxide/tests/integration/minion_constraints/eq/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/minion_constraints/eq/input.expected-rewrite.serialised.json @@ -35,41 +35,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 2 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 2 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/minion_constraints/ineq-01-strict-less-than/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/minion_constraints/ineq-01-strict-less-than/input.expected-parse.serialised.json index 208c01a8a9..d0ecddb574 100644 --- a/conjure_oxide/tests/integration/minion_constraints/ineq-01-strict-less-than/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/minion_constraints/ineq-01-strict-less-than/input.expected-parse.serialised.json @@ -35,41 +35,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 4 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 4 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 4 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 4 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/minion_constraints/ineq-01-strict-less-than/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/minion_constraints/ineq-01-strict-less-than/input.expected-rewrite.serialised.json index f82b392181..a16a7c15a5 100644 --- a/conjure_oxide/tests/integration/minion_constraints/ineq-01-strict-less-than/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/minion_constraints/ineq-01-strict-less-than/input.expected-rewrite.serialised.json @@ -26,41 +26,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 4 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 4 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 4 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 4 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/minion_constraints/ineq-02-leq/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/minion_constraints/ineq-02-leq/input.expected-parse.serialised.json index 24ab621ac3..5e3e46afa2 100644 --- a/conjure_oxide/tests/integration/minion_constraints/ineq-02-leq/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/minion_constraints/ineq-02-leq/input.expected-parse.serialised.json @@ -35,41 +35,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 4 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 4 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 4 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 4 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/minion_constraints/ineq-02-leq/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/minion_constraints/ineq-02-leq/input.expected-rewrite.serialised.json index 933fc69ad8..841bcde479 100644 --- a/conjure_oxide/tests/integration/minion_constraints/ineq-02-leq/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/minion_constraints/ineq-02-leq/input.expected-rewrite.serialised.json @@ -22,41 +22,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 4 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 4 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 4 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 4 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/minion_constraints/ineq-03-leq-plus-k/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/minion_constraints/ineq-03-leq-plus-k/input.expected-parse.serialised.json index 0e41a77544..2b0e3d90e2 100644 --- a/conjure_oxide/tests/integration/minion_constraints/ineq-03-leq-plus-k/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/minion_constraints/ineq-03-leq-plus-k/input.expected-parse.serialised.json @@ -58,41 +58,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/minion_constraints/ineq-03-leq-plus-k/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/minion_constraints/ineq-03-leq-plus-k/input.expected-rewrite.serialised.json index f63a9f49a4..9837ae1c36 100644 --- a/conjure_oxide/tests/integration/minion_constraints/ineq-03-leq-plus-k/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/minion_constraints/ineq-03-leq-plus-k/input.expected-rewrite.serialised.json @@ -26,41 +26,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/minion_constraints/ineq-04-strict-greater-than/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/minion_constraints/ineq-04-strict-greater-than/input.expected-parse.serialised.json index f206d16189..4447c2a91f 100644 --- a/conjure_oxide/tests/integration/minion_constraints/ineq-04-strict-greater-than/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/minion_constraints/ineq-04-strict-greater-than/input.expected-parse.serialised.json @@ -35,41 +35,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 4 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 4 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 4 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 4 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/minion_constraints/ineq-04-strict-greater-than/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/minion_constraints/ineq-04-strict-greater-than/input.expected-rewrite.serialised.json index 5650386144..67a89fe3a9 100644 --- a/conjure_oxide/tests/integration/minion_constraints/ineq-04-strict-greater-than/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/minion_constraints/ineq-04-strict-greater-than/input.expected-rewrite.serialised.json @@ -22,41 +22,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 4 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 4 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 4 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 4 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/minion_constraints/ineq-05-geq-plus-k-wrong-order/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/minion_constraints/ineq-05-geq-plus-k-wrong-order/input.expected-parse.serialised.json index dff0498730..e66551e655 100644 --- a/conjure_oxide/tests/integration/minion_constraints/ineq-05-geq-plus-k-wrong-order/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/minion_constraints/ineq-05-geq-plus-k-wrong-order/input.expected-parse.serialised.json @@ -121,41 +121,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 4 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 4 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 4 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 4 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/minion_constraints/ineq-05-geq-plus-k-wrong-order/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/minion_constraints/ineq-05-geq-plus-k-wrong-order/input.expected-rewrite.serialised.json index 82a911698f..29653343c6 100644 --- a/conjure_oxide/tests/integration/minion_constraints/ineq-05-geq-plus-k-wrong-order/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/minion_constraints/ineq-05-geq-plus-k-wrong-order/input.expected-rewrite.serialised.json @@ -43,41 +43,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 4 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 4 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 4 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 4 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/minion_constraints/ineq-06-leq-plus-k-wrong-order/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/minion_constraints/ineq-06-leq-plus-k-wrong-order/input.expected-parse.serialised.json index 9f61cef943..23850b0dc7 100644 --- a/conjure_oxide/tests/integration/minion_constraints/ineq-06-leq-plus-k-wrong-order/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/minion_constraints/ineq-06-leq-plus-k-wrong-order/input.expected-parse.serialised.json @@ -121,41 +121,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 4 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 4 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 4 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 4 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/minion_constraints/ineq-06-leq-plus-k-wrong-order/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/minion_constraints/ineq-06-leq-plus-k-wrong-order/input.expected-rewrite.serialised.json index b1f57d39f7..ad79cdfedf 100644 --- a/conjure_oxide/tests/integration/minion_constraints/ineq-06-leq-plus-k-wrong-order/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/minion_constraints/ineq-06-leq-plus-k-wrong-order/input.expected-rewrite.serialised.json @@ -51,41 +51,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 4 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 4 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 4 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 4 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/minion_constraints/modulo_undefzero-01-simple/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/minion_constraints/modulo_undefzero-01-simple/input.expected-parse.serialised.json index 80e7da55da..3770efebdb 100644 --- a/conjure_oxide/tests/integration/minion_constraints/modulo_undefzero-01-simple/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/minion_constraints/modulo_undefzero-01-simple/input.expected-parse.serialised.json @@ -56,41 +56,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 10 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 10 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 4 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 4 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/minion_constraints/modulo_undefzero-01-simple/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/minion_constraints/modulo_undefzero-01-simple/input.expected-rewrite.serialised.json index 65e299c221..52b3fdd84f 100644 --- a/conjure_oxide/tests/integration/minion_constraints/modulo_undefzero-01-simple/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/minion_constraints/modulo_undefzero-01-simple/input.expected-rewrite.serialised.json @@ -68,41 +68,43 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 10 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 10 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 2, - 4 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 2, + 4 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/minion_constraints/modulo_undefzero-02-zero/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/minion_constraints/modulo_undefzero-02-zero/input.expected-parse.serialised.json index e6a1a73e31..52204409d0 100644 --- a/conjure_oxide/tests/integration/minion_constraints/modulo_undefzero-02-zero/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/minion_constraints/modulo_undefzero-02-zero/input.expected-parse.serialised.json @@ -56,58 +56,60 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 5 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 5 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 2 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 2 + ] + } + ] + } } - } - ], - [ - { - "UserName": "z" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 2 - ] - } - ] + ], + [ + { + "UserName": "z" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 2 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/minion_constraints/modulo_undefzero-02-zero/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/minion_constraints/modulo_undefzero-02-zero/input.expected-rewrite.serialised.json index cca840e642..e159bbf481 100644 --- a/conjure_oxide/tests/integration/minion_constraints/modulo_undefzero-02-zero/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/minion_constraints/modulo_undefzero-02-zero/input.expected-rewrite.serialised.json @@ -68,58 +68,60 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 5 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 5 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 2 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 2 + ] + } + ] + } } - } - ], - [ - { - "UserName": "z" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 2 - ] - } - ] + ], + [ + { + "UserName": "z" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 2 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/minion_constraints/modulo_undefzero-03-nested/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/minion_constraints/modulo_undefzero-03-nested/input.expected-parse.serialised.json index 1585fefe53..dbff15bf2a 100644 --- a/conjure_oxide/tests/integration/minion_constraints/modulo_undefzero-03-nested/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/minion_constraints/modulo_undefzero-03-nested/input.expected-parse.serialised.json @@ -77,58 +77,60 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 5, - 20 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 5, + 20 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 5 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 5 + ] + } + ] + } } - } - ], - [ - { - "UserName": "z" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 6 - ] - } - ] + ], + [ + { + "UserName": "z" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 6 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/minion_constraints/modulo_undefzero-03-nested/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/minion_constraints/modulo_undefzero-03-nested/input.expected-rewrite.serialised.json index b7f61b28e4..05cdf9b3f4 100644 --- a/conjure_oxide/tests/integration/minion_constraints/modulo_undefzero-03-nested/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/minion_constraints/modulo_undefzero-03-nested/input.expected-rewrite.serialised.json @@ -148,92 +148,94 @@ ] } ], - "next_var": 2, - "variables": [ - [ - { - "MachineName": 0 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 5 - ] - } - ] + "symbols": { + "next_machine_name": 2, + "variables": [ + [ + { + "MachineName": 0 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 5 + ] + } + ] + } } - } - ], - [ - { - "MachineName": 1 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 5 - ] - } - ] + ], + [ + { + "MachineName": 1 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 5 + ] + } + ] + } } - } - ], - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 5, - 20 - ] - } - ] + ], + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 5, + 20 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 5 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 5 + ] + } + ] + } } - } - ], - [ - { - "UserName": "z" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 6 - ] - } - ] + ], + [ + { + "UserName": "z" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 6 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/minion_constraints/modulo_undefzero-04-nested-neq/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/minion_constraints/modulo_undefzero-04-nested-neq/input.expected-parse.serialised.json index 7d466ecc69..9aba104759 100644 --- a/conjure_oxide/tests/integration/minion_constraints/modulo_undefzero-04-nested-neq/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/minion_constraints/modulo_undefzero-04-nested-neq/input.expected-parse.serialised.json @@ -77,58 +77,60 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 5, - 7 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 5, + 7 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "z" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 4 - ] - } - ] + ], + [ + { + "UserName": "z" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 4 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/minion_constraints/modulo_undefzero-04-nested-neq/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/minion_constraints/modulo_undefzero-04-nested-neq/input.expected-rewrite.serialised.json index 228671e132..a184b9a296 100644 --- a/conjure_oxide/tests/integration/minion_constraints/modulo_undefzero-04-nested-neq/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/minion_constraints/modulo_undefzero-04-nested-neq/input.expected-rewrite.serialised.json @@ -182,109 +182,111 @@ ] } ], - "next_var": 3, - "variables": [ - [ - { - "MachineName": 0 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 2 - ] - } - ] + "symbols": { + "next_machine_name": 3, + "variables": [ + [ + { + "MachineName": 0 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 2 + ] + } + ] + } } - } - ], - [ - { - "MachineName": 1 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + ], + [ + { + "MachineName": 1 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } - ], - [ - { - "MachineName": 2 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + ], + [ + { + "MachineName": 2 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 5, - 7 - ] - } - ] + ], + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 5, + 7 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "z" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 4 - ] - } - ] + ], + [ + { + "UserName": "z" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 4 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/minion_constraints/modulo_undefzero-05-nested-noteq/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/minion_constraints/modulo_undefzero-05-nested-noteq/input.expected-parse.serialised.json index 2191e60e77..333ab4597d 100644 --- a/conjure_oxide/tests/integration/minion_constraints/modulo_undefzero-05-nested-noteq/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/minion_constraints/modulo_undefzero-05-nested-noteq/input.expected-parse.serialised.json @@ -85,58 +85,60 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 5, - 7 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 5, + 7 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "z" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 4 - ] - } - ] + ], + [ + { + "UserName": "z" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 4 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/minion_constraints/modulo_undefzero-05-nested-noteq/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/minion_constraints/modulo_undefzero-05-nested-noteq/input.expected-rewrite.serialised.json index 868a063103..eca7523311 100644 --- a/conjure_oxide/tests/integration/minion_constraints/modulo_undefzero-05-nested-noteq/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/minion_constraints/modulo_undefzero-05-nested-noteq/input.expected-rewrite.serialised.json @@ -148,92 +148,94 @@ ] } ], - "next_var": 2, - "variables": [ - [ - { - "MachineName": 0 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 2 - ] - } - ] + "symbols": { + "next_machine_name": 2, + "variables": [ + [ + { + "MachineName": 0 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 2 + ] + } + ] + } } - } - ], - [ - { - "MachineName": 1 - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + ], + [ + { + "MachineName": 1 + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 5, - 7 - ] - } - ] + ], + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 5, + 7 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 3 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "z" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 0, - 4 - ] - } - ] + ], + [ + { + "UserName": "z" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 0, + 4 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/minion_constraints/sumgeq/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/minion_constraints/sumgeq/input.expected-parse.serialised.json index 20fe09e786..d78850355e 100644 --- a/conjure_oxide/tests/integration/minion_constraints/sumgeq/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/minion_constraints/sumgeq/input.expected-parse.serialised.json @@ -58,58 +58,60 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "z" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 5 - ] - } - ] + ], + [ + { + "UserName": "z" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 5 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/minion_constraints/sumgeq/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/minion_constraints/sumgeq/input.expected-rewrite.serialised.json index 7a9d716a6a..aa05ec1a05 100644 --- a/conjure_oxide/tests/integration/minion_constraints/sumgeq/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/minion_constraints/sumgeq/input.expected-rewrite.serialised.json @@ -26,58 +26,60 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "z" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 5 - ] - } - ] + ], + [ + { + "UserName": "z" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 5 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/minion_constraints/sumleq/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/minion_constraints/sumleq/input.expected-parse.serialised.json index 28b356ab6d..f2add866b1 100644 --- a/conjure_oxide/tests/integration/minion_constraints/sumleq/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/minion_constraints/sumleq/input.expected-parse.serialised.json @@ -58,58 +58,60 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "z" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 5 - ] - } - ] + ], + [ + { + "UserName": "z" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 5 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/minion_constraints/sumleq/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/minion_constraints/sumleq/input.expected-rewrite.serialised.json index 55e31b0d5a..a255c76a63 100644 --- a/conjure_oxide/tests/integration/minion_constraints/sumleq/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/minion_constraints/sumleq/input.expected-rewrite.serialised.json @@ -26,58 +26,60 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "y" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + ], + [ + { + "UserName": "y" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "z" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 5 - ] - } - ] + ], + [ + { + "UserName": "z" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 5 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/optimisations/implies-tautologies-cse/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/optimisations/implies-tautologies-cse/input.expected-parse.serialised.json index 1bb2ea9fb4..e5da073336 100644 --- a/conjure_oxide/tests/integration/optimisations/implies-tautologies-cse/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/optimisations/implies-tautologies-cse/input.expected-parse.serialised.json @@ -1713,190 +1713,192 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "b" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "c" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "d" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "e" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "l" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 10 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": "BoolDomain" } - } - ], - [ - { - "UserName": "m" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 10 - ] - } - ] + ], + [ + { + "UserName": "b" + }, + { + "domain": "BoolDomain" } - } - ], - [ - { - "UserName": "n" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 10 - ] - } - ] + ], + [ + { + "UserName": "c" + }, + { + "domain": "BoolDomain" } - } - ], - [ - { - "UserName": "o" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 10 - ] - } - ] + ], + [ + { + "UserName": "d" + }, + { + "domain": "BoolDomain" } - } - ], - [ - { - "UserName": "p" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 10 - ] - } - ] + ], + [ + { + "UserName": "e" + }, + { + "domain": "BoolDomain" } - } - ], - [ - { - "UserName": "q" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 10 - ] - } - ] + ], + [ + { + "UserName": "l" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 10 + ] + } + ] + } } - } - ], - [ - { - "UserName": "r" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 10 - ] - } - ] + ], + [ + { + "UserName": "m" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 10 + ] + } + ] + } } - } - ], - [ - { - "UserName": "x" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "y" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "z" - }, - { - "domain": "BoolDomain" - } + ], + [ + { + "UserName": "n" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 10 + ] + } + ] + } + } + ], + [ + { + "UserName": "o" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 10 + ] + } + ] + } + } + ], + [ + { + "UserName": "p" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 10 + ] + } + ] + } + } + ], + [ + { + "UserName": "q" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 10 + ] + } + ] + } + } + ], + [ + { + "UserName": "r" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 10 + ] + } + ] + } + } + ], + [ + { + "UserName": "x" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "y" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "z" + }, + { + "domain": "BoolDomain" + } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/optimisations/implies-tautologies-cse/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/optimisations/implies-tautologies-cse/input.expected-rewrite.serialised.json index 4e27885a85..9ae4a52c8d 100644 --- a/conjure_oxide/tests/integration/optimisations/implies-tautologies-cse/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/optimisations/implies-tautologies-cse/input.expected-rewrite.serialised.json @@ -1253,310 +1253,312 @@ ] } ], - "next_var": 15, - "variables": [ - [ - { - "MachineName": 0 - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "MachineName": 10 - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "MachineName": 11 - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "MachineName": 12 - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "MachineName": 13 - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "MachineName": 14 - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "MachineName": 1 - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "MachineName": 2 - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "MachineName": 3 - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "MachineName": 4 - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "MachineName": 5 - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "MachineName": 6 - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "MachineName": 7 - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "MachineName": 8 - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "MachineName": 9 - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "a" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "b" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "c" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "d" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "e" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "l" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 10 - ] - } - ] + "symbols": { + "next_machine_name": 15, + "variables": [ + [ + { + "MachineName": 0 + }, + { + "domain": "BoolDomain" } - } - ], - [ - { - "UserName": "m" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 10 - ] - } - ] + ], + [ + { + "MachineName": 10 + }, + { + "domain": "BoolDomain" } - } - ], - [ - { - "UserName": "n" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 10 - ] - } - ] + ], + [ + { + "MachineName": 11 + }, + { + "domain": "BoolDomain" } - } - ], - [ - { - "UserName": "o" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 10 - ] - } - ] + ], + [ + { + "MachineName": 12 + }, + { + "domain": "BoolDomain" } - } - ], - [ - { - "UserName": "p" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 10 - ] - } - ] + ], + [ + { + "MachineName": 13 + }, + { + "domain": "BoolDomain" } - } - ], - [ - { - "UserName": "q" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 10 - ] - } - ] + ], + [ + { + "MachineName": 14 + }, + { + "domain": "BoolDomain" } - } - ], - [ - { - "UserName": "r" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 10 - ] - } - ] + ], + [ + { + "MachineName": 1 + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "MachineName": 2 + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "MachineName": 3 + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "MachineName": 4 + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "MachineName": 5 + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "MachineName": 6 + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "MachineName": 7 + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "MachineName": 8 + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "MachineName": 9 + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "a" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "b" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "c" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "d" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "e" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "l" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 10 + ] + } + ] + } } - } - ], - [ - { - "UserName": "x" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "y" - }, - { - "domain": "BoolDomain" - } - ], - [ - { - "UserName": "z" - }, - { - "domain": "BoolDomain" - } + ], + [ + { + "UserName": "m" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 10 + ] + } + ] + } + } + ], + [ + { + "UserName": "n" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 10 + ] + } + ] + } + } + ], + [ + { + "UserName": "o" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 10 + ] + } + ] + } + } + ], + [ + { + "UserName": "p" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 10 + ] + } + ] + } + } + ], + [ + { + "UserName": "q" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 10 + ] + } + ] + } + } + ], + [ + { + "UserName": "r" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 10 + ] + } + ] + } + } + ], + [ + { + "UserName": "x" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "y" + }, + { + "domain": "BoolDomain" + } + ], + [ + { + "UserName": "z" + }, + { + "domain": "BoolDomain" + } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/savilerow/divide-mod-novar/divide-mod-novar.expected-parse.serialised.json b/conjure_oxide/tests/integration/savilerow/divide-mod-novar/divide-mod-novar.expected-parse.serialised.json index 6d1258d1a7..8672ad6366 100644 --- a/conjure_oxide/tests/integration/savilerow/divide-mod-novar/divide-mod-novar.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/savilerow/divide-mod-novar/divide-mod-novar.expected-parse.serialised.json @@ -550,6 +550,8 @@ ] } ], - "next_var": 0, - "variables": [] + "symbols": { + "next_machine_name": 0, + "variables": [] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/savilerow/divide-mod-novar/divide-mod-novar.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/savilerow/divide-mod-novar/divide-mod-novar.expected-rewrite.serialised.json index 0fdcd4a46a..17f4b578d0 100644 --- a/conjure_oxide/tests/integration/savilerow/divide-mod-novar/divide-mod-novar.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/savilerow/divide-mod-novar/divide-mod-novar.expected-rewrite.serialised.json @@ -118,6 +118,8 @@ ] } ], - "next_var": 0, - "variables": [] + "symbols": { + "next_machine_name": 0, + "variables": [] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/savilerow/divide-mod/divide-mod.expected-parse.serialised.json b/conjure_oxide/tests/integration/savilerow/divide-mod/divide-mod.expected-parse.serialised.json index 8dc10dbe05..ed4ba98af2 100644 --- a/conjure_oxide/tests/integration/savilerow/divide-mod/divide-mod.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/savilerow/divide-mod/divide-mod.expected-parse.serialised.json @@ -550,24 +550,26 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 1 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 1 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/savilerow/divide-mod/divide-mod.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/savilerow/divide-mod/divide-mod.expected-rewrite.serialised.json index 546014df54..4599a41291 100644 --- a/conjure_oxide/tests/integration/savilerow/divide-mod/divide-mod.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/savilerow/divide-mod/divide-mod.expected-rewrite.serialised.json @@ -118,24 +118,26 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "x" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 1 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "x" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 1 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/xyz/input.expected-parse.serialised.json b/conjure_oxide/tests/integration/xyz/input.expected-parse.serialised.json index 42fe616658..18967166be 100644 --- a/conjure_oxide/tests/integration/xyz/input.expected-parse.serialised.json +++ b/conjure_oxide/tests/integration/xyz/input.expected-parse.serialised.json @@ -115,58 +115,60 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "b" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + ], + [ + { + "UserName": "b" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "c" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + ], + [ + { + "UserName": "c" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/integration/xyz/input.expected-rewrite.serialised.json b/conjure_oxide/tests/integration/xyz/input.expected-rewrite.serialised.json index d18b9969af..85e2af3c5e 100644 --- a/conjure_oxide/tests/integration/xyz/input.expected-rewrite.serialised.json +++ b/conjure_oxide/tests/integration/xyz/input.expected-rewrite.serialised.json @@ -92,58 +92,60 @@ ] } ], - "next_var": 0, - "variables": [ - [ - { - "UserName": "a" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + "symbols": { + "next_machine_name": 0, + "variables": [ + [ + { + "UserName": "a" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "b" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + ], + [ + { + "UserName": "b" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } - ], - [ - { - "UserName": "c" - }, - { - "domain": { - "IntDomain": [ - { - "Bounded": [ - 1, - 3 - ] - } - ] + ], + [ + { + "UserName": "c" + }, + { + "domain": { + "IntDomain": [ + { + "Bounded": [ + 1, + 3 + ] + } + ] + } } - } + ] ] - ] + } } \ No newline at end of file diff --git a/conjure_oxide/tests/model_tests.rs b/conjure_oxide/tests/model_tests.rs index ef1efb536e..a26cb38ad5 100644 --- a/conjure_oxide/tests/model_tests.rs +++ b/conjure_oxide/tests/model_tests.rs @@ -1,7 +1,5 @@ // Tests for various functionalities of the Model -use std::collections::BTreeMap; - use conjure_core::model::Model; use conjure_oxide::ast::*; @@ -12,14 +10,14 @@ fn modify_domain() { let d1 = Domain::IntDomain(vec![Range::Bounded(1, 3)]); let d2 = Domain::IntDomain(vec![Range::Bounded(1, 2)]); - let mut variables = BTreeMap::new(); - variables.insert(a.clone(), DecisionVariable { domain: d1.clone() }); + let mut symbols = SymbolTable::new(); + symbols.add_var(a.clone(), DecisionVariable { domain: d1.clone() }); - let mut m = Model::new(variables, vec![], Default::default()); + let mut m = Model::new(symbols, vec![], Default::default()); - assert_eq!(m.variables.get(&a).unwrap().domain, d1); + assert_eq!(m.symbols().domain_of(&a).unwrap(), &d1); m.update_domain(&a, d2.clone()); - assert_eq!(m.variables.get(&a).unwrap().domain, d2); + assert_eq!(m.symbols().domain_of(&a).unwrap(), &d2); } diff --git a/conjure_oxide/tests/rewrite_tests.rs b/conjure_oxide/tests/rewrite_tests.rs index 540c51a736..97576ed644 100644 --- a/conjure_oxide/tests/rewrite_tests.rs +++ b/conjure_oxide/tests/rewrite_tests.rs @@ -1,4 +1,4 @@ -use std::collections::{BTreeMap, VecDeque}; +use std::collections::VecDeque; use std::process::exit; use conjure_core::rules::eval_constant; @@ -321,20 +321,20 @@ fn reduce_solve_xyz() { ) ); - let mut model = Model::new(BTreeMap::new(), vec![expr1, expr2], Default::default()); - model.variables.insert( + let mut model = Model::new(SymbolTable::new(), vec![expr1, expr2], Default::default()); + model.add_variable( Name::UserName(String::from("a")), DecisionVariable { domain: Domain::IntDomain(vec![Range::Bounded(1, 3)]), }, ); - model.variables.insert( + model.add_variable( Name::UserName(String::from("b")), DecisionVariable { domain: Domain::IntDomain(vec![Range::Bounded(1, 3)]), }, ); - model.variables.insert( + model.add_variable( Name::UserName(String::from("c")), DecisionVariable { domain: Domain::IntDomain(vec![Range::Bounded(1, 3)]), @@ -657,7 +657,7 @@ fn rewrite_solve_xyz() { // Apply rewrite function to the nested expression let rewritten_expr = rewrite_model( - &Model::new(BTreeMap::new(), vec![nested_expr], Default::default()), + &Model::new(SymbolTable::new(), vec![nested_expr], Default::default()), &rule_sets, ) .unwrap() @@ -668,22 +668,22 @@ fn rewrite_solve_xyz() { assert!(rewritten_expr.iter().all(is_simple)); // Create model with variables and constraints - let mut model = Model::new(BTreeMap::new(), rewritten_expr, Default::default()); + let mut model = Model::new(SymbolTable::new(), rewritten_expr, Default::default()); // Insert variables and domains - model.variables.insert( + model.add_variable( var_name_from_atom(&variable_a.clone()), DecisionVariable { domain: domain.clone(), }, ); - model.variables.insert( + model.add_variable( var_name_from_atom(&variable_b.clone()), DecisionVariable { domain: domain.clone(), }, ); - model.variables.insert( + model.add_variable( var_name_from_atom(&variable_c.clone()), DecisionVariable { domain: domain.clone(), diff --git a/crates/conjure_core/src/ast/domains.rs b/crates/conjure_core/src/ast/domains.rs index 5ed5147a1b..6c17bdfb49 100644 --- a/crates/conjure_core/src/ast/domains.rs +++ b/crates/conjure_core/src/ast/domains.rs @@ -1,7 +1,6 @@ use serde::{Deserialize, Serialize}; -// use std::iter::Ste -#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] pub enum Range where A: Ord, @@ -10,7 +9,7 @@ where Bounded(A, A), } -#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] +#[derive(Clone, Debug, Eq, PartialEq, Hash, Serialize, Deserialize)] pub enum Domain { BoolDomain, IntDomain(Vec>), diff --git a/crates/conjure_core/src/ast/expressions.rs b/crates/conjure_core/src/ast/expressions.rs index 8820f1450c..14721564e9 100644 --- a/crates/conjure_core/src/ast/expressions.rs +++ b/crates/conjure_core/src/ast/expressions.rs @@ -322,24 +322,24 @@ fn range_vec_bounds_i32(ranges: &Vec>) -> (i32, i32) { impl Expression { /// Returns the possible values of the expression, recursing to leaf expressions - pub fn domain_of(&self, vars: &SymbolTable) -> Option { + pub fn domain_of(&self, syms: &SymbolTable) -> Option { let ret = match self { - Expression::Atomic(_, Atom::Reference(name)) => Some(vars.get(name)?.domain.clone()), + Expression::Atomic(_, Atom::Reference(name)) => Some(syms.domain_of(name)?.clone()), Expression::Atomic(_, Atom::Literal(Literal::Int(n))) => { Some(Domain::IntDomain(vec![Range::Single(*n)])) } Expression::Atomic(_, Atom::Literal(Literal::Bool(_))) => Some(Domain::BoolDomain), - Expression::Sum(_, exprs) => expr_vec_to_domain_i32(exprs, |x, y| Some(x + y), vars), + Expression::Sum(_, exprs) => expr_vec_to_domain_i32(exprs, |x, y| Some(x + y), syms), Expression::Product(_, exprs) => { - expr_vec_to_domain_i32(exprs, |x, y| Some(x * y), vars) + expr_vec_to_domain_i32(exprs, |x, y| Some(x * y), syms) } Expression::Min(_, exprs) => { - expr_vec_to_domain_i32(exprs, |x, y| Some(if x < y { x } else { y }), vars) + expr_vec_to_domain_i32(exprs, |x, y| Some(if x < y { x } else { y }), syms) } Expression::Max(_, exprs) => { - expr_vec_to_domain_i32(exprs, |x, y| Some(if x > y { x } else { y }), vars) + expr_vec_to_domain_i32(exprs, |x, y| Some(if x > y { x } else { y }), syms) } - Expression::UnsafeDiv(_, a, b) => a.domain_of(vars)?.apply_i32( + Expression::UnsafeDiv(_, a, b) => a.domain_of(syms)?.apply_i32( // rust integer division is truncating; however, we want to always round down, // including for negative numbers. |x, y| { @@ -349,12 +349,12 @@ impl Expression { None } }, - &b.domain_of(vars)?, + &b.domain_of(syms)?, ), Expression::SafeDiv(_, a, b) => { // rust integer division is truncating; however, we want to always round down // including for negative numbers. - let domain = a.domain_of(vars)?.apply_i32( + let domain = a.domain_of(syms)?.apply_i32( |x, y| { if y != 0 { Some((x as f32 / y as f32).floor() as i32) @@ -362,7 +362,7 @@ impl Expression { None } }, - &b.domain_of(vars)?, + &b.domain_of(syms)?, ); match domain { @@ -375,15 +375,15 @@ impl Expression { _ => None, } } - Expression::UnsafeMod(_, a, b) => a.domain_of(vars)?.apply_i32( + Expression::UnsafeMod(_, a, b) => a.domain_of(syms)?.apply_i32( |x, y| if y != 0 { Some(x % y) } else { None }, - &b.domain_of(vars)?, + &b.domain_of(syms)?, ), Expression::SafeMod(_, a, b) => { - let domain = a.domain_of(vars)?.apply_i32( + let domain = a.domain_of(syms)?.apply_i32( |x, y| if y != 0 { Some(x % y) } else { None }, - &b.domain_of(vars)?, + &b.domain_of(syms)?, ); match domain { @@ -398,7 +398,7 @@ impl Expression { } Expression::SafePow(_, a, b) | Expression::UnsafePow(_, a, b) => { - a.domain_of(vars)?.apply_i32( + a.domain_of(syms)?.apply_i32( |x, y| { if (x != 0 || y != 0) && y >= 0 { Some(x ^ y) @@ -406,7 +406,7 @@ impl Expression { None } }, - &b.domain_of(vars)?, + &b.domain_of(syms)?, ) } @@ -433,7 +433,7 @@ impl Expression { Expression::MinionReify(_, _, _) => Some(Domain::BoolDomain), Expression::MinionReifyImply(_, _, _) => Some(Domain::BoolDomain), Expression::Neg(_, x) => { - let Some(Domain::IntDomain(mut ranges)) = x.domain_of(vars) else { + let Some(Domain::IntDomain(mut ranges)) = x.domain_of(syms) else { return None; }; @@ -447,16 +447,16 @@ impl Expression { Some(Domain::IntDomain(ranges)) } Expression::Minus(_, a, b) => a - .domain_of(vars)? - .apply_i32(|x, y| Some(x - y), &b.domain_of(vars)?), + .domain_of(syms)? + .apply_i32(|x, y| Some(x - y), &b.domain_of(syms)?), Expression::FlatMinusEq(_, _, _) => Some(Domain::BoolDomain), Expression::FlatProductEq(_, _, _, _) => Some(Domain::BoolDomain), Expression::FlatWeightedSumLeq(_, _, _, _) => Some(Domain::BoolDomain), Expression::FlatWeightedSumGeq(_, _, _, _) => Some(Domain::BoolDomain), Expression::Abs(_, a) => a - .domain_of(vars)? - .apply_i32(|a, _| Some(a.abs()), &a.domain_of(vars)?), + .domain_of(syms)? + .apply_i32(|a, _| Some(a.abs()), &a.domain_of(syms)?), Expression::MinionPow(_, _, _, _) => Some(Domain::BoolDomain), }; match ret { @@ -802,7 +802,7 @@ mod tests { fn test_domain_of_reference() { let reference = Expression::Atomic(Metadata::new(), Atom::Reference(Name::MachineName(0))); let mut vars = SymbolTable::new(); - vars.insert( + vars.add_var( Name::MachineName(0), DecisionVariable::new(Domain::IntDomain(vec![Range::Single(1)])), ); @@ -822,7 +822,7 @@ mod tests { fn test_domain_of_reference_sum_single() { let reference = Expression::Atomic(Metadata::new(), Atom::Reference(Name::MachineName(0))); let mut vars = SymbolTable::new(); - vars.insert( + vars.add_var( Name::MachineName(0), DecisionVariable::new(Domain::IntDomain(vec![Range::Single(1)])), ); @@ -837,7 +837,7 @@ mod tests { fn test_domain_of_reference_sum_bounded() { let reference = Expression::Atomic(Metadata::new(), Atom::Reference(Name::MachineName(0))); let mut vars = SymbolTable::new(); - vars.insert( + vars.add_var( Name::MachineName(0), DecisionVariable::new(Domain::IntDomain(vec![Range::Bounded(1, 2)])), ); diff --git a/crates/conjure_core/src/ast/pretty.rs b/crates/conjure_core/src/ast/pretty.rs index 137b48d65b..384ce33094 100644 --- a/crates/conjure_core/src/ast/pretty.rs +++ b/crates/conjure_core/src/ast/pretty.rs @@ -70,7 +70,7 @@ pub fn pretty_vec(elems: &[T]) -> String { /// /// Returns None if the symbol is not in the symbol table pub fn pretty_variable_declaration(symbol_table: &SymbolTable, var_name: &Name) -> Option { - let var = symbol_table.get(var_name)?; + let var = symbol_table.get_var(var_name)?; match &var.domain { super::Domain::BoolDomain => Some(format!("{}: bool", var_name)), super::Domain::IntDomain(domain) => { diff --git a/crates/conjure_core/src/ast/symbol_table.rs b/crates/conjure_core/src/ast/symbol_table.rs index 9e7e8ae048..4ec47d99e1 100644 --- a/crates/conjure_core/src/ast/symbol_table.rs +++ b/crates/conjure_core/src/ast/symbol_table.rs @@ -1,13 +1,26 @@ -use std::collections::BTreeMap; +//! The (global) symbol table ([`SymbolTable`]), mapping identifiers (of type [`Name`]) to their +//! definitions. +//! +//! This only contains one type of definition at present, [`DecisionVariable`]. + +use std::collections::BTreeSet; use std::fmt::Display; +use std::{cell::RefCell, collections::BTreeMap}; use serde::{Deserialize, Serialize}; +use serde_with::serde_as; use crate::ast::variables::DecisionVariable; +use super::{Domain, ReturnType}; +use derivative::Derivative; + +/// A reference to an object stored in the [`SymbolTable`]. #[derive(Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum Name { + /// A name given in the input model. UserName(String), + /// A name generated by Conjure-Oxide. MachineName(i32), } @@ -22,4 +35,161 @@ impl Display for Name { } } -pub type SymbolTable = BTreeMap; +/// The global symbol table. Maps [`Names`](Name) to their definitions. +/// +/// Names in the symbol table are unique, including between different types of object stored in the +/// symbol table. For example, you cannot have a letting and decision variable with the same name. +#[derive(Derivative)] +#[derivative(Hash, PartialEq)] +#[serde_as] +#[derive(Clone, Debug, Eq, Serialize, Deserialize)] +pub struct SymbolTable { + // doing some information hiding here to allow for future refactoring (in particular adding + // lettings, removing variables). + #[serde_as(as = "Vec<(_, _)>")] + variables: BTreeMap, + + #[derivative(Hash = "ignore")] + #[derivative(PartialEq = "ignore")] + next_machine_name: RefCell, +} + +impl SymbolTable { + /// Creates an empty symbol table. + pub fn new() -> Self { + SymbolTable { + variables: BTreeMap::new(), + next_machine_name: RefCell::new(0), + } + } + + /*****************************/ + /* get entries */ + /*****************************/ + + /// Returns an iterator over the names in the symbol table. + /// + /// Alias of [`names`]. + pub fn keys(&self) -> impl Iterator { + self.names() + } + + /// Returns an iterator over the names in the symbol table. + pub fn names(&self) -> impl Iterator { + self.variables.keys() + } + + /// Returns an iterator over the names and defintions of all decision variables in the symbol + /// table. + pub fn iter_var(&self) -> impl Iterator { + self.variables.iter() + } + + /// Returns a reference to the decision variable with the given name. + /// + /// Returns `None` if: + /// + /// + There is no decision variable with that name. + /// + /// + The decision variable with that name has been deleted. + /// + /// + The object with that name is not a decision variable. + pub fn get_var(&self, name: &Name) -> Option<&DecisionVariable> { + self.variables.get(name) + } + + /// Returns a mutable reference to the decision variable with the given name. + /// + /// Returns `None` if: + /// + /// + There is no decision variable with that name. + /// + /// + The decision variable with that name has been deleted. + /// + /// + The object with that name is not a decision variable. + pub fn get_var_mut(&mut self, name: &Name) -> Option<&mut DecisionVariable> { + self.variables.get_mut(name) + } + + /********************************/ + /* mutate entries */ + /********************************/ + + /// Adds a decision variable to the symbol table as `name`. + /// + /// Returns `None` if there is a decision variable or other object with that name in the symbol + /// table. + pub fn add_var(&mut self, name: Name, var: DecisionVariable) -> Option<()> { + if let std::collections::btree_map::Entry::Vacant(e) = self.variables.entry(name) { + e.insert(var); + Some(()) + } else { + None + } + } + + /// Updates a decision variable to the symbol table as `name`, or adds it. + /// + /// Returns `None` if `name` refers to an object that is not a decision variable. + pub fn update_add_var(&mut self, name: Name, var: DecisionVariable) -> Option<()> { + self.variables.insert(name, var); + Some(()) + } + + /// Extends the symbol table with the given symbol table, updating the gensym counter if + /// necessary. + pub fn extend(&mut self, other: SymbolTable) { + if other.names().count() > self.names().count() { + let new_vars = other.names().collect::>(); + let old_vars = self.names().collect::>(); + + for added_var in new_vars.difference(&old_vars) { + let mut next_var = self.next_machine_name.borrow_mut(); + match *added_var { + Name::UserName(_) => {} + Name::MachineName(m) => { + if *m >= *next_var { + *next_var = *m + 1; + } + } + } + } + } + self.variables.extend(other.variables); + } + + /****************************************/ + /* get info about symbols */ + /****************************************/ + + /// Gets the domain of `name` if it exists and has a domain. + pub fn domain_of(&self, name: &Name) -> Option<&Domain> { + Some(&self.variables.get(name)?.domain) + } + + /// Gets the domain of `name` as a mutable reference if it exists and has a domain. + pub fn domain_of_mut(&mut self, name: &Name) -> Option<&mut Domain> { + Some(&mut self.variables.get_mut(name)?.domain) + } + + /// Gets the type of `name` if it exists and has a type. + pub fn type_of(&self, name: &Name) -> Option { + match self.domain_of(name)? { + Domain::BoolDomain => Some(ReturnType::Bool), + Domain::IntDomain(_) => Some(ReturnType::Int), + } + } + + /// Returns an arbitrary variable name that is not in the symbol table. + pub fn gensym(&self) -> Name { + let num = *self.next_machine_name.borrow(); + *(self.next_machine_name.borrow_mut()) += 1; + Name::MachineName(num) // incremented when inserted + } +} + +impl Default for SymbolTable { + fn default() -> Self { + Self::new() + } +} diff --git a/crates/conjure_core/src/ast/variables.rs b/crates/conjure_core/src/ast/variables.rs index 78f0b1b49e..dd7b12166e 100644 --- a/crates/conjure_core/src/ast/variables.rs +++ b/crates/conjure_core/src/ast/variables.rs @@ -26,7 +26,7 @@ use crate::ast::domains::{Domain, Range}; /// println!("Boolean Variable: {}", bool_var); /// println!("Integer Variable: {}", int_var); -#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] +#[derive(Clone, Debug, Eq, PartialEq, Hash, Serialize, Deserialize)] pub struct DecisionVariable { pub domain: Domain, } diff --git a/crates/conjure_core/src/model.rs b/crates/conjure_core/src/model.rs index 46b6c46f78..59d4fc61e9 100644 --- a/crates/conjure_core/src/model.rs +++ b/crates/conjure_core/src/model.rs @@ -1,11 +1,8 @@ -use std::cell::RefCell; -use std::collections::HashSet; use std::fmt::{Debug, Display}; use std::sync::{Arc, RwLock}; use derivative::Derivative; use serde::{Deserialize, Serialize}; -use serde_with::serde_as; use crate::ast::{DecisionVariable, Domain, Expression, Name, SymbolTable}; use crate::context::Context; @@ -17,11 +14,6 @@ use crate::ast::pretty::{pretty_expressions_as_top_level, pretty_variable_declar /// The `Model` struct holds a set of variables and constraints for manipulating and evaluating symbolic expressions. /// /// # Fields -/// - `variables`: -/// - Type: `SymbolTable` -/// - A table that links each variable's name to its corresponding `DecisionVariable`. -/// - For example, the name `x` might be linked to a `DecisionVariable` that says `x` can only take values between 1 and 10. -/// /// - `constraints`: /// - Type: `Vec` /// - Represents the logical constraints applied to the model's variables. @@ -33,59 +25,68 @@ use crate::ast::pretty::{pretty_expressions_as_top_level, pretty_variable_declar /// - A shared object that stores global settings and state for the model. /// - Can be safely read or changed by multiple parts of the program at the same time, making it good for multi-threaded use. /// -/// - `next_var`: -/// - Type: `RefCell` -/// - A counter used to create new, unique variable names. -/// - Allows updating the counter inside the model without making the whole model mutable. -/// /// # Usage /// This struct is typically used to: /// - Define a set of variables and constraints for rule-based evaluation. /// - Have transformations, optimizations, and simplifications applied to it using a set of rules. -#[serde_as] #[derive(Derivative, Clone, Debug, Serialize, Deserialize)] #[derivative(PartialEq, Eq)] pub struct Model { - #[serde_as(as = "Vec<(_, _)>")] - pub variables: SymbolTable, pub constraints: Vec, + + symbols: SymbolTable, + #[serde(skip)] #[derivative(PartialEq = "ignore")] pub context: Arc>>, - next_var: RefCell, } impl Model { + /// Creates a new model. pub fn new( - variables: SymbolTable, + symbols: SymbolTable, constraints: Vec, context: Arc>>, ) -> Model { Model { - variables, + symbols, constraints, context, - next_var: RefCell::new(0), } } pub fn new_empty(context: Arc>>) -> Model { Model::new(Default::default(), Vec::new(), context) } + + /// The global symbol table for this model. + pub fn symbols(&self) -> &SymbolTable { + &self.symbols + } + + /// The global symbol table for this model, as a mutable reference. + pub fn symbols_mut(&mut self) -> &mut SymbolTable { + &mut self.symbols + } + // Function to update a DecisionVariable based on its Name pub fn update_domain(&mut self, name: &Name, new_domain: Domain) { - if let Some(decision_var) = self.variables.get_mut(name) { + if let Some(decision_var) = self.symbols_mut().get_var_mut(name) { decision_var.domain = new_domain; } } + /// Gets the domain of `name` if it exists and has one. pub fn get_domain(&self, name: &Name) -> Option<&Domain> { - self.variables.get(name).map(|v| &v.domain) + self.symbols().domain_of(name) } - // Function to add a new DecisionVariable to the Model - pub fn add_variable(&mut self, name: Name, decision_var: DecisionVariable) { - self.variables.insert(name, decision_var); + /// Adds a decision variable to the model. + /// + /// Returns `None` if there is a decision variable or other object with that name in the symbol + /// table. + pub fn add_variable(&mut self, name: Name, decision_var: DecisionVariable) -> Option<()> { + self.symbols_mut().add_var(name, decision_var) } pub fn get_constraints_vec(&self) -> Vec { @@ -120,43 +121,24 @@ impl Model { /// Returns an arbitrary variable name that is not in the model. pub fn gensym(&self) -> Name { - let num = *self.next_var.borrow(); - *(self.next_var.borrow_mut()) += 1; - Name::MachineName(num) // incremented when inserted + self.symbols().gensym() } /// Extends the models symbol table with the given symbol table, updating the gensym counter if /// necessary. - /// - pub fn extend_sym_table(&mut self, symbol_table: SymbolTable) { - if symbol_table.keys().len() > self.variables.keys().len() { - let new_vars = symbol_table.keys().collect::>(); - let old_vars = self.variables.keys().collect::>(); - - for added_var in new_vars.difference(&old_vars) { - let mut next_var = self.next_var.borrow_mut(); - match *added_var { - Name::UserName(_) => {} - Name::MachineName(m) => { - if *m >= *next_var { - *next_var = *m + 1; - } - } - } - } - } - self.variables.extend(symbol_table); + pub fn extend_sym_table(&mut self, other: SymbolTable) { + self.symbols_mut().extend(other); } } impl Display for Model { #[allow(clippy::unwrap_used)] // [rustdocs]: should only fail iff the formatter fails fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - for name in self.variables.keys() { + for name in self.symbols.names() { writeln!( f, "find {}", - pretty_variable_declaration(&self.variables, name).unwrap() + pretty_variable_declaration(&self.symbols, name).unwrap() )?; } diff --git a/crates/conjure_core/src/rule_engine/rewriter_common.rs b/crates/conjure_core/src/rule_engine/rewriter_common.rs index 02ddd4171c..f54614a830 100644 --- a/crates/conjure_core/src/rule_engine/rewriter_common.rs +++ b/crates/conjure_core/src/rule_engine/rewriter_common.rs @@ -61,7 +61,7 @@ pub fn log_rule_application( let new_variables_str = { let mut vars: Vec = vec![]; - for var_name in red.added_symbols(&initial_model.variables) { + for var_name in red.added_symbols(initial_model.symbols()) { #[allow(clippy::unwrap_used)] vars.push(format!( " {}", diff --git a/crates/conjure_core/src/rule_engine/rule.rs b/crates/conjure_core/src/rule_engine/rule.rs index 410ddf5bbe..2afa8ecc9f 100644 --- a/crates/conjure_core/src/rule_engine/rule.rs +++ b/crates/conjure_core/src/rule_engine/rule.rs @@ -106,8 +106,8 @@ impl Reduction { /// Gets symbols added by this reduction pub fn added_symbols(&self, initial_symbols: &SymbolTable) -> BTreeSet { - let initial_symbols_set: BTreeSet = initial_symbols.keys().cloned().collect(); - let new_symbols_set: BTreeSet = self.symbols.keys().cloned().collect(); + let initial_symbols_set: BTreeSet = initial_symbols.names().cloned().collect(); + let new_symbols_set: BTreeSet = self.symbols.names().cloned().collect(); new_symbols_set .difference(&initial_symbols_set) @@ -124,8 +124,8 @@ impl Reduction { ) -> Vec<(Name, DecisionVariable, DecisionVariable)> { let mut changes: Vec<(Name, DecisionVariable, DecisionVariable)> = vec![]; - for (var_name, initial_value) in initial_symbols { - let Some(new_value) = self.symbols.get(var_name) else { + for (var_name, initial_value) in initial_symbols.iter_var() { + let Some(new_value) = self.symbols.get_var(var_name) else { continue; }; diff --git a/crates/conjure_core/src/rules/base.rs b/crates/conjure_core/src/rules/base.rs index 576bd12cc5..0ad4587268 100644 --- a/crates/conjure_core/src/rules/base.rs +++ b/crates/conjure_core/src/rules/base.rs @@ -88,9 +88,9 @@ fn min_to_var(expr: &Expr, mdl: &Model) -> ApplicationResult { let mut new_vars = SymbolTable::new(); let domain = expr - .domain_of(&mdl.variables) + .domain_of(mdl.symbols()) .ok_or(ApplicationError::DomainError)?; - new_vars.insert(new_name.clone(), DecisionVariable::new(domain)); + new_vars.add_var(new_name.clone(), DecisionVariable::new(domain)); Ok(Reduction::new( Atomic(Metadata::new(), Reference(new_name)), @@ -132,9 +132,9 @@ fn max_to_var(expr: &Expr, mdl: &Model) -> ApplicationResult { let mut new_vars = SymbolTable::new(); let domain = expr - .domain_of(&mdl.variables) + .domain_of(mdl.symbols()) .ok_or(ApplicationError::DomainError)?; - new_vars.insert(new_name.clone(), DecisionVariable::new(domain)); + new_vars.add_var(new_name.clone(), DecisionVariable::new(domain)); Ok(Reduction::new( Atomic(Metadata::new(), Reference(new_name)), diff --git a/crates/conjure_core/src/rules/minion.rs b/crates/conjure_core/src/rules/minion.rs index aa8d3c369e..81ba92694e 100644 --- a/crates/conjure_core/src/rules/minion.rs +++ b/crates/conjure_core/src/rules/minion.rs @@ -98,7 +98,7 @@ fn introduce_producteq(expr: &Expr, model: &Model) -> ApplicationResult { // TODO: find this domain without having to make unnecessary Expr and Metadata objects // Just using the domain of expr doesn't work let aux_domain = Expr::Product(Metadata::new(), vec![y.clone().into(), next_factor]) - .domain_of(&model.variables) + .domain_of(&model.symbols().clone()) .ok_or(ApplicationError::DomainError)?; model.add_variable(aux_var.clone(), DecisionVariable { domain: aux_domain }); @@ -113,7 +113,7 @@ fn introduce_producteq(expr: &Expr, model: &Model) -> ApplicationResult { Ok(Reduction::new( Expr::FlatProductEq(Metadata::new(), x, y, val), new_tops, - model.variables, + model.symbols().clone(), )) } @@ -392,7 +392,11 @@ fn introduce_weighted_sumleq_sumgeq(expr: &Expr, model: &Model) -> ApplicationRe (EqualityKind::Geq, false) => Expr::FlatSumGeq(Metadata::new(), vars, total), }; - Ok(Reduction::new(new_expr, new_top_exprs, model.variables)) + Ok(Reduction::new( + new_expr, + new_top_exprs, + model.symbols().clone(), + )) } #[register_rule(("Minion", 4200))] @@ -687,7 +691,7 @@ fn flatten_imply(expr: &Expr, model: &Model) -> ApplicationResult { Ok(Reduction::new( Expr::Imply(meta.clone(), Box::new(new_x), y.clone()), vec![aux_var_info.top_level_expr()], - model.variables, + model.symbols().clone(), )) } @@ -730,7 +734,7 @@ fn flatten_generic(expr: &Expr, model: &Model) -> ApplicationResult { let expr = expr.with_children(children); - Ok(Reduction::new(expr, new_tops, model.variables)) + Ok(Reduction::new(expr, new_tops, model.symbols().clone())) } #[register_rule(("Minion", 4200))] @@ -762,7 +766,7 @@ fn flatten_eq(expr: &Expr, model: &Model) -> ApplicationResult { let expr = expr.with_children(children); - Ok(Reduction::new(expr, new_tops, model.variables)) + Ok(Reduction::new(expr, new_tops, model.symbols().clone())) } /// Converts a Geq to an Ineq diff --git a/crates/conjure_core/src/rules/utils.rs b/crates/conjure_core/src/rules/utils.rs index 360d37bb9b..1379ccde73 100644 --- a/crates/conjure_core/src/rules/utils.rs +++ b/crates/conjure_core/src/rules/utils.rs @@ -82,7 +82,7 @@ pub fn to_aux_var(expr: &Expr, m: &Model) -> Option { let name = m.gensym(); - let Some(domain) = expr.domain_of(&m.variables) else { + let Some(domain) = expr.domain_of(m.symbols()) else { tracing::trace!("could not find domain of {}", expr); return None; }; diff --git a/crates/conjure_core/src/solver/adaptors/minion/parse_model.rs b/crates/conjure_core/src/solver/adaptors/minion/parse_model.rs index dfcb5a0ade..3701c83bf0 100644 --- a/crates/conjure_core/src/solver/adaptors/minion/parse_model.rs +++ b/crates/conjure_core/src/solver/adaptors/minion/parse_model.rs @@ -26,7 +26,7 @@ fn load_symbol_table( conjure_model: &ConjureModel, minion_model: &mut MinionModel, ) -> Result<(), SolverError> { - for (name, variable) in conjure_model.variables.iter() { + for (name, variable) in conjure_model.symbols().iter_var() { load_var(name, variable, minion_model)?; } Ok(()) diff --git a/crates/conjure_core/src/solver/adaptors/sat_common.rs b/crates/conjure_core/src/solver/adaptors/sat_common.rs index 027ac8585a..6d8ddafa96 100644 --- a/crates/conjure_core/src/solver/adaptors/sat_common.rs +++ b/crates/conjure_core/src/solver/adaptors/sat_common.rs @@ -37,9 +37,9 @@ impl CNFModel { pub fn from_conjure(conjure_model: ConjureModel) -> Result { let mut ans: CNFModel = CNFModel::new(); - for var in conjure_model.variables.keys() { + for var in conjure_model.symbols().keys() { // Check that domain has the correct type - let decision_var = match conjure_model.variables.get(var) { + let decision_var = match conjure_model.symbols().get_var(var) { None => { return Err(ModelInvalid(format!("variable {:?} not found", var))); }