Skip to content

Commit

Permalink
Added a max rule. Provided a solved example with max(a,b)
Browse files Browse the repository at this point in the history
  • Loading branch information
Soph1514 committed Oct 11, 2024
1 parent 453ff60 commit 84f05cc
Show file tree
Hide file tree
Showing 9 changed files with 491 additions and 1 deletion.
2 changes: 1 addition & 1 deletion conjure_oxide/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use conjure_oxide::SolverFamily;
struct Cli {
#[arg(
value_name = "INPUT_ESSENCE",
default_value = "./conjure_oxide/tests/integration/experiment/triangles.essence",
default_value = "./conjure_oxide/tests/integration/experiment/input.essence",
help = "The input Essence file"
)]
input_file: PathBuf,
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
find a,b : int(1..4)
such that max([a,b]) >= 2
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
[
{
"MachineName(0)": 2,
"UserName(a)": 1,
"UserName(b)": 2
},
{
"MachineName(0)": 2,
"UserName(a)": 2,
"UserName(b)": 1
},
{
"MachineName(0)": 2,
"UserName(a)": 2,
"UserName(b)": 2
},
{
"MachineName(0)": 3,
"UserName(a)": 1,
"UserName(b)": 3
},
{
"MachineName(0)": 3,
"UserName(a)": 2,
"UserName(b)": 3
},
{
"MachineName(0)": 3,
"UserName(a)": 3,
"UserName(b)": 1
},
{
"MachineName(0)": 3,
"UserName(a)": 3,
"UserName(b)": 2
},
{
"MachineName(0)": 3,
"UserName(a)": 3,
"UserName(b)": 3
},
{
"MachineName(0)": 4,
"UserName(a)": 1,
"UserName(b)": 4
},
{
"MachineName(0)": 4,
"UserName(a)": 2,
"UserName(b)": 4
},
{
"MachineName(0)": 4,
"UserName(a)": 3,
"UserName(b)": 4
},
{
"MachineName(0)": 4,
"UserName(a)": 4,
"UserName(b)": 1
},
{
"MachineName(0)": 4,
"UserName(a)": 4,
"UserName(b)": 2
},
{
"MachineName(0)": 4,
"UserName(a)": 4,
"UserName(b)": 3
},
{
"MachineName(0)": 4,
"UserName(a)": 4,
"UserName(b)": 4
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{
"constraints": {
"Geq": [
{
"clean": false,
"etype": null
},
{
"Max": [
{
"clean": false,
"etype": null
},
[
{
"Reference": [
{
"clean": false,
"etype": null
},
{
"UserName": "a"
}
]
},
{
"Reference": [
{
"clean": false,
"etype": null
},
{
"UserName": "b"
}
]
}
]
]
},
{
"Constant": [
{
"clean": false,
"etype": null
},
{
"Int": 2
}
]
}
]
},
"next_var": 0,
"variables": [
[
{
"UserName": "a"
},
{
"domain": {
"IntDomain": [
{
"Bounded": [
1,
4
]
}
]
}
}
],
[
{
"UserName": "b"
},
{
"domain": {
"IntDomain": [
{
"Bounded": [
1,
4
]
}
]
}
}
]
]
}
Loading

0 comments on commit 84f05cc

Please sign in to comment.