{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2025,10,11]],"date-time":"2025-10-11T01:36:17Z","timestamp":1760146577210,"version":"build-2065373602"},"reference-count":25,"publisher":"MDPI AG","issue":"4","license":[{"start":{"date-parts":[[2024,11,19]],"date-time":"2024-11-19T00:00:00Z","timestamp":1731974400000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Software"],"abstract":"<jats:p>This paper describes the Pawns programming language, currently under development, which uses several novel features to combine the functional and imperative programming paradigms. It supports pure functional programming (including algebraic data types, higher-order programming and parametric polymorphism), where the representation of values need not be considered. It also supports lower-level C-like imperative programming with pointers and the destructive update of all fields of the structs used to represent the algebraic data types. All destructive update of variables is made obvious in Pawns code, via annotations on statements and in type signatures. Type signatures must also declare sharing between any arguments and result that may be updated. For example, if two arguments of a function are trees that share a subtree and the subtree is updated within the function, both variables must be annotated at that point in the code, and the sharing and update of both arguments must be declared in the type signature of the function. The compiler performs extensive sharing analysis to check that the declarations and annotations are correct. This analysis allows destructive update to be encapsulated: a function with no update annotations in its type signature is guaranteed to behave as a pure function, even though the value returned may have been constructed using destructive update within the function. Additionally, the sharing analysis helps support a constrained form of global variables that also allows destructive update to be encapsulated and safe update of variables with polymorphic types to be performed.<\/jats:p>","DOI":"10.3390\/software3040023","type":"journal-article","created":{"date-parts":[[2024,11,20]],"date-time":"2024-11-20T10:37:35Z","timestamp":1732099055000},"page":"473-497","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":0,"title":["A Brief Overview of the Pawns Programming Language"],"prefix":"10.3390","volume":"3","author":[{"ORCID":"https:\/\/orcid.org\/0000-0001-7185-0115","authenticated-orcid":false,"given":"Lee","family":"Naish","sequence":"first","affiliation":[{"name":"Computingand Information Systems, The University of Melbourne, Parkville 3052, Australia"}]}],"member":"1968","published-online":{"date-parts":[[2024,11,19]]},"reference":[{"key":"ref_1","unstructured":"Naish, L. (2024, November 13). An Informal Introduction to Pawns: A Declarative\/Imperative Language. Available online: https:\/\/lee-naish.github.io\/papers\/pawns\/."},{"key":"ref_2","unstructured":"Jones, S.P. (2002). Haskell 98 Language and Libraries: The Revised Report, Cambridge University Press. Available online: https:\/\/haskell.org\/."},{"key":"ref_3","unstructured":"Kernighan, B.W., and Ritchie, D.M. (1988). The C Programming Language, Prentice Hall. [2nd ed.]. Prentice Hall Professional Technical Reference."},{"key":"ref_4","unstructured":"Wadsworth, C. (1971). Semantics and Pragmatics of the Lambda-Calculus, University of Oxford."},{"key":"ref_5","unstructured":"Warren, D.H.D. (1983). An Abstract Prolog Instruction Set, SRI International. Tecnical Note 309."},{"key":"ref_6","doi-asserted-by":"crossref","first-page":"5","DOI":"10.1016\/S0743-1066(96)00065-9","article-title":"Parma\u2014Bridging the Performance GAP Between Imperative and Logic Programming","volume":"29","author":"Taylor","year":"1996","journal-title":"J. Log. Program."},{"key":"ref_7","doi-asserted-by":"crossref","first-page":"310","DOI":"10.1145\/366622.366626","article-title":"An algorithm for equivalence declarations","volume":"4","author":"Arden","year":"1961","journal-title":"Commun. ACM"},{"key":"ref_8","unstructured":"Lippmeier, B. (2009). Type Inference and Optimisation for an Impure World. [Ph.D. Thesis, Australian National University]. Available online: https:\/\/benl.ouroborus.net\/papers\/2010-impure\/lippmeier-impure-world.pdf."},{"key":"ref_9","unstructured":"Giuca, M. (2014). Mars: An Imperative\/Declarative Higher-Order Programming Language with Automatic Destructive Update. [Ph.D. Thesis, University of Melbourne]."},{"key":"ref_10","doi-asserted-by":"crossref","first-page":"1685","DOI":"10.1002\/spe.2407","article-title":"Adtpp: Lightweight efficient safe polymorphic algebraic data types for C","volume":"46","author":"Naish","year":"2016","journal-title":"Softw. Pract. Exp."},{"key":"ref_11","doi-asserted-by":"crossref","unstructured":"Milner, R., Tofte, M., and Macqueen, D. (1997). The Definition of Standard ML, MIT Press.","DOI":"10.7551\/mitpress\/2319.001.0001"},{"key":"ref_12","doi-asserted-by":"crossref","first-page":"e22","DOI":"10.7717\/peerj-cs.22","article-title":"Sharing analysis in the Pawns compiler","volume":"1","author":"Naish","year":"2015","journal-title":"PeerJ Comput. Sci."},{"key":"ref_13","unstructured":"Bruynooghe, M. (1986, January 15\u201317). Compile time garbage collection or how to transform programs in an assignment free languages into code with assignments. Proceedings of the IFIP TC2\/WG2.1 Working Conference on Program Specification and Transformation, Bad-T\u00f6lz, Germany."},{"key":"ref_14","doi-asserted-by":"crossref","first-page":"807","DOI":"10.1002\/spe.4380180902","article-title":"Garbage Collection in an Uncooperative Environment","volume":"18","author":"Boehm","year":"1988","journal-title":"Softw. Pract. Exper."},{"key":"ref_15","unstructured":"Plasmeijer, R., and van Eekelen, M. (2002). Concurrent Clean Language Report, Version 2.1, University of Nijmegen."},{"key":"ref_16","doi-asserted-by":"crossref","first-page":"1","DOI":"10.1016\/0304-3975(87)90045-4","article-title":"Linear logic","volume":"50","author":"Girard","year":"1987","journal-title":"Theor. Comput. Sci."},{"key":"ref_17","first-page":"5","article-title":"Linear Haskell: Practical linearity in a higher-order polymorphic language","volume":"2","author":"Bernardy","year":"2017","journal-title":"Proc. ACM Program. Lang."},{"key":"ref_18","doi-asserted-by":"crossref","first-page":"17","DOI":"10.1016\/S0743-1066(96)00068-4","article-title":"The Execution Algorithm of Mercury, an Efficient Purely Declarative Logic Programming Language","volume":"29","author":"Somogyi","year":"1996","journal-title":"J. Log. Program."},{"key":"ref_19","first-page":"105","article-title":"Practical aspects for a working compile time garbage collection system for Mercury","volume":"Volume 2237","author":"Codognet","year":"2001","journal-title":"Logic Programming, Proceedings of the 17th International Conference, ICLP 2001, Paphos, Cyprus, 26 November\u20131 December 2001"},{"key":"ref_20","doi-asserted-by":"crossref","unstructured":"Mulkers, A. (1993). Live Data Structures in Logic Programs, Derivation by Means of Abstract Interpretation, Springer.","DOI":"10.1007\/3-540-56694-5"},{"key":"ref_21","doi-asserted-by":"crossref","unstructured":"Peyton Jones, S., and Wadler, P. (1993, January 10\u201313). Imperative functional programming. Proceedings of the 20th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, Charleston, SC, USA.","DOI":"10.1145\/158511.158524"},{"key":"ref_22","doi-asserted-by":"crossref","first-page":"245","DOI":"10.1017\/S0956796800000393","article-title":"Polymorphic type, region and effect inference","volume":"2","author":"Talpin","year":"1992","journal-title":"J. Funct. Program."},{"key":"ref_23","doi-asserted-by":"crossref","first-page":"671","DOI":"10.1145\/365813.365819","article-title":"SIMULA: An ALGOL-based simulation language","volume":"9","author":"Dahl","year":"1966","journal-title":"Commun. ACM"},{"key":"ref_24","doi-asserted-by":"crossref","first-page":"184","DOI":"10.1145\/367177.367199","article-title":"Recursive functions of symbolic expressions and their computation by machine, Part I","volume":"3","author":"McCarthy","year":"1960","journal-title":"Commun. ACM"},{"key":"ref_25","doi-asserted-by":"crossref","unstructured":"Burstall, R.M., MacQueen, D.B., and Sannella, D. (1980, January 25\u201327). HOPE: An experimental applicative language. Proceedings of the LISP Conference, Stanford, CA, USA.","DOI":"10.1145\/800087.802799"}],"container-title":["Software"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/2674-113X\/3\/4\/23\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,10,10]],"date-time":"2025-10-10T16:35:15Z","timestamp":1760114115000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/2674-113X\/3\/4\/23"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2024,11,19]]},"references-count":25,"journal-issue":{"issue":"4","published-online":{"date-parts":[[2024,12]]}},"alternative-id":["software3040023"],"URL":"https:\/\/doi.org\/10.3390\/software3040023","relation":{},"ISSN":["2674-113X"],"issn-type":[{"type":"electronic","value":"2674-113X"}],"subject":[],"published":{"date-parts":[[2024,11,19]]}}}