Skip to content

Commit

Permalink
remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
gipsyh committed Jan 6, 2025
1 parent be3b9c8 commit c480164
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 207 deletions.
21 changes: 0 additions & 21 deletions src/transys/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
pub mod others;
pub mod sec;
pub mod simplify;
pub mod simulate;
pub mod unroll;
Expand Down Expand Up @@ -260,23 +258,4 @@ impl Transys {
println!("trans size: {}", self.trans.len());
println!("num constraint: {}", self.constraints.len());
}

// pub fn simplify_eq_latchs(&mut self, eqs: &[(Lit, Lit)], keep_dep: bool) {
// let mut marks = HashSet::new();
// let mut map = HashMap::new();
// for (x, y) in eqs.iter() {
// assert!(marks.insert(x.var()));
// assert!(marks.insert(y.var()));
// map.insert(*y, *x);
// map.insert(!*y, !*x);
// }
// for cls in self.trans.iter_mut() {
// for l in cls.iter_mut() {
// if let Some(r) = map.get(l) {
// *l = *r;
// }
// }
// }
// self.simplify(&[], keep_dep, true)
// }
}
65 changes: 0 additions & 65 deletions src/transys/others.rs

This file was deleted.

77 changes: 0 additions & 77 deletions src/transys/sec.rs

This file was deleted.

44 changes: 0 additions & 44 deletions src/transys/unroll.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,50 +155,6 @@ impl TransysUnroll {
}
}

// pub fn primed_constrains(&self) -> Transys {
// assert!(self.num_unroll == 1);
// let mut trans = Cnf::new();
// for u in 0..=1 {
// for c in self.ts.trans.iter() {
// let c: Clause = c.iter().map(|l| self.lit_next(*l, u)).collect();
// trans.push(c);
// }
// }
// let mut dependence = self.ts.dependence.clone();
// dependence.reserve(Var::new(self.num_var));
// let mut next_map = self.ts.next_map.clone();
// next_map.reserve(Var::new(self.num_var));
// for i in 0..self.ts.num_var {
// let l = Var::new(i).lit();
// next_map[l] = self.lit_next(l, 1);
// next_map[!l] = self.lit_next(!l, 1);
// }
// for i in 0..self.ts.num_var {
// let v = Var::new(i);
// let n = self.lit_next(v.lit(), 1).var();
// if dependence[n].is_empty() {
// dependence[n] = dependence[v]
// .iter()
// .map(|l| self.lit_next(l.lit(), 1).var())
// .collect()
// }
// }
// Transys {
// inputs: self.ts.inputs.clone(),
// latchs: self.ts.latchs.clone(),
// init: self.ts.init.clone(),
// bad: self.ts.bad.clone(),
// init_map: self.ts.init_map.clone(),
// constraints: self.ts.constraints.clone(),
// trans,
// num_var: self.num_var,
// next_map,
// dependence,
// max_latch: self.ts.max_latch,
// latch_group: self.ts.latch_group.clone(),
// }
// }

pub fn interal_signals(&self) -> Transys {
let mut trans = self.ts.trans.clone();
for c in self.ts.trans.iter() {
Expand Down

0 comments on commit c480164

Please sign in to comment.