Keele täiendamine lausearvutusvalemite translaatori näitel
Date
2019
Authors
Journal Title
Journal ISSN
Volume Title
Publisher
Abstract
Mitmeid kombinatoorikaprobleeme saab kirjeldada lausearvutusvalemite abil. Antud loogikavalemi kehtestavate väärtustuste leidmisel on võimalik teada saada püstitatud ülesande võimalikud lahendid, milleks ongi valemi kehtestavate väärtustuste arv. Sellise lähenemisviisiga ülesannete hõlbustamiseks on loodud lausearvutusvalemite translaator, mis teisendab LaTeX formaadis parametriseeritud sisendvalemi kindla formaadiga parameetriteta lausearvutusvalemiks. Teisendatud valemit saab seejärel kasutada mõne kehtestavate väärtustuste loenduriga, et leida valemi kehtestavate väärtustuste arv. Antud töö eesmärgiks oli anda ülevaade, kuidas teha läbi ühe programmeerimiskeele täiendamine eelmainitud lausearvutusvalemite translaatori näitel. Töö tulemusena täienes lausearvutusvalemite translaator nii, et translaator on nüüd võimeline töötlema keerulisemaid loogikavalemeid, mis kasutavad näiteks mõne etteantud graafi täiendit. Selle näitamiseks analüüsiti läbi üks Stamm-Wilbrandti poolt kirjeldatud probleem graafi klikkideks jaotamise võimaluse kontrollimise kohta, mida varem translaator ei olnud võimeline läbi töötlema. Täiendatud translaatorprogramm aitab viia läbi selliseid teaduslikke eksperimente, kus on teada mõne probleemi rahuldavate seisundite arv, aga puudub nende seisundite täielik kirjeldus.
Many combinatorial problems can be described by propositional formulae. By finding possible interpretations that satisfy a given formula, it is possible to find the solution to the problem by counting the number of satisfiable interpretations. There has been created a translator for propositional formulae to tackle combinatorial problems in such a way, which translates a parametrized formula described in LaTeX to a formula without parameters. This new formula can be used to find the number of satisfiable interpretations by using a satisfiability counter.The aim of this thesis is to give an overview of how to modify and improve a programming language using this existing translator as an example. As a result of the work of this thesis the translator is now able to process more complicated descriptions of logical formulae, for example such formulae that describe a problem using complements of a graph. To show this result, a formula for describing the cliques of a graph by Stamm-Wilbrandt, a problem that was not previously processable by the translator, was analyzed and validated. The improved translator is useful for conducting scientific experiments, where there is known the amount of satisfiable solutions, but the descriptions of those solutions is not entirely known.
Many combinatorial problems can be described by propositional formulae. By finding possible interpretations that satisfy a given formula, it is possible to find the solution to the problem by counting the number of satisfiable interpretations. There has been created a translator for propositional formulae to tackle combinatorial problems in such a way, which translates a parametrized formula described in LaTeX to a formula without parameters. This new formula can be used to find the number of satisfiable interpretations by using a satisfiability counter.The aim of this thesis is to give an overview of how to modify and improve a programming language using this existing translator as an example. As a result of the work of this thesis the translator is now able to process more complicated descriptions of logical formulae, for example such formulae that describe a problem using complements of a graph. To show this result, a formula for describing the cliques of a graph by Stamm-Wilbrandt, a problem that was not previously processable by the translator, was analyzed and validated. The improved translator is useful for conducting scientific experiments, where there is known the amount of satisfiable solutions, but the descriptions of those solutions is not entirely known.