{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,9,12]],"date-time":"2026-09-12T23:25:27Z","timestamp":1789255527912,"version":"build-2803163510"},"reference-count":9,"publisher":"Cambridge University Press (CUP)","issue":"6","license":[{"start":{"date-parts":[[2021,11,2]],"date-time":"2021-11-02T00:00:00Z","timestamp":1635811200000},"content-version":"unspecified","delay-in-days":1,"URL":"http:\/\/creativecommons.org\/licenses\/by-nc-sa\/4.0\/"}],"content-domain":{"domain":["cambridge.org"],"crossmark-restriction":true},"short-container-title":["Theory and Practice of Logic Programming"],"published-print":{"date-parts":[[2021,11]]},"abstract":"<jats:title>Abstract<\/jats:title><jats:p>Whitby is the server-side of an Intelligent Tutoring System application for learning System-Theoretic Process Analysis (STPA), a methodology used to ensure the safety of anything that can be represented with a systems model. The underlying logic driving the reasoning behind Whitby is Situation Calculus, which is a many-sorted logic with situation, action, and object sorts. The Situation Calculus is applied to Ontology Authoring and Contingent Scaffolding: the primary activities within Whitby. Thus many fluents and actions are aggregated in Whitby from these two sub-applications and from Whitby itself, but all are available through a common situation query interface that does not depend upon any of the fluents or actions. Each STPA project in Whitby is a single situation term, which is queried for fluents that include the ontology, and to determine what pedagogical interventions to offer. Initially Whitby was written in Prolog using a module system. In the interest of a cleaner architecture and implementation with improved code reuse and extensibility, the initial application was refactored into Logtalk. This refactoring includes decoupling the Situation Calculus reasoner, Ontology Authoring framework, and Contingent Scaffolding framework into third-party libraries that can be reused in other applications. This extraction was achieved by inverting dependencies via Logtalk <jats:italic>protocols<\/jats:italic> and <jats:italic>categories<\/jats:italic>, which are reusable interfaces and components that provide functionally cohesive sets of predicate <jats:italic>declarations<\/jats:italic> and predicate <jats:italic>definitions<\/jats:italic>. In this paper the architectures of two iterations of Whitby are evaluated with respect to the motivations behind the refactor: clean architecture enabling code reuse and extensibility.<\/jats:p>","DOI":"10.1017\/s1471068421000326","type":"journal-article","created":{"date-parts":[[2021,11,2]],"date-time":"2021-11-02T09:09:33Z","timestamp":1635844173000},"page":"818-834","update-policy":"https:\/\/doi.org\/10.1017\/policypage","source":"Crossref","is-referenced-by-count":2,"title":["Refactoring the Whitby Intelligent Tutoring System for Clean Architecture"],"prefix":"10.1017","volume":"21","author":[{"ORCID":"https:\/\/orcid.org\/0000-0003-4134-9092","authenticated-orcid":false,"given":"PAUL S.","family":"BROWN","sequence":"first","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"VANIA","family":"DIMITROVA","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"GLEN","family":"HART","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"ANTHONY G.","family":"COHN","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"PAULO","family":"MOURA","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"56","published-online":{"date-parts":[[2021,11,2]]},"reference":[{"key":"S1471068421000326_ref9","doi-asserted-by":"publisher","DOI":"10.1111\/j.1469-7610.1976.tb00381.x"},{"key":"S1471068421000326_ref7","volume-title":"The Logtalk Handbook","author":"Moura","year":"2021"},{"key":"S1471068421000326_ref6","doi-asserted-by":"crossref","unstructured":"Moura, P. 2011. Programming patterns for Logtalk parametric objects. In Applications of Declarative Programming and Knowledge Management, Abreu, S. and Seipel, D. , Eds. Lecture Notes in Artificial Intelligence, Vol. 6547. Springer-Verlag, Berlin Heidelberg, 52\u201369.","DOI":"10.1007\/978-3-642-20589-7_4"},{"key":"S1471068421000326_ref1","volume-title":"Design Patterns: Elements of Reusable Object-Oriented Software","author":"Gamma","year":"1997"},{"key":"S1471068421000326_ref5","volume-title":"Clean Architecture: A Craftman\u2019s Guide to Software Structure and Design","author":"Martin","year":"2018"},{"key":"S1471068421000326_ref2","doi-asserted-by":"publisher","DOI":"10.1006\/ijhc.1995.1081"},{"key":"S1471068421000326_ref4","volume-title":"International Standard ISO\/IEC 13211-2 Information Technology \u2014 Programming Languages \u2014 Prolog \u2014 Part II: Modules","year":"2000"},{"key":"S1471068421000326_ref8","doi-asserted-by":"publisher","DOI":"10.7551\/mitpress\/4074.001.0001"},{"key":"S1471068421000326_ref3","volume-title":"International Standard ISO\/IEC 13211-1 Information Technology \u2014 Programming Languages \u2014 Prolog \u2014 Part I: General core","year":"1995"}],"container-title":["Theory and Practice of Logic Programming"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.cambridge.org\/core\/services\/aop-cambridge-core\/content\/view\/S1471068421000326","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2022,1,6]],"date-time":"2022-01-06T10:18:13Z","timestamp":1641464293000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.cambridge.org\/core\/product\/identifier\/S1471068421000326\/type\/journal_article"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2021,11]]},"references-count":9,"journal-issue":{"issue":"6","published-print":{"date-parts":[[2021,11]]}},"alternative-id":["S1471068421000326"],"URL":"https:\/\/doi.org\/10.1017\/s1471068421000326","relation":{},"ISSN":["1471-0684","1475-3081"],"issn-type":[{"value":"1471-0684","type":"print"},{"value":"1475-3081","type":"electronic"}],"subject":[],"published":{"date-parts":[[2021,11]]},"assertion":[{"value":"\u00a9 The Author(s), 2021. Published by Cambridge University Press","name":"copyright","label":"Copyright","group":{"name":"copyright_and_licensing","label":"Copyright and Licensing"}},{"value":"This is an Open Access article, distributed under the terms of the Creative Commons Attribution-NonCommercial-ShareAlike licence (http:\/\/creativecommons.org\/licenses\/by-nc-sa\/4.0\/), which permits non-commercial re-use, distribution, and reproduction in any medium, provided the same Creative Commons licence is used to distribute the re-used or adapted article and the original article is properly cited. The written permission of Cambridge University Press must be obtained prior to any commercial use.","name":"license","label":"License","group":{"name":"copyright_and_licensing","label":"Copyright and Licensing"}},{"value":"This content has been made available to all.","name":"free","label":"Free to read"}]}}