Commit 5044c458 authored by Ranadeep Biswas's avatar Ranadeep Biswas
Browse files

fix SER check error

parent 488e0264
......@@ -114,7 +114,7 @@ impl AtomicHistoryPO {
for (t2, _) in wr_x.adj_map.iter() {
if t1 != t2 {
for t3 in t3s.iter() {
if self.vis.has_edge(t3, t2) || self.vis.has_edge(t1, t2) {
if t3 != t2 && (self.vis.has_edge(t3, t2) || self.vis.has_edge(t1, t2)) {
rw_x.add_edge(*t3, *t2);
}
}
......
......@@ -117,6 +117,7 @@ pub trait ConstrainedLinearization {
linearization: &mut Vec<Self::Vertex>,
seen: &mut HashSet<BTreeSet<Self::Vertex>>,
) -> bool {
// println!("explored {}", seen.len());
if !seen.insert(non_det_choices.iter().cloned().collect()) {
// seen is not modified
// non-det choices are already explored
......
......@@ -9,6 +9,8 @@ use rayon::iter::{IntoParallelIterator, ParallelIterator};
use chrono::{DateTime, Duration, Local};
use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize, Eq, PartialEq, Clone)]
pub struct Event {
pub write: bool,
......
......@@ -12,9 +12,6 @@ extern crate serde;
extern crate serde_json;
extern crate serde_yaml;
#[macro_use]
extern crate serde_derive;
#[macro_use]
extern crate slog;
extern crate slog_json;
......
......@@ -180,6 +180,8 @@ fn main() {
let buf_reader = BufReader::new(file);
let hist: History = bincode::deserialize_from(buf_reader).unwrap();
println!("{:?}", hist);
let o_dir = Path::new(matches.value_of("o_directory").unwrap());
if !o_dir.is_dir() {
......@@ -201,6 +203,9 @@ fn main() {
verifier.sat(matches.is_present("sat"));
verifier.bicomponent(matches.is_present("bicomponent"));
println!("no. of session {:?}", hist.get_data().len());
println!("no. of transactions {:?}", hist.get_data()[0].len());
match verifier.verify(hist.get_data()) {
Some(level) => println!(
"hist-{:05} failed - minimum level failed {:?}",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment