{'fraction_non_alphanumeric': 0.046672563608928665, 'fraction_numerical': 0.011290910036942608, 'mean_word_length': 3.9909114515710207, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Automating Access Control Logics in Simple Type Theory with LEO-II

Garg and Abadi recently proved that prominent access control logics can be translated in a sound and complete way into modal logic S4. We have previously outlined how normal multimodal logics, including monomodal logics K and S4, can be embedded in simple type theory (which is also known as higher-order logic) and we have demonstrated that the higher-order theorem prover LEO-II can automate reasoning in and about them. In this paper we combine these results and describe a sound and complete embedding of different access control logics in simple type theory. Employing this framework we show that the off the shelf theorem prover LEO-II can be applied to automate reasoning in prominent access control logics.


Introduction
The provision of effective and reliable control mechanisms for accessing resources is an important issue in many areas. In computer systems, for example, it is important to effectively control the access to personalized or security critical files.
A prominent and successful approach to implement access control relies on logic based ideas and tools. Abadi's article [1] provides a brief overview on the frameworks and systems that have been developed under this approach. Garg and Abadi recently showed that several prominent access control logics can be translated into modal logic S4 [15]. They proved that this translation is sound and complete.
We have previously shown [7] how multimodal logics can be elegantly embedded in simple type theory (STT) [12,5] -which is widely also known as higher-order logic (HOL). We have also demonstrated that proof problems in and about multimodal logics can be effectively automated with the higher theorem prover LEO-II.
In this paper we combine the above results and show that different access control logics can be embedded in STT, which has a well understood syntax and semantics [19,4,3,6].
The expressiveness of STT furthermore enables the encoding of the entire translation from access control logic input syntax to STT in STT itself, thus making it as transparent as possible. Our embedding furthermore demonstrates that prominent access control logics as well as prominent multimodal logics can be considered and treated as natural fragments of STT.
Using our embedding, reasoning in and about access control logic can be automated in the higher-order theorem prover LEO-II [9]. Since LEO-II generates proof objects the entire translation and reasoning process is in principle accessible for independent proof checking. This paper is structured as follows: Section 2 reviews background knowledge and Section 3 outlines the translation of access control logics into modal logic S4 as proposed by Garg and Abadi [15]. Section 4 restricts the general embedding of multimodal logics into STT [7] to an embedding of monomodal logics K and S4 into STT and proves its soundness and completeness. These results are combined in Section 5 in order to obtain a sound and complete embedding of access control logics into STT. Moreover, we present some first empirical evaluation of the approach with the higher-order automated theorem prover LEO-II. Section 6 concludes the paper.
∨ o→o→o and Π (α→o)→o (for each type α). From these connectives, other logical connectives can be defined in the usual way. We often use binder notation ∀X α s for (Π (α→o)→o (λ X α s o )). We denote substitution of a term A α for a variable X α in a term B β by [A/X ]B. Since we consider αconversion implicitly, we assume the bound variables of B avoid variable capture. Two common relations on terms are given by β -reduction and η-reduction. A β -redex (λ X s)t β -reduces to [t/X ]s. An η-redex (λ X sX ) where variable X is not free in s, η-reduces to s. We write s= β t to mean s can be converted to t by a series of β -reductions and expansions. Similarly, s= β η t means s can be converted to t using both β and η.
Semantics of STT is well understood and thoroughly documented in the literature [6,3,4,19]; our summary below is adapted from Andrews [2].
A frame is a collection {D α } α∈T of nonempty domains (sets) D α , such that D o = {T, F} (where T represents truth and F represents falsehood). The D α→β are collections of functions mapping D α into D β . The members of D ι are called individuals. An interpretation is a tuple {D α } α∈T , I where function I maps each typed constant c α to an appropriate element of D α , which is called the denotation of c α (the denotations of ¬, ∨ and Π are always chosen as intended). A variable assignment φ maps variables X α to elements in D α . An interpretation {D α } α∈T , I is a Henkin model (general model) if and only if there is a binary function V such that V φ s α ∈ D α for each variable assignment φ and term s α ∈ L, and the following conditions are satisfied for all φ and all s,t ∈ L: If an interpretation {D α } α∈T , I is a Henkin model, the function V φ is uniquely determined. An interpretation {D α } α∈T , I is a standard model if and only if for all α and β , D α→β is the set of all functions from D α into D β . Each standard model is also a Henkin model.
We say that formula A ∈ L is valid in a model {D α } α∈T , I if an only if V φ A = T for every variable assignment φ . A model for a set of formulas H is a model in which each formula of H is valid.
A formula A is Henkin-valid (standard-valid) if and only if A is valid in every Henkin (standard) model. Clearly each formula which is Henkin-valid is also standard-valid, but the converse of this statement is false. We write |= ST T A if A is Henkin-valid and we write Γ |= ST T A if A is valid in all Henkin models in which all formulas of Γ are valid.

Translating Access Control Logic to Modal Logic
The access control logic ICL studied by Garg and Abadi [15] is defined by p denotes atomic propositions, ∧ , ∨ , ⊃ , ⊥ and ⊤ denote the standard logical connectives, and A denotes principals, which are atomic and distinct from the atomic propositions p. Expressions of the form A says s, intuitively mean that A asserts (or supports) s. ICL inherits all inference rules of intuitionistic propositional logic. The logical connective says satisfies the following axioms:

Example 3.1 (from [15])
We consider a file-access scenario with an administrating principal admin, a user Bob, one file file1, and the following policy: 1. If admin says that file1 should be deleted, then this must be the case.
2. admin trusts Bob to decide whether file1 should be deleted.
This policy can be encoded in ICL as follows: The question whether file1 should be deleted in this situation corresponds to proving deletefile1 (1.4), which follows from (1.1)-(1.3), (unit), and (cuc).
Garg and Abadi [15] propose the following mapping ⌈.⌉ of ICL formulas into modal logic S4 formulas (similar to Gödels translation from intuitionistic logic to S4 [16], but providing a mapping for the additional connective says ; we refer to Garg and Abadi [15] for a brief discussion of the intuition of the mapping of says). ⌈p⌉ = 2p ⌈s ∧ t⌉ = ⌈s⌉ ∧ ⌈t⌉ ⌈s ∨ t⌉ = ⌈s⌉ ∨ ⌈t⌉ ⌈s ⊃ t⌉ = 2 (⌈s⌉ ⊃ ⌈t⌉) Logic ICL =⇒ extends ICL by a speaks-for operator (represented by =⇒ ) which satisfies the following axioms: The use of the new =⇒ operator is illustrated by the following modification of Example 1.
Using these facts and (handoff) and (speaking-for) one can prove deletefile1 (2.5) The translation of ICL =⇒ into S4 extends the translation from ICL to S4 by Logic ICL B differs from ICL by allowing that principals may contain Boolean connectives (a denotes atomic principals distinct from atomic propositions): ICL B satisfies the following additional axioms: Abadi and Garg show that the speaks-for operator from ICL =⇒ is definable in ICL B . The use of ICL B is illustrated by the following modification of Example 1.

Example 3.3 (from [15]
) admin is trusted on deletefile1 and its consequences (3.1). (3.2) says that admin further delegates this authority to Bob.
Using these facts and the available axioms one can again prove deletefile1 (3.4).
The translation of ICL B into S4 is the same as the translation from ICL to S4. However, the mapping ⌈A says s⌉ = 2(A ∨ ⌈s⌉) now guarantees that Boolean principal expressions A are mapped one-to-one to Boolean expressions in S4.
Garg and Abadi prove their translations sound and complete:

Embedding Modal Logic in Simple Type Theory
Embeddings of modal logics into higher-order logic have not yet been widely studied, although multimodal logic can be regarded as a natural fragment of STT. Gallin [13] appears to mention the idea first. He presents an embedding of modal logic into a 2-sorted type theory. This idea is picked up by Gamut [14] and a related embedding has recently been studied by Hardt and Smolka [17]. Carpenter [11] proposes to use lifted connectives, an idea that is also underlying the embeddings presented by Merz [21], Brown [10], Harrison [18,Chap. 20], and Kaminski and Smolka [20].
In [7] we pick up and extend the embedding of multimodal logics into STT as studied by Brown [10]. The starting point is a characterization of multimodal logic formulas as particular λterms in STT. A distinctive characteristic of the encoding is that the definiens of the 2 R operator λ -abstracts over the accessibility relation R. As is shown in [7] this supports the formulation of meta properties of encoded multimodal logics such as the correspondence between certain axioms and properties of the accessibility relation R. And some of these meta properties can be efficiently automated within our higher-order theorem prover LEO-II.
The general idea of this encoding is very simple: Choose base type ι and let this type denote the set of all possible worlds. Certain formulas of type ι → o then correspond to multimodal logic expressions, whereas the modal operators ¬ , ∨ , and 2 r itself become λ -terms of type respectively. Intuitively, a multimodal formula of type ι → o denotes the set of worlds in which it is true.
The mapping ⌊.⌋ translates formulas of multimodal logic ML into terms of type ι → o in STT: The expressiveness of STT (in particular the use of λ -abstraction and β η-conversion) allows us to replace mapping ⌊.⌋ by mapping |.| which works locally and is not recursive. 2 It is easy to check that this local mapping works as intended. For example, |2 r p ∨ 2 r q)| := | ∨ | (|2 | |r| |p|) (|2 | |r| |q|)= β η ⌊2 r p ∨ 2 r q)⌋ 2 Note that the encoding of the modal operators 2 r is chosen to explicitly depend on an accessibility relation r of type ι → ι → o given as first argument to it. Hence, we basically introduce a generic framework for modeling multimodal logics. This idea is due to Brown and it is this aspect where the encoding differs from the LTL encoding of Harrison. The latter chooses the interpreted type num of numerals and then uses the predefined relation ≤ over numerals as fixed accessibility relation in the definitions of 2 and 3. By making the dependency of 2 r and 3 r on the accessibility relation r explicit, we cannot only formalize but also automatically prove some meta properties of multimodal logics as we have demonstrated in [7].
Further local definitions for other multimodal logic operators can be introduced this way.
A notion of validity for the λ -terms (of type ι → o) we obtain after definition expansion is still missing: We want A ι→o to be valid if and only if for all possible worlds w ι we have (A ι→o w ι ), that is, w ∈ A. This notion of validity is also introduced as a local definition: Garg and Abadi's translation of access control into modal logic as presented in Section 3 is monomodal and does not require different 2 r -operators. Thus, for the purpose of this paper we restrict the outlined general embedding of multimodal logics into STT to an embedding of monomodal logic into STT. Hence, for the remainder of the paper we assume that ML provides exactly one 2 r -operator, that is, a single relation constant r.
We next study soundness of this embedding. Our soundness proof below employs the following mapping of Kripke frames into Henkin models.
We leave it to the reader to prove (ii) if and only if (iii). q.e.d We now prove soundness of the embedding of normal monomodal logics K and S4 into STT. In the case of S4 we add axioms that correspond to modal logic axioms T (reflexivity) and 4 (transitivity). 3 Here we call these axiom R and T. ∀X ι→o |Mval 2 r X ⊃ X | and ∀X ι→o |Mval 2 r X ⊃ 2 r 2 r X | respectively.

Proof:
(1) The proof is by contraposition. For this, assume |= K s, that is, there is a Kripke model K = W, (R r ), |= with w |= s for some w ∈ W . By Lemma 4.2, for arbitrary φ we have (2) The proof is by contraposition. From |= S4 s we get by Lemma 4.2 that |Mval s| is not valid in Henkin model M K = {D α } α∈T , I for Kripke model K = W, (R r ) . R r in K is reflexive and transitive, hence, the relation (Ir) ∈ D ι→ι→o is so as well. We leave it to the reader to verify that axioms R and T are valid in M K . Hence, {R,T} |= ST T |Mvals|. q.e.d In order to prove completeness, we introduce a mapping from Henkin models to Kripke models. We assume that the the signature of the modal logic contains the atomic primitives p 1 , . . ., p m for m ≥ 1 and that the simple type theory signature correspondingly contains constants p 1 ι→o , . . . , p m ι→o for m ≥ 1 as well as relation constant r ι→ι→o .  q.e.d We now prove completeness of the embedding of normal monomodal logics K and S4 into STT. As before we add axioms T and R to obtain S4. ∀X ι→o |Mval 2 r X ⊃ X | and ∀X ι→o |Mval 2 r X ⊃ 2 r 2 r X | respectively. Proof: (1) The proof is by contraposition. Assume |= ST T |Mval s|, that is, for a Henkin model M = {D α } α∈T , I and a variable assignment φ we have V φ |Mval s| = F in M. This implies that there is some w ∈ D i such that V [w/W ι ],φ (|s|W ) = F in M. By Lemma 4.5 we know that w |= s in Kripke model K M = W, (R r ), |= for M. Hence, |= K s.
(2) The proof is analogous to above and from {R,T} |= ST T |Mval s| we get with Lemma 4.5 that w |= s in Kripke model K M = W, (R r ), |= for M. However, we now additionally have for axioms R and T that V φ R = V φ T = T . We leave it to the reader to check that this implies reflexivity and transitivity of relation (Ir ι→ι→o ). Thus, by construction, R r in K M is reflexive and transitive. This implies |= S4 s. q.e.d Reasoning problems in modal logics K and S4 can thus be considered as reasoning problems in STT. Hence, any off the shelf theorem prover that is sound for STT, such as our LEO-II, can be applied to them. For example, |= ST T |Mval 2 r ⊤|, |= ST T |Mval 2 r a ⊃ 2 r a|, and |= ST T |Mval3 r (a ⊃ b) ∨ (2 r a ⊃ 2 r b)| are automatically proved by LEO-II in 0.024 seconds, 0.026 seconds, and 0.035 seconds respectively. All experiments with LEO-II reported in this paper were conducted with LEO-II version v0.98 4 on a notebook computer with a Intel Pentium 1.60GHz processor with 1GB memory running Linux.
More impressive example problems illustrating LEO-II's performance for reasoning in and about multimodal logic can be found in [7]. Amongst these problems is also the equivalence between axioms 2 r s ⊃ s and 2 r s ⊃ 2 r 2 r s and the reflexivity and transitivity properties of the accessibility relation r: trans r) where R and T are the abbreviations as introduced in Theorem 4.3 and refl and trans abbreviations for λ R ι→ι→o ∀X ι R X X and λ R ι→ι→o ∀X ι ∀Y ι ∀Z ι R X Y ∧RY Z ⇒ R X Z. LEO-II can solve this modal logic meta-level problem in 2.329 seconds.

Embedding Access Control Logic in Simple Type Theory
We combine the results from Sections 3 and 4 and obtain the following mapping . from access control logic ICL into STT: It is easy to verify that this mapping works as intended. For example: We extend this mapping to logic ICL ⇒ by adding a clause for the speaks-for connective =⇒ : For the translation of ICL B we simply allow that the ICL connectives can be applied to principals. Our mapping . needs not to be modified and is applicable as is.
The notion of validity for the terms we obtain after translations is chosen identical to before This implies that ⊢ ⌈s⌉ for the sound and complete Hilbert System for S4 studied in [15]. 5 By Theorem 3.4 we conclude that ⊢ s in access control logic ICL (resp. ICL ⇒ , ICL B ).
q.e.d   We can thus safely exploit our framework to map problems formulated in the control logics ICL, ICL ⇒ , and ICL B to problems in STT and we can apply the off the shelf higher-order theorem prover LEO-II (which itself cooperates with the first-order theorem prover E [22]) to solve them. Times are given in seconds. Table 1 shows that LEO-II can effectively prove that the axioms unit, cuc and idem hold as expected in our embedding of ICL in STT. This provides additional evidence for the correctness of our approach. Example 1 can also be quickly solved by LEO-II. Problems unit K , cuc K , idem K , and Ex1 K modify their counterparts by omitting the axioms R and T. Thus, they essentially test whether these problems can already be proven via a mapping to modal logic K instead of S4, which is not expected. A challenge for future work is to apply LEO-II to analyse invalidity of these axioms in context K and to synthesize concrete witness terms if possible. For unit K , for instance, the problem given to LEO-II would be |= ST T ∃s ¬ ICLval s ⊃ (A says s) Tables 2 and 3 extend our experiment to the other access control logics, axioms and examples presented in Section 3. In the cases of refl K for logic ICL ⇒ and untrust K for logic ICL B LEO-II shows that the axioms R and T are in fact not needed. In the Appendix we present the concrete encoding or our embedding together with the problems unit, cuc, idem, and Ex1 in the new TPTP THF syntax [8], which is also the input syntax of LEO-II.

Conclusion and Future Work
We have outlined a framework for the automation of reasoning in and about different access control logics in simple type theory. Using our framework off the shelf higher-order theorem provers and proof assistants can be applied for the purpose. Our embedding of access control logics in simple type theory and a selection of example problems have been encoded in the new TPTP THF syntax and our higher-order theorem prover LEO-II has been applied to them yielding promising initial results. Our problem encodings have been submitted to the higher-order TPTP library (see http://www.cs.miami.edu/~tptp/; problem domain thf) under development in the EU project THFTPTP and are thus available for comparison and competition with other TPTP compliant theorem provers.
Future work includes the evaluation of the scalability of our approach for reasoning within prominent access control logics. Moreover, LEO-II could be applied to explore meta-properties of access control logics ICL, ICL ⇒ , and ICL B analogous to Example 4.7. More generally, we would like to study whether our framework can fruitfully support the exploration of new access control logics.
What has not been addressed in this paper due to space restrictions is our embedding of access control logic ICL ∀ into simple type theory -ICL ∀ is an access control logic with second-order quantification.