-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathChunks.scala
More file actions
53 lines (44 loc) · 1.92 KB
/
Copy pathChunks.scala
File metadata and controls
53 lines (44 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
//
// Copyright (c) 2011-2019 ETH Zurich.
package viper.silicon.interfaces.state
import viper.silicon
import viper.silicon.resources.ResourceID
import viper.silicon.state.terms.{Term, Var}
import viper.silver.ast
trait Chunk {
def substitute(terms: silicon.Map[Term, Term]): Chunk
}
trait ChunkIdentifer
trait GeneralChunk extends Chunk {
val resourceID: ResourceID
val id: ChunkIdentifer
val perm: Term
def applyCondition(newCond: Term, newCondExp: Option[ast.Exp]): GeneralChunk
def permMinus(perm: Term, permExp: Option[ast.Exp]): GeneralChunk
def permPlus(perm: Term, permExp: Option[ast.Exp]): GeneralChunk
def permScale(perm: Term, permExp: Option[ast.Exp]): GeneralChunk
val permExp: Option[ast.Exp]
}
trait NonQuantifiedChunk extends GeneralChunk {
val args: Seq[Term]
val argsExp: Option[Seq[ast.Exp]]
val snap: Term
override def applyCondition(newCond: Term, newCondExp: Option[ast.Exp]): NonQuantifiedChunk
override def permMinus(perm: Term, permExp: Option[ast.Exp]): NonQuantifiedChunk
override def permPlus(perm: Term, permExp: Option[ast.Exp]): NonQuantifiedChunk
def withPerm(perm: Term, permExp: Option[ast.Exp]): NonQuantifiedChunk
def withSnap(snap: Term, snapExp: Option[ast.Exp]): NonQuantifiedChunk
}
trait QuantifiedChunk extends GeneralChunk {
val quantifiedVars: Seq[Var]
val quantifiedVarExps: Option[Seq[ast.LocalVarDecl]]
def snapshotMap: Term
def valueAt(arguments: Seq[Term]): Term
override def applyCondition(newCond: Term, newCondExp: Option[ast.Exp]): QuantifiedChunk
override def permMinus(perm: Term, permExp: Option[ast.Exp]): QuantifiedChunk
override def permPlus(perm: Term, permExp: Option[ast.Exp]): QuantifiedChunk
def withSnapshotMap(snap: Term): QuantifiedChunk
}