• No results found

Developing a model checker for inquisitive logic

N/A
N/A
Protected

Academic year: 2021

Share "Developing a model checker for inquisitive logic"

Copied!
47
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

Developing a model checker

for Inquisitive Logic

(2)

Layout: typeset by the author using L

A

TEX.

(3)

Developing a model checker

for Inquisitive Logic

Korijn Moor

11902701

Bachelor thesis

Credits: 18 EC

Bachelor Kunstmatige Intelligentie

University of Amsterdam

Faculty of Science

Science Park 904

1098 XH Amsterdam

Supervisor

Dr. G. Grilletti

Dr. T. van Gessel

Institute for Logic, Language and Computation

Faculty of Science

University of Amsterdam

Science Park 907

1098 XG Amsterdam

(4)

Abstract

The inquisitive logic framework provides formal ways of representing questions and issues in a similar way as statements and facts (Ciardelli, 2009, 2016). With these formal ways of repre-senting questions, the inquisitive logic framework is able to describe and model the relationship between questions. This is something that classical logic frameworks are unable to do. This framework is abstract and mathematical. It lacks real world applications.

This thesis proposes a first step into the direction of a real world application for inquisitive logic. More specifically this paper develops a model checker for formulae and relationships for a propositional inquisitive logic language. We propose two distinct approaches for checking formulae and relationships, based on two different ways of representing the semantics of the inquisitive logic language.

(5)

Contents

1 Introduction 4 2 Inquisitive Logic 5 2.1 Basic Notions . . . 5 2.1.1 Information states . . . 5 2.1.2 Issues . . . 7 2.1.3 Propositions . . . 8 2.1.4 Contexts . . . 11 2.2 Model Structure . . . 13

2.3 Inquisitive Logic Language . . . 14

2.3.1 Syntax . . . 14

2.3.2 Semantics . . . 15

3 Model Checking Problem 17 3.1 Objects . . . 17 3.2 Relationships . . . 18 3.2.1 Support . . . 18 3.2.2 Entailment . . . 18 4 Data-structures 19 4.1 Meta-language . . . 21 4.2 Sy-DS . . . 22 4.3 Model . . . 22 4.3.1 Information states . . . 23

4.3.2 Inquisitive logic model . . . 23

4.3.3 Context . . . 23 4.4 Result . . . 23 4.4.1 Relationship connectives . . . 24 4.4.2 Issue-equivalent objects . . . 24 4.4.3 Information states . . . 24 5 Model Checker 25 5.1 Pseudo-code conventions . . . 26 5.1.1 Common Objects . . . 26 5.1.2 Common Functions . . . 27 5.2 Syntactic analysis . . . 27 5.2.1 Grammar . . . 28 5.2.2 Parser . . . 28

5.3 Standard semantic analysis . . . 29

5.4 Alternative semantic analysis . . . 33

6 Conclusion and Discussion 39 6.1 Conclusion . . . 39

6.2 Discussion . . . 39

References 41

(6)

A Source code and User Manual 42

A.1 Main helper functions . . . 42

A.2 Main model creation functions . . . 42

A.2.1 Worlds and propositions . . . 42

A.2.2 Information States . . . 42

A.2.3 Contexts . . . 43

A.2.4 Evaluation . . . 43

A.3 Language specification . . . 43

A.3.1 operators . . . 43

A.3.2 Context . . . 43

A.3.3 Information states . . . 43

A.3.4 Atomic Propositions . . . 43

(7)

1

Introduction

People commonly use patterns of questions and answers to exchange information in normal conversations. For example, the following two sentences might be uttered in a discussion about weather events:

1. What is the weather like today? 2. It is raining.

Sentence 1 is a question or broadly speaking an inquisitive sentence, it is a request for information. In this case a request for information about the state of the weather. Sentence 2 is an answer in the form of a declarative sentence, it states (declares) a fact. Which, in this case is the fact that it is indeed raining. Notice how sentence 2 resolves the issue raised by sentence 1. In other words, sentence 2 provides the information necessary to determine an answer to the question stated by sentence 1. Whether or not this answer is correct is a different matter. However, logically speaking both sentences have some kind of relationship with each-other (Ciardelli, Groenendijk, & Roelofsen, 2019).

Most forms of logic only consider statements, like sentence 2. Questions, like sentence 1, do not have explicit representation in most logic frameworks (Ciardelli, 2009, 2016). Inquisitive logic is a logic framework that does include ways of representing questions in a formal manner. It provides mathematical grounds on which inquisitive sentences can be modelled in a similar way as declarative sentences. As a result, the relationships between those two types of sentences can be explored using the inquisitive logic framework, as well as the interaction between different questions. This allows for greater understanding and reasoning about the meaning of sentences. And it rovides specific tools with which this reasoning can be achieved. Let us consider a different example:

1. What is the weather like today?

2. It is dry, slightly overcast and quite cold. 3. Is it raining?

Sentence 1 remains the same however the direct response (sentence 2) is different from the previous example. We have also added sentence 3, which is inquisitive. Let us consider sentence 1 and 3. They are both inquisitive and intuitively we can say that sentence 3 is more specific than sentence 1. This means that if we know the answer to the broader sentence (sentence 1) we can also determine the answer to the more specific sentence (sentence 3). This is exactly what happens when we look at the response (sentence 2) to sentence 1. Sentence 2 is a direct answer to sentence 1 however it also implicitly resolves sentence 3. We could say that having enough information to resolve sentence 1 would entail having enough information to resolve sentence 3. This relationship of entailment between questions is precisely the relationship left out of classical logic and implemented formally in inquisitive logic (Ciardelli, 2016; Ciardelli et al., 2019). It is especially these relationships, that is between inquisitive sentences like sentence 1 and 3, that does not normally have representations in other forms of logic.

Furthermore we might say that sentence 2 has a truth-value. It is either true or false de-pending on the actual weather. Statements in general can either be true or false dede-pending on the actual state of reality. However, it does not make any sense for a question to have a similar truth-value. Inquisitive logic therefore moves away from the classical notion of truth and instead uses the notion of support (Ciardelli, 2009). We can say that any question is supported if there is enough information available to determine its answer.

(8)

Still, this framework is abstract and mathematical. A next step would be to generate some real world application using this framework. One real-world application to start with is developing a model checker. There exists some research about formulating model checkers for classical forms of logic (Clarke, Emerson, & Sistla, 1986; Ebbing & Lohmann, 2011). Clarke et al. (1986) considers for example Temporal Logic Specifications and Ebbing and Lohmann (2011) focuses on dependence logic. This thesis proposes a start of similar investigations for inquisitive logic.

More specifically, what is meant by a model checker is a piece of software or (pseudo) code that can automatically and systematically verify whether some property holds on some representation of a model (Baier & Katoen, 2008). For the inquisitive logic framework this means that we would like to make a program that can represent formulae and their relationships from some inquisitive logic language and determine whether those relationships hold over some inquisitive logic model structure.

Research goal The goal of this thesis is to develop a model checker for inquisitive logic. This model checker should be able to, provided with a model, a formula and the support and entailment relationships of the inquisitive logic language, determine automatically whether that formula satisfy those relationships.

The outline of this thesis is as follows; we will start with laying out the specific concepts and definitions of the inquisitive logic framework that will be used for the model checker. This will be exposed in section 2. We will discuss how these mathematical principles translate to the specific model checking task we are going to solve in section 3. The specific concepts established need to be translated to data-structures to be used in the model checker. This will be explained in section 4. Following this will be the actual model checker itself in section 5. With finally a conclusion and a discussion with suggestions for further work in section 6.

2

Inquisitive Logic

This section provides a description of the inquisitive logic language (ILL) on which the model checker tool operates. First, the basic notions of the inquisitive logic framework as a whole will be introduced. Next, the relationships between these notions will be established. Lastly, a formal definition of the semantics of the ILL based on these notions and relations will be given. The notions and their relationships are based on the inquisitive logic framework described by Ciardelli et al. (2019).

2.1

Basic Notions

The inquisitive logic language is a logic system which enriches classical logic with a couple of more complex structures in order for it to represent questions. These structures are information states, issues, propositions and contexts (Ciardelli et al., 2019). Furthermore, the inquisitive logic language introduces the notion of support for inquisitive sentences in favour of truth. In this section these notions will be further explored and some intuition will be provided.

2.1.1 Information states

Information states are the most basic representation of a body of information in inquisitive logic (Ciardelli et al., 2019). Before we introduce information states we first need to introduce the concepts of worlds. A world represents a possible state of affairs. The set of all worlds is commonly denoted by W . Mathematically speaking, an information state is a set containing

(9)

worlds. The information embodied by this set is the information that is consistent with all the facts that are true in all worlds in the information state.

Definition 2.1 (Information States). An information state s is a set of worlds that represents a piece of information. Mathematically speaking s ⊆ W .

Information states represent information. However, not all information states represent equal amounts of information. If there are two information states we can figure out which information state contains the most information by examining the worlds that make up the information. Information states are sets of worlds, where we consider one of those worlds to be the ‘true’ world. When one information state is a subset of another it has fewer or equal worlds that it could consider to be the ‘true’ world. It then represents more information since we know that the worlds that lie outside this information state are definitively wrong. When an information state is a subset of another we call this an enhancement.

Definition 2.2 (Enhancement). If we have information states s and t, where t ⊆ s, then t is called an enhancement of s.

Example 2.1. Let us consider an example depicted in figure 2.1. Let us have two worlds w1

and w2 that make up the entire set of all worlds W ; mathematically: W = {w1, w2}. This is

depicted in figure 2.1(a). Let us have two information states s = {w1, w2} and t = {w1}. The

convention used throughout this thesis is to draw information states as blue boxes containing the worlds within them. We can see that information state s is depicted in figure 2.1(b) and information state t in figure 2.1(c). t only contains world w1, it represents the information that

w1 is the ‘true’ world. s contains worlds w1 and w2, it contains the information that either w1

or w2 is the ‘true’ world, but we cannot determine which yet. We say that t enhances s, since

t contains more information than s, namely the information that w1 is the ‘true’ world. Just

besides these two information states there is one hiding in figure 2.1(a). Let us call it r. r is equal to the empty set; r = ∅. This information state has a special name called the inconsistent state (Ciardelli et al., 2019). r represents the information that no world in W is considered the ‘true’ world. Furthermore it has the special property that for all information states q we have that r ⊆ q, which means that r enhances all information states.

w1 w2 (a) w1 w2 (b) w1 w2 (c)

(10)

2.1.2 Issues

An issue represents a request for information or a lack of information (Ciardelli et al., 2019). For any issue there should be at least one way in which it can be resolved. In other words, for any issue there should exist at least one piece of information that could fill the gap of information. Representing the lack of something is obviously somewhat difficult. In inquisitive logic this is solved by representing an issues as the set of all information states that would resolve the issue. Formally speaking an issue is a set of information states. Each information state in the issue has to contain at least enough information to resolve the issue. Furthermore, if we have an information state that resolves an issue then it makes sense that also the enhancement of that information state would be able to resolve the same issue, since enhancements contain at least as much information. Therefore, if an information state is in an issue then all information states that enhance it are in the same issue. This has a special name: downward closure. An issue I is downward closed if for all states s ∈ I all enhancements t ⊆ s are also in I i.e. t ∈ I.

Definition 2.3 (Issues). An issue is a non-empty set of information states. Where, if I is an issue and s is an information state then for all information states t such that t ⊆ s and s ∈ I, then also t ∈ I.

Issues generally represent a request for information. However they also have informational con-tent (Ciardelli et al., 2019). An issue is made up of information states. All these information states each encode a piece of information which on its own is enough to resolve the issue. An issue is therefore really an issue over information. The information state that describes the entire informational content of the issue should be such that it is enhanced by all information states in the issue. We can therefore think of the information of an issue as the combination of all the information states that make up the issue. Consequently, there exists a special information state for each issue that represents precisely the informational content of that issue. This information state is equal to the union of the information states in the issue.

Definition 2.4 (Information of an issue). When we have an issue I there exists an information states s representing the information of the issue, where s =S I.

Example 2.2. Let us consider a couple of example issues. Let us say that we have two students who just recently made an exam. Those students are called Alice and Bob. They either passed the exam or they failed. There are four possibilities, either Alice and Bob both passed which we call ab, only Alice passed: a, only Bob passed: b or none did: 0. The set of worlds is denoted by W = {ab, a, b, 0}. Alice and Bob just finished their exam and so it cannot be determined who has passed yet. Let us call this issue I. This is represented by the issue in figure 2.2(a). We draw issues in a similar way as we do with information states, however to distinguish between them issues are coloured green. However, they are different objects. Note for example how only the maximum information state of this issue is drawn. That is, only the information state {ab, a, b, 0} is actually drawn, however all the enhancements of this information state are also in i. This convention is used to avoid clutter and increase readability.

The professor graded the exam and Bob asks Alice: “Did you pass?”. This question can be encoded as a single issue. This issue is drawn in figure 2.2(b). Two information states were drawn depicting the two distinct pieces of information that could resolve the question. Those are {ab, a} for Alice passed and {b, 0} for Alice did not pass. Again the enhancements of both states are also in this new issue, but are not drawn.

Alice replies: “Yes, I made it! but sadly you did not pass.”. This issue is represented in figure 2.2(c). It is equal to the set {{a}, ∅}. This issue contains just one consistent information state which allows us to correctly determine the true world.

(11)

ab a b 0 (a) ab a b 0 (b) ab a b 0 (c)

Figure 2.2: Some example issues 2.1.3 Propositions

Propositions in inquisitive logic should be able to convey an issue as well as some information (an information state) (Ciardelli et al., 2019). This property is really how questions or inquisitiveness can be represented in a similar way as declarations or statements. At first it would make sense to construct a proposition as a tuple containing an issue and an information state. In other words, intuitively a proposition P should be equal to hI, si, where I is an issue and s an information state. However Ciardelli et al. (2019) shows that the precise information state s can be constructed from the issue I. We therefore only need an issue to be able to convey information as well as inquisitiveness (see example 2.5). Hence, we say that a proposition in inquisitive logic is equivalent to an issue.

Definition 2.5 (Proposition). An inquisitive proposition is a non-empty downward-closed set of information states, structurally equivalent to an issue.

We can obtain the information of an issue with s =S I (definition 2.4). Since propositions are structurally equivalent to issues we can also determine the informational content of propositions in a similar fashion. We let info(P ) denote the information of proposition P (Ciardelli et al., 2019). Then info(P ) is equal to the union over P .

Definition 2.6 (Information of a proposition). The information of a proposition P is denoted as info(P ) where info(P ) :=S P .

Truth and Support We say that a Proposition P is true in world w if w ∈ info(P ) (Ciardelli et al., 2019). In other words, a proposition is true in a world if and only if the world is in the information state describing the information of that proposition. Additionally, for information states we have a slightly similar but different relationship. We say that an information state s supports a proposition P when two things hold; first s ⊆ info(P ) and second s should resolve the issue in P , which amounts to s ∈ P . However if s ∈ P then it must also hold that s ⊆ info(P ), so we can simplify the relationship as follows: let s be an information state and P a proposition, s supports P if s ∈ P . This support relationship is denoted with the symbol |=,

Definition 2.7 (support). For an information state s and a proposition P we say that s supports P iff s ∈ P :

s |= P iff s ∈ P (2.1) To summarise, the notion of truth is quite similar to the classical notion of truth. Besides this notion of truth, the inquisitive logic framework also introduces the notion of support. Truth is

(12)

about the relationship between worlds and propositions while support is about the relationship between information states and propositions.

Alternatives Intuitively the alternatives of a proposition are distinct pieces of information that make up the proposition. We have already implicitly encountered alternatives for issues in example 2.2. Here in figure 2.2 only the alternatives of each issue were drawn. In these paragraphs a more formal description of alternatives will be provided.

Each proposition consists of one or more information states (Ciardelli et al., 2019). Informa-tion states in a proposiInforma-tion can be (partially) ordered based on the enhancement relaInforma-tionship. Let s and t be two information states from a proposition P . If t ⊆ s we say that t enhances s. When we have a state r such that it does not enhance any other state in P other than itself, we will call that state an alternative. Intuitively an alternative is a state with the least information that would still resolve the issue in a proposition. A proposition contains at least one alternative. Let s and t be two (different) alternatives in P . By definition an alternative does not enhance any information state other than itself from the same proposition; i.e. s 6⊆ t and t 6⊆ s. This confirms the intuition that alternatives represent the least amount of distinct (not enhancing each-other) information states that do resolve the proposition.

Mathematically speaking the set of alternatives in any proposition P is as follows:

alt(P ) := {s | s ∈ P and ∀t ∈ P, s.t. t 6= s, we have that s 6⊆ t} (2.2) Any full proposition is recoverable from this set of alternatives via the following relationship:

P =[{℘(s) | s ∈ alt(P )} (2.3) Where ℘(s) denotes the powerset of s. Equation 2.3 states that any proposition is equal to the union over the powersets of the alternatives of that proposition. Which makes sense because the powerset of any set s is s itself and all s’s subsets. The relationships between equations 2.2 and 2.3 allows us to interchange two crucial representations of propositions. First, the standard representation of propositions where a proposition is as a complete set of all information states that support the proposition. And second, the alternatives representation, where a proposition is represented by the set of alternatives of that proposition. As we will later see, both repre-sentations can be used for our model-checking task. In the standard representation we need to write out all subsets of all information states. This takes a lot of space we do not really need, since we can encode the same proposition by just using its alternatives (see example 2.3). Example 2.3 (Alternatives vs standard). Let P be the proposition with the set of alternatives alt(P ) = {{w1, w2}, {w2, w3}}. The standard representation of this proposition P is equal to P =

{{w1, w2}, {w2, w3}, {w1}, {w2}, {w3}, ∅} Notice how the same proposition P can be represented

as a set of 2 alternatives, or 6 information states. In fact, the alternatives representation is smaller than the standard representation for all but one proposition. That proposition is equal to P = {∅} and alt(P ) = {∅}. In all other cases the alternative representation needs fewer information states to fully describe a proposition than using the standard representation. Classical vs inquisitive The inquisitive notion of a proposition is different from the classi-cal notion of a proposition. In the classiclassi-cal notion, a proposition would be representing some information encoded in a set of worlds (Ciardelli et al., 2019). This is structurally equivalent to our notion of an information state. In inquisitive logic on the other hand, propositions are represented as issues raised over some piece of information. In other words in inquisitive logic a proposition is equal to an issue. The classical proposition represents a piece of information

(13)

(information state) while the inquisitive proposition represents a collection of pieces of infor-mation (issue). This distinction is really the fundamental difference between classical logic and inquisitive logic and it thus cannot be stressed enough.

One might also note the fact that the inquisitive notion of proposition contains more elements than the classical notion of a proposition. For example the size of a proposition in propositional logic is n where n denotes the number of worlds were the proposition is true. However in inquis-itive logic, the worst-case number of elements of the same proposition represented in standard form is 2n. Furthermore, recall that the elements of an inquisitive proposition are themselves information states. So each individual element of an inquisitive proposition is larger than the elements of a classical proposition. This size increase comes with a benefit as well, since it allows us to incorporate inquisitiveness into the propositions.

Example 2.4. This example will show what type of sentences inquisitive proposition can rep-resent while classical propositions cannot. Let us try to draw the sentence: “Did Alice pass or did Bob pass?”. We use a subset of the worlds from 2.2. Here W = {a, b}. Our inquisitive proposition would be equal to Pinq = {{a}, {b}, ∅} (figure 2.3(a)). The convention for

draw-ing inquisitive propositions in this thesis is with the colour gray. We could try constructdraw-ing a classical proposition that contains the exact representation. Let our classical proposition be equal to the information state info(Pinq) (figure 2.3(b)). This seems fair enough, however this

information state encodes the sentence “Alice or Bob passed”. Which is not a question; it is a statement. It states either Alice or Bob passed. We could lastly try the information states {a} (figure 2.3(c)) or {b} (figure 2.3(d)). However these mean “Alice passed” and “Bob passed” re-spectively. We cannot construct any classical proposition that captures the sentence: “Did Alice pass or did Bob pass?”. We need inquisitive propositions to represent questions. Notice how can construct inquisitive propositions that also capture the sentences formulated by the classical propositions. For example, for “Either Bob or Alice passed” we can construct the inquisitive proposition Pinq = {{a, b}, {a}, {b}, ∅}. “Alice passed” can be constructed as Pinq = {{a}, ∅}

and “Bob passed” can be captured with Pinq = {{b}, ∅}.

a b (a) a b (b) a b (c) a b (d)

Figure 2.3: Classical vs inquisitive propositions. Here (a) depicts an inquisitive proposition and (b) to (d) depict information states representing classical propositions

Inquisitiveness vs Informativeness When we have a proposition with multiple alternatives we say that this proposition is inquisitive. Intuitively if a proposition has more than one alter-native that means that there are multiple distinct pieces of information that could resolve the issue represented by the proposition. Furthermore if a proposition adds information we say that it is informative. Mathematically if we have a proposition P such that info(P ) ⊂ W than P is

(14)

informative because it exclude at least one world. A proposition can be inquisitive, informative or inquisitive and informative.

Example 2.5. Let us say someone stole the keys to the house. It could be Alice, Bob, or the cat. Our worlds are W = {a, b, c}. A purely inquisitive proposition would be: “Who stole the keys?”, which is {{a}, {b}, {c}, ∅} (figure 2.4(a)). A purely informative proposition could be: “The cat did not steal they keys”, which is {{a, b}, {a}, {b}, ∅} (figure 2.4(b)). An inquisitive and informative proposition could be: “Did the cat or Alice steal the keys?”: {{a}, {c}, ∅} (figure 2.4(c)). This last proposition provides the information Bob did not steal the keys. Furthermore, it raises the issue as to who exactly it was then; Alice or the cat?

b c a (a) b c a (b) b c a (c)

Figure 2.4: Inquisitiveness and informativeness

Entailment Propositions are not all equal. Some propositions contain more information or more inquisitiveness than others. The entailment relationship describes this ordering (Ciardelli et al., 2019). A proposition P entails a proposition Q iff P is at least as inquisitive and at least as informative as Q. This is the case when P ⊆ Q. We use the symbol |=entail to describe this

relationship.

Definition 2.8 (Entailment). Let P, Q be propositions. P entails Q iff P ⊆ Q:

P |=entailQ iff P ⊆ Q (2.4)

2.1.4 Contexts

During normal conversations at one point someone might raise an issue. When the conversation continues someone might add some information. At some point in the future the original issue might be resolved. The collection of all the issues raised and all the information posed is called the common ground. We would like to be able to keep track of the common ground. A context does just that.

A context contains the information and issues previously established to keep track of the common ground (Ciardelli et al., 2019). The context is quite similar to the notion of a proposition. In fact the context is structurally equivalent to a proposition, however they represent different concepts. A context contains a single issue that represents all established issues and information. This issue is an issue over some information. This information can be reconstructed with the function info(C).

Definition 2.9 (Context). A context is an issue representing the established common ground issues and information.

(15)

Definition 2.10 (Information of a context). The information of a context C can be determined through: info(C) :=S C.

The context represents the common ground. However the common ground is really a collection of issues over some information. There is a way in which those issues can be collapsed into one issue. That is done by taking the set intersection of all issues.

There are two special contexts, the initial context and the absurd context. Intuitively the initial context describes the state where no issue is raised and where no worlds are excluded yet. This context is equal to set of all information states that can be formulated over W , which is ℘(W ). The absurd context on the other hand is the context in which all information is given even contradictory information, that is why it is called absurd. This context is equal to the singleton containing the empty set.

Definition 2.11 (Initial and absurd context). The initial context C> and the absurd context

C⊥ are such that:

C>:= ℘(W ) (2.5)

C⊥:= {∅} (2.6)

The common ground can change when new issues are raised or new information is presented. The context should therefore be changeable. In inquisitive logic a context can be updated with a proposition to represent this changeability (Ciardelli et al., 2019). The proposition contains the issue and information that should be raised or added to the common ground. Adding issues and information together amounts to set intersection in inquisitive logic. The notation is as follows: when we have a context C and a proposition P we say that the updated context is C[P ]. Taking the intersection between the context and the proposition assures that any state in that would resolve C[P ] also resolves C and P .

C[P ] := C ∩ P (2.7) Example 2.6. Let us say we interpret the example 2.2 with context. Alice and Bob made an exam. They either passed the exam or they failed. There are four possibilities, either Alice and Bob both passed which we call ab, only Alice passed: a, only Bob passed: b or none did: 0. The set of worlds is denoted by W = {ab, a, b, 0}. Alice and Bob just finished their exam and so it cannot be determined who has passed yet. Let us say that we assume the exam to be hard. Therefore it is a fact that they cannot both have passed the exam. We can represent this with a context. Let us call this context C0. This context contains the alternative alt(C0) = {{a, b, 0}},

which is drawn in figure 2.5(a). The convention is used to draw contexts in red.

The professor graded the exam and Bob asks Alice: “Did you pass?”. This question can be encoded as a proposition P1 with alternatives alt(P1) = {{ab, a}, {b, 0}}. This proposition is

drawn in figure 2.5(b). When we update C0 with P1 we get the new context C0[P1] = C0∩ P1,

which is depicted in figure 2.5(c). This context now represents the common ground wherein Bob raised the issue whether or not Alice passed. This context contains the alternatives alt(C0[P1]) =

{{a}, {b, 0}}

Alice replies something different this time: “No, I did not pass. But did you pass?”. This statement is really a declaration and a question in one. However we can create a proposition that encodes both the of information and the question in one. Let us call this proposition P2, where

alt(P2) = {{b}, {0}}. The common ground is still the same i.e. C0[P1]. The proposition expressed

by Alice is represented in figure 2.5(e). The resulting update is equal to C0[P1][P2] = C0[P1] ∩ P2

(16)

ab a b 0 (a) ab a b 0 (b) ab a b 0 (c) ab a b 0 (d) ab a b 0 (e) ab a b 0 (f)

Figure 2.5: Some example contexts with updates

2.2

Model Structure

We have established the fundamental notions of the inquisitive logic framework. The goal of this thesis is to develop a model checker for inquisitive logic. Since we have now established the basic notions of this logic we will provide the model structures for which a model checker is developed. In this section the basic structure of an inquisitive model is presented and discussed.

In general a model structure for inquisitive logic is a collection of worlds and an assignment of affairs to those worlds. Mathematically speaking, an inquisitive logic structure M , also called a model, is a tuple defined as M := (W, ν) (Ciardelli, 2016). This structure M provides with the information necessary to evaluate sentences from our inquisitive logic language as we will see later. In this structure we have W , which is a set of worlds and ν which represents the valuation of affairs over W . A world w ∈ W represents a possible state of affairs, where the state of affairs is a full enumeration of all the facts that are true in that world.

Definition 2.12 (Model structure). A model is defined as a tuple M := (W, ν), where W is a set of worlds and ν is a valuation function.

The set of worlds W is quite straightforward. It is a set which contains all the worlds considered to be part of the model structure.

The valuation function ν is a mapping from atomic propositions to a set of worlds in which the proposition in question is true. Let us denote the set of Atomic Propositions by AP . We then have the following definition for the valuation function:

(17)

ν : AP → 2W (2.8) In most examples given in the previous section we have already seen some incomplete model structures. Let us revisit one of those and give examples for how we could construct them with the correct definitions in place. Let us revisit the models from the examples 2.2 and 2.5. The model structure is a tuple M = (W, ν). We can see that we have four worlds {ab, a, b, 0}. The names of these worlds are really their valuations so it makes more sense to rename them to W = {w1, w2, w3, w4}. The valuation is a mapping from atomic propositions to worlds. We have

two atomic propositions a and b. The valuation is as follows: ν = {ha, {w1, w2}i, hb, {w1, w3}i}.

In figure 2.6 this model structure is drawn. In this thesis the convention is used to label each world with its name and atomic propositions that are true there. Note that since no atomic proposition is true in world w4 only its name is labelled.

w1: ab w2: a

w3: b w4

Figure 2.6: Example of a model

2.3

Inquisitive Logic Language

This subsection will provide an overview of the inquisitive logic language. First a syntactical overview is provided. Then the semantics of this language are discussed, and how they lead to the support-relationship as discussed previously.

2.3.1 Syntax

In this section the syntax of the language is explained. The following grammar describes the form of any well-formed formula ϕ (Ciardelli, 2016):

ϕ ::= p | ⊥ | ϕ ∧ ϕ | ϕ > ϕ | ϕ → ϕ (2.9) Here p is an element of the set of all atomic propositions AP . In other words p ∈ AP . The intuition and formal semantics of the other connectives are explained in the next section on semantics (section 2.3.2). These primitive connectives in equation 2.9 can be extended with a couple of defined shorthand connectives (Ciardelli, 2016).

Definition 2.13. We define the shorthands for the connectives ¬, ∨, ? as follows:

¬ϕ := ϕ → ⊥ (2.10) ϕ ∨ ψ := ¬(¬ϕ ∧ ¬ψ) (2.11) ?ϕ := ϕ > ¬ϕ (2.12)

(18)

Note how we have two disjunctions, those are > and ∨. > is called the inquisitive disjunction and it will be used to form question. ∨ is the classical disjunction and is defined in terms of ¬ and ∧. Furthermore we have the ?-operator, it is a shorthand to construct polar questions and can thus be defined in terms of > and ¬. When discussing the semantics we will go over more detail of the intuitive interpretations of these operators.

2.3.2 Semantics

This section provides the semantics of the inquisitive language. We provide mathematical defi-nitions for the connectives as defined in the previous section 2.3.1, which we will follow up with some intuitions for these semantics.

Central to the semantics is the support relationship: |=. If an information state s supports a proposition P we denote that as s |= P . We can determine if s |= P as follows:

s |= P iff s ∈ P (2.13) This support relationship takes place between information states and propositions. We will present how a proposition can be obtained from our well-formed formulae such that we can extend this support relationship to be able to act upon formulae from our language as well. Let us denoteJϕK as the proposition expressed by the formula ϕ. When we want to express whether or not an information state supports the proposition expressed by a formula we denote that as: s |= ϕ iff s ∈JϕK (2.14) To determine JϕK we need a model structure M = (W, ν) to begin with. In this structure W denotes all worlds in our model and the valuation ν : AP → 2W attributes to atomic proposi-tions all worlds in which they are true. This valuation is a starting point for determining the proposition expressed by formulae in our language (as can be seen in equation 2.15). We have the following equations:

JpK = ℘(ν (p)) (2.15) Jϕ ∧ ψK = JϕK ∩ JψK (2.16) Jϕ > ψ K = JϕK ∪ JψK (2.17) Jϕ → ψK = {s ⊆ W | ∀t ⊆ s, if t |= ϕ then t |= ψ} (2.18) The semantics for the shorthand formulae are as then as follows:

J¬ϕK = ℘  info(JϕK) (2.19) Jϕ ∨ ψK = ℘(info(Jϕ > ψ K)) (2.20) J?ϕK = JϕK ∪ J¬ϕK (2.21) There are a couple of things to note from these equations. To begin with a high level overview. The basis of each proposition expressed by a formula is the valuation of its constituent atomic propositions as seen in equation 2.15. When we go back to our support relationship (equation 2.14) we can see that we cannot determine whether or not a formula is supported by an informa-tion state without having a model from which the proposiinforma-tion expressed by the formula can be generated. In other words the support relationship s |= ϕ cannot be determined without having a model to determine the meaning of ϕ. Therefore this support relationship for a formula is more correctly denoted as:

(19)

We will leave out M from equation 2.22 whenever no confusion can arise about which model we are talking about.

Let us now walk through all equations and explain what is going on. The first equation 2.15 describes how to construct a proposition from an atomic proposition. Let us recall that the valuation function ν assigned to each atomic proposition all the worlds in which the proposition is true. This means effectively that we have:

ν(p) = info(JpK) (2.23) Furthermore recall definition 2.6 where we had for any proposition P :

info(P ) =[P From this info we can thus see thatJpK is equal to:

℘(info(JpK)) = ℘[JpK (2.24) ℘(info(JpK)) = JpK (2.25) ℘(ν(p)) =JpK (2.26) Equations 2.16 and 2.17 are quite straightforward. The conjunction is equivalent to set intersec-tion and the inquisitive disjuncintersec-tion is equivalent to set union.

The semantics of the implication is given in equation 2.18. In words, we might describe equation 2.18 as follows: the semantics of the implication operator is the propositions which contains the information states such that for all subsets of those information state if they support the antecedent they should also support the consequent. This is more complex than the definition in classical logic, where we could just say ϕ → ψ ⇔ ¬ϕ ∨ ψ. In inquisitive logic we cannot do this because we must check for the enhancement of each state since inquisitive propositions that were not supported at one point might become supported when we add more information.

Equation 2.19 describes the semantics of negation. This semantics differs from classical logic. info(JϕK) means all worlds in W which are not in the info of JϕK.

info(JϕK) := W − info(JϕK) (2.27) Due to this definition of semantics we also have that the double negation does not necessarily yield the same proposition (Ciardelli et al., 2019). In other words, in general for a proposition P we do not have that ¬¬P ≡ P . However, one can construct some propositions where this equivalence does hold.

The classical disjunction which is described in equation 2.20 is somewhat more involved than the inquisitive disjunction. In essence we want to remove the inquisitiveness of the inquistive or-operation. Therefore we take the information of the inquisitive or-operation and compute the powerset of that. The result of info(P ) is the information state s containing the information of the proposition P . We can say that s contains just the information and not the inquisitiveness. We can construct a proposition from an information state s by taking the powerset of that information state (e.g. ℘(s)). Since the information state does not contain any inquisitiveness the resultant proposition ℘(s) is not inquisitive, but retains the information from s. This way we can cancel out inquisitiveness from any proposition P by applying ℘(info(P )) to it.

Equation 2.21 describes the semantics of the whether operator. This operator is equivalent to the inquisitive disjunction on itself and its negative, and can be expressed in these two other operators.

J?ϕK = Jϕ > ¬ϕ

(20)

We can think of formulae where this operator is the main connective as representing a question. For example if we have the formula ?ϕ we can think of it as representing the polar (or yes/no) question: “is ϕ or not?”

Recall the research goal of this thesis. We want to develop a model-checker tool for the inquisitive logic framework. In the previous section we have seen how we can construct a language form inquisitive logic and how we should interpret formulae from that language. That is, formulae from this inquisitive logic language express propositions which we can derive from the model structure using the rules we defined in this previous section. Furthermore we can express whether or not information states support these propositions. The next sections will provide how to adapt the inquisitive logic framework to our model checker problem.

3

Model Checking Problem

We have previously, in section 2, established the mathematical definitions and structures used by the inquisitive logic language. Our research goal is to develop a model checker based on these definitions and structures. In this section we will discuss briefly what that means concretely. This section will therefore establish the parts of our model checking approach analogous to the modelling and specifications steps described by Clarke Jr, Grumberg, Kroening, Peled, and Veith (2018). The mathematics provide the basic principles for the model checker problem. However in light of implementational benefits we will sometimes strafe away from these mathematical definitions and structures.

3.1

Objects

The inquisitive logic framework is mathematical while our model checker is a piece of software. Not all mathematical concept translate cleanly into implementations. In this section we will briefly discuss how we adapt some of the mathematical objects from the inquisitive logic frame-work to more computationally friendly representations.

We need representations for the following objects: information states, propositions, contexts, formulae from the inquisitive logic language and models. Information states and models are the most straightforward from this list because they retain most of their original mathematical interpretations.

Information states Information states are sets of worlds representing a piece of information. They retain all properties giving in section 2.

Models A model M is a tuple containing a set of worlds W and a valuation function ν. The model structure used in our model checker is analogous to the inquisitive logic notion of a model (section 2.2).

Propositions and contexts Propositions are sets of information states, they represent an issue and some corresponding information. Similarly, contexts are also sets of information states. However, a context represents the issues raised over the common ground. Propositions and contexts are structurally equivalent but representing different things. For our model checker we can leverage the fact that they are structurally equivalent. Let us call propositions and contexts, issue-equivalent objects. We need just one computational implementation of this issue-equivalent object to represent both propositions and contexts.

(21)

Formulae A formula is just an ordered list of atomic propositions and connectives that can be combined following the rules given by equations 2.9 and 2.10 to 2.12. A formula ϕ expresses a proposition JϕK. This proposition JϕK is dependent on the semantic context captured by a model. There exist two distinct views on formulae; either syntactical view which is the tokens constituting the formula ϕ or the semantic view which is the proposition ϕ expresses, denoted asJϕK. ϕ and JϕK are distinct but related ob jects.

3.2

Relationships

The basis of our model checker is the support relationship between information states and formu-lae. We want to be able to determine if the support relationship holds for any information states and formulae. In addition to support relationship this section we will introduce the entailment relationship between two issue-equivalent objects. We want to extend our model checker goal to also be able to determine whether this entailment relationship holds for any two issue-equivalent objects.

3.2.1 Support

The basis of our model checking problem is to solve the support relationship for an information state s, model M and well-formed inquisitive logic formula ϕ. This means that we would like to be able to determine whether the following holds for a given M , s and ϕ (equation 2.22):

M, s |= ϕ iff s ∈JϕKM

The relationship of support is a relationship between an information state and either a proposition or a formula expressing a proposition. It forms the basis of our model checker. This relationship requires from our model checker to be able to compute JϕKM from any well-formed formula ϕ

and model M . 3.2.2 Entailment

Let us recall the notion of entailment between two propositions (definition 2.8). It can be expressed in terms of the support relationship (Ciardelli et al., 2019). Let P, Q be propositions, the entailment relationship is denoted with |=entail. However, for readability we will be using

the symbol |= (representing support) to also denote the entailment relationship. This abuse of notation is justified on the basis that we can always distinguish which relationship is meant by the type of the expressions it acts upon. For example, when we have s |= x where s is an information state |= always means support.

Either way, when P and Q are propositions the entailment relationship is given by:

P |= Q iff ∀s such that s |= P, also s |= Q (3.1) This equation 3.1 is equivalent to the original definition of entailment:

P |= Q iff P ⊆ Q (3.2) Intuitively speaking a proposition entails another if all states that support it also support the other proposition. We will extend our model checker problem to also be able to determine this entailment relationship.

(22)

Furthermore a similar notion exists between two contexts. This relationship is called the extension relationship and is denoted by the symbol ≥ (Ciardelli et al., 2019). Let C0 and C be two contexts. The extension relationship between C0 and C is given as:

C0≥ C iff C0⊆ C (3.3) This extension relationship between contexts expresses that C0 is at least as inquisitive and informative as C.

Recall that propositions are structurally equivalent to contexts, since a context and a propo-sition are a set of information states. On the other hand they represent different concepts. We will introduce a notion of entailment between issue-equivalent structures as follows. Let J and K be issue-equivalent structures. When J is a subset of, or equal to K we say that J entails K. For readability purposes we will once again denote this relationship with |=. This is again abuse of notation since |= denotes strictly speaking only the support relationship. However if we have two issue-equivalent objects J and K the issue-equivalent entailment relationship is given as 3.4: J |= K iff J ⊆ K (3.4) This relationship is a more abstract relationship; in general this relationship represents that J is at least as inquisitive and informative as K. However, the precise interpretation depends on the exact structures of J and K. On the other hand, interpreting this relationship as an abstract one allows us to capture a lot of different relationships into one implementation. Let P, Q be propositions and C0, C be contexts, then the list of different relationships that can be expressed by the issue-equivalent entailment |= is the following:

P |= Q ⇐⇒ P |=entailQ (3.5)

C0|= C ⇐⇒ C0≥ C (3.6) C |= P ⇐⇒ C ⊆ P (3.7) P |= C ⇐⇒ P ⊆ C (3.8) We have already discussed the intuitive interpretation of equations 3.5 and 3.6. We can think of equation 3.7 as expressing that P is already part of the common ground captured in C. Updating C with P would have no effect in this case (e.g. C[P ] = C). Equation 3.8 can be thought of as expressing the fact that the proposition P would introduce a new issue were it to be updated with the context C.

Furthermore recall that a formula ϕ expresses a proposition JϕK. Propositions are issue-equivalent and therefore the proposition expressed by a formula is also issue-issue-equivalent. We use the following shorthands to describe specifically the issue-equivalent entailment between an issue-equivalent structure and a formula:

J |= ϕ := J |=JϕK (3.9) ϕ |= J := JϕK |= J (3.10) ϕ |= ϕ := JϕK |= JϕK (3.11)

4

Data-structures

We have established and expanded on the rules and definitions of inquisitive logic in the previous sections. This section will provide a translation from these mathematical notions to concrete

(23)

data-structures that will be used in the model checker. The evaluation procedure is the main procedure and it requires all data-structures present in our model checker to work.

The end goal of the evaluation procedure boils down to automatic determination of two different relationships. The support relationship between information states and formulae, and the issue-equivalent entailment relationship between two issue-equivalent objects.

M, s |= ϕ iff s ∈JϕKM (4.1)

J |= K iff J ⊆ K (4.2) These two relationships are not part of the inquisitive logic language. Instead they provide the basis for a meta-language which will be used by the model checker to describe the problem that needs to be solved. This meta-language defines the set of well-formed instructions that could be given to the model checker. The grammar of this meta-language is as follows:

ρ ::= ϕ | C | s | s |= ϕ | C |= ϕ | ϕ |= C | ϕ |= ϕ | C |= C (4.3) ϕ ::= p | ⊥ | ϕ ∧ ϕ | ϕ > ϕ | ϕ → ϕ (4.4) C ::= C | C[ϕ] (4.5) Where C is a context, s an information state and p an atomic proposition.

We also use the following shorthands:

¬ϕ := ϕ → ⊥ (4.6) ϕ ∨ ψ := ¬(¬ϕ ∧ ¬ψ) (4.7) ?ϕ := ϕ > ¬ϕ (4.8) C ∧ ϕ := C[ϕ] (4.9) Based on these rules the output of the evaluation procedure can be one of three things. First, the output can be the evaluation of a relationship (1), the output can be an issue-equivalent object (2), or the output can be an information state (3).

1. if ρ = s |= ϕ | C |= ϕ | ϕ |= C | ϕ |= ϕ | C |= C 2. if ρ = ϕ | C

3. if ρ = s

To discuss the data-structures that are needed to accomplish the model checking task we need a high-level overview of the evaluation procedure of the model checker. This high-level overview is provided in figure 4.1. First, we have an instruction ρ that is passed to the model checker. The instruction gets parsed in the syntactic analysis step. The result of this step is a syntactical data-structure called ‘Sy-DS’. ‘Sy-DS’ is an abbreviation for syntactical data-data-structure. The object ‘Sy-DS’ is a data-structure representing the instruction ρ in an implementation friendly way. It acts as a backbone on which the semantic analysis can be performed. It is therefore a kind of intermediary data-structure. Next, this ‘Sy-DS’ is passed to the semantic analysis step together with the model M . The model provides auxiliary information. The information in the model is combined following the syntactical rules captured in ‘Sy-DS’. This happens in the semantic analysis step which yields the ‘result’. This ‘result’ can be one of three things depending on the instruction ρ (see (1), (2), (3) in the list above).

Section 5 provides the exact details of how these steps are implemented. In this section we will focus on the structures themselves. The following subsections will each explain one data-structure from this figure. We begin with the ρ data-data-structure (also called the meta-language), followed by ‘Sy-DS’, then the model M data-structure and finally the ‘result’ data-structure.

(24)

ρ Sy-DS M

+ result syntactic analysis semantic analysis

Figure 4.1: Schematic overview of data-structures for the evaluation procedure

4.1

Meta-language

This section introduces and explains the structure used for the meta-language. This data-structure is denoted by ρ in figure 4.1. This data-data-structure represents the instruction from the user. When someone is using the model checker they interact with the text-based interface and start an evaluation of an instruction ρ.

Because of the text-based interface the most obvious data-structure for ρ is a string of char-acters. ρ can contain formulae ϕ from the inquisitive logic language. Those formulae are written out as a string of characters as well. The symbols that represent the connectives are mapped to specific tokens (where a token is a sequence of characters separated by white-spaces) to work better with the text-based interface of the model checker. This mapping is given in table 4.1.

Any other token in a string is assumed to encode either a proposition, context or information state. A context will be represented always as upper-case C. Information states are denoted by any token starting with lower-case or upper-case s. All the other strings are interpreted tokens for propositions. connective string ¬ ‘not’ ∧ ‘and’ > ‘ior’ ∨ ‘or’ → ‘then’ |= ‘models’

Table 4.1: operators and their string representation

Let us look at some examples. The following are valid instructions for the evaluation proce-dure of the model checker:

C |=?(p > q) → t (4.10) p →?q (4.11)

s (4.12)

We would write these in string form like:

“C models ?(not p ior q) then t or z” (4.13) “p then ?q” (4.14)

“s” (4.15)

Intuitively speaking the equation 4.10 through 4.12 mean the following:

• Equation 4.10: is the context C at least as inquisitive and informative as the proposition (J?(p > q) → tK) expressed by the formula ?(p > q) → t

(25)

|= → t ? > q p C (a) → ? q p (b) s (c)

Figure 4.2: The trees represent the ‘Sy-DS’ structures created from equation 4.10 to 4.12 repre-sented with Mathematical symbols.

• Equation 4.11: what is the proposition (Jp →?qK) expressed by the formula p →?q • Equation 4.12: what is the information state s

4.2

Sy-DS

In the syntactic analysis step the ‘Sy-DS’ object is created from the instruction ρ (figure 4.1). This data-structure is the internal representation of the syntactic structure of ρ. It functions as an intermediary between the instruction ρ and the computed result.

‘Sy-DS’ is a tree that represents the syntactical structure acquired from the meta-language instructions. This tree is also called the operator tree. Each node in the tree represents an operator or connective. There are three types of nodes. There are Binary Operators, those are nodes with two children, Unary Operators, which are nodes with one child and Variable Expressions, which are leaf nodes.

The syntactic and semantic definitions of the inquisitive logic language are inductive (see sec-tions 2.3.1 and 2.3.2). These inductive definisec-tions lend themselves for recursive data-structures. Our operator tree is a recursive data-structure, since the children of each node are the roots of their own sub-trees. Each node can therefore be thought of as a sub-expression.

Let us continue the examples we proposed. Decomposed as trees they are depicted in figure 4.2. We use parentheses to establish the order of operation. This way all valid instructions map to one valid tree only. How the tree is generated from ρ is explained in section 5.2.

4.3

Model

The model provides the information necessary to determine the meaning of any instruction ρ. It is passed to the semantic analysis step together with ‘Sy-DS’ (figure 4.1). Our model struc-ture should contain all relevant information to all possible instructions ρ. We therefore extend our interpretation of a model from the inquisitive interpretation to a broader interpretation to incorporate additional information. In our application we say that a model is a set of worlds W , a valuation map ν, a list of information states S and a context C. The set of worlds W and the valuation map ν are analogous to the standard inquisitive logic model. We will provide more detail of all elements of the new model in this section.

(26)

4.3.1 Information states

Information states s can form sub-expressions in ρ. Even though information states are not part of the standard inquisitive logic model, they are necessary to compute the result of some instructions ρ. In our application we will keep track of the information states in a list attached to the model. Information states are stored as sets of worlds and will be passed to the semantic analysis step in the evaluation procedure as attachment of the model.

4.3.2 Inquisitive logic model

The inquisitive logic model M defined in section 2.2 provides the basis for our model checker model. It provides all information needed to determine the propositionJϕKM starting from the

inquisitive logic formula ϕ.

The precise definition of an inquisitive model is given by definition 2.12. An inquisitive model contains two elements, a collection of all worlds W and a valuation function ν. These two elements will also be part of our computational model. The collection of all worlds is implemented as a set containing all worlds.

The valuation function ν is a function that takes an atomic proposition p and returns the info of that proposition info(p). The data-structure of a valuation should therefore be some kind of mapping. We will a dictionary for this implementation. This is a mapping from the names of atomic propositions to the information states representing the info of that proposition. Note that these information states are different from the information states in 4.3.1. The information states in 4.3.1 are information states not bounded by atomic propositions, while the information states that are part of the mapping ν represent specifically the information of atomic propositions. They are both however similarly implemented as sets of worlds.

4.3.3 Context

A context can appear in ρ as an issue-equivalent object. A context represents the common ground. It is a set of information states. We will store the context as an element of the computational model. It is implemented as a set of tuples, where each tuple corresponds to an information state. The context is passed to the semantic analysis step because it is attached to the model. It is needed in the evaluation procedure for the cases where there is a context in a (sub)-expression of ρ (figure 4.1).

4.4

Result

After the construction of the operator tree, semantic analysis is performed. The semantic analysis step takes a tree and a model and computes the semantics of the root of that tree. The semantics of the root of the tree is called the ‘result’ (see figure 4.1). Each root calculates its ‘result’ by calculating the semantics of its children and combining them. The details of this procedure are given in sections 5.3 and 5.4. Notice how this is a procedure that can be carried out recursively since the children are themselves roots of sub-trees.

There are three distinct semantic objects representing any (sub)-tree. We can have the support or issue-equivalent entailment relationship (|=) as root of our tree (figure 4.2(a)), we can have an issue-equivalent object as root of our tree (figure 4.2(b)) or we can have an information state as root of our tree (figure 4.2(c)). These semantic objects represent the meaning of the tree as a whole. So for example in figure 4.2(b) we have the → node as root. However this → operator represents the entire formula p →?q. The semantic object that corresponds to the meaning of this entire tree is the issue-equivalent objectJp →?qK. So a tree is a syntactic structure and the

(27)

three semantic objects discussed here are the implementations of the meaning of trees called the ‘result’.

Besides these three semantic objects discussed in the last paragraph there are also two distinct ways of representing and implementing only issue-equivalent objects. There is the standard way and an alternative way. These two implementations are so fundamentally different that we also need two distinct ways in which the semantic analysis step can be computed. This section will provide details over the implementation of the different data-structures. Sections 5.3 and 5.4 will provide details over the different implementation of the semantic analysis steps.

Furthermore this section provides the design choices behind the data types that are used in our model checker to represent the semantics of any operator tree. We will discuss and explain these data-structures as follows. To begin, we will discuss the case where the root of the tree is a relationship |= connective. Then we will discuss the case where the root of the tree is an issue-equivalent object. Then we discuss the case where the root of the tree is an information state. This section will also provide detail over the two fundamentally different implementations. 4.4.1 Relationship connectives

This section provides the data-type of the ‘result’ for the case that a relationship connective |= is the root of our tree (figure 4.2(a)). Any relationship can be either true or false. For example, an information state s can either support or not support a formula ϕ. We can therefore simply conclude that the ‘result’ of this type of operator tree should be either ‘true’ or ‘false’.

4.4.2 Issue-equivalent objects

This section provides the data-types of the ‘result’ when the root of the operator tree is an issue-equivalent object (figure 4.2(b)). We have two separate issue-issue-equivalent objects represented in our model checker. That is, propositions expressed by formulae (e.g. JϕK) and contexts. Both propositions and contexts are sets of information states.

If the root of our tree represents a formula ϕ we first compute the proposition that is expressed by this formulaJϕK. If the root of the tree is a context then the context is directly passed onto the ‘result’. Either way if the root of the tree is a formula or a context the ‘result’ is an issue-equivalent object.

4.4.3 Information states

An information state is a set of worlds. They can appear as a stand-alone semantic object (see figure 4.2(c)) or they can appear as elements of issue-equivalent objects. We will implement information states in the same way regardless of whether they appear as stand-alone semantic objects or as elements of issue-equivalent objects.

Implementation Here we will discuss how we should implement issue-equivalent objects and information states in our model checking program. An issue-equivalent object is mathematically speaking a set of information states. Each information state is a set of worlds. An issue-equivalent object is thus a set of sets of worlds. However there are two paradigms of representing these objects. We can either fully write out the entire set of all information states which we will call the standard representation. Or we can represent it more compactly by just writing out the set of alternatives which we will call the alternatives representation (see section 2.1.3 : alternatives). These different representations are really two different paradigms, because it not only changes the way in which we implement the issue-equivalent objects data-structure but also the way in which we compute them.

(28)

In the following paragraphs, we will provide implementations for the data-structures of both the standard and alternative representations of issue-equivalent objects.

Standard representation In the standard representation, an issue-equivalent object is equal to a downward-closed set of information states. Each of those information states is in turn a set of worlds. An issue-equivalent object is thus a set of sets of worlds.

A logical starting point for our data-structure is a set-like data-structure. Sets themselves are abstract data-types and in practice they might be implemented in different ways in different languages. This model checker is written in Python, where sets are available as built-in data-types. We would like to use this built-in data-type because we can assume that the built-in functions for these data-types are implemented in the most efficient way. Sadly, a drawback of sets is that a they cannot contain a set as one of their elements. Python provides an alternative to a set called a frozenset which can be used as elements of a set. The information states that constitute our equivalent object are therefore implemented as frozensets, while our issue-equivalent objects themselves are implemented as sets. This allows us to leverage the built-in functions for sets to a certain degree.

In conclusion, the standard implementation of the issue-equivalent object is as a set of frozensets, where each frozenset represent an information state.

Alternative representation An issue-equivalent object represented with alternatives is a set of alternatives. Each alternative is an information state. However the set of alternatives contain only the maximum information states of the issue-equivalent object.

Essentially, the difference between an issue-equivalent object represented in the standard way and the alternative way is that a standard object contains more information states than an alternative one. Therefore an alternative issue-equivalent object is also a set of frozensets, where each frozenset represents an alternative in the issue-equivalent object. However, the alternative issue-equivalent object contains just the alternatives while the standard issue-equivalent object is downward-closed.

These two representations split the semantic analysis step in two. To be clear about which implementation is discussed, we will refer to either using the standard or alternative representa-tions. Where the standard representation uses an issue-equivalent object as a mathematical set of information states, or implementation-wise a set of frozensets. And the alternative representation as using issue-equivalent objects as a mathematical set of alternatives or implementation-wise also a set of frozensets. Where the key difference between standard and alternative is that with the alternative implementation only the maximum information states if the represented issue are part of the issue-equivalent object.

5

Model Checker

The model checker will determine the semantics of an instruction ρ from our meta-language on a structure M representing a model. Such a model M is an extension on the mathematical inquisitive model (see section 4.3). A model in inquisitive logic only consists of a set of worlds W , and a valuation ν that assigns to atomic propositions the set of worlds in which they are true. We extend this model with a context C and a collection of information states predetermined by the user.

This section provides the implementation details of the evaluation process of ρ. This process is depicted in figure 5.1. We have two sequential steps, first syntactic analysis and then either standard semantic analysis or alternative semantic analysis. The difference between the two

(29)

semantic analysis approaches is the representation of the issue-equivalent objects. With the standard approach an issue-equivalent object is implemented as the full set of all information states constituting that object, while with the alternatives approach an issue-equivalent object is implemented as the set of the alternatives constituting that object.

Note how the syntactic analysis step is the same either way. The difference is a in how we represent the semantics of issue-equivalent objects and thus only appears at the semantic analysis step. This section provides the explanations and implementations of all three different steps. We begin with explaining the syntactic analysis implementation. Then we focus on the standard semantic analysis implementation. Finally, we conclude with the alternative semantic analysis implementation.

Furthermore some implementation will feature pseudo-code. Before we start with the actual implementations we first introduce some pseudo-code conventions used throughout this section.

ρ Sy-DS M + standard result alternative result syntactic analysis

standard semantic analysis

alternative semantic analysis

Figure 5.1: Schematic overview of the evaluation of ρ.

5.1

Pseudo-code conventions

An example pseudo-code block for an example procedure is given by pseudo-block 1. Each pseudo-code block represents a function or procedure. The objects after ‘Input’ are the objects passed to the function or procedure. The objects after ‘Output’ give an indication of what is returned to the caller of the procedure. This is made explicit by the return statement. With dot-‘.’ an attribute of an object can be accessed (e.g. M.W being the set of worlds W in M ). Furthermore a function-call is written as ‘nameOfFunc(argument1, ..., argumentn)’.

We will enumerate and explain a number of common objects and functions used throughout this section.

Algorithm 1: example procedure Input: some variable: x, some other: Y Output: different thing: z

1 z = someFunc(x.p, differentFunc(Y)) 2 return z

5.1.1 Common Objects

(30)

Children children-nodes are commonly denoted as c. When we have multiple children, we add a subscript to identify whether it is the left child: clor the right child cr.

Model A model is denoted as M . A model contains a set of worlds W , a formula ν a context C and information states s1, s2, . . . sn. These elements can be accessed with ‘.’ (dot). For example,

the set of worlds in the model is denoted as follows: M.W .

Sets and lists Sets and lists are objects that contain one or more other objects. A set is unordered and a list is ordered. An element of a list ‘x’ can be retrieved by its index ‘i’ like ‘x[i]’. Furthermore all sets and lists have an attribute called ‘length’ which is the number of elements in the set or list. Let ‘x’ be a set or list, ‘x.length’ is the number of elements in ‘x’. Note that issue-equivalent objects are implemented as sets.

Semantics A semantic object is denoted with S. The semantics can be one of three different things based on the type of node that is evaluated. If we evaluate a |= node the semantics is either a ‘true’ or ‘false’. If we evaluate an information state node the semantics is an information state. If we evaluate any other node the semantics is an issue-equivalent object.

5.1.2 Common Functions

add ‘add(x,y)’ adds object ‘x’ to set ‘y’.

append ‘append(x,y)’ appends object ‘x’ to list ‘y’

eval ‘eval(x,y)’ calls the evaluation procedure on a node ‘x’ and passes a model ‘y’ with it. This evaluation procedure is the recursive model checking procedure that we are implementing in these sections. It returns the semantics of the node ‘x’ computed on the model ‘y’.

info The ‘info(x)’ function takes an issue-equivalent object ‘x’ and returns the information state representing the info of that object. ‘info(x)’ allows for the issue-equivalent object ‘x’ to be implemented in both the standard and alternative way.

max ‘max(x)’ computes the set of alternatives for an issue-equivalent object in ‘x’. ‘max(x)’ returns this set of alternatives of ‘x’.

pop ‘pop(x,i)’ pops from list ‘x’ the element at index ‘i’. The objects that have an index higher then ‘i’ get shifted down one place to compensate for the removed object.

powerset The ‘powerset(x)’ function takes a list or set ‘x’ and returns the powerset of ‘x’. removeIndex ‘removeIndex(x,i)’ removes from list ‘x’ the object at index ‘i’. All elements that have an index greater than ‘i’ are shifted down one place, similarly to what happens with the ‘pop(x,i)’ function.

5.2

Syntactic analysis

In the syntactic analysis step we parse an instruction ρ and create the syntactical data-structure ‘Sy-DS’ (see section 4.2). ρ can be a mixture of inquisitive logic formulae ϕ, information states s, contexts C and the meta-operator |=.

Referenties

GERELATEERDE DOCUMENTEN

Om vast te stellen of er geen invloed van slaapkwaliteit op het kortetermijngeheugen en langetermijngeheugen werd gevonden omdat er gebruik gemaakt werd van een populatie met

Thom de Graaf die tijdens het debat in de Eerste Kamer een motie indiende om de behandeling van het wetsvoorstel op te schorten, noemt hij dan ‘een klassiek voorbeeld van een

Met andere woorden, wat zijn de behoef- ten in de dagelijkse klinische praktijk óf waar kan met de inzet van innovatieve technologie echt winst worden geboekt voor

Door de manier waarop de Wlz-specfieke behandeling en de aanvullende zorgvormen nu geregeld zijn en de huidige uitvoeringspraktijk krijgen Wlz- cliënten niet altijd de integrale

The second sub question touches upon the struggles the Sámi have faced and are facing in relation to museum representation: How have the Sámi struggled for indigenous rights and

By using philosophies and stylistic elements of art and design movements the method tries to extend ones skill and knowledge about design tools, principles and processes in an

Although the choice of a suitable intermediary that supports knowledge exchange is critical (Wright et al., 2008), one of the main constraints that invariably hinder the exchange

Chapter 8 by Jakkie Cilliers (Stability and security in Southern Africa) provides and overview of the state of the nation in Southern Africa, as well as an update and cursory