Skip to content

Commit

Permalink
Update plus_or_minus
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Vassor committed Jul 8, 2024
1 parent 52bec7f commit 1778770
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 15 deletions.
1 change: 1 addition & 0 deletions examples/Running examples/plus_or_minus/A_expected.dot
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ digraph A {
0 -> 1 [label="B!Secret(n: i32)", ];

}

1 change: 1 addition & 0 deletions examples/Running examples/plus_or_minus/B_expected.dot
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ digraph B {
3 -> 7 [label="C!Correct(x: i32{x = n})", ];

}

7 changes: 4 additions & 3 deletions examples/Running examples/plus_or_minus/C_expected.dot
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ digraph C {


0 -> 2 [label="B!Guess(x: i32)", ];
2 -> 0 [label="B?Less(x: i32{x > n})", ];
2 -> 0 [label="B?More(x: i32{x < n})", ];
2 -> 6 [label="B?Correct(x: i32{x = n})", ];
2 -> 0 [label="B?Less(x: i32)", ];
2 -> 0 [label="B?More(x: i32)", ];
2 -> 6 [label="B?Correct(x: i32)", ];

}

Original file line number Diff line number Diff line change
Expand Up @@ -204,15 +204,15 @@ impl Predicate for PlusMinusB3Predicate {
if let Some(label) = label {
match label {
Label::Correct(_) => {
EqualVar::<Value, Label, 'x', 'n'>::default()
Equal::<Value, char, Label, Variable<'x'>, Variable<'n'>>::default()
.check(m, Some(label))
},
Label::More(_) => {
LTnVar::<Value, Label, 'x', 'n'>::default()
LTn::<Value, char, Label, Variable<'x'>, Variable<'n'>>::default()
.check(m, Some(label))
},
Label::Less(_) => {
GTnVar::<Value, Label, 'x', 'n'>::default()
GTn::<Value, char, Label, Variable<'x'>, Variable<'n'>>::default()
.check(m, Some(label))
},
_ => {
Expand Down Expand Up @@ -283,15 +283,15 @@ impl Predicate for PlusMinusC2Predicate {
if let Some(label) = label {
match label {
Label::Correct(_) => {
EqualVar::<Value, Label, 'x', 'n'>::default()
Tautology::<Name, Value, Label>::default()
.check(m, Some(label))
},
Label::More(_) => {
LTnVar::<Value, Label, 'x', 'n'>::default()
Tautology::<Name, Value, Label>::default()
.check(m, Some(label))
},
Label::Less(_) => {
GTnVar::<Value, Label, 'x', 'n'>::default()
Tautology::<Name, Value, Label>::default()
.check(m, Some(label))
},
_ => {
Expand Down
12 changes: 6 additions & 6 deletions examples/Running examples/plus_or_minus/plus_or_minus_full.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,15 +204,15 @@ impl Predicate for PlusMinusB3Predicate {
if let Some(label) = label {
match label {
Label::Correct(_) => {
EqualVar::<Value, Label, 'x', 'n'>::default()
Equal::<Value, char, Label, Variable<'x'>, Variable<'n'>>::default()
.check(m, Some(label))
},
Label::More(_) => {
LTnVar::<Value, Label, 'x', 'n'>::default()
LTn::<Value, char, Label, Variable<'x'>, Variable<'n'>>::default()
.check(m, Some(label))
},
Label::Less(_) => {
GTnVar::<Value, Label, 'x', 'n'>::default()
GTn::<Value, char, Label, Variable<'x'>, Variable<'n'>>::default()
.check(m, Some(label))
},
_ => {
Expand Down Expand Up @@ -283,15 +283,15 @@ impl Predicate for PlusMinusC2Predicate {
if let Some(label) = label {
match label {
Label::Correct(_) => {
EqualVar::<Value, Label, 'x', 'n'>::default()
Tautology::<Name, Value, Label>::default()
.check(m, Some(label))
},
Label::More(_) => {
LTnVar::<Value, Label, 'x', 'n'>::default()
Tautology::<Name, Value, Label>::default()
.check(m, Some(label))
},
Label::Less(_) => {
GTnVar::<Value, Label, 'x', 'n'>::default()
Tautology::<Name, Value, Label>::default()
.check(m, Some(label))
},
_ => {
Expand Down

0 comments on commit 1778770

Please sign in to comment.