Skip to content

Commit

Permalink
annotations: calculus refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
umutdural committed Jan 16, 2024
1 parent a286130 commit ad861f3
Show file tree
Hide file tree
Showing 16 changed files with 321 additions and 481 deletions.
45 changes: 0 additions & 45 deletions src/calculi/ert.rs

This file was deleted.

121 changes: 0 additions & 121 deletions src/calculi/mod.rs

This file was deleted.

51 changes: 0 additions & 51 deletions src/calculi/tests.rs

This file was deleted.

44 changes: 0 additions & 44 deletions src/calculi/wlp.rs

This file was deleted.

45 changes: 0 additions & 45 deletions src/calculi/wp.rs

This file was deleted.

12 changes: 0 additions & 12 deletions src/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use crate::{
visit::VisitorMut, Block, DeclKind, Expr, ExprData, ExprKind, LitKind, Shared,
SourceFilePath, Span, Spanned, StoredFile, TyKind,
},
calculi::CalculusVisitor,
front::parser,
front::resolve::{Resolve, ResolveError},
front::{
Expand Down Expand Up @@ -190,17 +189,6 @@ impl SourceUnit {
}
}

#[instrument(skip(self, tcx))]
pub fn check_calculus(&mut self, tcx: &mut TyCtx) -> Result<(), AnnotationError> {
let mut calculus_visitor = CalculusVisitor::new(tcx);

match self {
SourceUnit::Decl(decl) => calculus_visitor.visit_decl(decl),
// Not supported for raw source units since calculus annotations are only allowed on procedures
SourceUnit::Raw(_) => Ok(()),
}
}

/// Return a new [`Item`] by wrapping it around the [`SourceUnit`]
/// and set the file path of the new [`SourceUnitName`] to the given file_path argument
/// This function is used to generate [`Item`]s from generated [`SourceUnit`] objects (through AST transformations)
Expand Down
Loading

0 comments on commit ad861f3

Please sign in to comment.