Skip to main content
. 2019 Mar 8;19(5):1184. doi: 10.3390/s19051184
Algorithm 1 Context construction algorithm.
  • Input

  •  Function Call Graph CG

  •  Privacy Disclosure Path Paths

  •  System and UI Events Events

  •  Permission Mapping Table Table

  • Output

  •  Context PrivacyContext

  • Begin

  • PrivacyContext=null

  • context=null

  • for all eE do

  •   if e.targetPrivacyAPI then

  •    ne=getEntryPointFromCG(e.origin) //Retrieval entry function from CG

  •    permission=getPermissionFromTable(e.target) //Retrieval API permission

  •    for all pathPaths do

  •     if path.source==e.target then

  •      context.add(<path,ne>) //Add context

  •     end if

  •    end for

  •    PrivacyContext.add(e.target,permission,context)

  •    context.clear()

  •   end if

  • end for

  • return PrivacyContext