Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
544 commits
Select commit Hold shift + click to select a range
ca64da4
cleanup of how passing dependency results to Gobra
AndreaKe Jan 9, 2026
f8ea7f8
implement progress metric
AndreaKe Jan 9, 2026
14c87f9
fix lifting from low level to user level graph
AndreaKe Jan 12, 2026
5c0dfce
renaming
AndreaKe Jan 12, 2026
acbcca6
implement verification guidance
AndreaKe Jan 12, 2026
c990fa6
handle verification failures in progress metric
AndreaKe Jan 12, 2026
c75b617
fix for Gobra
AndreaKe Jan 12, 2026
4ce35a3
handle verification failures via infeasible path and assert failed nodes
AndreaKe Jan 13, 2026
9964848
minor fix
AndreaKe Jan 13, 2026
af67cfd
minor fix
AndreaKe Jan 13, 2026
ca821e1
add dependency types
AndreaKe Jan 14, 2026
e15ae1f
revert
AndreaKe Jan 14, 2026
c769b79
fix source info "equals"
AndreaKe Jan 14, 2026
c87a0f7
fix function axioms of disabled functions
AndreaKe Jan 14, 2026
9863770
progress metric: require verified program
AndreaKe Jan 14, 2026
08233c9
progress metric: exclude trivial assertions
AndreaKe Jan 14, 2026
69ed391
test
AndreaKe Jan 14, 2026
b3e6f21
Revert "fix source info "equals""
AndreaKe Jan 14, 2026
ffb25e3
fix UserLevelDependencyAnalysisNode creation
AndreaKe Jan 14, 2026
b1d20cc
minor fix
AndreaKe Jan 14, 2026
9d67732
temporary fix graph join for frontends
AndreaKe Jan 15, 2026
3afb7bc
fix UserLevelDependencyAnalysisNode
AndreaKe Jan 15, 2026
6672a9d
fix AnalysisSourceInfo
AndreaKe Jan 15, 2026
34b6c18
minor fix
AndreaKe Jan 15, 2026
53d3051
DependencyAnalysisTestFramework: make storing pruned programs optional
AndreaKe Jan 15, 2026
bf5f1ca
update submodules
AndreaKe Jan 15, 2026
d0a0f07
add progress test
AndreaKe Jan 15, 2026
9ed781e
fix method join
AndreaKe Jan 16, 2026
3d41f98
implement VerificationProgressRunner
AndreaKe Jan 16, 2026
36fa7eb
add verification progress examples
AndreaKe Jan 16, 2026
74a2a1e
update Readme
AndreaKe Jan 16, 2026
71b955f
fix typos
AndreaKe Jan 16, 2026
a13e6e7
Merge branch 'master' into keuscha/assumption_analysis_profiling_gobra
AndreaKe Jan 26, 2026
7b45a02
fix after merge
AndreaKe Jan 26, 2026
c1231a1
fix assumption types
AndreaKe Jan 27, 2026
901aae1
dependency node equality workaround
AndreaKe Jan 27, 2026
1cef81a
fix assumption types
AndreaKe Jan 27, 2026
12d4ff0
treat assertions as verification annotations
AndreaKe Jan 28, 2026
50821f3
fix function axioms by removing analysis labels
AndreaKe Jan 29, 2026
73d930f
comment in warnings about function axioms
AndreaKe Jan 29, 2026
5077d68
progress metric: remove special treatment of verification failures
AndreaKe Jan 29, 2026
e0d695d
optimize progress computation
AndreaKe Feb 2, 2026
54733c2
optimize node storage (assumptions vs assertions)
AndreaKe Feb 2, 2026
a12e784
minor fix
AndreaKe Feb 2, 2026
212a37e
combine spec and proof quality computation
AndreaKe Feb 2, 2026
cfd76f6
fix assumption and assertion types
AndreaKe Feb 2, 2026
07cc814
progress computation optimizations (removing internal nodes, node maps)
AndreaKe Feb 4, 2026
b482ccd
infeasible paths: optimizations
AndreaKe Feb 9, 2026
81b25c0
update submodules
AndreaKe Feb 9, 2026
0a2bd2b
fix infeasible path incompleteness bug
AndreaKe Feb 10, 2026
f195487
fix unsoundness bug
AndreaKe Feb 10, 2026
722f36c
TMP: run pipeline with DA enabled
AndreaKe Feb 10, 2026
c2bf37e
Revert "TMP: run pipeline with DA enabled"
AndreaKe Feb 10, 2026
35ede49
make DA more precise for magic wands
AndreaKe Feb 11, 2026
662685b
fix graph export (edges)
AndreaKe Feb 11, 2026
5b678f7
(WIP) fix chunk nodes
AndreaKe Feb 11, 2026
1874235
minor fix
AndreaKe Feb 12, 2026
c4d6f44
add test case for infeasible paths
AndreaKe Feb 12, 2026
187238d
fix missing dependency types
AndreaKe Feb 12, 2026
3b2a0ea
fix graph join for frontends
AndreaKe Feb 14, 2026
eb695ee
minor fixes
AndreaKe Feb 24, 2026
9afa0cd
add more profiling instrumentation
AndreaKe Feb 24, 2026
23c3c31
add enableUnsatCore config option
AndreaKe Feb 27, 2026
5b9d5d2
fix for gobra interfaces
AndreaKe Feb 27, 2026
62e7dcf
cherry-pick silicon PR #961
jcp19 Feb 27, 2026
ae05d01
implement graph importer as a stand-alone program
AndreaKe Feb 27, 2026
71c0899
Merge remote-tracking branch 'origin/keuscha/assumption_analysis_prof…
AndreaKe Feb 27, 2026
6fe9365
add command line arguments to graph importer
AndreaKe Feb 28, 2026
18b0939
cleanup smoke checks
AndreaKe Feb 28, 2026
2a5fa17
cleanup fix for Gobra interfaces (custom join nodes)
AndreaKe Mar 2, 2026
19f6dad
handle join nodes in function verification unit
AndreaKe Mar 2, 2026
977c980
optimize graph export
AndreaKe Mar 2, 2026
f72b6c1
comment out profiling artifacts for progress metric
AndreaKe Mar 2, 2026
1881e4d
minor fix regarding join nodes
AndreaKe Mar 2, 2026
4e8df60
fix guidance
AndreaKe Mar 2, 2026
e350606
attempt to automatically determine minimal dependencies for precision…
AndreaKe Mar 3, 2026
e7e15de
fix guidance (function bodies)
AndreaKe Mar 3, 2026
ee7bb0a
minor fix, function bodies -> verification annotation
AndreaKe Mar 3, 2026
c53794d
fix Gobra method and function postcondition types
AndreaKe Mar 3, 2026
4360244
fix Gobra method and function postcondition types
AndreaKe Mar 4, 2026
06316d7
improve guidance by estimating impact of assumptions on Lea's progres…
AndreaKe Mar 5, 2026
0ccddd1
fix div by 0 in progress computation
AndreaKe Mar 5, 2026
485a2ce
fix function axiom annotations
AndreaKe Mar 6, 2026
1af15bc
add getMaxPriorityType
AndreaKe Mar 6, 2026
addf001
fix dependency type annotations for Gobra
AndreaKe Mar 7, 2026
29457ba
fix dependency type annotations for Gobra
AndreaKe Mar 7, 2026
88532c1
fix infinite loop in progress computation
AndreaKe Mar 7, 2026
ac929ff
optimize graph joins
AndreaKe Mar 8, 2026
ec340c8
handle impure assertion failures
AndreaKe Mar 9, 2026
47e551d
add support for verification failures
AndreaKe Mar 9, 2026
cc6a430
minor fix for verification failure handling
AndreaKe Mar 9, 2026
1857b71
annotate imported methods
AndreaKe Mar 10, 2026
ae769dd
treat ghost code identical to normal code
AndreaKe Mar 10, 2026
392473c
adjust progress and guidance for abstract and imported methods
AndreaKe Mar 10, 2026
bedaee1
nodes with failed obligations are always explicit assumptions
AndreaKe Mar 10, 2026
73fcd94
fix spec quality computation
AndreaKe Mar 11, 2026
bc73399
minor fix for verification failures
AndreaKe Mar 11, 2026
815b844
add precision eval query
AndreaKe Mar 11, 2026
f2c95bc
add annotate query
AndreaKe Mar 11, 2026
c36fe68
update precisionEval query
AndreaKe Mar 12, 2026
ce03dff
fix precision test case annotation helper
AndreaKe Mar 12, 2026
d2f2a28
fix precision eval query
AndreaKe Mar 12, 2026
373d60e
update precision evaluation query
AndreaKe Mar 15, 2026
ae88f7a
fixes for interfaces
AndreaKe Mar 15, 2026
f01110a
update precision evaluation query for gobra
AndreaKe Mar 15, 2026
2a7124a
fix for gobra interfaces
AndreaKe Mar 16, 2026
4242846
fix method call without assumptions
AndreaKe Mar 16, 2026
fe79c63
fix for preconditions
AndreaKe Mar 17, 2026
ac356df
make interprocedural dependencies context-sensitive
AndreaKe Mar 17, 2026
c95a2fd
refactoring
AndreaKe Mar 23, 2026
43501c3
create DependencyAnalysisInfo and propagate it
AndreaKe Mar 25, 2026
21658db
create DependencyAnalysisInfoes
AndreaKe Mar 30, 2026
9862a5a
refactor dependency type
AndreaKe Mar 30, 2026
206e326
refactor join info
AndreaKe Mar 30, 2026
df9c515
fix
AndreaKe Mar 30, 2026
2d96e53
fix merge info
AndreaKe Mar 30, 2026
6560e2c
fix join
AndreaKe Mar 31, 2026
8c405ea
refactoring
AndreaKe Mar 31, 2026
2d4dd16
fix axioms
AndreaKe Mar 31, 2026
900af54
cleanup
AndreaKe Mar 31, 2026
620003d
renaming
AndreaKe Mar 31, 2026
4cdbeea
cleanup warnings
AndreaKe Mar 31, 2026
6475012
refactoring
AndreaKe Mar 31, 2026
89bfa03
collect DependencyAnalysisInfos only if DA is enabled
AndreaKe Mar 31, 2026
8b53c22
fix
AndreaKe Mar 31, 2026
080116a
fix Silicon DA tests
AndreaKe Apr 8, 2026
38e479f
update silver submodule
AndreaKe Apr 8, 2026
30d9bb3
add DependencyGraphState
AndreaKe Apr 8, 2026
f995ad4
fix tests
AndreaKe Apr 9, 2026
dd148b8
fix graph export
AndreaKe Apr 9, 2026
7fd6ccb
make method calls more precise by separating it from argument evaluation
AndreaKe Apr 9, 2026
d5609a1
make function calls more precise by separating it from argument evalu…
AndreaKe Apr 9, 2026
5f352b2
add test case for join precision
AndreaKe Apr 9, 2026
f869afc
refactor interpreter and user tool
AndreaKe Apr 9, 2026
d5f2fa5
refactor interpreter and user tool
AndreaKe Apr 10, 2026
329e7dc
fix tests
AndreaKe Apr 10, 2026
7ed0918
fix state consolidation
AndreaKe Apr 10, 2026
9f7f356
fix for method and function calls
AndreaKe Apr 10, 2026
5cf82c0
add some documentation
AndreaKe Apr 10, 2026
505944c
fix tests
AndreaKe Apr 10, 2026
6c69f8b
add documentation and cleanup unused code
AndreaKe Apr 10, 2026
4ae1874
adapt Gobra DA implementation to new design
AndreaKe Apr 10, 2026
86c8f93
update submodules
AndreaKe Apr 10, 2026
a195706
adapt solution for Gobra interfaces
AndreaKe Apr 10, 2026
69c7064
fixes
AndreaKe Apr 12, 2026
bcbe1b6
fix infeasibility node
AndreaKe Apr 12, 2026
d6eec6b
fix withMeta for BackendFuncApp
AndreaKe Apr 20, 2026
8bc735d
fix withMeta for Adt plugin
AndreaKe Apr 20, 2026
61c8fa6
fix DA tests
AndreaKe Apr 21, 2026
edf51da
fix dependency queries regarding join edges
AndreaKe Apr 21, 2026
567c480
refactor dependency queries
AndreaKe Apr 21, 2026
7fd1213
refactor progress and pruning supporter
AndreaKe Apr 21, 2026
a501721
print warnings when DA info is missing
AndreaKe Apr 23, 2026
f84414a
do not collect builtin axioms
AndreaKe Apr 23, 2026
c80c852
Add flags for VSC extension
DovydasVad Mar 20, 2026
bf7211a
mark infeasibility checks at branches as internal
AndreaKe May 7, 2026
de0c85b
ignore preconditions for progress and guidance
AndreaKe May 8, 2026
0548f80
fix join nodes on infeasible paths
AndreaKe May 8, 2026
49d90fd
add assertionTypes query
AndreaKe May 8, 2026
9c469a5
create one node per top-level conjuncts for assertions
AndreaKe May 8, 2026
b2bd2bd
clean up silver
AndreaKe May 12, 2026
52c63db
clean up silver
AndreaKe May 12, 2026
bcc8d7e
remove benchmark artifacts
AndreaKe May 12, 2026
395e36f
clean up silver
AndreaKe May 12, 2026
bf8b403
clean up silicon
AndreaKe May 12, 2026
c065adf
clean up silicon
AndreaKe May 12, 2026
da0fe07
clean up DA tests
AndreaKe May 12, 2026
142af18
fix implication in combination with infeasibility
AndreaKe May 12, 2026
8f6668d
add tests for node types and dependencies (for Silicon and Gobra)
AndreaKe May 13, 2026
662c1c4
minor fix
AndreaKe May 13, 2026
8be7baa
redesign annotated tests
AndreaKe May 14, 2026
39958bc
fix failing tests
AndreaKe May 19, 2026
92cf5db
merge silver/master
AndreaKe May 26, 2026
1b0c791
merge silver/master
AndreaKe May 26, 2026
521979f
Merge branch 'master' into keuscha/dependency_analysis_refactoring
AndreaKe May 26, 2026
1ccf5d7
code review
AndreaKe Jun 17, 2026
3472259
fix progress for failing assertions
AndreaKe Jun 19, 2026
cb8378b
Add dependency analysis test cases for guidance and verification prog…
DovydasVad Jun 19, 2026
5fb9234
fix unknown constant (function recorder)
AndreaKe Jun 19, 2026
c9a0093
Remove duplicate error messages
DovydasVad Jun 22, 2026
fe01472
fixes (function recorder and infeasibility)
AndreaKe Jun 22, 2026
9e3a215
Merge pull request #983 from DovydasVad/dependency_analysis_testing
AndreaKe Jun 23, 2026
ac9ccfe
Merge remote-tracking branch 'origin/keuscha/dependency_analysis_refa…
AndreaKe Jun 23, 2026
ae36076
fix infeasible paths
AndreaKe Jun 23, 2026
08aa77f
cleanup
AndreaKe Jun 23, 2026
350b4af
add progress test
AndreaKe Jun 23, 2026
d830c50
cleanup
AndreaKe Jun 25, 2026
6128047
remove precision improvement regarding function arguments
AndreaKe Jun 25, 2026
a5a7c85
add allDeps cli command
AndreaKe Jun 29, 2026
cb93490
fix da source info extraction for frontends
AndreaKe Jun 29, 2026
8e592f5
fix direct dependencies query
AndreaKe Jun 29, 2026
0ed154c
make dependencies across methods more precise
AndreaKe Jun 29, 2026
f665ef0
fix progress computation for failures
AndreaKe Jun 30, 2026
e5aa3d3
handle verification failures properly
AndreaKe Jun 30, 2026
54f9e24
fix infinite loop in getAllDeps query
AndreaKe Jul 1, 2026
e1b8068
update silver submodule
AndreaKe Jul 1, 2026
9b8580c
cleanup config flag and refactor cli tool
AndreaKe Jul 1, 2026
1cbec38
update graph importer and test it
AndreaKe Jul 2, 2026
ea54969
adding memberStr to nodes and removing the need for member-specific d…
AndreaKe Jul 2, 2026
3ed73d9
separate DA features from default decider
AndreaKe Jul 2, 2026
2208747
add ChunkFactories and separate DA code from default code
AndreaKe Jul 3, 2026
60fe517
separate decider, verifier, function and method supporter DA code fro…
AndreaKe Jul 3, 2026
11ef9e6
separate DA code from prover and decider
AndreaKe Jul 6, 2026
c55dcc6
tabs -> spaces
AndreaKe Jul 6, 2026
344271a
reorganizing silicon classes
AndreaKe Jul 6, 2026
ec8b955
cleanup
AndreaKe Jul 6, 2026
2c5b290
make chunk constructor private -> enforce ChunkFactory
AndreaKe Jul 6, 2026
dc230d0
refactor function data
AndreaKe Jul 7, 2026
6ca5160
update README.md
AndreaKe Jul 7, 2026
db7c7ec
minor fixes
AndreaKe Jul 7, 2026
689a52f
update progress and weird nodes command for cli tool
AndreaKe Jul 7, 2026
e3242a1
rename classes
AndreaKe Jul 8, 2026
3897e97
rename and move classes
AndreaKe Jul 8, 2026
137adec
cleanup progress tests
AndreaKe Jul 8, 2026
3fb8850
Merge branch 'master' into keuscha/dependency_analysis_refactoring
AndreaKe Jul 8, 2026
b2fe999
dependency analysis
AndreaKe Jul 8, 2026
2d7ec57
add license headers
AndreaKe Jul 8, 2026
a576196
refactor attaching DA info during translator
AndreaKe Jul 8, 2026
3c437c8
refactor attaching DA info during translator
AndreaKe Jul 8, 2026
69e562e
fix pipeline
AndreaKe Jul 8, 2026
5066d71
cleanup
AndreaKe Jul 8, 2026
d4a6507
fix weirdNodes command
AndreaKe Jul 9, 2026
1903d9f
fix for method calls with field receiver
AndreaKe Jul 9, 2026
9b3d5ec
fix default analysis infos
AndreaKe Jul 9, 2026
c256587
make analysis info creation prettier
AndreaKe Jul 9, 2026
d4aa738
code review
AndreaKe Jul 9, 2026
3b6ad8d
update readme
AndreaKe Jul 9, 2026
614c63b
fix getInfo exception sourceInfo.last
AndreaKe Jul 13, 2026
4f7e707
dependency nodes: case class -> class
AndreaKe Jul 14, 2026
7fbae88
optimize graph join
AndreaKe Jul 14, 2026
1bcbe1e
optimize computation of direct dependencies
AndreaKe Jul 14, 2026
f7f67d7
more optimizations
AndreaKe Jul 14, 2026
80ee4bb
refactor assumption and dependency type
AndreaKe Jul 14, 2026
7809d23
remove assumption type sets
AndreaKe Jul 15, 2026
3006aee
claude code review
AndreaKe Jul 15, 2026
1de1976
refactor dependency queries
AndreaKe Jul 15, 2026
3e8b0f1
refactor dependency queries
AndreaKe Jul 15, 2026
aea477a
cleanup warnings
AndreaKe Jul 15, 2026
40bfe77
rename dependency analysis source info
AndreaKe Jul 15, 2026
ae471b0
update silicon/silver
AndreaKe Jul 15, 2026
00138ca
cleanup
AndreaKe Jul 15, 2026
78a6c23
update silver
AndreaKe Jul 15, 2026
1259037
Update src/main/scala/Config.scala
AndreaKe Jul 17, 2026
3a54964
code review
AndreaKe Jul 17, 2026
a608c20
fixes
AndreaKe Jul 17, 2026
b90426c
update config flags
AndreaKe Jul 17, 2026
4fb645d
implement node factory and turn nodes into case classes
AndreaKe Jul 19, 2026
49d812d
cleanup da config flags
AndreaKe Jul 19, 2026
d5cac4a
remove early returns
AndreaKe Jul 19, 2026
89ea5c0
cleanup
AndreaKe Jul 19, 2026
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
2 changes: 1 addition & 1 deletion silver
Submodule silver updated 33 files
+5 −4 src/main/scala/viper/silver/ast/Ast.scala
+7 −4 src/main/scala/viper/silver/ast/Program.scala
+1 −1 src/main/scala/viper/silver/ast/utility/ImpureAssumeRewriter.scala
+20 −14 src/main/scala/viper/silver/ast/utility/QuantifiedPermissions.scala
+9 −2 src/main/scala/viper/silver/ast/utility/rewriter/Rewritable.scala
+1 −1 src/main/scala/viper/silver/cfg/silver/CfgGenerator.scala
+19 −3 src/main/scala/viper/silver/cfg/utility/LoopDetector.scala
+127 −0 src/main/scala/viper/silver/dependencyAnalysis/DependencyAnalysisInfo.scala
+113 −0 src/main/scala/viper/silver/dependencyAnalysis/DependencyAnalysisSourceInfo.scala
+96 −0 src/main/scala/viper/silver/dependencyAnalysis/DependencyType.scala
+195 −150 src/main/scala/viper/silver/parser/Translator.scala
+6 −6 src/main/scala/viper/silver/plugin/standard/termination/transformation/DecreasesCheck.scala
+0 −1 src/test/resources/all/heap-dependent_triggers/triggerFoldPackage.vpr
+2 −0 src/test/resources/all/impure_assume/assume10QPwand.vpr
+14 −0 src/test/resources/all/issues/silicon/0992.vpr
+16 −0 src/test/resources/wands/mwsf/applying-twice-bool.vpr
+52 −0 src/test/resources/wands/mwsf/applying-twice-qp-fields.vpr
+76 −0 src/test/resources/wands/mwsf/applying-twice-qp-predicates.vpr
+85 −0 src/test/resources/wands/mwsf/applying-twice-quantified-lhs.vpr
+103 −0 src/test/resources/wands/mwsf/applying-twice-quantified-wand.vpr
+16 −0 src/test/resources/wands/mwsf/assign-applying-bool.vpr
+29 −0 src/test/resources/wands/mwsf/assign-applying-int.vpr
+50 −0 src/test/resources/wands/mwsf/basic-bool.vpr
+50 −0 src/test/resources/wands/mwsf/basic-int.vpr
+47 −0 src/test/resources/wands/mwsf/basic-lhs-equal-to-rhs.vpr
+78 −0 src/test/resources/wands/mwsf/basic-lhs-larger-than-rhs.vpr
+87 −0 src/test/resources/wands/mwsf/basic-lhs-smaller-than-rhs.vpr
+90 −0 src/test/resources/wands/mwsf/example-list.vpr
+27 −0 src/test/resources/wands/mwsf/inhaling-magic-wand.vpr
+31 −0 src/test/resources/wands/mwsf/predicates-in-magic-wands.vpr
+165 −0 src/test/resources/wands/mwsf/quantified-magic-wands.vpr
+14 −0 src/test/resources/wands/mwsf/two-fields.vpr
+34 −1 src/test/resources/wands/new_syntax/QPWands.vpr
76 changes: 72 additions & 4 deletions src/main/scala/Config.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,17 @@

package viper.silicon

import java.nio.file.{Files, Path, Paths}
import scala.collection.immutable.ArraySeq
import scala.util.matching.Regex
import scala.util.Properties._
import org.rogach.scallop._
import viper.silicon.Config.JoinMode.JoinMode
import viper.silicon.Config.StateConsolidationMode.StateConsolidationMode
import viper.silicon.decider.{Cvc5ProverStdIO, Z3ProverAPI, Z3ProverStdIO}
import viper.silver.frontend.SilFrontendConfig

import java.nio.file.{Files, Path, Paths}
import scala.collection.immutable.ArraySeq
import scala.util.Properties._
import scala.util.matching.Regex

class Config(args: Seq[String]) extends SilFrontendConfig(args, "Silicon") {
import Config._

Expand Down Expand Up @@ -691,6 +692,48 @@ class Config(args: Seq[String]) extends SilFrontendConfig(args, "Silicon") {
noshort = true
)

val enableUnsatCores: ScallopOption[Boolean] = opt[Boolean]("enableUnsatCores",
descr = "Compute UNSAT cores. Useful for evaluating the overhead of this feature in an isolated manner.",
default = Some(false),
noshort = true
)
Comment thread
AndreaKe marked this conversation as resolved.

/*
* For benchmarking and testing purposes one can also use the command `computeGraphOnly` that enables dep analysis
* and computes the final dependency graph but does not run any graph queries.
*/
val dependencyAnalysis: ScallopOption[String] = opt[String]("dependencyAnalysis",
descr = "Enable dependency analysis and set the commands (separated by ;) to be executed after verification. The available commands are `interactive` " +
"and all commands supported by the interactive CLI tool",
default = None,
noshort = true
)

val disableDependencyAnalysisJoinPrecisionOpt: ScallopOption[Boolean] = opt[Boolean]("disableDependencyAnalysisJoinPrecisionOpt",
descr = "Use a less precise but faster algorithm for computing dependencies.",
default = Some(false),
noshort = true
)

val enableDependencyAnalysisDebugging: ScallopOption[Boolean] = opt[Boolean]("enableDependencyAnalysisDebugging",
descr = "Enable debugging for the verification dependency analysis",
default = Some(false),
noshort = true
)

private val disableInfeasiblePaths: ScallopOption[Boolean] = opt[Boolean]("disableInfeasiblePaths",
descr = "This flag makes the dependency analysis faster by skipping the analysis of dead paths, but it may produce unsound results " +
"where the dependencies of a proof obligation in an infeasible branch are not completely listed",
default = Some(false),
noshort = true
)

/**
* If true, verification always steps through all paths; even if provably infeasible. Might have a huge performance penalty!
* Note: analyzeInfeasiblePaths might be used independent of the dependency analysis but this has not been tested yet.
*/
lazy val analyzeInfeasiblePaths: Boolean = dependencyAnalysis.isDefined && !disableInfeasiblePaths()

/* Option validation (trailing file argument is validated by parent class) */

validateOpt(prover) {
Expand Down Expand Up @@ -738,6 +781,31 @@ class Config(args: Seq[String]) extends SilFrontendConfig(args, "Silicon") {
validateFileOpt(multisetAxiomatizationFile)
validateFileOpt(sequenceAxiomatizationFile)

validateOpt(dependencyAnalysis, parallelizeBranches) {
case (dam, Some(true)) if dam.isDefined =>
Left(s"Option ${dependencyAnalysis.name} is not supported in combination with ${parallelizeBranches.name}")
case (_, Some(false)) => Right(())
}

validateOpt(rawProverArgs, dependencyAnalysis) {
case (_, dam) if dam.isEmpty => Right(())
case (Some(args), dam) if dam.isDefined && args.toLowerCase.contains("proof=true") && args.toLowerCase.contains("unsat-core=true") => Right(())
case (_, _) =>
Left(s"Option ${dependencyAnalysis.name} requires ${rawProverArgs.name} with \"proof=true unsat-core=true\"")
}

validateOpt(prover, dependencyAnalysis) {
case (p, dam) if !p.contains(Z3ProverStdIO.name) && dam.isDefined =>
Left(s"Dependency analysis is only supported with ${Z3ProverStdIO.name}")
case _ => Right(())
}

validateOpt(disableInfeasiblePaths, dependencyAnalysis) {
case (Some(true), dam) if dam.isEmpty =>
Left(s"The ${disableInfeasiblePaths.name} is currently only supported in combination with ${dependencyAnalysis.name}")
case _ => Right(())
}

/* Finalise configuration */

verify()
Expand Down
25 changes: 12 additions & 13 deletions src/main/scala/Silicon.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,26 @@

package viper.silicon

import java.text.SimpleDateFormat
import java.util.concurrent.{Callable, Executors, TimeUnit, TimeoutException}
import scala.collection.immutable.ArraySeq
import scala.util.{Left, Right}
import ch.qos.logback.classic.{Level, Logger}
import com.typesafe.scalalogging.LazyLogging
import org.slf4j.LoggerFactory
import viper.silver.ast
import viper.silver.frontend.{DefaultStates, MinimalViperFrontendAPI, SilFrontend, ViperFrontendAPI}
import viper.silver.reporter._
import viper.silver.verifier.{AbstractVerificationError => SilAbstractVerificationError, Failure => SilFailure, Success => SilSuccess, TimeoutOccurred => SilTimeoutOccurred, VerificationResult => SilVerificationResult, Verifier => SilVerifier}
import viper.silicon.decider.{Cvc5ProverStdIO, Z3ProverStdIO}
import viper.silicon.interfaces.Failure
import viper.silicon.logger.{MemberSymbExLogger, SymbExLogger}
import viper.silicon.reporting.{MultiRunRecorders, condenseToViperResult}
import viper.silicon.verifier.DefaultMainVerifier
import viper.silicon.decider.{Cvc5ProverStdIO, Z3ProverStdIO}
import viper.silicon.verifier.{DefaultMainVerifier, DependencyAnalysisAwareMainVerifier}
import viper.silver.ast
import viper.silver.cfg.silver.SilverCfg
import viper.silver.frontend.{DefaultStates, MinimalViperFrontendAPI, SilFrontend, ViperFrontendAPI}
import viper.silver.logger.ViperStdOutLogger
import viper.silver.utility.{FileProgramSubmitter}
import viper.silver.reporter._
import viper.silver.utility.FileProgramSubmitter
import viper.silver.verifier.{AbstractVerificationError => SilAbstractVerificationError, Failure => SilFailure, Success => SilSuccess, TimeoutOccurred => SilTimeoutOccurred, VerificationResult => SilVerificationResult, Verifier => SilVerifier}

import scala.util.chaining._
import java.text.SimpleDateFormat
import java.util.concurrent.{Callable, Executors, TimeUnit, TimeoutException}
import scala.collection.immutable.ArraySeq
import scala.util.{Left, Right}

object Silicon {
val name = BuildInfo.projectName
Expand Down Expand Up @@ -136,7 +135,7 @@ class Silicon(val reporter: Reporter, private var debugInfo: Seq[(String, Any)]

setLogLevelsFromConfig()

verifier = new DefaultMainVerifier(config, reporter, symbExLog)
verifier = if (config.dependencyAnalysis.isDefined) new DependencyAnalysisAwareMainVerifier(config, reporter, symbExLog) else new DefaultMainVerifier(config, reporter, symbExLog)
verifier.start()
}

Expand Down
5 changes: 3 additions & 2 deletions src/main/scala/debugger/DebugParser.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package viper.silicon.debugger

import fastparse._
import viper.silver.ast._
import viper.silver.dependencyAnalysis.DependencyType
import viper.silver.parser._

import scala.collection.mutable
Expand Down Expand Up @@ -36,7 +37,7 @@ class DebugParser extends FastParser {

class DebugTranslator(p: PProgram, override val members: mutable.Map[String, Node]) extends Translator(p) {

override protected def expInternal(pexp: PExp, pos: PExp, info: Info): Exp = {
override protected def expInternal(pexp: PExp, pos: PExp, info: Info, dependencyType: Option[DependencyType]): Exp = {
pexp match {
case pviu@PVersionedIdnUseExp(_, _, _) =>
pexp.typ match {
Expand All @@ -45,7 +46,7 @@ class DebugTranslator(p: PProgram, override val members: mutable.Map[String, Nod
}
case PDebugLabelledOldExp(_, lbl, e) =>
DebugLabelledOld(exp(e), lbl.versionedName)(pos, info)
case _ => super.expInternal(pexp, pos, info)
case _ => super.expInternal(pexp, pos, info, dependencyType)
}
}

Expand Down
10 changes: 5 additions & 5 deletions src/main/scala/debugger/SiliconDebugger.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ package viper.silicon.debugger

import viper.silicon.common.collections.immutable.InsertionOrderedSet
import viper.silicon.decider.{Cvc5ProverStdIO, RecordedPathConditions, Z3ProverStdIO}
import viper.silicon.interfaces.state.Chunk
import viper.silicon.dependencyAnalysis.DependencyAnalysisInfos
import viper.silicon.interfaces.{Failure, SiliconDebuggingFailureContext, Success, VerificationResult}
import viper.silicon.resources.{FieldID, PredicateID}
import viper.silicon.rules.evaluator
import viper.silicon.state.Heap
import viper.silicon.state.chunks._
import viper.silicon.state.terms.{Term, True}
import viper.silicon.state.{BasicChunk, IdentifierFactory, MagicWandChunk, QuantifiedFieldChunk, QuantifiedMagicWandChunk, QuantifiedPredicateChunk, State}
import viper.silicon.state.{Heap, IdentifierFactory, State}
import viper.silicon.utils.ast.simplifyVariableName
import viper.silicon.verifier.{MainVerifier, Verifier, WorkerVerifier}
import viper.silver.ast
Expand Down Expand Up @@ -430,7 +430,7 @@ class SiliconDebugger(verificationResults: List[VerificationResult],
var resE: ast.Exp = null
var resV: Verifier = null
val pve: PartialVerificationError = PartialVerificationError(r => ContractNotWellformed(assertionE, r))
val verificationResult = evaluator.eval3(obl.s, assertionE, pve, obl.v)((_, t, newE, newV) => {
val verificationResult = evaluator.eval3(obl.s, assertionE, pve, obl.v, DependencyAnalysisInfos.DefaultInfos.withEnabled(false))((_, t, newE, newV) => {
resT = t
resE = newE.get
resV = newV
Expand Down Expand Up @@ -497,7 +497,7 @@ class SiliconDebugger(verificationResults: List[VerificationResult],
var evalPcs: RecordedPathConditions = null
val pve: PartialVerificationError = PartialVerificationError(r => ContractNotWellformed(e, r))
val beforeEval = v.decider.setPathConditionMark()
val verificationResult = evaluator.eval3(obl.s, e, pve, v)((newS, t, newE, newV) => {
val verificationResult = evaluator.eval3(obl.s, e, pve, v, v.decider.defaultAnalysisInfos)((newS, t, newE, newV) => {
resS = newS
resT = t
resE = newE.get
Expand Down
7 changes: 4 additions & 3 deletions src/main/scala/decider/CVC5ProverStdIO.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@

package viper.silicon.decider

import java.nio.file.{Path, Paths}
import viper.silicon.common.config.Version
import viper.silicon.state.IdentifierFactory
import viper.silicon.verifier.Verifier
import viper.silver.verifier.{DefaultDependency => SilDefaultDependency}
import viper.silver.reporter.Reporter
import viper.silicon.common.config.Version
import viper.silver.verifier.{DefaultDependency => SilDefaultDependency}

import java.nio.file.{Path, Paths}

object Cvc5ProverStdIO {
val name = "cvc5"
Expand Down
Loading
Loading