-
Method Summary
Modifier and TypeMethodDescriptiondev.civl.sarl.IF.expr.BooleanExpressionbuildFrameCondition(dev.civl.sarl.IF.type.SymbolicType varType, dev.civl.sarl.IF.expr.SymbolicExpression oldVal, dev.civl.sarl.IF.expr.SymbolicExpression newVal, dev.civl.sarl.IF.expr.SymbolicExpression valueSetTemplate) Builds an assertion stating that all the objects in a variable ofvarTypeNOT referred byvalueSetTemplatepreserve their old values.List<dev.civl.sarl.IF.expr.valueSetReference.ValueSetReference> extendToFull(dev.civl.sarl.IF.expr.valueSetReference.ValueSetReference vsRef, dev.civl.sarl.IF.type.SymbolicType varType) Extends theValueSetReferencevsRefto an equivalent set of references to primitivesdev.civl.sarl.IF.expr.valueSetReference.ValueSetReferencegetVSReferenceToSequenceOrNoop(CIVLType variableOrMallocElementType, boolean isMallocElementType, dev.civl.sarl.IF.expr.valueSetReference.ValueSetReference vsRef) This method over-approximatesvsRefif it references into sequence elements.toDisjointGroups(dev.civl.sarl.IF.expr.SymbolicExpression valueSetTemplate) DividesValueSetReferences in a value set template to a number of groups.
-
Method Details
-
extendToFull
List<dev.civl.sarl.IF.expr.valueSetReference.ValueSetReference> extendToFull(dev.civl.sarl.IF.expr.valueSetReference.ValueSetReference vsRef, dev.civl.sarl.IF.type.SymbolicType varType) Extends theValueSetReferencevsRefto an equivalent set of references to primitives- Parameters:
vsRef- aValueSetReferencevarType- the type of variables wherevsRefapplies- Returns:
- an set of references to primitives equivalent to the given
vsRef
-
toDisjointGroups
Iterable<List<dev.civl.sarl.IF.expr.valueSetReference.ValueSetReference>> toDisjointGroups(dev.civl.sarl.IF.expr.SymbolicExpression valueSetTemplate) DividesValueSetReferences in a value set template to a number of groups. Every pair of groups are referring to disjoint objects in a variable. -
buildFrameCondition
dev.civl.sarl.IF.expr.BooleanExpression buildFrameCondition(dev.civl.sarl.IF.type.SymbolicType varType, dev.civl.sarl.IF.expr.SymbolicExpression oldVal, dev.civl.sarl.IF.expr.SymbolicExpression newVal, dev.civl.sarl.IF.expr.SymbolicExpression valueSetTemplate) Builds an assertion stating that all the objects in a variable ofvarTypeNOT referred byvalueSetTemplatepreserve their old values. (i.e., theirnewValequals to theiroldVal).- Parameters:
varType- the type of the variable associated tovalueSetTemplateoldVal- old value of the variablenewVal- new value of the variablevalueSetTemplate- a value set template associated tovarType- Returns:
- an assertion as described above.
-
getVSReferenceToSequenceOrNoop
dev.civl.sarl.IF.expr.valueSetReference.ValueSetReference getVSReferenceToSequenceOrNoop(CIVLType variableOrMallocElementType, boolean isMallocElementType, dev.civl.sarl.IF.expr.valueSetReference.ValueSetReference vsRef) This method over-approximates
vsRefif it references into sequence elements. In this case, the returned value is an ancestor that references to the outer-most sequence object that encloses whatvsRefreferences to.The parameter
variableOrMallocElementTypeis the CIVLType of the variable wherevsRefreferences, ifvsRefdoes NOT reference to a heap object. Otherwise,variableOrMallocElementTypeis the element type statically determined by the corresponding malloc statement. In this case, the root ancestor ofvsRefreferences to the heap object instead of the heap variable.The reason of why this method analyzes
vsRefwith respect to CIVLType instead of dynamic types is that sequence type is invisible to dynamic types. The reason of why we treat variables and heap objects differently is that there is no CIVLType exisiting in the model for a heap object. There are only CIVLType of static element types extracted from malloc statement.
-