Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/main/scala/viper/silver/ast/utility/chopper/Chopper.scala
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,20 @@ trait ChopperLike { this: ViperGraphs with Cut =>
chopWithMetrics(choppee)(selection, bound, penalty)._1
}

/**
* chops `choppee` into a single Viper program containing only the selected members. See [[chop]] for more details.
*
* @param choppee Targeted program.
* @param selection Specifies the names of all members that should be verified.
* @return Chopped program, if anything was selected.
*/
def chop(
choppee: ast.Program,
selection: Set[String],
): Option[ast.Program] = {
chopWithMetrics(choppee)(Some(m => selection.contains(m.name)))._1.headOption
}

/**
* chops `choppee` into multiple Viper programs and returns metrics. See [[chop]] for more details.
*
Expand Down