{"id":{"repo_id":"vilnius","oai_identifier":"oai:vu.lt:elaba:308338306"},"canonical_url":"https://search.ndltd.org/etd/vilnius/oai:vu.lt:elaba:308338306","repository":{"repo_id":"vilnius","name":"Vilnius University","base_url":"https://epublications.vu.lt/oai"},"display":{"title":"Modelling and formal verification of spes query equivalence tool using isabelle/hol /","abstract":"SQL query equivalence (determining whether two SQL queries produce the same result for every possible database) is an important problem with applications in query optimization, automated grading and duplicate elimination in data pipelines. Several solvers for this problem exist, however not every solver has been formally verified. A bug in such a solver could lead to silent data corruption, making formal verification a worthwhile investment. SPES is a symbolic SQL query equivalence solver that supports bag semantics and NULL values. It works by constructing a symbolic representation of bijection between two queries and proving that bijection is an identity function. The original SPES paper provides a semi-formal soundness argument, but no machine-checked proof. In this work, the author develops a formal mathematical model for a trimmed-down version of SPES supporting Table, Select, Project and Union queries, formalizes it in Isabelle/HOL using multiset-based table representation and deep embedding for first-order logic formulas, and successfully proves the soundness of the modelled version of SPES. The thesis covers the modelling decisions, iterative modelling process and the resulting Isabelle/HOL proof.","abstract_html":"SQL query equivalence (determining whether two SQL queries produce the same result for every possible database) is an important problem with applications in query optimization, automated grading and duplicate elimination in data pipelines. Several solvers for this problem exist, however not every solver has been formally verified. A bug in such a solver could lead to silent data corruption, making formal verification a worthwhile investment. SPES is a symbolic SQL query equivalence solver that supports bag semantics and NULL values. It works by constructing a symbolic representation of bijection between two queries and proving that bijection is an identity function. The original SPES paper provides a semi-formal soundness argument, but no machine-checked proof. In this work, the author develops a formal mathematical model for a trimmed-down version of SPES supporting Table, Select, Project and Union queries, formalizes it in Isabelle/HOL using multiset-based table representation and deep embedding for first-order logic formulas, and successfully proves the soundness of the modelled version of SPES. The thesis covers the modelling decisions, iterative modelling process and the resulting Isabelle/HOL proof.","abstract_has_math":false,"creators":["Piatrashka, Kanstantinas,"],"institution":"Institutional Repository of Vilnius University","degree_name":null,"degree_level":null,"degree_discipline":null,"degree_department":null,"school":null,"contributors":[],"advisors":[],"committee_chairs":[],"committee_members":[],"year":2026,"date_issued":"2026","date_published":"2026","updated_at":"2026-11-19T10:12:59Z","subjects":["Formal methods, SPES, Isabelle/HOL, SQL"],"languages":["eng"],"rights":["info:eu-repo/semantics/openAccess"],"rights_urls":[],"identifier_entries":[],"person_identifier_entries":[]},"links":{"outbound_url":"https://repository.vu.lt/VU:ELABAETD308338306&prefLang=en_US","outbound_label":"Repository record","outbound_source":"dc:identifier","record_url":"https://repository.vu.lt/VU:ELABAETD308338306&prefLang=en_US","record_label":"Repository record","record_kind":"record","record_source":"dc:identifier","download_url":null,"download_label":null,"download_source":null,"access_status":"open","embargo_until":null,"access_note":null},"source_record":{"url":"https://epublications.vu.lt/oai?verb=GetRecord&metadataPrefix=oai_dc&identifier=oai%3Avu.lt%3Aelaba%3A308338306","prefix":"oai_dc"},"metadata_groups":[{"id":"people","label":"People","entries":[{"key":"dc:creator","label":"Author","values":["Piatrashka, Kanstantinas,"]}]},{"id":"academic_context","label":"Academic Context","entries":[{"key":"dc:date","label":"Dc Date","values":["2026"]},{"key":"dc:publisher","label":"Institution","values":["Institutional Repository of Vilnius University"]},{"key":"dc:relation","label":"Dc Relation","values":["https://epublications.vu.lt/object/elaba:308338306/308338306.pdf"]},{"key":"dc:type","label":"Dc Type","values":["info:eu-repo/semantics/bachelorThesis"]}]},{"id":"subjects_keywords","label":"Subjects and Keywords","entries":[{"key":"dc:subject","label":"Dc Subject","values":["Formal methods, SPES, Isabelle/HOL, SQL"]}]},{"id":"language_rights","label":"Language and Rights","entries":[{"key":"dc:language","label":"Dc Language","values":["eng"]},{"key":"dc:rights","label":"Dc Rights","values":["info:eu-repo/semantics/openAccess"]}]},{"id":"identifiers","label":"Identifiers","entries":[{"key":"dc:identifier","label":"Identifier","values":["https://repository.vu.lt/VU:ELABAETD308338306&prefLang=en_US"]}]},{"id":"additional","label":"Additional Metadata","entries":[{"key":"dc:description","label":"Description","values":["SQL query equivalence (determining whether two SQL queries produce the same result for every possible database) is an important problem with applications in query optimization, automated grading and duplicate elimination in data pipelines. Several solvers for this problem exist, however not every solver has been formally verified. A bug in such a solver could lead to silent data corruption, making formal verification a worthwhile investment. SPES is a symbolic SQL query equivalence solver that supports bag semantics and NULL values. It works by constructing a symbolic representation of bijection between two queries and proving that bijection is an identity function. The original SPES paper provides a semi-formal soundness argument, but no machine-checked proof. In this work, the author develops a formal mathematical model for a trimmed-down version of SPES supporting Table, Select, Project and Union queries, formalizes it in Isabelle/HOL using multiset-based table representation and deep embedding for first-order logic formulas, and successfully proves the soundness of the modelled version of SPES. The thesis covers the modelling decisions, iterative modelling process and the resulting Isabelle/HOL proof."]},{"key":"dc:format","label":"Dc Format","values":["application/pdf"]},{"key":"dc:title","label":"Title","values":["Modelling and formal verification of spes query equivalence tool using isabelle/hol /","SPES užklausų ekvivalentumo įrankio modeliavimas ir formali verifikacija naudojant Isabelle/HOL."]}]}],"canonical_facts":{"dc:creator":["Piatrashka, Kanstantinas,"],"dc:date":["2026"],"dc:description":["SQL query equivalence (determining whether two SQL queries produce the same result for every possible database) is an important problem with applications in query optimization, automated grading and duplicate elimination in data pipelines. Several solvers for this problem exist, however not every solver has been formally verified. A bug in such a solver could lead to silent data corruption, making formal verification a worthwhile investment. SPES is a symbolic SQL query equivalence solver that supports bag semantics and NULL values. It works by constructing a symbolic representation of bijection between two queries and proving that bijection is an identity function. The original SPES paper provides a semi-formal soundness argument, but no machine-checked proof. In this work, the author develops a formal mathematical model for a trimmed-down version of SPES supporting Table, Select, Project and Union queries, formalizes it in Isabelle/HOL using multiset-based table representation and deep embedding for first-order logic formulas, and successfully proves the soundness of the modelled version of SPES. The thesis covers the modelling decisions, iterative modelling process and the resulting Isabelle/HOL proof."],"dc:format":["application/pdf"],"dc:identifier":["https://repository.vu.lt/VU:ELABAETD308338306&prefLang=en_US"],"dc:language":["eng"],"dc:publisher":["Institutional Repository of Vilnius University"],"dc:relation":["https://epublications.vu.lt/object/elaba:308338306/308338306.pdf"],"dc:rights":["info:eu-repo/semantics/openAccess"],"dc:subject":["Formal methods, SPES, Isabelle/HOL, SQL"],"dc:title":["Modelling and formal verification of spes query equivalence tool using isabelle/hol /","SPES užklausų ekvivalentumo įrankio modeliavimas ir formali verifikacija naudojant Isabelle/HOL."],"dc:type":["info:eu-repo/semantics/bachelorThesis"]},"updated_at":"2026-11-19T10:12:59Z"}