MoTion: A new declarative object matching ...
Document type :
Article dans une revue scientifique: Article original
Permalink :
Title :
MoTion: A new declarative object matching approach in Pharo
Author(s) :
Hosry, Aless [Auteur]
Reflective Evolution of Ever-running Software Systems [EVREF]
Aranega, Vincent [Auteur]
Anquetil, Nicolas [Auteur]
Centre de Recherche en Informatique, Signal et Automatique de Lille - UMR 9189 [CRIStAL]
Analyses and Languages Constructs for Object-Oriented Application Evolution [RMOD]
Reflective Evolution of Ever-running Software Systems [EVREF]
Aranega, Vincent [Auteur]
Anquetil, Nicolas [Auteur]
Centre de Recherche en Informatique, Signal et Automatique de Lille - UMR 9189 [CRIStAL]
Analyses and Languages Constructs for Object-Oriented Application Evolution [RMOD]
Journal title :
Journal of Computer Languages
Pages :
101290
Publisher :
Elsevier
Publication date :
2024-09-04
ISSN :
2590-1184
English keyword(s) :
Pattern matching
Object Oriented
Smalltalk
Object Oriented
Smalltalk
HAL domain(s) :
Informatique [cs]/Langage de programmation [cs.PL]
English abstract : [en]
<div><p>Pattern matching is an expressive way of matching data and extracting pieces of information from it. The recent inclusion of pattern matching in the Java and Python languages highlights that such a facility is more ...
Show more ><div><p>Pattern matching is an expressive way of matching data and extracting pieces of information from it. The recent inclusion of pattern matching in the Java and Python languages highlights that such a facility is more and more adopted by developers for everyday development. Other main stream programming languages also offer pattern matching capabilities as part of the language (Rust, Scala, Haskell, and OCaml), with different degrees of expressivity in what can be matched. In the meantime, in graphs, pattern matching takes a slightly different turn; it enhances the expressivity of the patterns that can be defined. Smalltalk currently offers little pattern matching capability to find specific objects inside a large graph of objects using a declarative pattern. In Pharo, the closest library to classical pattern matching that exists is the RBParseTreeSearcher, which allows to express specialized patterns over a Pharo Abstract Syntax Tree to find some inner node. The question arises of what features a flexible pattern matching language should have. In this paper, we review the features found in different existing pattern matching languages, both in General Purpose Languages (like Java) and in declarative graph pattern matching languages. We then describe MoTion, a new pattern matching engine for Pharo smalltalk, combining all these features. We discuss some aspects of MoTion's implementation and illustrate its use with real case examples.</p></div>Show less >
Show more ><div><p>Pattern matching is an expressive way of matching data and extracting pieces of information from it. The recent inclusion of pattern matching in the Java and Python languages highlights that such a facility is more and more adopted by developers for everyday development. Other main stream programming languages also offer pattern matching capabilities as part of the language (Rust, Scala, Haskell, and OCaml), with different degrees of expressivity in what can be matched. In the meantime, in graphs, pattern matching takes a slightly different turn; it enhances the expressivity of the patterns that can be defined. Smalltalk currently offers little pattern matching capability to find specific objects inside a large graph of objects using a declarative pattern. In Pharo, the closest library to classical pattern matching that exists is the RBParseTreeSearcher, which allows to express specialized patterns over a Pharo Abstract Syntax Tree to find some inner node. The question arises of what features a flexible pattern matching language should have. In this paper, we review the features found in different existing pattern matching languages, both in General Purpose Languages (like Java) and in declarative graph pattern matching languages. We then describe MoTion, a new pattern matching engine for Pharo smalltalk, combining all these features. We discuss some aspects of MoTion's implementation and illustrate its use with real case examples.</p></div>Show less >
Language :
Anglais
Peer reviewed article :
Oui
Audience :
Internationale
Popular science :
Non
Collections :
Source :
Submission date :
2024-10-08T02:32:53Z
Files
- document
- Open access
- Access the document
- main.pdf
- Open access
- Access the document