<?xml version="1.0" encoding="UTF-8"?>
<TEI xml:space="preserve" xmlns="http://www.tei-c.org/ns/1.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.tei-c.org/ns/1.0 https://raw.githubusercontent.com/kermitt2/grobid/master/grobid-home/schemas/xsd/Grobid.xsd"
 xmlns:xlink="http://www.w3.org/1999/xlink">
	<teiHeader xml:lang="en">
		<fileDesc>
			<titleStmt>
				<title level="a" type="main">LOGI: A didactic tool for a beginners&apos; course in logic (system description)</title>
			</titleStmt>
			<publicationStmt>
				<publisher/>
				<availability status="unknown"><licence/></availability>
			</publicationStmt>
			<sourceDesc>
				<biblStruct>
					<analytic>
						<author>
							<persName><forename type="first">Mario</forename><surname>Ornaghi</surname></persName>
							<affiliation key="aff0">
								<orgName type="department">Dipartimento di Informatica</orgName>
								<orgName type="institution">Università degli Studi di Milano</orgName>
								<address>
									<country key="IT">Italy</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Camillo</forename><surname>Fiorentini</surname></persName>
							<affiliation key="aff0">
								<orgName type="department">Dipartimento di Informatica</orgName>
								<orgName type="institution">Università degli Studi di Milano</orgName>
								<address>
									<country key="IT">Italy</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Alberto</forename><surname>Momigliano</surname></persName>
							<affiliation key="aff0">
								<orgName type="department">Dipartimento di Informatica</orgName>
								<orgName type="institution">Università degli Studi di Milano</orgName>
								<address>
									<country key="IT">Italy</country>
								</address>
							</affiliation>
						</author>
						<title level="a" type="main">LOGI: A didactic tool for a beginners&apos; course in logic (system description)</title>
					</analytic>
					<monogr>
						<imprint>
							<date/>
						</imprint>
					</monogr>
					<idno type="MD5">B90A02BE9E0F47102A1B16303FAE4102</idno>
				</biblStruct>
			</sourceDesc>
		</fileDesc>
		<encodingDesc>
			<appInfo>
				<application version="0.7.2" ident="GROBID" when="2023-03-24T07:53+0000">
					<desc>GROBID - A machine learning software for extracting information from scholarly documents</desc>
					<ref target="https://github.com/kermitt2/grobid"/>
				</application>
			</appInfo>
		</encodingDesc>
		<profileDesc>
			<abstract>
<div xmlns="http://www.tei-c.org/ns/1.0"><p>LOGI is a didactic software designed for a basic course of Logic. We developed it as an extension of the course-ware Language, Proof and Logic (LPL) by Plummer, Barwise, and Etchemendy, in particular of Tarski's World (TW): the latter features simple virtual worlds populated by blocks and equipped with a first order language to about them; this helps students to understand the language of logic and its semantics in an intuitive and effective way. A limit is that there is no automatic support for exercises involving other domains. More importantly, if we view logic as a paradigmatic modeling language, this aspect is lost in the predefined blocks world, while it should be one of the educational outcomes of a course of Logic in a Computer Science curriculum. To overcome those limits, LOGI provides an environment where students can model simple "realities" by devising an appropriate (one-or many-sorted) signature, writing finite interpretations that represent possible circumstances, and evaluating the truth/falsity of first order formulas in an interpretation according to Tarski's semantics. Furthermore, it provides a detailed explanation of the result of evaluating a formula in a set of interpretations. Finally, to stress the role of logic in modeling, LOGI supports explicit definitions and allows the user to deal with incomplete information. In this sense, LOGI is not a competitor of TW, but an extension, to be used as a second, more advanced step.</p></div>
			</abstract>
		</profileDesc>
	</teiHeader>
	<text xml:lang="en">
		<body>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1">Motivation</head><p>LOGI is a didactic tool designed for "Logica Matematica", a first year course of the "Corso di Laurea in Informatica" at the University of Milan. The decision of developing LOGI followed three years of experience using the course-ware associated to Language, Proof and Logic <ref type="bibr" target="#b0">[1]</ref> (LPL, https://ggweb.gradegrinder.net/lpl). This is one of the most widely used logic course-ware: it is available since 2002 and includes, among other tools, "Tarski's World" (TW), which provides a virtual environment for students to draw on the screen virtual worlds populated by blocks (see Fig. <ref type="figure">1</ref>); the aim is to learn the formal language of logic and understand its semantics in an easy and intuitive way.</p><p>"There are two ways to learn a second language. One is to learn how to translate sentences of the language to and from sentences of your native language. The other is to learn by using the language directly. . . . In LPL, we adopt the second method for learning FOL [first-order logic]. Tarski's World provides a simple environment in which FOL can be used in many of the ways that we use our native language. . . . With LPL, students learn not Fig. <ref type="figure">1</ref>. A Tarski's World screenshot just how to prove consequences of premises, but also the equally important technique of showing that a given claim does not follow logically from its premises. To do this, they learn how to give counterexamples, which are really proofs of non-consequence. These will often [our emphasis] be given using Tarski's World" ([1], pages 14-5).</p><p>In our experience, TW effectively helps students in gaining some understanding of logic and students do like it. LPL contains a ton of exercises that can be developed and checked via the tools and we used them in lectures and as support for homework. However, most exercises involve signatures and interpretations different from TW. For example, there are exercises requiring to translate English statements into FOL, "introducing names, predicates, and function symbols as needed", considering other first order languages and interpretations, or asking to prove that an argument valid in TW is not valid in FOL, etc. These exercises have to be solved by hand. It will come to nobody's surprise that many students present very confused and imprecise solutions, which are in turn difficult to grade. Furthermore, students themselves would like to have a tool to check the correctness of their homework. LOGI aims to address those issues by: a) Defining first order (possibly many sorted) signatures, which can be stored and reused. b) Writing formulas and arguments in the language of a chosen signature. LOGI checks the correctness of formulas with respect to the signature. If no signature is declared, LOGI tries to infer one from the formulas. c) Introducing finite interpretations of the chosen signature. LOGI checks that interpretations are correctly formulated. d) Evaluating the truth/falsity of formulas in an interpretation or in a set of interpretations. LOGI shows also a detailed explanation of the computation of an evaluation. e) Supporting explicit definitions.</p><p>An additional motivation for LOGI is to emphasize the role of modeling in software development: FOL can be seen as a paradigmatic modeling language with a consolidated formal semantics. LOGI allows students to formalize "contexts", that is the set of "circumstances" which we are reasoning about. In LOGI a formal model of a context is obtained by introducing a signature that allows the user to represent all the circumstances of interest as first order interpretations and to express all related properties by primitively or explicitly defined symbols. Furthermore, to help modeling large examples, LOGI handles incomplete information, in the form of partially defined interpretations as well as of partially defined functions, corresponding to situations of partial knowledge typical of software systems. Note that since we also allow integers as a fixed structure, our system is outside of the strict limits of first-order logic. The first step is to create the required signature via the button "Crea Segnatura" in the "Creazione Fogli" menu (Fig. <ref type="figure" target="#fig_0">2</ref>, left). Sheets are the basic units of the tool and an exercise involves the creation of a set of sheets of different kinds: .sig for signatures, .sp for formulas of a specific signature, .intp for interpretations and so on. Fig. <ref type="figure" target="#fig_0">2</ref>, right, shows how to give a (many sorted) first order signature. A signature always includes u, the "universe" of discourse, while in this example we also have integers, used here to interpret the height function. In LOGI, by declaring the sort integer the predefined structure of integers is automatically included. If types in constant, function or predicate declarations are different from u, they have to be explicitly declared (see the declaration of height in Fig. <ref type="figure" target="#fig_0">2</ref>); otherwise u is assumed. The syntax of declarations is quite intuitive and the tool clearly reports mistakes by highlighting.</p><p>The second step is to write down the required translations (Fig. <ref type="figure">3</ref>). We consider here only two of the statements of the exercise, shown in the comments. Formulas are checked with respect to both FOL syntax and the declared signature. Once the formulas are correct, the sheet is accepted.</p><p>The third step is to formalize the required interpretation, a fragment of which is shown in Fig. <ref type="figure" target="#fig_1">4</ref>. Mistakes, such as for example multi-valued functions, are signaled by error messages. In the case of partially defined information, the tool just issues a warning, see again Fig. <ref type="figure" target="#fig_1">4</ref>. Finally, in exercises such as the one considered here, the last step is to evaluate the truth of formulas in a given sheet w.r.t. the considered interpretation. This is done via the "Esercizi" menu (details omitted). The result is  Logically, this is accomplished recording during the interpretation, and then verbalizing evaluation forms <ref type="bibr" target="#b1">[2]</ref>, which are essentially a kind of realizers of given formulas.</p><p>The tool is entirely developed in SWI Prolog -LPL's Java code basis being proprietary -and consists of circa 6000 lines of code, including extensive comments. It contains three main "components": application, parser, and GUI, trying to bend SWI's limited module system to approximate as much as possible the notion of software components; this in order to separate the basic functionalities from the concrete representation of the sheets and from the GUI, simplifying future improvements and modifications. The information flow is the following: Sheet on the GUI ↔ (1) list(char) for the parser ↔ (2) Prolog term for the application The GUI is responsible for the translation <ref type="bibr" target="#b0">(1)</ref>. Different GUIs may behave in different ways, but all have to produce the same representation for the parser. The current GUI is based on XPCE-Emacs. For better rendering of logical symbols, we use different fonts and encodings for Windows and Unix systems. A custom written DCG parser, with a reasonable error messaging, is in charge of the translation <ref type="bibr" target="#b1">(2)</ref>. We refer to that as a "compilation".</p><p>Finally, the application component contains the basic functionalities. It defines the Prolog representation of signatures, interpretations and formulas, it checks the conformance of formulas and interpretations to a signature and evaluates the truth-value of formulas in an interpretation. Moreover, a compilation manager module maintains a dynamic database of the compiled sheets and their dependencies: for example, if a signature sheet is modified, the interpretation and formula sheets depending on it in general are no longer correct and thus are deleted from the compiled ones.</p></div><figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_0"><head>Fig. 2 .</head><label>2</label><figDesc>Fig. 2. Creating a new signature s1.sig</figDesc><graphic coords="3,151.77,229.76,311.81,68.04" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_1"><head>Fig. 4 .</head><label>4</label><figDesc>Fig. 4. Interpretation i1.intp of the signature s1.sig</figDesc><graphic coords="4,151.77,115.84,311.82,90.71" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_2"><head>Fig. 5 .</head><label>5</label><figDesc>Fig. 5. Truth evaluation</figDesc><graphic coords="4,134.77,334.40,369.53,180.38" type="bitmap" /></figure>
		</body>
		<back>

			<div type="acknowledgement">
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4">Conclusions</head><p>We have presented LOGI, a didactic tool for a beginners' course in Logic. Being a prototype, LOGI has not been tested in the classroom yet, but we plan to experiment with it in the next edition and collect data, hopefully showing that it can improve students' performances.</p><p>We recall that we have designed LOGI to complement TW, addressing the same kinds of problems with the same approach, but opening up the choice of language. From this viewpoint, consistently with LPL's choice, we are not interested (for the time being) in other significant issues in a Logic course, such as automatic proofs and/or counter-model generation; for this we refer to existing tools, which can conceivably be integrated in a later version.</p><p>The code for both Windows and for Linux can be found at https://homes.di. unimi.it/ornaghi/logi, together with some limited documentation.</p></div>
			</div>

			<div type="references">

				<listBibl>

<biblStruct xml:id="b0">
	<analytic>
		<title level="a" type="main">Language, Proof, and Logic: Second Edition</title>
		<author>
			<persName><forename type="first">D</forename><surname>Barker-Plummer</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Barwise</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Etchemendy</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Center for the Study of Language and Information/SRI</title>
				<imprint>
			<date type="published" when="2011">2011</date>
		</imprint>
	</monogr>
	<note>2nd edition</note>
</biblStruct>

<biblStruct xml:id="b1">
	<analytic>
		<title level="a" type="main">Some results on intermediate constructive logics</title>
		<author>
			<persName><forename type="first">P</forename><surname>Miglioli</surname></persName>
		</author>
		<author>
			<persName><forename type="first">U</forename><surname>Moscato</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Ornaghi</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Quazza</surname></persName>
		</author>
		<author>
			<persName><forename type="first">G</forename><surname>Usberti</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Notre Dame Journal of Formal Logic</title>
		<imprint>
			<biblScope unit="volume">30</biblScope>
			<biblScope unit="issue">4</biblScope>
			<biblScope unit="page" from="543" to="562" />
			<date type="published" when="1989">1989</date>
		</imprint>
	</monogr>
</biblStruct>

				</listBibl>
			</div>
		</back>
	</text>
</TEI>
