LoPSiL: A location-based policy-specification language This paper describes the design of LoPSiL, a language for specifying location-dependent security and privacy policies. Policy- specification languages like LoPSiL are domain-specific programming languages intended to simplify the tasks of specifying and enforcing sound security policies on untrusted (i.e., potentially insecure) software. As far as we are aware, LoPSiL is the first imperative policy-specification language to provide abstractions specifically tailored to location-dependent policies for mobile-device applications. We have implemented a proof-of-concept compiler that inputs a LoPSiL policy P and a mobile-device application program A and outputs a new application program A ’ equivalent to A, except that A ’ contains inlined enforcement code that ensures that A ’ satisfies P at runtime. We report our experiences using this compiler to design and implement several policies for mobile-device applications.