map.key

Abstract datatype of (untyped) partial maps.

  • Author: Daniel Bruns
  • Documentation added by Alexander Weigl weigl@kit.edu

Sorts

Map

Map;defined in: map.key Line: 13 Offset :4

Functions

mapGet

Return a value from the given Map. If value is undefined, mapUndef is used.

any mapGet (Map , any ); defined in: map.key Line: 17 Offset :4

mapUndef

\unique any mapUndef ; defined in: map.key Line: 23 Offset :4

mapForeach

Map mapForeach {true , true } (boolean , any ); defined in: map.key Line: 29 Offset :4

mapEmpty

Map mapEmpty ; defined in: map.key Line: 30 Offset :4

mapSingleton

Map mapSingleton (any , any ); defined in: map.key Line: 31 Offset :4

mapOverride

Map mapOverride (Map , Map ); defined in: map.key Line: 32 Offset :4

seq2map

Map seq2map (Seq ); defined in: map.key Line: 33 Offset :4

mapUpdate

Map mapUpdate (Map , any , any ); defined in: map.key Line: 34 Offset :4

mapRemove

Map mapRemove (Map , any ); defined in: map.key Line: 35 Offset :4

Predicates

inDomain

inDomain (Map , any ); defined in: map.key Line: 39 Offset :4

inDomainImpliesCreated

inDomainImpliesCreated (Map ); defined in: map.key Line: 40 Offset :4

Taclets

No choice condition specified

defMapEquality

defMapEquality { \find ( m0 = m1 ) \varcond \replacewith ( \forall vy ; ( ( inDomain ( m0 , vy )<-> inDomain ( m1 , vy ))& ( inDomain ( m0 , vy )-> mapGet ( m0 , vy )= mapGet ( m1 , vy )))) };defined in: map.key Line: 60 Offset :4

inDomainOfMapForeach

inDomainOfMapForeach { \find ( inDomain ( mapForeach { v ; } ( b , y ), x )) \replacewith ( {\subst v ; alpha :: cast ( x )} b = TRUE & alpha :: instance ( x )= TRUE ) \heuristics (simplify ) };defined in: map.key Line: 67 Offset :4

getOfMapForeach

getOfMapForeach { \find ( mapGet ( mapForeach { v ; } ( b , y ), x )) \sameUpdateLevel \replacewith ( \if ( inDomain ( mapForeach { v ; } ( b , y ), x ))\then ( {\subst v ; alpha :: cast ( x )} y )\else ( mapUndef )) \heuristics (simplify_enlarging ) };defined in: map.key Line: 74 Offset :4

defMapEmpty

defMapEmpty { \find ( mapEmpty ) \replacewith ( mapForeach { vy ; } ( FALSE , mapUndef )) };defined in: map.key Line: 87 Offset :4

defMapSingleton

defMapSingleton { \find ( mapSingleton ( xa , y )) \varcond \replacewith ( mapForeach { vy ; } ( \if ( vy = any :: cast ( xa ))\then ( TRUE )\else ( FALSE ), y )) };defined in: map.key Line: 92 Offset :4

defMapOverride

defMapOverride { \find ( mapOverride ( m0 , m1 )) \varcond \replacewith ( mapForeach { vy ; } ( \if ( inDomain ( m0 , vy )| inDomain ( m1 , vy ))\then ( TRUE )\else ( FALSE ), \if ( inDomain ( m1 , vy ))\then ( mapGet ( m1 , vy ))\else ( mapGet ( m0 , vy )))) };defined in: map.key Line: 100 Offset :4

defSeq2Map

defSeq2Map { \schemaVar \term Seq s ; \schemaVar \variables int ix ; \find ( seq2map ( s )) \varcond \replacewith ( mapForeach { ix ; } ( \if ( 0 <= ix & ix < seqLen ( s ))\then ( TRUE )\else ( FALSE ), any :: seqGet ( s , ix ))) };defined in: map.key Line: 110 Offset :4

defMapUpdate

defMapUpdate { \find ( mapUpdate ( m , key , value )) \varcond \replacewith ( mapForeach { vy ; } ( \if ( inDomain ( m , vy )| vy = key )\then ( TRUE )\else ( FALSE ), \if ( vy = key )\then ( value )\else ( mapGet ( m , vy )))) };defined in: map.key Line: 122 Offset :4

defMapRemove

defMapRemove { \find ( mapRemove ( m , key )) \varcond \replacewith ( mapForeach { vy ; } ( \if ( inDomain ( m , vy )& vy != key )\then ( TRUE )\else ( FALSE ), mapGet ( m , vy ))) };defined in: map.key Line: 136 Offset :4

defInDomainImpliesCreated

defInDomainImpliesCreated { \schemaVar \variables Object o ; \find ( inDomainImpliesCreated ( m )) \varcond \replacewith ( \forall o ; ( inDomain ( m , o )-> boolean :: select ( heap , o , java.lang.Object :: )= TRUE )) \heuristics (simplify_enlarging ) };defined in: map.key Line: 148 Offset :4

mapEqualityRight

mapEqualityRight { \find ( ==> m0 = m1 ) \varcond \replacewith ( ==> \forall vy ; ( ( inDomain ( m0 , vy )<-> inDomain ( m1 , vy ))& ( inDomain ( m0 , vy )-> mapGet ( m0 , vy )= mapGet ( m1 , vy )))) \heuristics (simplify_enlarging ) };defined in: map.key Line: 162 Offset :4

mapUpdateUnchanged

mapUpdateUnchanged { \find ( m = mapUpdate ( m , key , value )) \replacewith ( inDomain ( m , key )& mapGet ( m , key )= value ) \heuristics (simplify_enlarging ) };defined in: map.key Line: 171 Offset :4

mapUpdateUnchanged2

mapUpdateUnchanged2 { \find ( mapUpdate ( m , key , value )= m ) \replacewith ( inDomain ( m , key )& mapGet ( m , key )= value ) \heuristics (simplify_enlarging ) };defined in: map.key Line: 178 Offset :4

mapRemoveUnchanged

mapRemoveUnchanged { \find ( m = mapRemove ( m , key )) \replacewith ( ! inDomain ( m , key )) \heuristics (simplify_enlarging ) };defined in: map.key Line: 185 Offset :4

mapRemoveUnchanged2

mapRemoveUnchanged2 { \find ( mapRemove ( m , key )= m ) \replacewith ( ! inDomain ( m , key )) \heuristics (simplify_enlarging ) };defined in: map.key Line: 192 Offset :4

inDomainOfMapEmpty

inDomainOfMapEmpty { \find ( inDomain ( mapEmpty , x )) \replacewith ( false ) \heuristics (concrete ) };defined in: map.key Line: 202 Offset :4

inDomainOfMapSingleton

inDomainOfMapSingleton { \find ( inDomain ( mapSingleton ( x , y ), z )) \replacewith ( x = z ) \heuristics (simplify ) };defined in: map.key Line: 208 Offset :4

inDomainOfMapOverride

inDomainOfMapOverride { \find ( inDomain ( mapOverride ( m0 , m1 ), x )) \replacewith ( inDomain ( m0 , x )| inDomain ( m1 , x )) \heuristics (simplify ) };defined in: map.key Line: 214 Offset :4

inDomainOfSeq2Map

inDomainOfSeq2Map { \schemaVar \term Seq s ; \find ( inDomain ( seq2map ( s ), x )) \replacewith ( int :: instance ( x )= TRUE & 0 <= int :: cast ( x )& int :: cast ( x )< seqLen ( s )) \heuristics (simplify ) };defined in: map.key Line: 220 Offset :4

inDomainOfMapUpdate

inDomainOfMapUpdate { \find ( inDomain ( mapUpdate ( m , key , value ), x )) \replacewith ( inDomain ( m , x )| ( x = key )) \heuristics (simplify_enlarging ) };defined in: map.key Line: 229 Offset :4

inDomainOfMapRemove

inDomainOfMapRemove { \find ( inDomain ( mapRemove ( m , key ), x )) \replacewith ( inDomain ( m , x )& ( x != key )) \heuristics (simplify_enlarging ) };defined in: map.key Line: 236 Offset :4

notInDomain

notInDomain { \find ( ==> inDomain ( m , x )) \add ( mapGet ( m , x )= mapUndef ==> ) \heuristics (inReachableStateImplication ) };defined in: map.key Line: 243 Offset :4

inDomainConcrete

inDomainConcrete { \assumes ( ==> mapUndef = y ) \find ( mapGet ( m , x )= y ==> ) \add ( inDomain ( m , x )==> ) \heuristics (inReachableStateImplication ) };defined in: map.key Line: 249 Offset :4

getOfMapEmpty

getOfMapEmpty { \find ( mapGet ( mapEmpty , x )) \sameUpdateLevel \replacewith ( mapUndef ) \heuristics (simplify ) };defined in: map.key Line: 261 Offset :4

getOfMapSingleton

getOfMapSingleton { \find ( mapGet ( mapSingleton ( x , y ), z )) \sameUpdateLevel \replacewith ( \if ( x = z )\then ( y )\else ( mapUndef )) \heuristics (simplify ) };defined in: map.key Line: 268 Offset :4

getOfMapOverride

getOfMapOverride { \find ( mapGet ( mapOverride ( m0 , m1 ), x )) \sameUpdateLevel \replacewith ( \if ( inDomain ( m1 , x ))\then ( mapGet ( m1 , x ))\else ( mapGet ( m0 , x ))) \heuristics (simplify_enlarging ) };defined in: map.key Line: 275 Offset :4

getOfSeq2Map

getOfSeq2Map { \schemaVar \term Seq s ; \find ( mapGet ( seq2map ( s ), x )) \sameUpdateLevel \replacewith ( \if ( int :: instance ( x )= TRUE & 0 <= int :: cast ( x )& int :: cast ( x )< seqLen ( s ))\then ( any :: seqGet ( s , int :: cast ( x )))\else ( mapUndef )) \heuristics (simplify_enlarging ) };defined in: map.key Line: 283 Offset :4

getOfMapUpdate

getOfMapUpdate { \find ( mapGet ( mapUpdate ( m , key , value ), x )) \sameUpdateLevel \replacewith ( \if ( x = key )\then ( value )\else ( mapGet ( m , x ))) \heuristics (simplify_enlarging ) };defined in: map.key Line: 293 Offset :4

getOfMapRemove

getOfMapRemove { \find ( mapGet ( mapRemove ( m , key ), x )) \sameUpdateLevel \replacewith ( \if ( x = key )\then ( mapUndef )\else ( mapGet ( m , x ))) \heuristics (simplify_enlarging ) };defined in: map.key Line: 301 Offset :4