Skip to content

Commit 13ddc0d

Browse files
committed
upgrade dependencies and rust edition
1 parent bc4dd8c commit 13ddc0d

File tree

27 files changed

+90
-77
lines changed

27 files changed

+90
-77
lines changed

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ resolver = "2"
33
members = ["patronus", "patronus-egraphs", "patronus-dse", "tools/bmc", "tools/egraphs-cond-synth", "tools/sim", "tools/simplify", "tools/view"]
44

55
[workspace.package]
6-
edition = "2021"
6+
edition = "2024"
77
authors = ["Kevin Laeufer <laeufer@berkeley.edu>"]
88
repository = "https://github.com/cucapra/patronus"
99
readme = "Readme.md"
1010
license = "BSD-3-Clause"
11-
rust-version = "1.73.0"
11+
rust-version = "1.85.0"
1212

1313
[workspace.dependencies]
1414
rustc-hash = "2.x"
15-
baa = { version = "0.16.9", features = ["rand1"] }
15+
baa = { version = "0.17.1", features = ["rand1"] }
1616
egg = "0.9.5"
1717
regex = "1.11.1"
1818
boolean_expression = "0.4.4"

patronus-dse/src/value_summary.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// released under BSD 3-Clause License
33
// author: Kevin Laeufer <laeufer@cornell.edu>
44

5-
use boolean_expression::{BDDFunc, BDD};
5+
use boolean_expression::{BDD, BDDFunc};
66
use patronus::expr::*;
77
use rustc_hash::{FxBuildHasher, FxHashMap, FxHashSet};
88
use std::hash::Hash;

patronus-egraphs/src/arithmetic.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
// author: Kevin Laeufer <laeufer@cornell.edu>
44

55
use baa::BitVecOps;
6-
use egg::{define_language, Analysis, DidMerge, Id, Language, RecExpr};
6+
use egg::{Analysis, DidMerge, Id, Language, RecExpr, define_language};
77
use patronus::expr::*;
8-
use std::cmp::{max, Ordering};
8+
use std::cmp::{Ordering, max};
99
use std::fmt::{Display, Formatter};
1010
use std::str::FromStr;
1111

patronus-egraphs/src/dot.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// author: Kevin Laeufer <laeufer@cornell.edu>
44
// some of the code is based on `egg` source code which is licenced under MIT
55

6-
use crate::{get_const_width_or_sign, is_bin_op, EGraph};
6+
use crate::{EGraph, get_const_width_or_sign, is_bin_op};
77
use egg::Language;
88
use rustc_hash::FxHashMap;
99
use std::io::{BufWriter, Write};

patronus-egraphs/src/rewrites.rs

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ introspect them in order to check re-write conditions or debug matches.
1010
!*/
1111

1212
use crate::arithmetic::{eval_width_left_shift, eval_width_max_plus_1};
13-
use crate::{get_const_width_or_sign, is_bin_op, Arith, EGraph, WidthConstantFold};
13+
use crate::{Arith, EGraph, WidthConstantFold, get_const_width_or_sign, is_bin_op};
1414
use egg::{
1515
ConditionalApplier, ENodeOrVar, Id, Language, Pattern, PatternAst, Searcher, Subst, Var,
1616
};
@@ -22,16 +22,12 @@ macro_rules! arith_rewrite {
2222
(
2323
$name:expr;
2424
$lhs:expr => $rhs:expr
25-
) => {{
26-
ArithRewrite::new::<&str>($name, $lhs, $rhs, [], None)
27-
}};
25+
) => {{ ArithRewrite::new::<&str>($name, $lhs, $rhs, [], None) }};
2826
(
2927
$name:expr;
3028
$lhs:expr => $rhs:expr;
3129
if $vars:expr, $cond:expr
32-
) => {{
33-
ArithRewrite::new($name, $lhs, $rhs, $vars, Some($cond))
34-
}};
30+
) => {{ ArithRewrite::new($name, $lhs, $rhs, $vars, Some($cond)) }};
3531
}
3632

3733
/// Generate our ROVER inspired rewrite rules.
@@ -162,12 +158,14 @@ impl ArithRewrite {
162158
};
163159
vec![Rewrite::new(self.name.clone(), self.lhs.clone(), cond_app).unwrap()]
164160
} else {
165-
vec![Rewrite::new(
166-
self.name.clone(),
167-
self.lhs.clone(),
168-
self.rhs_derived.clone(),
169-
)
170-
.unwrap()]
161+
vec![
162+
Rewrite::new(
163+
self.name.clone(),
164+
self.lhs.clone(),
165+
self.rhs_derived.clone(),
166+
)
167+
.unwrap(),
168+
]
171169
}
172170
}
173171

patronus/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ indexmap = "2.7.0"
1616
codespan-reporting = "0.11.1"
1717
lazy_static = "1.4.0"
1818
smallvec = { version = "1.x", features = ["union"] }
19-
rand = { version = "0.8.5", features = ["small_rng"] }
19+
rand = { version = "0.9", features = ["small_rng"] }
2020
boolean_expression.workspace = true
2121
regex.workspace = true
2222
baa.workspace = true

patronus/src/btor2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ mod serialize;
66
mod witness;
77

88
pub use parse::{
9-
parse_file, parse_file_with_ctx, parse_str, DEFAULT_INPUT_PREFIX, DEFAULT_STATE_PREFIX,
9+
DEFAULT_INPUT_PREFIX, DEFAULT_STATE_PREFIX, parse_file, parse_file_with_ctx, parse_str,
1010
};
1111
pub use serialize::{serialize, serialize_to_str};
1212
pub use witness::{parse_witness, parse_witnesses, print_witness, witness_to_string};

patronus/src/btor2/parse.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -911,11 +911,10 @@ fn report_errors(errors: Errors, name: &str, source: &str) {
911911
fn report_error(error: ParserError, file: &codespan_reporting::files::SimpleFile<&str, &str>) {
912912
let diagnostic = codespan_reporting::diagnostic::Diagnostic::error()
913913
.with_message(error.msg)
914-
.with_labels(vec![codespan_reporting::diagnostic::Label::primary(
915-
(),
916-
error.start..error.end,
917-
)
918-
.with_message(error.explain)]);
914+
.with_labels(vec![
915+
codespan_reporting::diagnostic::Label::primary((), error.start..error.end)
916+
.with_message(error.explain),
917+
]);
919918
let writer = codespan_reporting::term::termcolor::StandardStream::stderr(
920919
codespan_reporting::term::termcolor::ColorChoice::Auto,
921920
);

patronus/src/expr.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@ pub mod traversal;
1414
mod types;
1515

1616
pub use context::{Builder, Context, ExprRef, StringRef};
17-
pub use eval::{eval_array_expr, eval_bv_expr, eval_expr, SymbolValueStore};
17+
pub use eval::{SymbolValueStore, eval_array_expr, eval_bv_expr, eval_expr};
1818
pub use foreach::ForEachChild;
1919
pub use meta::{
20-
get_fixed_point, DenseExprMetaData, DenseExprSet, ExprMap, ExprSet, SparseExprMap,
21-
SparseExprSet,
20+
DenseExprMetaData, DenseExprSet, ExprMap, ExprSet, SparseExprMap, SparseExprSet,
21+
get_fixed_point,
2222
};
2323
pub use nodes::{ArrayType, BVLitValue, Expr, Type, WidthInt};
2424
pub use parse::parse_expr;
2525
pub use serialize::SerializableIrNode;
2626
pub(crate) use serialize::{serialize_expr, serialize_expr_ref};
2727
pub(crate) use simplify::simplify;
28-
pub use simplify::{simplify_single_expression, Simplifier};
28+
pub use simplify::{Simplifier, simplify_single_expression};
2929
pub use transform::simple_transform_expr;
30-
pub(crate) use transform::{do_transform_expr, ExprTransformMode};
30+
pub(crate) use transform::{ExprTransformMode, do_transform_expr};
3131
pub use types::{TypeCheck, TypeCheckError};

patronus/src/expr/context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
//! are no checks to ensure that a [`ExprRef`] or [`StringRef`] from different contexts are
1515
//! not matched. Thus working with more than one [`Context`] object can be dangerous.
1616
17-
use crate::expr::nodes::*;
1817
use crate::expr::TypeCheck;
18+
use crate::expr::nodes::*;
1919
use baa::{
2020
ArrayOps, BitVecValue, BitVecValueIndex, BitVecValueRef, IndexToRef, SparseArrayValue, Value,
2121
};

0 commit comments

Comments
 (0)