Skip to main content
. 2025 Jul 30;25(15):4701. doi: 10.3390/s25154701
Listing 2. Share: feature OCL rules.
context Feature::call(t:Tuple):Boolean, Tuple
   def: found : Sequence(Service) =
     select(s : Share.discovery(id) |
       let s.pre(k:Tuple):Boolean, self.post(v,q):Boolean, s.
          function(w):r in
         t.isOclType() = k.isOclType() and
         t.isOclType() = v.isOclType() and
         r.isOclType() = q.isOclType() and
         s.pre(t) and self.post(t,s.function(t)))
    post: if found->notEmpty()
         then result =  {true, found->first().function(t)}
         else result = {false, Sequence{}} endif