Abstract
As opposed to textual programming languages, multidimensional languages compiler construction paradigms lack standardization. To this aim, in this paper we present the spatial grammar (SG) formalism, a grammar model for multidimensional languages which has string-like productions containing more general spatial relations other than string concatenation, and we provide mapping rules to translate an SG specification into a translation schema. In this way, the SG formalism inherits and extends to the multidimensional context concepts and techniques of standard compiler generation tools like YACC.
Similar content being viewed by others
Change history
05 June 2023
Author name tagging has been updated.
References
Aho A, Sethi R, Ullman J (1986) Compilers, principles, techniques, and tools, Addison-Wesley series in computer science and information processing. Addison-Wesley, Boston
Allen JF (1983) Maintaining knowledge about temporal intervals. Commun ACM 26(11):832–843
Balbiani P, Condotta J, del Cerro LF (1998) A model for reasoning about bidemsional temporal relations. In: Proceedings of the sixth international conference on principles of knowledge representation and reasoning (KR’98), Trento, Italy, June 2–5, 1998, pp 124–130
Barredo Arrieta A, Díaz-Rodríguez N, Del Ser J, Bennetot A, Tabik S, Barbado A, Garcia S, Gil-Lopez S, Molina D, Benjamins R, Chatila R, Herrera F (2020) Explainable artificial intelligence (xai): concepts, taxonomies, opportunities and challenges toward responsible ai. Inf Fusion 58:82–115
Becker G (2007) Combining rule-based and machine learning approaches for shape recognition. In: 36th Applied imagery pattern recognition workshop (aipr 2007), pp 65–70
Chen J, Cohn AG, Liu D, Wang S, Ouyang J, Yu Q (2015) A survey of qualitative spatial representations. Knowl Eng Rev 30:106–136
Clementini E, Felice PD, Oosterom P (1993) A small set of formal topological relationships suitable for end-user interaction. In: Proceedings of the third international symposium on advances in spatial databases (SSD’93). Springer, London, pp 277–295
Crimi C, Guercio A, Nota G, Pacini G, Tortora G, Tucci M (1991) Relation grammars and their application to multi-dimensional languages. J Vis Lang Comput 2(4):333–346
Della Penna G, Magazzeni D, Orefice S (2016) Extending visual information extraction to biomedical applications. Comput Syst Sci Eng 31(5):371–383
Della Penna G, Magazzeni D, Orefice S (2017) A formal framework to represent spatial knowledge. Knowl Inf Syst 51(1):311–338
Della Penna G, Orefice S (2018) Qualitative representation of spatio-temporal knowledge. J Vis Lang Comput 49:1–16
Della Penna G, Orefice S (2019) Using spatial relations for qualitative specification of gestures. Comput Syst Sci Eng 34(6):325–338
Della Penna G, D’Angelo A (2022) PCT\_SGtoTS algorithm repository. https://github.com/gdellapenna/PCT_SGtoTS
Egenhofer MJ, Mark DM, Herring J (1991) Categorizing binary topological relationships between regions, lines and points in geographic databases, Technical report, Department of Surveying Engineering, University of Maine
Egenhofer MJ, Mark DM, Herring J (1994) The 9-intersection: formalism and its use for natural-language spatial predicates, Technical Report 94-1, National Center for Geographic Information and Analysis
Engelfriet J (1997) Context-free graph grammars. In: Rozenberg G, Salomaa A (eds) Handbook of formal languages: volume 3 beyond words. Springer, Berlin, pp 125–214
Flesca S, Furfaro F, Greco S (2006) A graph grammars based framework for querying graph-like data. Data Knowl Eng 59(3):652–680
Fu M-Y, Huang Y-S (2010) A survey of traffic sign recognition. In: 2010 International conference on wavelet analysis and pattern recognition, pp 119–124
Giammarresi D, Restivo A (1997) Two-dimensional languages. In: Rozenberg G, Salomaa A (eds) Handbook of formal languages: volume 3 beyond words. Springer, Berlin, pp 215–267
GNU (2021) Gnu bison—the yacc-compatible parser generator. https://www.gnu.org/software/bison
Goyal R, Egenhofer M (2001) Similarity of cardinal directions. In: Jensen C, Schneider M, Seeger B, Tsotras V (eds) Advances in spatial and temporal databases, vol 2121. Lecture notes in computer science. Springer, Berlin, pp 36–55
JavaCC Community (2021) Java compiler compiler (javacc). https://javacc.github.io/javacc
Johnson SC, Sethi R (1990) Yacc: a parser generator. In: UNIX Vol. II: research system, 10th edn. W. B. Saunders Company, USA, pp 347–374
Krishnamurti R, Stouffs R (1993) Spatial grammars: motivation, comparison, and new results. In: Proceedings of the fifth international conference on computer-aided architectural design futures. North-Holland, NLD, pp 57–74
Meyer-Baese A, Schmid V (2014) Chapter 6—statistical and syntactic pattern recognition. In: Meyer-Baese A, Schmid V (eds) Pattern recognition and signal analysis in medical imaging, 2nd edn. Academic Press, Oxford, pp 151–196
Moratz R (2006) Representing relative direction as a binary relation of oriented points. In: Proceedings of the ECAI 2006, 17th European conference on artificial intelligence, August 29—September 1, 2006, Riva del Garda, Italy, including prestigious applications of intelligent systems (PAIS 2006), pp 407–411
Moratz R, Ragni M (2008) Qualitative spatial reasoning about relative point position. J Vis Lang Comput 19(1):75–98
Mossakowski T, Moratz R (2012) Qualitative reasoning about relative direction of oriented points. Artif Intell 180–181:34–45
Parr T (2021) Antlr (another tool for language recognition). https://www.antlr.org
Randell DA, Cui Z, Cohn AG (1992) A spatial logic based on regions and connection. In: Proceedings of the 3rd international conference on principles of knowledge representation and reasoning (KR’92). Cambridge, MA, October 25–29, 1992, pp 165–176
Rowe PDG, Reed C (2006) Cad grammars. In: Gero JS (ed) Design computing and cognition ’06. Springer, Dordrecht, pp 503–520
Rozenberg G, Salomaa A (eds) (1997) Handbook of formal languages, vol 3: beyond words. Springer, Berlin
Sanyal B, Mohapatra RK, Dash R (2020) Traffic sign recognition: a survey. In: 2020 International conference on artificial intelligence and signal processing (AISP), pp 1–6
Skiadopoulos S, Koubarakis M (2004) Composing cardinal direction relations. Artif Intell 152(2):143–171
Zhu Z, Liang D, Zhang S, Huang X, Li B, Hu S (2016) Traffic-sign detection and classification in the wild. In: 2016 IEEE conference on computer vision and pattern recognition (CVPR), pp 2110–2118
Acknowledgements
We thank the anonymous reviewers and the journal editor for their useful comments and suggestions.
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Della Penna, G., Orefice, S. & D’Angelo, A. Exploiting spatial relations for grammar-based specification of multidimensional languages. Knowl Inf Syst 65, 3995–4020 (2023). https://doi.org/10.1007/s10115-023-01879-6
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10115-023-01879-6