• Nenhum resultado encontrado

Proof theory for hybrid(ised) logics

N/A
N/A
Protected

Academic year: 2021

Share "Proof theory for hybrid(ised) logics"

Copied!
41
0
0

Texto

(1)

Proof theory for hybrid(ised) logics

I

Renato Nevesa, Alexandre Madeiraa, Manuel A. Martinsb, Luis S. Barbosaa

aHASLab (INESC TEC) & Universidade do Minho, Portugal bCIDMA  Dep. Mathematics, Universidade de Aveiro, Portugal

Abstract

Hybridisation is a systematic process along which the characteristic features of hybrid logic, both at the syntactic and the semantic levels, are developed on top of an arbitrary logic framed as an institution. In a series of papers this process has been detailed and taken as a basis for a specication methodology for recongurable systems. The present paper extends this work by showing how a proof calculus (in both a Hilbert and a tableau based format) for the hybridised version of a logic can be systematically generated from a proof calculus for the latter. Such developments provide the basis for a complete proof theory for hybrid(ised) logics, and thus pave the way to the development of (dedicated) proof support.

Keywords:

Hybrid logic, decidability, completeness, tableau systems, Hilbert calculus 1. Introduction

1.1. Motivation and context

This paper is part of a broader research agenda on the use of hybrid logic [2, 10] as a formal basis for the specication of recongurable systems [57]. Those are characterised by the ability to adapt (or recongure) their

IAccepted authors' manuscript published as: Renato Neves, Alexandre Madeira,

Manuel A. Martins, Luís S. Barbosa, Proof theory for hybrid(ised) logics, Sci-ence of Computer Programming, Volume 126, Pag. 73-93,2016 [DOI: 10. 1016/j.scico.2016.03.001]. The nal publication is available at Elsevier via http:// www.sciencedirect.com/science/article/pii/S0167642316000691 .

Email addresses: rjneves@inescporto.pt (Renato Neves),

amadeira@inescporto.pt (Alexandre Madeira), martins@ua.pt (Manuel A. Martins), lsb@di.uminho.pt (Luis S. Barbosa)

(2)

behaviour in response to contextual changes, switching from one mode of op-eration to another. Such systems are ubiquitous in the Information Society, from service-oriented applications that change services in accordance to the network trac level, to controllers embedded in modern cars whose driving contexts switch from economy to added power whenever the `sports mode' is selected.

The formal specication of a recongurable system is often a challenge: whatever logic the software engineer nds useful to dene the system's be-havioural requirements, it may not be suitable to relate the dierent contexts in which they hold and express the reconguration dynamics. The approach proposed in [38] makes explicit the labelled transition structure that typically underlies a recongurable system. Each of its states corresponds to a spe-cic conguration, or mode of operation, specied in an appropriate logic. Arrows, on the other hand, relate two possible congurations and exhibit in their labels the event that triggers the change. Thus, while this transition structure can be specied in (some variant of) modal logic, the description of the possible behaviours of concrete congurations requires logics that better suit the nature of the software system at hands. For example, continuous systems advocate the use of topological logics in the specication of each lo-cal conguration, whereas probabilistic systems are better handled through logics that embed some fragment of probability theory. Thus, our previous work [38] proposes that the specication of recongurable systems should be divided into two dierent levels:

• globally the reconguration dynamics is represented by a transition structure described in hybrid logic, a logic that adds to modal rea-soning the ability to pinpoint individual states, which in this context, represent congurations;

• locally each state is endowed with a structure that models, in a suitable logic, the specication of the associated conguration.

Therefore, to address both dimensions together in a single logical setting, the features of hybrid logic are developed on top of whatever logic is used for the local specication of each conguration. The logic used locally becomes hybridised, a specic procedure for combination of logics developed in A. Madeira's doctoral thesis [37], often referred to as the hybridisation process. The logic used locally depends, as expected, on the application require-ments. Typical candidates are equational, partial algebra or rst-order logic (F OL), but one may equally resort to multivalued logics or even to hybrid

(3)

logic itself equipping, in this last case, each state with another (local) tran-sition system. Verication resorts to a parametrised translation to F OL (developed in [42, 49] and further extended in [22]), but at the cost of losing decidability and adding extra complexity.

The work reported here, extending as discussed below previous results introduced in the original conference paper [50], paves the way to an al-ternative approach in which verication can be carried on at the level of the hybridised logic itself. Even if a number of further questions has to be addressed to make it a pragmatic alternative, namely in what concerns com-plexity and possible circumventing heuristics, the paper introduces a rst contribution. In brief, the hybridisation method is extended so that not only the logic is hybridised but also its calculus is systematically enriched into a calculus for the hybridised logic. Moreover, the latter is shown to be sound and complete whenever the calculus associated to the underlying, base logic is.

This programme, sketched in reference [50] as an Hilbert style calculus, is detailed here and extended to the generation of a tableau system for the hybridised logic. Actually, Hilbert calculi, although simple and versatile, are not amenable to eective computational support. On the other hand, tableau systems [10, 34], able to systematically decompose sentences until contradictions are found, are well-known for their impressive computational power; in particular for the class of modal logics, where hybrid(ised) logics live. We believe this development is a rst step towards dedicated proof support for a broad spectrum of hybrid(ised) logics.

Hybrid logic, with its ability to explicitly refer to local states in a tran-sition structure, proved to be a powerful tool to specify recongurations [38, 39]. Other, less standard extensions of modal logic, namely swap logic [3, 4] in which recongurations steps can be reverted or erased at evaluation time, may complement this view with other, interesting possibilities. 1.2. Contributions and roadmap

The paper's starting point is to recast the hybridisation method in the context of the theory of institutions with proofs [23], which makes possible the development of the whole framework at a general level. Then, it simplies the generation of the Hilbert calculus originally proposed in [50], and, as a main contribution, introduces the corresponding tableau version. Besides the theoretical relevance of these results, from a pragmatic point of view they pave the way to the development of eective tool support for the verication of recongurable systems within the approach proposed in [38].

(4)

A clarication is in order at this point. As the attentive reader may notice, most of the results presented here could be formulated out of the institutional setting. We believe, however, the latter provides an abstract framework in which the hybridisation process can be discussed in full gener-ality. Actually, the level of generality that the notion of institution achieves, is one of the reasons for its success. Such was also the path initiated in [38] and kept in this paper, which can be considered as one of its follow-ups.

The theory of institutions (see [23] for an extensive account) was moti-vated by the need to abstract from the particular details of each individual logic and characterise generic issues, such as satisfaction and combination of logics, in very general terms. In computer science, this lead to the develop-ment of a solid institution-independent specication theory, on which, struc-turing and parameterisation mechanisms, required to scale up software spec-ication methods, are dened `once and for all', irrespective of the concrete logic used in each application domain. This explains why institutions proved eective and resilient as witnessed by the wide number of logics formalised in this way. Examples range from the usual logics in classical mathemati-cal logic (propositional, equational, rst order, etc.), to the ones underlying specication and programming languages or used for describing particular systems from dierent domains. Well-known examples include probabilistic logics [7], quantum logics [13], hidden and observational logics [11, 9, 43], coalgebraic logics [19], as well as logics for reasoning about process algebras [46], functional [53, 54] and imperative programing languages [53].

The remainder of the paper is organised as follows: Section 2 provides the relevant background on institutions with proofs and revisits the hybridisation method in this setting. Section 3 presents the generation of Hilbert calculi, and discusses decidability and completeness of hybrid(ised) logics. Section 4 introduces the corresponding tableau version. Finally, Section 5 concludes and provides pointers for future work.

2. Background

2.1. Institutions with proofs

The generic character of the hybridisation process is due to its rendering in the context of the theory of institutions [32]. The notion of an institution formalises the essence of a logical system by encompassing syntax, semantics and satisfaction. Formally,

Denition 1. An institution is a tuple (SignI,SenI,ModI, (|=I

Σ)Σ∈|SignI|),

(5)

• SignI is a category whose objects are signatures and arrows signature

morphisms,

• SenI : SignI → Set, is a functor that, for each signature Σ ∈ |SignI|,

returns a set of sentences over Σ,

• M odI : (SignI)op → Cat, is a functor that, for each signature Σ ∈

|SignI|, returns a category whose objects are models over Σ,

• |=I

Σ ⊆ |M odI(Σ)| × SenI(Σ), or simply |=, if the context is clear, is a

satisfaction relation such that, for each signature morphism ϕ : Σ → Σ0,

M odI(ϕ)(M0) |=IΣρ i M0 |=I

Σ0 SenI(ϕ)(ρ), for any

M0 ∈ |M odI0)|and ρ ∈ SenI(Σ). Graphically,

Σ ϕ  M odI(Σ) |= I Σ SenI(Σ) SenI(ϕ)  Σ0 M odI(Σ0) M odI(ϕ) OO |=I Σ0 SenI(Σ0)

Intuitively, this property claims that satisfaction is preserved under change of notation. In order to build up the reader's intuition, let us recall some typical examples.

Example 1. Many sorted rst-order logic (FOL).

• Signatures. SignFOLis a category whose objects are triples (S, F, P ), consisting of a set of sort symbols S, a family, F = (Fw→s)w∈S∗,s∈S, of

function symbols indexed by their arity, and a family, P = (Pw)w∈S∗,

of relational symbols also indexed by their arity.

A signature morphism is a triple (ϕst, ϕop, ϕrl) : (S, F, P ) → (S0, F0, P0)

such that if σ ∈ Fw→s, then ϕop(σ) ∈ Fϕ0st(w)→ϕst(s), and if π ∈ Pw

then ϕrl(π) ∈ Pϕ0st(w).

• Sentences. For each signature (S, F, P ) ∈ |SignFOL|,

SenFOL(S, F, P ) is the smallest set generated by the grammar below

(6)

where t is a term with the syntactic structure σ(X) for σ ∈ Fw→s and

Xa list of terms compatible with the arity of σ. π ∈ Pw and X is a list

of terms compatible with the arity of π. Finally, ρ0 ∈ SenF OL(S, F ]

{x}→s, P ). SenI(ϕ), for ϕ a signature morphism, is a function that,

given a sentence ρ ∈ SenI(S, F, P ), replaces the signature symbols in

ρaccording to ϕ.

• Models. For each signature (S, F, P ) ∈ |SignFOL|, M odFOL(S, F, P ) is the category with only identity arrows and whose objects are models with a carrier set |Ms|, for each s ∈ S, a function Mσ : |Mw| → |Ms|,

for each σw→s ∈ Fw→s, and a relation Mπ ⊆ |Mw|, for each π ∈ Pw.

• Satisfaction. Satisfaction of sentences by models is the usual Tarskian satisfaction.

N Example 2. Equational (EQ) and propositional (P L) logics.

The institution EQ is the sub-institution of FOL in which sentences are re-stricted to those of the type ∀x : s.t = t0. Institution PL is the sub-institution

of FOL in which signatures with no empty set of sorts are discarded. N Other examples of institutions include the algebraic specication language CASL [44], many-valued logics [25, 1], and the relational-based language Alloy [47].

However, the classic notion of an institution, does not includes an ab-stract structure to represent the associated logic calculus. The problem was addressed in [28] with the introduction of π-institutions, and, more recently, with the notion of an institution with proofs [23].

Denition 2. An institution with proofs adds to the original denition of an institution, a functor PrfI : SignI → Cat such that, for each Σ ∈

|SignI|, PrfI(Σ) (called the category of Σ-proofs) has subsets of SenI(Σ)

(i.e. |PrfI(Σ)| = P(SenI(Σ))) as objects, and the corresponding proofs as arrows. The latter are preserved along signature morphisms. In addition, for A, B ∈ |PrfI(Σ)|, if A ⊆ B then arrow B −→ A exists; if A ∩ B = ∅

(7)

unique proof arrow hp, qi that makes the following diagram to commute: Γ p {{ q ## h p,q i  A (A ] B)π 2 // π1 oo B

For the sake of simplicity, when a singleton set of sentences is presented in a proof arrow, we will drop the curly brackets. Also, observe that the restric-tions imposed to the proof arrows force upon PrfI the following properties,

which are typical of most proof systems:

1. Reexivity (if A ∈ Γ, then Γ ` A) follows from the fact that {A} ⊆ Γ and, therefore, Γ −→ A.

2. Monotonicity (if Γ ` A and Γ ⊆ ∆ then ∆ ` A), follows from compo-sition of proofs, where ∆ −→ Γ is given by inclusion and Γ −→ A by the assumption.

3. Transitivity (if Γ ` A and {∆, A} ` B then Γ ∪ ∆ ` B), follows from the product of disjoint sets, reexivity and monotonicity,

Γ //A //A0 (Γ ∪ ∆) ;; // ## ∆ ] A0 // OO  (∆ ∪ A) //B ∆ //∆ where A0 = A − (A ∩ ∆).

Functor PrfI distinguishes dierent proof arrows between the same pair of

objects. In this work, however, we force the category PrfI(Σ)to be thin (i.e.

each pair of objects to have at most one arrow). Such a restriction allows a clear focus on entailment systems1, and trivialises the uniqueness property

of arrow hp, qi.

In the sequel we use notation A `I B to say that arrow A → B is in

PrfI(Σ), and expression `I B as an abbreviation of ∅ `I B. Conversely, we use A 6`I B to negate A `IB. On the semantic side, we say that a sentence

ρ ∈ SenI(Σ)is Σ-valid (or simply, valid) if for each model M ∈ |ModI(Σ)|,

(8)

M |=IΣ ρ. Usually we prex such sentences by |=IΣ or, simply by |=I or just |=.

Denition 3. Let I be an institution with a proof system PrfI. We say that

PrfI is sound and complete if, for any signature Σ ∈ |SignI| and sentence ρ ∈ SenI(Σ),

`I ρi |=I ρ

Specically, sound if `I ρentails |=I ρ and complete if |=Iρ entails `I ρ.

A property equivalent to soundness and completeness arises from the follow-ing denitions.

Denition 4. (From [24]) An institution I is called Boolean complete if it has all semantic Boolean connectives. More formally, if given a signature Σ ∈ |SignI|,

• for any sentence ρ ∈ SenI(Σ), there is a sentence ¬ρ ∈ SenI(Σ)such

that for any model M ∈ |ModI(Σ)|, M |= ρ i M 6|= ¬ρ,

• for any sentences ρ, ρ0∈ SenI(Σ), there is a sentence ρ ∧ ρ0 ∈ SenI(Σ)

such that for any model M ∈ |ModI(Σ)|, M |= ρ ∧ ρ0 i M |= ρ and

M |= ρ0.

Note that the Boolean connectives are unique up to semantic equivalence. Then, negation makes possible to state that, given an institution I and signature Σ ∈ |SignI|, for any sentence ρ ∈ SenI(Σ),

ρis unsatisable i ¬ρ is valid.

As usual, ρ∨ρ0 denotes ¬(¬ρ∧¬ρ0)and ρ → ρ0 denotes ¬(ρ∧¬ρ0). Sentence

ρ∧¬ρ, denoted by ⊥, is such that no model in |ModI(Σ)|satises it. Symbol

>represents the negation of ⊥. Finally,

Theorem 1. Consider a Boolean complete institution with proofs I, such that PrfIcontains the double negation introduction rule and, its inverse, the

double negation elimination. Then the following statements are equivalent. 1. PrfI is sound and complete, i.e. for any ρ ∈ SenI(Σ), `I ρi |=I ρ.

2. For any sentence ρ ∈ SenI(Σ), ρ is satisable i 6`I ¬ρ.

(9)

• 1. ⇒ 2. ρ is satisable ≡ { Denition of satisability } 6|=I ¬ρ ≡ { 1. } 6`I¬ρ • 2. ⇒ 1. `Iρ

≡ { Double negation rules }

`I¬(¬ρ) ≡ { 2. } ¬ρ is unsatisable ≡ { Denition of satisability } |=I ρ 2.2. Hybridisation revisited

This subsection reviews the basics of the hybridisation process with the global modality. Document [42] reports a version of hybridisation where uni-versal quantication over worlds and polyadic modalities are also considered. Let SignH be the category Set × Set whose objects are pairs (Nom, Λ),

where Nom denotes a set of nominal symbols and Λ a set of modality sym-bols.

Denition 5. Given an institution I = (SignI, SenI, M odI, |=I) its

hy-bridised version HI = (SignHI, SenHI, M odHI, |=HI) is dened as follows:

• SignHI = SignH× SignI,

• given a signature (∆, Σ) ∈ |SignHI|, SenHI ∆, Σ)is the least set gen-erated by

(10)

for i a nominal, λ a modality, ψ ∈ SenI(Σ). We use non standard

Boolean connectives symbols (¬¬, ∧) in order to distinguish them from the Boolean connectives that a base logic may have. In general, note that the set of symbols introduced by the hybridisation method is disjoint from the set of symbols in the base institution I. Also, dene [λ] ρ ≡ ¬¬hλi¬¬ρ, E ρ ≡ ¬¬A¬¬ρ and ρ ⇒ ρ0 ≡ ¬¬(ρ ∧ ¬¬ρ0). Letter ψ

stands for a sentence of the base logic.

• Given a signature (∆, Σ) ∈ |SignHI|, a model M ∈ |ModHI(∆, Σ)| is a triple (W, R, m) such that,

 W is a non-empty set of worlds,

 R is a family of relations indexed by the modality symbols Λ, i.e. for each λ ∈ Λ, Rλ ⊆ W × W

 m : W → |ModI(Σ)|.

Also, for each i ∈ Nom, Mi ∈ W.

• Given a signature (∆, Σ) ∈ |SignHI|, a model M = (W, R, m) ∈

|M odHI(∆, Σ)| and a sentence ρ ∈ SenHI(∆, Σ), the satisfaction

rela-tion is dened as,

M |=HI(∆,Σ)ρ i M |=wρ, for all w ∈ W where, M |=w ¬¬ρ i M 6|=w ρ M |=w ρ ∧ ρ0 i M |=w ρand M |=w ρ0 M |=w i i M i = w M |=w @iρ i M |=Mi ρ M |=w ψ i m(w) |=IΣ ψ M |=w A ρ i for all v ∈ W , M |=vρ

M |=w hλiρ i there is some v ∈ W such that (w, v) ∈ Rλ and M |=vρ.

Actually, if the base institution I is Boolean complete, due to the equiva-lences ψ ∧ ψ0 ≡ ψ ∧ ψ0, ¬ψ ≡ ¬¬ψ, it is possible to collapse the Boolean

connectives ∧, ∧, and also ¬, ¬¬ (cf. [22]). Thus, the grammar of the hy-bridised logic becomes,

ρ 3 ¬ρ | ρ ∧ ρ | i | @iρ | hλiρ | A ρ | ψ.

In the sequel, since it turns proofs simpler and more intuitive, we assume that all hybridised logics adopt this approach.

(11)

Example 3. Hybridised propositional logic (HP L)

• Signatures are pairs (∆, Σ) ∈ |SignHP L|where Σ is a set of propo-sitional symbols. It is assumed that this set and the set of nominals are disjoint.

• Sentences are generated by the grammar

ρ 3 i | p | ¬ρ | ρ ∧ ρ | @iρ | hλiρ | A ρ

where i is a nominal and p a propositional symbol.

• Models are Kripke structures (W, R) (where for each λ ∈ Λ, Rλ ⊆ W × W) equipped with a function m : W → |ModI(Σ)| that makes

each world to correspond to a propositional model (i.e., a subset of Σ). N When the only signatures considered are those that possess exactly one modality symbol, HP L coincides with classical hybrid propositional logic with global modality (which is known to be decidable and have a complete calculus). In this case symbols [λ], hλi are replaced, respectively, by  and ♦.

3. Generation of an Hilbert calculus for the hybridised logic 3.1. The method

This section introduces a rened version of the method for generation of an Hilbert calculus for the hybridised logic (originally proposed in [50]) in which the collapse of Boolean connectives is taken into consideration. This new formulation simplies the whole process and contributes to smaller proofs. Thus, consider an institution I with a proof system PrfI. For

any signature (∆, Σ) ∈ |SignHI|, the category PrfHI(∆, Σ) is generated by

the axioms and rules stated in Figure 3.1. Note that their schematic form guarantees that the proof arrows are preserved along signature morphisms.

Let us see some examples of Hilbert calculi, generated through this process, at work.

(12)

Axioms

All instances of classical tautologies for ¬, → (CT ) @i(ρ → ρ0) ↔ (@iρ → @iρ0) (Dist) @i⊥ → ⊥ (⊥) @i@jρ → @jρ (Scope) @ii (Ref) (i ∧ ρ) → @iρ (Intro) ([λ] ρ ∧ hλii) → @iρ ([λ]E) A ρ → @iρ (AE) ψ, for all `I ψ ( ↑ ) Rules `HI ρ, `HI ρ → ρ0 entails `HI ρ0 (M P ) if `HI ρ then `HI @ iρ (@I) if `HI @ iρ then `HI ρ (@E)? if `HI ρ ∧ hλii → @ iρ0 then `HI ρ → [λ]ρ0 ([λ]I)? if `HI ρ → @ iρ0 then `HI ρ → A ρ0 (AI)?

where annotation ? denotes condition `if i does not occur free neither in

ρnor ρ0'.

(13)

Example 4. To show that [λ](∀ x : s . t = t) is a theorem in HEQ one starts with `EQ ∀ x : s . t = t and proceeds `HI ∀ x : s . t = t ( ↑ ) `HI @i(∀ x : s . t = t) (@I) `HI (> ∧ hλii) → @i(∀ x : s . t = t) (CT ) `HI > → [λ](∀ x : s . t = t) ([λ]I) `HI [λ](∀ x : s . t = t) (CT ) N Example 5. Sentence (p → q) → (p → q) is an instance of theorem K of classic hybrid propositional logic; let us prove it through the generated Hilbert calculus of HP L. First one notes that,

`HI (p ∧ ♦i) → @ip (E) `HI ((p → q) ∧ p ∧ ♦i) → ((p → q) ∧ @ip ∧ ♦i) (CT ) Then, `HI ((p → q) ∧ ♦i) → @i(p → q) (E) `HI ((p → q) ∧ ♦i) → (@ip → @iq) (Dist) `HI ((p → q) ∧ ♦i ∧ @ip) → @iq (CT )

Both cases lead to theorem,

`HI ((p → q) ∧ p ∧ ♦i) → @iq (M P, CT )

`HI ((p → q) ∧ p) → q (I)

`HI (p → q) → (p → q) (CT )

N Note that it is straightforward to generalise the property above to any hy-bridised logic.

(14)

3.2. Soundness and completeness

We shall now show that, under certain conditions, any generated Hilbert calculus is sound and complete whenever such is the case for the corre-sponding base calculus. For this assume, in the sequel, that the logic to be hybridised is Boolean complete.

Theorem 2. (Soundness) Consider an institution I with a sound proof system PrfI. Then, for any signature (∆, Σ) ∈ |SignHI| and sentence

ρ ∈ SenHI(∆, Σ),

`HI ρ entails |=HI ρ

Proof. The result follows from the analysis of each rule and axiom in PrfHI.

In particular, for axiom ( ↑ ) we have `Iψ

⇒ { `I is sound }

|=I ψ

⇒ { Denition of |=HI }

|=HI ψ

The proof of the remaining cases is straightforward.

On the other hand, the proof of completeness requires some preliminaries. Denition 6. Consider a Boolean complete institution I. For any signature (∆, Σ) ∈ |SignHI|, a given sentence ρ ∈ SenHI(∆, Σ) is basic i sb(ρ) = {ρ} where sb(ϕ) = S

k>0

sbk(ϕ) for

sb0(ϕ) = ϕ

sbk+1(ϕ) = {ϕ0 : ♥ϕ0 ∈ sbk(ϕ) for ♥ ∈ {¬, @i, hλi, A}}

∪ {ϕ1, ϕ2: ϕ1∧ ϕ2 ∈ sbk(ϕ)}for any k > 0

Denition 7. Consider a signature (∆, Σ) ∈ |SignHI|, ρ ∈ SenHI(∆, Σ)

and let Bρ= {ψ1, . . . , ψn} ⊆ SenI(Σ)be the set of maximal base sentences

in ρ that are basic. Then, Ωρdenotes the set of sentences such that for each

a ∈ 2Bρ

(15)

where

χi=

(

ψi if ψi ∈ a

¬ψi otherwise

Lemma 1. Assume that Ωρ 6∈ ∅. Then, for any model M ∈ |ModI(Σ)|, M

satises exactly one of the sentences in Ωρ.

Proof. First observe that for any dierent χ, χ0 ∈ Ω

ρ at least one clause in

χ appears negated in χ0. This entails that M can never satisfy χ and χ0 at the same time (conjunction and negation properties). Now, if M 6|= χ, then there is a sentence χ0 ∈ Ω

ρ that negates all clauses leading to M 6|= χ, and,

therefore, M |= χ0.

Denition 8. Consider function σ : SenHI(∆, Σ) → SenHP L(∆, P ) where

P = {πψ| ψ ∈ SenI(Σ)}, such that

σ(¬ρ) = ¬σ(ρ) σ(ρ ∧ ρ0) = σ(ρ) ∧ σ(ρ0) σ(i) = i σ(@iρ) = @iσ(ρ) σ(hλiρ) = hλiσ(ρ) σ(A ρ) = A σ(ρ) σ(ψ) = πψ, if ψ is basic

Intuitively, this means that function σ replaces the basic sentences of the input ρ ∈ SenHI(∆, Σ) by propositional symbols.

Lemma 2. For any signature (∆, Σ) ∈ |SignHI|, ρ ∈ SenHI(∆, Σ)

6`HI ρ entails 6`HP Lσ(ρ) or equivalently,

`HP Lσ(ρ) entails `HI ρ

Proof. Observe that rules and axioms in PrfHP L also hold for PrfHI, and

that σ(ρ), ρ are structurally the same. This implies that if `HP L σ(ρ), then,

whichever rules and axioms were used before, one may reproduce the process using the same rules and axioms, thus arriving at `HI ρ.

(16)

Denition 9. Let Ω?

ρ = {χ ∈ Ωρ | `I ¬χ} and consider function η :

SenHI(∆, Σ) → SenI(Σ)such that η(ρ) =

(

V{¬χ | χ ∈ Ω?

ρ} if Ω?ρ6= ∅

> otherwise

Lemma 3. The sentence A η(ρ) is a theorem, or in symbols `HI A η(ρ)

Proof. Since `I η(ρ)one has that `HI η(ρ). Then, by rule (A

I), `HI A η(ρ).

Lemma 4. Consider a signature (∆, Σ) ∈ |SignHI|, a sentence ρ ∈ SenHI(∆, Σ)

and a model M ∈ |ModHP L(∆, P )|such that

M |=w A σ(η(ρ))

for some w ∈ W . Given any χ ∈ Ωρ, if σ(χ) is satised at some world of M,

then χ is satisable.

Proof. If χ is unsatisable then, because PrfI is complete, condition `I ¬χ

holds, implying that ¬χ is a clause of η(ρ) and σ(¬χ) a clause of σ(η(ρ)). Therefore, since M |=w A σ(η(ρ)), no world of M can point to a model that

satises σ(χ).

Denition 10. An institution I has the explicit satisfaction property, if for any signature Σ ∈ |SignI| and sentence ρ ∈ SenI(Σ), satisability of ρ

entails the existence of a model M ∈ |ModI(Σ)| such that M |=I Σ ρ.

This last property holds for the most common logics used in software speci-cation, e.g., propositional, fuzzy, equational, partial and rst-order. In the following theorem assume that the base institution has the explicit satisfac-tion property.

Theorem 3. (Completeness) Consider signature (∆, Σ) ∈ |SignHI|and

sen-tence ρ ∈ SenHI(∆, Σ)

(17)

Proof. Start with the observation 6`HI ¬ρ ⇒ { (MP) and Lemma 3 } 6`HI ¬(ρ ∧ A η(ρ)) ⇒ { Lemma 2 } 6`HP L σ(¬(ρ ∧ A η(ρ))) ⇒ { Denition of σ } 6`HP L ¬(σ(ρ ∧ Aη(ρ)))

Thus, by Theorem 1 and since PrfHP L is complete, there is a model M =

(W, R, m) ∈ |M odHP L(∆, P )|such that

M |=w σ(ρ) ∧ A σ(η(ρ)) for some w ∈ W .

Next we build a model for ρ. Let M0= (W, R, m0)where for any w ∈ W

m0(w) is a model for χ where σ(χ) is satised at m(w)  recall Lemmas 1 and 4 and the fact that I has the explicit satisfaction property. To nish the proof, it remains to show that M0 |=w ρ. This is proved by induction on the

subformulas of ρ. For any sentence ψ ∈ Bρ

M, w |= σ(ψ)

≡ {Denition of |= }

m(w) |= πψ

≡ {m0(w)satises some χ in which ψ is present }

m0(w) |= ψ

≡ {Denition of |= }

M0, w |= ψ

The remaining cases oer no diculty. 3.3. Decidability

Decidability is a key property on developing a new logic. Indeed, not only it is a central element in proof theory, but has also practical implications in the theory of software validation and verication.

(18)

The machinery used above to prove completeness, provides an interest-ing opportunity to discuss the decidability of hybrid(ised) logics. More con-cretely, progressing through slight changes in the denition of function η, one can show that if a logic is decidable then its hybridised version also is. This subsection reports on such a result. Recall our assumption that all base logics are Boolean complete. Then,

Lemma 5. Consider signature (∆, Σ) ∈ |SignHI|and sentence ρ ∈ SenHI(∆, Σ).

For any χ ∈ Ωρ, σ(χ) is satisable.

Proof. Unsatisfaction of σ(χ) may only come from one of the following cases: • a clause of σ(χ) is unsatisable;

• two clauses of σ(χ) contradict each other.

Clearly, a single clause of σ(χ)  a proposition  is always satisable. Then, note that, according to denition of χ, a clause in σ(χ) is πψi or ¬πψi

and any other πψj or ¬πψj. Since their corresponding propositional symbols

dier, it is clear that they never clash.

Theorem 4. Consider a signature (∆, Σ) ∈ |SignHI|, and sentence ρ ∈

SenHI(∆, Σ). If ρ is satisable σ(ρ) also is.

Proof. Start with the assumption that ρ is satisable which means that there is a model (W, R, m) = M ∈ |ModHI(∆, Σ)| such that M |=w ρ for some

w ∈ W. From M dene a model M0 = (W, R, m0) ∈ |M odHP L(∆, P )|such that for any w ∈ W , χ ∈ Ωρ, if m(w) |= χ then m0(w) |= σ(χ) (Lemmas 1

and 5). To nish the proof, it remains to show that M0 |=w σ(ρ), which is

done by induction on the subformulas of ρ. In particular, for any v ∈ W , ψ ∈ Bρ,

M |=v ψ

≡ {Denition of |=I }

m(v) |= ψ

⇒ { m(v)satises some χ ∈ Ωρof which ψ is a clause }

m0(v) |= σ(ψ)

≡ {Denition of |=HP L }

M0 |=v σ(ψ)

(19)

Next, we redene function η.

Denition 11. Consider an institution I corresponding to a decidable logic, i.e., with an eective decision procedure SatI. Then, let Ω?

ρ = {χ ∈

Ωρ| SatI(χ) is unsat } and

η(ρ) = (

V{¬χ | χ ∈ Ω?

ρ} if Ω?ρ6= ∅

> otherwise

Lemma 6. Consider a signature (∆, Σ) ∈ |SignHI|, a sentence ρ ∈ SenHI(∆, Σ)

and a model M ∈ |ModHP L(∆, P )|such that

M |=w A σ(η(ρ))

for some w ∈ W . Given any χ ∈ Ωρif σ(χ) is satised at some world of M,

then χ is satisable.

Proof. If χ is unsatisable, ¬χ is a clause of η(ρ). Hence, since M |=w

A σ(η(ρ)), no world of M satises σ(χ).

Theorem 5. Assume that I has the explicit satisfaction property. Then, consider a signature (∆, Σ) ∈ |SignHI|and a sentence ρ ∈ SenHI(∆, Σ). If

σ(ρ ∧ A η(ρ))is satisable then so is ρ.

Proof. Start with the assumption that σ(ρ ∧ A η(ρ)) is satisable which means that there is a model M = (W, R, m) ∈ |ModHP L(∆, P )|such that

M |=w σ(ρ) ∧ A σ(η(ρ))

for some w ∈ W . From model M we dene a model M0 = (W, R, m0) ∈

|M odHI(∆, Σ)| such that for any w ∈ W , m0(w) is a model for χ ∈ Ωρ

where m(w) |= σ(χ) (recall Lemmas 1 and 6 and the fact that the explicit satisfaction property holds for I). To nish the proof, it remains to show that (W, R, m0) |=w ρ, which is done by induction on the structure of ρ. For

any sentence ψ ∈ Bρ, any v ∈ W ,

M |=v σ(ψ)

≡ { Denition of |=I }

m(v) |= σ(ψ)

⇒ { m0(v)satises some χ of which ψ is a clause, denition of m0 }

m0(v) |= ψ

≡ { Denition of |=HI }

(20)

The remaining cases are straightforward.

Corollary 1. Together, Theorems 4 and 5 tell, that given a signature (∆, Σ) ∈ |SignHI|, and sentence ρ ∈ SenHI(∆, Σ),

ρ is satisable i σ(ρ ∧ A η(ρ)) is satisable.

Since HP L is decidable and the equivalence above holds, it is possible to use the decision procedure of HP L to show the (un)satisability of ρ. This approach denes an eective decision procedure for HI, and thus shows that the latter is decidable, which leads to the expected result

Corollary 2. If I is decidable then HI is also decidable.

Moreover, note that the strategy that underlies the proof of Theorem 5 paves the way to a constructive decision algorithm for HI; i.e., a decision algorithm that in the case of the input sentence ρ being satisable, provides a witnessing model. For validation purposes, this model may serve as a counter-example of some property (about the system) that is put to test.

Technically, such an algorithm relies on constructive decision algorithms for both I and HP L  the latter has at least one prover that meets this requirement [35]. Then, as indicated in the proof, through a HP L decision procedure, one extracts a Kripke frame for the input sentence in which suit-able models of I are `attached' (given by the constructive decision algorithm for I). Note, however, that the algorithm may be computationally hard: for example, it may happen that in order to dene η(ρ), the decision algorithm for I must be executed 2n times where n = |B

ρ|.

4. Generation of a tableau for the hybridised logic 4.1. The method

Let us now discuss how to generate a tableau for the hybridised logic, in complement to the generation of an (Hilbert) calculus discussed in the last section. Actually, prone to computational support, tableau systems oer to the software engineer automatic methods of verication, whereas Hilbert calculi, despite simple and versatile, often require intensive human assistance for non trivial proofs. Another key feature of tableau systems is their ability to provide counter-examples when some wrong statement about the system is put to test. This helps the engineer to locate awed designs, and, overall, turns the validation process more agile.

Tableau systems are driven by a set of rules, but, dierently from other families of proof systems, they cater for the possibility of executions paths to

(21)

diverge. Actually, when validating a sentence, tableau systems tend to open a number of execution paths, also called branches, each of them is expected to be examined, through sentence decomposition, until contradictions are exposed or no further rules can be applied. If the former case occurs the branch closes; otherwise, it is said to become saturated.

Generally speaking, when checking the validity of a sentence its negation is fed to a suitable tableau: if all branches close  which means that all possibilites have contradictions  the negated sentence is unsatisable and therefore the assertion (i.e., the original sentence) is found valid. On the other hand, if some branch saturates one can, in principle, extract a model for the negated sentence that serves as a counter-example of the assertion being tested. A detailed account on tableau systems can be found for example, in references [34] and [10], the latter specialised on tableau systems for hybrid logic.

Let I be a Boolean complete institution with proofs. The tableau system for its hybridisation, THI, is driven by the set of rules in Figure 2. Before

letting a branch to saturate, an extra test is added: each sentence of the type @iψ, where ψ ∈ SenI(Σ), must be satisable (this is checked through

functor PrfI). The branch closes if it fails the test; otherwise it becomes

saturated.

Since the rules in THI only cater for sentences of the type @

iρ, ¬@iρ, a

given input sentence φ is replaced, at the beginning, by @0φ where 0 is a

fresh nominal, i.e., the root sentence is prexed by @0. Note that the process

preserves satisability.

The next example illustrates the mechanisms of THI.

Example 6. Recall rule (Dist), introduced in the previous section; it states that @i(ρ → ρ0) → (@iρ → @iρ0). Thus, instantiating to classical hybrid

propositional logic, one gets:

@i(p → q) → (@ip → @iq)

≡ (@i(p → q) ∧ @ip) → @iq

≡ ¬((@i(p → q) ∧ @ip) ∧ ¬@iq)

≡ ¬((@i¬(p ∧ ¬q) ∧ @ip) ∧ ¬@iq)

Then, its negation, @i¬(p ∧ ¬q) ∧ @ip ∧ ¬@iq, is fed to the tableau which

(22)

@i¬ρ ¬@iρ (¬) ¬@iψ @i¬ψ (¬ ↓) ρ 6∈ SenI(Σ) ψ ∈ SenI(Σ) @i(ρ ∧ ρ0) @iρ, @iρ0 (∧) @iψ, @iψ 0 @i(ψ ∧ ψ0) (∧ ↓) ρ, ρ06∈ SenI(Σ) ψ, ψ0∈ SenI(Σ) ¬@i¬ρ @iρ (¬¬) ¬@i(ρ ∧ ρ 0) ¬@iρ | ¬@iρ0 (¬∧) @i@jρ @jρ (@) ¬@i@jρ ¬@jρ (¬@) @iEρ @jρ (E) ¬@iEρ ¬@lρ (¬E) jis fresh l ∈ N om @ihλiρ @kρ, @ihλik

(hλi) ¬@ihλiρ, @ihλil

¬@lρ ( ¬hλi ) kis fresh, ρ 6∈ Nom l ∈ N om @ii (R) @ij, @iρ @jρ (N1) i ∈ N om ρ ∈ SenI(Σ) ∪ N om @ik, @ihλij @khλij (N2) j ∈ N om

(23)

@0(@i¬(p ∧ ¬q) ∧ @ip ∧ ¬@iq)

@0@i¬(p ∧ ¬q), @0@ip, @0¬@iq (∧)

@i¬(p ∧ ¬q), @ip, ¬@0@iq (@, ¬)

@i(¬(p ∧ ¬q) ∧ p), ¬@iq (∧ ↓, ¬@)

@i(¬(p ∧ ¬q) ∧ p ∧ ¬q) (¬ ↓, ∧ ↓)

Now, as dened above, the tableau resorts to a prover of the base logic (that corresponds to PrfI) to check the satisability of sentence ¬(p∧¬q)∧p∧¬q.

For example, the tableau system of propositional logic, driven by the rules, p ∧ q p, q (∧) ¬¬p p (¬¬) ¬(p ∧ q) ¬p | ¬q (¬∧) leads to ¬(p ∧ ¬q) ∧ p ∧ ¬q ¬(p ∧ ¬q), p, ¬q (∧) ¬p, p, ¬q q, p, ¬q (¬∧) × ×

Therefore, the test fails, the branch closes, and the unsatisability of the input is disclosed. This means that sentence @i(p → q) → @ip → @iq is

indeed valid.

N 4.2. Soundness and completeness

This section shows that any tableau system generated as explained above, is sound and complete whenever the corresponding proof system for the base logic is as well.

To prove that a tableau system is sound, it usually suces to show that each rule preserves satisability.

Theorem 6. (Soundness) Given an institution I with a sound proof system PrfI, the tableau system THI is sound; i.e., given any signature (∆, Σ) ∈ |SignHI|, and sentence ρ ∈ SenHI(∆, Σ), ρ being satisable entails that any

(24)

Proof. Let us start by showing that rules (∧ ↓), (¬ ↓) preserve satisability. For any signature (∆, Σ) ∈ |SignHI|, model M ∈ |ModHI(∆, Σ)| and base

sentences ψ1, ψ2∈ SenI(Σ), M |=w @iψ1 and M |=w @iψ2 ≡ { Denition of |=H } M |=Mi ψ 1 and M |=Mi ψ2 ≡ { Denition |=H } m(Mi) |= ψ1 and m(Mi) |= ψ2 ≡ { Denition |=I } m(Mi) |= ψ1∧ ψ2 ≡ { Denition |=H } M |=Mi ψ 1∧ ψ2 ≡ { Denition |=H } M |=w @i(ψ1∧ ψ2) For rule (¬ ↓), M |=w¬@iψ1 ≡ {Denition of |=H } M 6|=w@iψ1 ≡ { Denition of |=H } M 6|=Mi ψ 1 ≡ { Denition |=H } m(Mi) 6|= ψ1 ≡ { Denition |=I } m(Mi) |= ¬ψ1 ≡ { Denition |=H } M |=Mi ¬ψ 1 ≡ { Denition |=H }

(25)

M |=w@i¬ψ1

The remaining cases are proved in a similar way. Then, to nish the proof, note that PrfI is sound and therefore the test that regards satisability

of base sentences only closes branches with contradictions; more concretely, branches with some unsatisable sentence of the type @iψwhere ψ ∈ SenI(Σ).

We now consider completeness.

Theorem 7. Consider an institution I with a complete proof system PrfI

and the explicit satisfaction property. Then, the tableau system THI is

complete, i.e., given any signature (∆, Σ) ∈ |SignHI|, and sentence ρ ∈

SenHI(∆, Σ), if some branch saturates for ρ, then ρ is satisable.

Proof. Suppose that some branch saturates for ρ. Then, we are able to build model (W, R, m) ∈ |ModHI(∆, Σ)|, as follows

• W = (N / ∼), where N denotes the set of nominals that occur in the branch, and ∼ is the equivalence relation generated by the sentences in the branch of the type @ij. Note that rules (R) and (N1) guarantee

that ∼ is an equivalence relation.

• for any n ∈ Nom, Mn = [n], where [n] denotes the equivalence class

of n.

• for any λ ∈ Λ, w, v ∈ W , (w, v) ∈ Rλ i there is some nominal n ∈ N omsuch that n ∼ v and sentence @whλin occurs in the branch.

• for any w ∈ W , m(w) is a model of |ModI(Σ)| for a sentence χ ∈

SenI(Σ) where @

wχ is a sentence that occurs in the branch's leaf

(PrfI is complete and I has the explicit satisfaction property). If no

such sentence exists, m(w) is a model for >.

It remains to show that there is some w ∈ W such that (W, R, m) |=w ρ. We

prove this by showing that the following statements are true • if @iϕoccurs in the branch then M |=w @iϕ.

• if ¬@iϕoccurs in the branch then M 6|=w @iϕ.

for any sentence ϕ ∈ SenHI(∆, Σ). This is done by induction on the

(26)

• @ij

@ij occurs in the branch

⇒ { Denition of ∼ } i ∼ j ⇒ {Denition of M } Mi = Mj ⇒ {Denition of |=H } M |=w @ij • ¬@ij

¬@ij occurs in the branch ⇒ { Denition of ∼ } i 6∼ j ⇒ { Denition of M } Mi6= Mj ⇒ { Denition of |=H } M 6|=w@ij ⇒ { Denition of |=H } M |=w¬@ij • @iψ

@iψoccurs in the branch

⇒ { Application of rule (∧ ↓) }

ψis a clause of some sentence @iχ in the branch's leaf where

χ ∈ SenI(Σ)

⇒ { Application of rule (N1), denition of M (Mi= [i]) }

M (Mi) |= ψ

⇒ { Denition of |=H }

(27)

• ¬@iψ

¬@iψoccurs in the branch ⇒ { Application of rule (¬ ↓) }

¬ψ is a clause of some sentence @iχin the branch's leaf where χ ∈ SenI(Σ)

⇒ { Application of rule (N1), denition of M (Mi= [i]) }

M (Mi) |= ¬ψ ⇒ { Denition of |=I } M (Mi) 6|= ψ ⇒ { Denition of |=H } M 6|= @iψ ⇒ { Denition of |=H } M |=w¬@iψ • @ihλiρ

@ihλiρoccurs in the branch

⇒ { Application of rule (hλi) }

@kρ, @ihλikoccur in the branch

⇒ { Induction hypothesis }

M |=w@kρ and @ihλik occurs in the branch

⇒ { Application of rule (N2), denition of M }

M |=w@kρ and (Mi, Mk) ∈ Rλ ⇒ { Denition of |=H } M |=Mi hλiρ ⇒ { Denition of |=H } M |=w@ihλiρ • ¬@ihλiρ

(28)

⇒ { Denition of M and rule ¬hλi }

for any v ∈ W such that (Mi, v) ∈ Rλ, ¬@vρ

⇒ { Induction hypothesis }

for any v ∈ W such that (Mi, v) ∈ Rλ, M |=w ¬@vρ

⇒ { Denition of |=H }

for any v ∈ W such that (Mi, v) ∈ Rλ, M 6|=v ρ

⇒ { Duality between existential and universal quantication }

there is no v ∈ W such that (Mi, v) ∈ Rλ and M |=v ρ

⇒ { Denition of |=H } M 6|=Mi hλiρ ⇒ { Denition of |=H } M 6|= @ihλiρ ⇒ { Denition of |=H } M |= ¬@ihλiρ

The remaining cases are straightforward.

4.3. An illustration in HAlloy  the recongurable buers

Increasingly popular both in industry and academia, Alloy [36] is a lightweight model nder for software design whose language is based on single sorted relational logic extended with a transitive closure operator  hence its motto: everything is a relation. Adding to this, Alloy has the ability to automatically validate specications with respect to bounded domains, and, moreover, to graphically depict counter-examples of awed assertions.

In order be able to hybridise Alloy specications, to capture recong-urable systems, but also, in a wider perspective, to `connect' it to a vast network of logics and provers [45]  Neves et al [48, 47] introduced an insti-tution for Alloy along with suitable translations to (variants of) rst-order and second-order logics. This makes possible not only to hybridise Alloy but also to verify the corresponding specications in powerful provers such as SPASS [59] and LEO-II [8].

Here, however, our focus is the development of dedicated tool support for HAlloy, based on the tableau generation method. Thus, this section illustrates the potentialities of the method through an example of THAlloy

(29)

Figure 3: Several instances of a list in Alloy

at work. The case study concerns the specication of a recongurable buer, addressed in documents [22, 41] through hybridised partial logic.

Consider a buer that stores and pops out client requests. In general, the store and pop operations follow the FIFO strategy. However, when client requests increase, the buer adapts by starting to behave as a LIFO system. A question that is typically asked in this context is the following: once known the expected behaviour for its dierent settings, is it possible to discern the current execution mode? To answer this question, we start by dening in Alloy the notion of a buer as a list, i.e., a set List equipped with the following relations

head : List → Elem tail : List → List

where for each l ∈ List, its head and tail (l · head, l · tail) have at most cardinality one. Recall that operator · denotes relation composition. Then, it is necessary to force exactly one empty list to exist, and any other to have its head and tail well-dened.

one l : List | l · head ⊆ ∅ one l : List | l · tail ⊆ ∅

one l : List | l · head ⊆ ∅ and l · tail ⊆ ∅

At this stage, Alloy can already provide several instances of a list. For example, Figure 3 depicts lists: List0 = [], List1 = [b], List2 = [a], List3 = [b, a]and List4 = [a, a, a, . . . ] where Elem0 = a and Elem1 = b.

The next step is to dene the pop relation pop : List → List

(30)

Figure 4: Examples of pop in action at state FIFO.

and the possible execution modes. In particular, we state that the system has only two possible execution modes

FIFO ≡ ¬LIFO

and dene the behaviour of pop at FIFO and LIFO as @FIFO

all l : List | ¬ l · tail = empty →

(l · pop ) · head = l · head and (l · pop ) · tail = (l · tail ) · pop

all l : List | l · tail = empty → l · pop = empty

@LIFO

all l : List | ¬ l = empty → l · pop = l · tail

all l : List | l = empty → l · pop = empty

Let us denote the axiomatics of pop at FIFO by @FIFOψ1 and at LIFO by

@LIFOψ2. Alloy can also show the behaviour of pop at FIFO or at LIFO;

Figure 4 shows the behaviour of pop at FIFO with the lists mentioned above: pop([]) = [], pop = ([b]) = [], pop([a]) = [], pop([b, a]) = [b]and pop([a, a, a, . . . ]) = [a, a, a, . . . ].

We are now ready to answer our original question. Clearly, in models with just the empty list, singleton lists and lists with only element repetition, it is impossible to observe and distinguish the current execution mode. Indeed,

(31)

in these cases pop at FIFO behaves as pop at LIFO. But what happens in the case of a list whose rst element is dierent from the second? Formally,

φ1≡ some l : List | ¬ (l · tail ) · head = l · head and

¬ (l · tail ) = empty

It turns out that, when such a condition is true, for any Alloy model with no more than four elements and fty lists it is possible to distinguish the current execution mode with the test

φ2≡ all l : List | ¬ l = empty → l · pop = l · tail Indeed, as tableau THAlloyproves the validity of the sentence below, it also

proves that the proposition holds.

((FIFO ∨ LIFO) ∧ @FIFOψ1∧ @LIFOψ2∧ φ1) → (φ2→ LIFO)

≡ ((FIFO ∨ LIFO) ∧ @FIFOψ1∧ @LIFOψ2∧ φ1∧ φ2) → LIFO

≡ ¬((FIFO ∨ LIFO) ∧ @FIFOψ1∧ @LIFOψ2∧ φ1∧ φ2∧ ¬LIFO)

≡ ¬(¬(¬FIFO ∧ ¬LIFO) ∧ @FIFOψ1∧ @LIFOψ2∧ φ1∧ φ2∧ ¬LIFO)

Its negation, ¬(¬FIFO ∧ ¬LIFO) ∧ @FIFOψ1∧ @LIFOψ2∧ φ1∧ φ2∧ ¬LIFO, is

fed to the tableau which calculates

@0(¬(¬FIFO ∧ ¬LIFO) ∧ @FIFOψ1∧ @LIFOψ2∧ φ1∧ φ2∧ ¬LIFO)

@0¬(¬FIFO ∧ ¬LIFO), @FIFOψ1, @LIFOψ2, @0φ1, @0φ2, @0¬LIFO (∧, @)

@0¬(¬FIFO ∧ ¬LIFO), @FIFOψ1, @LIFOψ2, @0φ1, @0φ2, ¬@0LIFO (¬)

@0¬(¬FIFO ∧ ¬LIFO), @FIFOψ1, @LIFOψ2, @0(φ1∧ φ2), ¬@0LIFO (∧ ↓)

Then,

@0FIFO @0LIFO, ¬@0LIFO (¬∧)

@FIFOψ1, @FIFO(φ1∧ φ2) × (N1)

@FIFO(ψ1∧ φ1∧ φ2) × (∧ ↓)

× × No model for ψ1∧ φ1∧ φ2.

Alloy cannot nd a model up to four elements and fty lists for ψ1∧ φ1∧

φ2, which means that, whenever no base model exceeds these domains, our

(32)

5. Conclusions and future work

Despite the major advantages of working in a single logical setting, current software complexity often forces the engineer to use multiple log-ics in the specication of a single software system. Hence, it comes as no surprise the emergence of several mechanisms for combining logics (e.g. [26, 29, 5, 15, 51]). From a computer science point of view, the programme is even broader because, as Goguen and Meseguer wrote in [33],

The right way to combine various programming paradigms is to discover their underlying logics, combine them, and then base a language upon the

combined logic.

Indeed, the hybridisation method can be more broadly understood as a specic way of combining logics at model theoretical level. Actually, it classies as a tool for simplifying problems involving heterogeneous reason-ing [16], a common reason-ingredient to this family of methods accordreason-ing to the corresponding entry in the Stanford Encyclopedia of Philosophy.

Hybridisation is, thus, an asymmetric combination of logics in the sense that specic features of hybrid logic are developed `on top' of another logic. As mentioned in the Introduction, this follows exactly the same steps, and to a certain extent extends, previous work by R. Diaconescu and P. Ste-faneas [26] on `modalisation' of institutions, which endows systematically institutions with Kripke semantics for standard modalities. R. Fajardo and M. Finger introduced in [27] an alternative method to modalise logics, and proved preservation of both completeness and decidability of the source log-ics. Other examples, in a similar research line, include the `temporalisation' of logics introduced by M. Finger and D. Gabbay in [29] and the more re-cent `probabilisation' of logics introduced by P. Baltazar in [5]. The work of A. Costa Leite on what he calls paraconsistentization of logics [20] goes in a similar direction investigating how the paraconsistent counterpart of an arbitrary logic can be obtained.

This sort of approaches were generalised by C. Caleiro, A. Sernadas and C. Sernadas in [15], in a method called parameterization. In brief, a logic is parametrized by another one if the atomic part of the former is replaced by the latter. The recent method of importing logics suggested by J. Rasga, A. Sernadas and C. Sernadas [52] aims at formalising this kind of asymmetric combinations resorting to a graph-theoretic approach.

From a wider perspective, combination of logics is increasingly recognised as a relevant research domain, driven not only by philosophical enquiry on the

(33)

nature of logics or strict mathematical questions, but also from applications in computer science and articial intelligence. The rst methods appeared in the context of modal logics. This includes fusion of the underlying languages [58], pioneered by M. Fitting, in a 1969 paper combining alethic and deontic modalities [30], and product of logics [55]. Both approaches can be charac-terised as symmetric. Product, for example, amounts to pairing the Kripke semantics, i.e., the accessibility relations, of both logics. With a wider scope of application, i.e. beyond modal logics, bring [31] was originally proposed by D. Gabbay, and contains fusion as a particular case. From a syntactic point of view the language of the resulting logic is freely generated from the signatures of the combined logics, symbols from both of them appearing intertwined in an arbitrary way.

Reference [14] oers an excellent roadmap for the several variants of b-ring in the literature. A particularly relevant evolution was the work of A. Sernadas and his collaborators resorting to universal constructions from category theory to characterise dierent patterns of connective sharing, as documented in [56]. In the simplest case, where no constraint is imposed by sharing, bring is the least extension of both logics over the coproduct of their signatures, which basically amounts to a coproduct of logics. This approach, usually referred to as algebraic bring, makes heavy use of catego-rial constructions as a source of genericity to provide more general and wide applicable methods.

The use of the theory of institutions [12] as a foundation for hybridis-ation, as described in this paper, or for modalisation in [26], has a similar motivation: going categorial is going generic. Actually, a proper setting to discuss the generation of new logics form old, and to identify the sort of prop-erties preserved or reected along such a process, always requires a generic denition of what a logic and a logic system is.

Serving as a framework for the specication of recongurable systems, the hybridisation method has been extended to include equivalence and rene-ment [39], initial semantics [21], and, on the verication side, suitable trans-lations to rst-order logic [42, 22]. Recently, hybridisation was implemented [49] in the HETS platform [45]. However, contrary to what happened, for example with temporalisation [29] and probabilisation [5], the proof theory for hybrid(ised) logics was only recently discussed in reference [50]. The very particular case of equational hybrid logic was addressed in [6].

Document [50] gave the rst step in this line of research by showing how an Hilbert calculus for the hybridised version of a logic can be systematically generated from a calculus for the latter. The current paper goes one step beyond by simplifying the previous method, and providing a similar process

(34)

for generating tableau systems. Such developments form a sound basis for a complete proof theory, which, from a pragmatic point of view, paves the way to dedicated proof support for a broad spectrum of hybrid(ised) logics. Actually, the next natural step in this direction is to `extract' the algo-rithms developed in this paper and implement them in the HETS platform where provers of dierent logics can communicate with each other (and con-sequently where hybridisation's potentialities are maximised). Then, a com-parison with the strategy of using the parametrised translation to rst-order logic will be in order.

The completeness results that this paper reports rely on the assumption that the base institution has the explicit satisfaction property. Although prevalent for the logics used in software specication, such a property does not hold in hybridised logics. It can, however, be regained by relaxing the satisfaction denition into

M |=HI(∆,Σ) ρ i M |=w ρ, for some w ∈ W

where M is the typical model of an hybridised logic and ρ a compatible sen-tence. This means that in a multiple hybridisation scenario [40], soundness and completeness of the corresponding calculi, as well as decidability, can still be obtained.

Complexity issues of the hybridised logics, although out of the scope of this paper, cannot be ignored if this work is to be taken as a basis for the construction of a computational proof tool. In this context the techniques proposed in [17, 18], which underly the Sibyl prover, should be explored. Acknowledgements. The authors are grateful to Torben Bräuner for help-ful, inspiring discussions, and to the anonymous referees for their detailed comments.

This work is funded by ERDF - European Regional Development Fund, through the COMPETE Programme, and by National Funds through Fundação para a Ciência e Tecnologia (FCT) within project PTDC/EEI-CTP/4836/2014. Moreover, the rst and the second authors are sponsored by FCT grants SFRH/BD/52234/2013 and SFRH/BPD/103004/2014, respectively. M. Martins is also supported by the EU FP7 Marie Curie PIRSES-GA-2012-318986 project GeTFun: Generalizing Truth-Functionality and FCT project UID/MAT/04106/2013 through CIDMA. L. Bar-bosa is further supported by FCT in the context of SFRH/BSAB/113890/2015.

[1] J. Agustí-Cullell, F. Esteva, P. Garcia, and Ll Godo. Formalizing multiple-valued logics as institutions. In Bernadette Bouchon-Meunier,

(35)

RonaldR. Yager, and LotA. Zadeh, editors, Uncertainty in Knowledge Bases, volume 521 of Lecture Notes in Computer Science, pages 269 278. Springer Berlin Heidelberg, 1991.

[2] C. Areces and B. ten Cate. Hybrid logics. In P. Blackburn, F. Wolter, and J. van Benthem, editors, Handbook of Modal Logics. Elsevier, 2006. [3] Carlos Areces, Raul Fervari, and Guillaume Homann. Swap logic.

Logic Journal of the IGPL, 22(2):309332, 2014.

[4] Carlos Areces, Raul Fervari, and Guillaume Homann. Relation-changing modal operators. Logic Journal of the IGPL, 23(4):601627, 2015.

[5] Pedro Baltazar. Probabilization of logics: Completeness and decidabil-ity. Logica Universalis, 7(4):403440, 2013.

[6] Luís Soares Barbosa, Manuel A. Martins, and Marta Carreteiro. A Hilbert-style axiomatisation for equational hybrid logic. Journal of Logic, Language and Information, 23(1):3152, 2014.

[7] Christoph Beierle and Gabriele Kern-Isberner. Looking at probabilistic conditionals from an institutional point of view. In G. Kern-Isberner, W. Rödder, and F. Kulmann, editors, Conditionals, Information, and Inference (Revised Selected Papers of WCII 2002, Hagen, Germany, May 13-15, 2002), volume 3301 of Lecture Notes in Computer Science, pages 162179. Springer, 2005.

[8] Christoph Benzmüller, Frank Theiss, Larry Paulson, and Arnaud Fiet-zke. LEO-II - a cooperative automatic theorem prover for higher-order logic. In Alessandro Armando, Peter Baumgartner, and Gilles Dowek, editors, Automated Reasoning (IJCAR 2008, Sydney, Australia, August 12-15, 2008), volume 5195 of LNCS, pages 162170. Springer, 2008. [9] Michel Bidoit and Rolf Hennicker. Constructor-based observational

logic. Journal of Logic and Algebraic Programming, 67(1-2):351, 2006. [10] T Braüner. Proof-Theory of Propositional Hybrid Logic. Hybrid Logic

and its Proof-Theory, 2011.

[11] Rod Burstall and R zvan Diaconescu. Hiding and behaviour: an insti-tutional approach. In William Roscoe, editor, A Classical Mind: Essays in Honour of C.A.R. Hoare, pages 7592. Prentice-Hall, 1994.

(36)

[12] Rod M. Burstall and Joseph A. Goguen. The semantics of CLEAR, a specication language. In D. Bjørner, editor, Abstract Software Spec-ications (1979 Copenhagen Winter School, January 22 - February 2, 1979), volume 86 of Lecture Notes in Computer Science, pages 292332. Springer, 1980.

[13] Carlos Caleiro, Paulo Mateus, Amílcar Sernadas, and Cristina Ser-nadas. Quantum institutions. In K. Futatsugi, J.-P. Jouannaud, and J. Meseguer, editors, Algebra, Meaning, and Computation, Essays Dedi-cated to Joseph A. Goguen on the Occasion of His 65th Birthday, volume 4060 of Lecture Notes in Computer Science, pages 5064. Springer, 2006. [14] Carlos Caleiro, Amílcar Sernadas, and Cristina Sernadas. Fibring logics: Past, present and future. In Sergei N. Artëmov, Howard Barringer, Artur S. d'Avila Garcez, Luís C. Lamb, and John Woods, editors, We Will Show Them! Essays in Honour of Dov Gabbay, Volume One, pages 363388. College Publications, 2005.

[15] Carlos Caleiro, Cristina Sernadas, and Amílcar Sernadas. Parameter-isation of logics. In José Luiz Fiadeiro, editor, Recent Trends in Al-gebraic Development Techniques (WADT '98, Lisbon, Portugal, April 2-4, 1998) Selected Papers, volume 1589 of Lecture Notes in Computer Science, pages 4862. Springer, 1998.

[16] Walter Carnielli and Marcelo Esteban Coniglio. Combining logics. In Edward N. Zalta, editor, The Stanford Encyclopedia of Philosophy. Win-ter 2011 edition, 2011.

[17] Serenella Cerrito and Marta Cialdea Mayer. An ecient approach to nominal equalities in hybrid logic tableaux. Journal of Applied Non-Classical Logics, 20(1-2):3961, 2010.

[18] Serenella Cerrito and Marta Cialdea Mayer. A tableau based deci-sion procedure for an expressive fragment of hybrid logic with binders, converse and global modalities. Journal of Automated Reasoning, 51(2):197239, 2013.

[19] Corina Cîrstea. An institution of modal logics for coalgebras. J. Log. Algebr. Program., 67(1-2):87113, 2006.

[20] Alexandre Costa-Leite. Interactions of metaphysical and epistemic con-cepts. PhD thesis, Universite de Neuchatel, Switzerland, 2007.

(37)

[21] Razvan Diaconescu. Quasi-varieties and initial semantics for hybridized institutions. Journal of Logic and Computation, 2013.

[22] Razvan Diaconescu and Alexandre Madeira. Encoding hybridized in-stitutions into rst-order logic. Mathematical Structures in Computer Science, FirstView:144, 4 2015.

[23] R zvan Diaconescu. Institution-independent Model Theory. Birkhäuser Basel, 2008.

[24] R zvan Diaconescu. Quasi-boolean encodings and conditionals in al-gebraic specication. Journal of Logic and Alal-gebraic Programming, 79(2):174188, 2010.

[25] R zvan Diaconescu. Institutional semantics for many-valued logics. Fuzzy Sets and Systems, 218:3252, May 2013.

[26] R zvan Diaconescu and Petros Stefaneas. Ultraproducts and possible worlds semantics in institutions. Theoretical Computer Science, 379(1-2):210230, July 2007.

[27] Rogerio Fajardo and Marcelo Finger. Non-normal modalisation. In Philippe Balbiani, Nobu-Yuki Suzuki, Frank Wolter, and Michael Za-kharyaschev, editors, Advances in Modal Logic 4, papers from the fourth conference on Advances in Modal logic, held in Toulouse, France in Oc-tober 2002, pages 8396. King's College Publications, 2002.

[28] José Fiadeiro and Amílcar Sernadas. Structuring theories on conse-quence. In D. Sannella and A. Tarlecki, editors, Recent Trends in Data Type Specication, volume 332 of Lecture Notes in Computer Science, pages 4472. Springer Berlin Heidelberg, 1988.

[29] Marcelo Finger and Dov Gabbay. Adding a temporal dimension to a logic system. Journal of Logic, Language and Information, 1(3):203 233, 1992.

[30] M. Fitting. Logics with several modal operators. Theoria, 35(3):259 266, 1969.

[31] D Gabbay. Fibred semantics and the weaving of logics: Part 1. Journal of Symbolic Logic, 61(4):10571120, 1996.

[32] Joseph A. Goguen and Rod M. Burstall. Institutions: abstract model theory for specication and programming. Journal ACM, 39:95146, January 1992.

(38)

[33] Joseph A. Goguen and José Meseguer. Models and equality for logical programming. In Hartmut Ehrig, Robert Kowalski, Giorgio Levi, and Ugo Montanari, editors, Theory and Practice of Software Development (TAPSOFT'87, Pisa, Italy, March 23-27, 1987), volume 250 of Lecture Notes in Computer Science, pages 122. Springer Berlin Heidelberg, 1987.

[34] Rajeev Goré. Tableau methods for modal and temporal logics. In Mar-cello D'Agostino, DovM. Gabbay, Reiner Hähnle, and Joachim Posegga, editors, Handbook of Tableau Methods, pages 297396. Springer Nether-lands, 1999.

[35] Guillaume Homann and Carlos Areces. Htab: a terminating tableaux system for hybrid logic. Electronic Notes in Theoretical Computer Sci-ence, 231:319, 2009.

[36] Daniel Jackson. Software Abstractions: Logic, Language, and Analysis. The MIT Press, 2006.

[37] Alexandre Madeira. Foundations and techniques for software recong-urability (An institution-independent approach to specifying and reason-ing about recongurable systems). PhD thesis, Minho, Aveiro and Porto Universities (MAP-i Doctoral Programme), July 2013.

[38] Alexandre Madeira, José M. Faria, Manuel A. Martins, and Luís Soares Barbosa. Hybrid specication of reactive systems: An institutional ap-proach. In G. Barthe, A. Pardo, and G. Schneider, editors, Software Engineering and Formal Methods (SEFM 2011, Montevideo, Uruguay, November 14-18, 2011), volume 7041 of Lecture Notes in Computer Sci-ence, pages 269285. Springer, 2011.

[39] Alexandre Madeira, Manuel Martins, Luis Barbosa, and Rolf Hennicker. Renement in hybridised institutions. Formal Aspects of Computing, 27(2):375395, 2015.

[40] Alexandre Madeira, Renato Neves, Manuel Martins, and Luis Barbosa. Introducing hierarchical hybrid logic. In Short papers presented at Ad-vances in Modal Logic 2014, pages 74  78, 2014.

[41] Alexandre Madeira, Renato Neves, Manuel A. Martins, and Luís S. Bar-bosa. When even the interface evolves... In Hai Wang and Richard Ba-nach, editors, Theoretical Aspects of Software Engineering (TASE 2013, Birmingham, UK, 1-3 July, 2013), pages 7982. IEEE Press, 2013.

(39)

[42] Manuel A. Martins, Alexandre Madeira, R zvan Diaconescu, and Luís Soares Barbosa. Hybridization of institutions. In A. Corradini, B. Klin, and C. Cîrstea, editors, Algebra and Coalgebra in Computer Science (CALCO 2011, Winchester, UK, August 30 - September 2, 2011), volume 6859 of Lecture Notes in Computer Science, pages 283 297. Springer, 2011.

[43] Manuel A. Martins and Don Pigozzi. Behavioural reasoning for con-ditional equations. Mathematical Structures in Computer Science, 17(5):10751113, 2007.

[44] Till Mossakowski, Anne Haxthausen, Donald Sannella, and Andrzej Tarlecki. CASL: The common algebraic specication language: Seman-tics and proof theory. Computing and InformaSeman-tics, 22:285321, 2003. [45] Till Mossakowski, Christian Maeder, and Klaus Lüttich. The

heteroge-neous tool set, Hets. In O. Grumberg and M. Huth, editors, Tools and Algorithms for the Construction and Analysis of Systems (TACAS 2007 - Braga, Portugal, March 24 - April 1, 2007), volume 4424 of Lecture Notes in Computer Science, pages 519522. Springer, 2007.

[46] Till Mossakowski and Markus Roggenbach. Structured CSP - a pro-cess algebra as an institution. In J. L. Fiadeiro and P.-Y. Schobbens, editors, Recent Trends in Algebraic Development Techniques (Revised Selected Papers of WADT 2006, La Roche en Ardenne, Belgium, June 1-3, 2006), volume 4409 of Lecture Notes in Computer Science, pages 92110. Springer, 2006.

[47] Renato Neves, Alexandre Madeira, Manuel Martins, and Luís Barbosa. An institution for alloy and its translation to second-order logic. In Thouraya Bouabana-Tebibel and Stuart H. Rubin, editors, Integration of Reusable Systems (extended versions of the best papers which were presented at IEEE International Conference on Information Reuse and Integration and IEEE International Workshop on Formal Methods In-tegration, San Francisco, CA, USA, August 2013), volume 263 of Ad-vances in Intelligent Systems and Computing, pages 4575. Springer, 2014.

[48] Renato Neves, Alexandre Madeira, Manuel A. Martins, and Luís S. Barbosa. Giving alloy a family. In Chengcui Zhang, James Joshi, Elisa Bertino, and Bhavani Thuraisingham, editors, Proceedings of 14th IEEE

(40)

International conference on information reuse and integration, pages 512519. IEEE Press, 2013.

[49] Renato Neves, Alexandre Madeira, Manuel A. Martins, and Luís S. Barbosa. Hybridisation at work. In Reiko Heckel and Stefan Milius, editors, Algebra and Coalgebra in Computer Science (CALCO 2013, Warsaw, Poland, September 3-6, 2013), volume 8089 of Lecture Notes in Computer Science, pages 340345. Springer, 2013.

[50] Renato Neves, Manuel A. Martins, and Luís Soares Barbosa. Complete-ness and decidability results for hybrid(ised) logics. In C. Braga and N. Martí-Oliet, editors, Formal Methods: Foundations and Applications (SBMF 2014, Maceió, AL, Brazil, September 29-October 1, 2014), vol-ume 8941 of Lecture Notes in Computer Science, pages 146161, 2015. [51] J. Rasga, A. Sernadas, and C. Sernadas. Importing logics: Soundness

and completeness preservation. Studia Logica, 101(1):117155, 2013. [52] João Rasga, Amílcar Sernadas, and Cristina Sernadas. Importing logics.

Studia Logica, 100(3):545581, 2012.

[53] Donald Sannella and Andrzej Tarlecki. Foundations of Algebraic Spec-ication and Formal Software Development. EATCS Monographs on theoretical computer science. Springer, 2012.

[54] Lutz Schröder and Till Mossakowski. HasCasl: Integrated higher-order specication and program development. Theoretical Computer Science, 410(12-13):12171260, 2009.

[55] K Segerberg. Two-dimensional modal logic. Journal of Philosophical Logic, 2(1):7796, 1973.

[56] Amílcar Sernadas, Cristina Sernadas, and Carlos Caleiro. Fibring of logics as a categorial construction. Journal of Logic and Computation, 9(2):149179, 1999.

[57] Robert Szepesia and Horia Ciocârlie. An overview on software recongu-ration. Theory and Applications of Mathematics and Computer Science, 1:7479, 2011.

[58] R. H. Thomason. Combinations of tense and modality. In D. Gabbay and F. Guenthner, editors, Handbook of Philosophical Logic: Volume II: Extensions of Classical Logic, pages 135165. Springer Netherlands, 1984.

(41)

[59] Christoph Weidenbach, Dilyana Dimova, Arnaud Fietzke, Rohit Kumar, Martin Suda, and Patrick Wischnewski. SPASS version 3.5. In Re-nate A. Schmidt, editor, Automated Deduction (CADE-22  Montreal, Canada, August 2-7, 2009), volume 5663 of Lecture Notes in Articial Intelligence, pages 140145. Springer, 2009.

Referências

Documentos relacionados

A partir dos resultados apresentados nesta revisão de literatura, podemos sugerir que as pesquisas relativas aos efeitos do Método Pilates na flexibilidade e postura de

Conforme debatido anteriormente nos capítulos teóricos deste trabalho, com o avanço das TIC, sobretudo após a ascensão da web 2.0, uma infinidade de ferramentas

Os objetivos específicos são divididos em cinco, sendo: estudar os conceitos de cultura da convergência, da conexão e do audiovisual e sua relação com o objeto de estudo;

Foi com certeza a época que ouve novas manifestações e com isso, os estudantes, as organizações da população foi ganhando mais espaço, foram cada vez mais lutando pelos seus

Com este mini plano de marketing, pretende-se reorganizar a estratégia global da empresa, definindo algumas linhas orientadoras que possam servir de base, para

Ousasse apontar algumas hipóteses para a solução desse problema público a partir do exposto dos autores usados como base para fundamentação teórica, da análise dos dados

A infestação da praga foi medida mediante a contagem de castanhas com orificio de saída do adulto, aberto pela larva no final do seu desenvolvimento, na parte distal da castanha,