some fixes in terms of map

Mainly, make a intermediate function to get the keys we want. 
I would add something more in hasUnionMarker and isFromArray as:

     rule hasUnionMarker(loc(_,_,.Set)) => false
     rule hasUnionMarker(loc(_,_)) => false
     rule hasUnionMarker(NullPointer) => false
     rule hasUnionMarker(loc(_,_,SetItem(K:K) S:Set)) =>
#hasUnionMarker(K,S) ==K true

     rule isFromArray(loc(_,_,SetItem(K:K) S:Set)) => #isFromArray(K,S) ==K
true
     rule isFromArray(loc(_,_,.Set)) => false
     rule isFromArray(loc(_,_)) => false
     rule isFromArray(NullPointer) => false


On Fri, Jun 6, 2014 at 3:52 PM, Chris Hathhorn <notifications@github.com>
wrote:

> In semantics/language/common/symloc.k:
>
> > @@ -267,19 +267,42 @@ module C-SYMLOC
> >       syntax Bool ::= "#isBases" "(" Provenance ")" [function, klabel('#isBases)]
> >       rule #isBases(basedOn(_)) => true
> >
> > -     rule hasUnionMarker(Loc:SymLoc) => #hasUnionMarker(Loc) ==K true
> > -
> > -     syntax Bool ::= #hasUnionMarker(SymLoc) [function]
> > -     rule #hasUnionMarker(loc(_, _, SetItem(fromUnion(_, _, _)) _)) => true
> > -
> > -     rule isFromArray(Loc:SymLoc) => #isFromArray(Loc) ==K true
> > -
> > -     syntax Bool ::= "#isFromArray" "(" SymLoc ")" [function]
> > -     rule #isFromArray(loc(_, _, SetItem(fromArray(_, _)) _)) => true
> > -
> > -     rule stripFromArray(loc(_, _, (SetItem(fromArray(_, _)) => .Set) _))
> > -     rule stripFromArray(Loc:SymLoc) => Loc
> > -          when notBool isFromArray(Loc)
> > +     rule hasUnionMarker(loc(_,_,.Set)) => false
> > +     rule hasUnionMarker(loc(_,_,SetItem(K:K) S:Set)) => #hasUnionMarker(K,S) ==K true
>
> But it'll be a partial function that only returns true when the thing is
> in the set, it doesn't even need to consider the case when the set argument
> is missing.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/kframework/c-semantics/pull/10/files#r13509721>.
>