SlideShare a Scribd company logo
1
1
1
FASTTypeScript
FASTTypeScript metamodel generation
using FAST traits and TreeSitter project
Aless HOSRY, Benoit VERHAEGHE
FASTTypeScript
2
2
2
Who are we?
Alesshosry.github.io
badetitou.github.io
Scientific project manager at Berger-Levrault
Lyon, France, 2021 – Present
R&D in software analysis, team supervision
Research Engineer at Berger-Levrault
Lyon, France, 2025 – Present
R&D in software analysis
4
4
4
Motivation
§ DRIT: a department specialized in
research and composed of
researchers, PhD students, engineers
and trainees.
§ LabGL: a research team specialized
in Software Analysis, by submitting
scientific publications and creating
prototypes and innovations.
LabGL team
Applications
5
5
5
Motivation
We use different materials, but we rely on:
§ Moose: Platform for software and data analysis in Pharo. Allows
importing, parsing data, modelling, measuring, querying …
§ Famix: Abstract representation of source code
§ FAST: Famix Abstract Syntax Tree
§ MoTion: Object pattern matching in Pharo
§ …
6
6
6
Motivation
§ At Berger-Levrault we use a variety of languages
to develop our applications, for example:
§ Java is used to develop back-end applications
à LabGL team can develop tools using
FASTJava and FamixJava.
§ TypeScript is used to develop front-End
applications à FASTTypeScript does not exist,
LabGL team is blocked L
…..
7
7
7
Problem
FASTTypeScript is missing :(
§ Build a new metamodel
§ Develop a new TypeScript parser
8
8
8
FFI protocol
string := ‘class Person {
name: string;
}’.
Typescript code External parser
Methodology
9
9
9
FFI protocol
string := ‘class Person {
name: string;
}’.
Typescript code
Typescript AST
External parser
Methodology
10
10
10
§ Provides incremental parsing based
on Wagner et al. work (*)
§ Able to parse many languages:
Java, TypeScript, Python, C, C# …
§ Open source: >20k stars (Tree-sitter)
and >400 stars (Tree-sitter
TypeScript)
Solution
For parsing we chose Tree-Sitter:
* Efficient and flexible incremental parsing
Wagner et al.,1998
11
11
11
§ Languages supported: TypeScript,
Python, C, Mermaid, Groovy
§ Cross-platform: Mac, Ubuntu,
Windows
§ Automated library generation for
easy setup and CI/CD integration
Solution
§ Integration in Pharo under Pharo-Tree-Sitter:
12
12
12
class Person {
name: string;
}
Pharo-Tree-Sitter AST
Solution
FASTType_
identifier
FASTClass_
declaration
FASTClass_
body
FASTPublic_
field_
definition
FASTPrope
rty_
identifier
FASTType_
annotation
FASTPredifined_
type
FASTProgram
ü AST generated
13
13
13
class Person {
name: string;
}
Pharo-Tree-Sitter AST
ü AST generated
Limited info per
each node
Solution à Limited L
FASTType_
identifier
FASTClass_
declaration
FASTClass_
body
FASTPublic_
field_
definition
FASTPrope
rty_
identifier
FASTType_
annotation
FASTPredifined_
type
FASTProgram
14
14
14
Solution
Pharo-Tree-Sitter AST FASTTypeScript
type_
identifier
class_
declaration
class_
body
public_
field_
definition
property_
identifier
type_
annotation
predifined_
type
program
class Person {
name: string;
}
ü AST generated
ü Info provided
per each node
FASTType_
identifier
FASTClass_
declaration
FASTClass_
body
FASTPublic_
field_
definition
FASTPrope
rty_
identifier
FASTType_
annotation
FASTPredifined_
type
FASTProgram
15
15
15
§ Create first version of FASTTypeScript metamodel automatically based on
the grammar of Tree-Sitter-TypeScript
Solution
FASTTypescriptClass_
declaration
FASTTypescriptFor_
in_
statement
FASTTypescriptMethod_
definition
……
FASTTypescriptIf_
statement
FASTTypescriptTry_
statement
FASTTypescript-Model Package
16
16
16
§ Create first version of FASTTypeScript metamodel automatically based on
the grammar of Tree-Sitter-TypeScript
§ Add properties for each class to enrich the metamodel and use FAST traits
Solution
FASTTypescriptClass_
declaration
FASTTypescriptFor_
in_
statement
FASTTypescriptMethod_
definition
FASTTypescriptEntity
17
17
17
§ Create first version of FASTTypeScript metamodel automatically based on
the grammar of Tree-Sitter-TypeScript
§ Add properties for each class to enrich the metamodel and use FAST traits
Solution
FASTTypescriptClass_
declaration
FASTTypescriptFor_
in_
statement
FASTTypescriptMethod_
definition
FASTTypescriptEntity
Use FAST traits:
- FASTTEntity
- FASTTWithComments
18
18
18
§ Create first version of FASTTypeScript metamodel automatically based on
the grammar of Tree-Sitter-TypeScript
§ Add properties for each class to enrich the metamodel and use FAST traits
Solution
FASTTypescriptClass_
declaration
FASTTypescriptFor_
in_
statement
FASTTypescriptMethod_
definition
FASTTypescriptEntity
Use FAST traits:
- FASTTEntity
- FASTTWithComments
- Body
- Name
- Body
- Name
- Parameters
- Return_Type
- Body
- Left
- Right
19
19
19
§ Create first version of FASTTypeScript metamodel automatically
based on the grammar of Tree-Sitter-TypeScript
§ Add properties for each class to enrich the metamodel and use FAST
traits
§ Create an importer from Pharo-Tree-Sitter to FASTTypeScript
Solution
20
20
20
Solution
Pharo-Tree-Sitter AST FASTTypeScript
type_
identifier
class_
declaration
class_
body
public_
field_
definition
property_
identifier
type_
annotation
predifined_
type
program
Importer main tasks:
§ Creates a new instance of
FASTTypeScript
21
21
21
Solution
Pharo-Tree-Sitter AST FASTTypeScript
type_
identifier
class_
declaration
class_
body
public_
field_
definition
property_
identifier
type_
annotation
predifined_
type
program
Importer main tasks:
§ Creates a new instance of
FASTTypeScript
§ Creates the nodes and set
positions
FASTType_
identifier
FASTClass_
declaration
FASTClass_
body
FASTPublic_
field_
definition
FASTPrope
rty_
identifier
FASTType_
annotation
FASTPredifined_
type
FASTProgram
22
22
22
Solution
Pharo-Tree-Sitter AST FASTTypeScript
type_
identifier
class_
declaration
class_
body
public_
field_
definition
property_
identifier
type_
annotation
predifined_
type
program
Importer main tasks:
§ Creates a new instance of
FASTTypeScript
§ Creates the nodes and set
positions
§ Fill the rootNode with the
source code.
FASTType_
identifier
FASTClass_
declaration
FASTClass_
body
FASTPublic_
field_
definition
FASTPrope
rty_
identifier
FASTType_
annotation
FASTPredifined_
type
FASTProgram
23
23
23
Demo
24
24
24
Use cases
§ Methodology use case example:
§ Implementation of Famix metamodels for Perl C using Pharo-Tree-Sitter
§ FASTTypeScript use case example:
§ 2 separate projects are using FASTTypeScript at BL
§ MoTion (pattern matching library) could be used with FASTTypeScript as a searching
engine
25
25
25
pattern := FASTTypescriptModel % {
#entities <=> FASTTypescriptMethod_definition % {
#sourceCode <=> 'gets+.*'.
#children <=> FASTTypescriptStatement_block % {
#children <=> { #'@child1'. #'*otherChilds'. }
}.
}
}.
Use cases
MoTion pattern with FASTTypescript:
26
26
26
Future work
§ Incremental parsing for FASTTypeScript
§ Cover all properties: 30% already covered
§ Carrefour FamixTypeScript FASTTypeScript
§ Implementation of more BL projects that depends on FASTTypeScript
§ Perhaps FASTNewLanguage ?
27
27
27
Thank you for your
attention

More Related Content

PDF
Analyzing Dart Language with Pharo: Report and early results
PPT
Visual Studio .NET2010
PPTX
2. introduction
PDF
Introduction of Pharo 5.0
PPTX
Bringing the Power and Familiarity of .NET, C# and F# to Big Data Processing ...
PPTX
carrow - Go bindings to Apache Arrow via C++-API
PPTX
Big Data Processing with .NET and Spark (SQLBits 2020)
PDF
20100730 phpstudy
Analyzing Dart Language with Pharo: Report and early results
Visual Studio .NET2010
2. introduction
Introduction of Pharo 5.0
Bringing the Power and Familiarity of .NET, C# and F# to Big Data Processing ...
carrow - Go bindings to Apache Arrow via C++-API
Big Data Processing with .NET and Spark (SQLBits 2020)
20100730 phpstudy

Similar to FASTTypeScript metamodel generation using FAST traits and TreeSitter project (20)

PDF
Language-agnostic data analysis workflows and reproducible research
PDF
Building and deploying LLM applications with Apache Airflow
PDF
Apache Deep Learning 201 - Philly Open Source
PPTX
PHP Development Tools 2.0 - Success Story
PPTX
Xtend api and_dsl_design_patterns_eclipse_confrance2016
PDF
TensorFlow meetup: Keras - Pytorch - TensorFlow.js
PPTX
Terraform modules restructured
PPTX
Terraform Modules Restructured
PPTX
Serverless survival kit
PPTX
Through the firewall with miniCRAN
PDF
Conf42-Python-Building Apache NiFi 2.0 Python Processors
PDF
28March2024-Codeless-Generative-AI-Pipelines
PPTX
R sharing 101
PPTX
JavaOne 2017 CON3282 - Code Generation with Annotation Processors: State of t...
PPTX
Creating a Python Microservice Tier in Four Sprints with Cassandra, Kafka, an...
PDF
The Roslyn Compiler: Look at Your Code from a Different Perspective (Raffaele...
PDF
Big Data, Data Lake, Fast Data - Dataserialiation-Formats
PDF
Data FAIRport Skunkworks: Common Repository Access Via Meta-Metadata Descript...
PPS
Simplify your professional web development with symfony
PDF
Declare Your Language: What is a Compiler?
Language-agnostic data analysis workflows and reproducible research
Building and deploying LLM applications with Apache Airflow
Apache Deep Learning 201 - Philly Open Source
PHP Development Tools 2.0 - Success Story
Xtend api and_dsl_design_patterns_eclipse_confrance2016
TensorFlow meetup: Keras - Pytorch - TensorFlow.js
Terraform modules restructured
Terraform Modules Restructured
Serverless survival kit
Through the firewall with miniCRAN
Conf42-Python-Building Apache NiFi 2.0 Python Processors
28March2024-Codeless-Generative-AI-Pipelines
R sharing 101
JavaOne 2017 CON3282 - Code Generation with Annotation Processors: State of t...
Creating a Python Microservice Tier in Four Sprints with Cassandra, Kafka, an...
The Roslyn Compiler: Look at Your Code from a Different Perspective (Raffaele...
Big Data, Data Lake, Fast Data - Dataserialiation-Formats
Data FAIRport Skunkworks: Common Repository Access Via Meta-Metadata Descript...
Simplify your professional web development with symfony
Declare Your Language: What is a Compiler?
Ad

More from ESUG (20)

PDF
ShowUs: Pharo Stream Deck (ESUG 2025, Gdansk)
PDF
Micromaid: A simple Mermaid-like chart generator for Pharo
PDF
Directing Generative AI for Pharo Documentation
PDF
Even Lighter Than Lightweiht: Augmenting Type Inference with Primitive Heuris...
PDF
Composing and Performing Electronic Music on-the-Fly with Pharo and Coypu
PDF
Gamifying Agent-Based Models in Cormas: Towards the Playable Architecture for...
PDF
Analysing Python Machine Learning Notebooks with Moose
PDF
Migrating Katalon Studio Tests to Playwright with Model Driven Engineering
PDF
Package-Aware Approach for Repository-Level Code Completion in Pharo
PDF
Evaluating Benchmark Quality: a Mutation-Testing- Based Methodology
PDF
An Analysis of Inline Method Refactoring
PDF
Identification of unnecessary object allocations using static escape analysis
PDF
Control flow-sensitive optimizations In the Druid Meta-Compiler
PDF
Clean Blocks (IWST 2025, Gdansk, Poland)
PDF
Encoding for Objects Matters (IWST 2025)
PDF
Challenges of Transpiling Smalltalk to JavaScript
PDF
Immersive experiences: what Pharo users do!
PDF
ChatPharo: an Open Architecture for Understanding How to Talk Live to LLMs
PDF
Cavrois - an Organic Window Management (ESUG 2025)
PDF
Fluid Class Definitions in Pharo (ESUG 2025)
ShowUs: Pharo Stream Deck (ESUG 2025, Gdansk)
Micromaid: A simple Mermaid-like chart generator for Pharo
Directing Generative AI for Pharo Documentation
Even Lighter Than Lightweiht: Augmenting Type Inference with Primitive Heuris...
Composing and Performing Electronic Music on-the-Fly with Pharo and Coypu
Gamifying Agent-Based Models in Cormas: Towards the Playable Architecture for...
Analysing Python Machine Learning Notebooks with Moose
Migrating Katalon Studio Tests to Playwright with Model Driven Engineering
Package-Aware Approach for Repository-Level Code Completion in Pharo
Evaluating Benchmark Quality: a Mutation-Testing- Based Methodology
An Analysis of Inline Method Refactoring
Identification of unnecessary object allocations using static escape analysis
Control flow-sensitive optimizations In the Druid Meta-Compiler
Clean Blocks (IWST 2025, Gdansk, Poland)
Encoding for Objects Matters (IWST 2025)
Challenges of Transpiling Smalltalk to JavaScript
Immersive experiences: what Pharo users do!
ChatPharo: an Open Architecture for Understanding How to Talk Live to LLMs
Cavrois - an Organic Window Management (ESUG 2025)
Fluid Class Definitions in Pharo (ESUG 2025)
Ad

Recently uploaded (20)

PPTX
ognitive-behavioral therapy, mindfulness-based approaches, coping skills trai...
PPTX
Introduction to Fisheries Biotechnology_Lesson 1.pptx
PPTX
Vitamins & Minerals: Complete Guide to Functions, Food Sources, Deficiency Si...
PPTX
Microbiology with diagram medical studies .pptx
PPTX
Protein & Amino Acid Structures Levels of protein structure (primary, seconda...
PDF
Formation of Supersonic Turbulence in the Primordial Star-forming Cloud
PPT
The World of Physical Science, • Labs: Safety Simulation, Measurement Practice
PDF
Mastering Bioreactors and Media Sterilization: A Complete Guide to Sterile Fe...
PPTX
Taita Taveta Laboratory Technician Workshop Presentation.pptx
PDF
SEHH2274 Organic Chemistry Notes 1 Structure and Bonding.pdf
PDF
Phytochemical Investigation of Miliusa longipes.pdf
PPTX
microscope-Lecturecjchchchchcuvuvhc.pptx
PDF
Unveiling a 36 billion solar mass black hole at the centre of the Cosmic Hors...
PDF
An interstellar mission to test astrophysical black holes
PDF
bbec55_b34400a7914c42429908233dbd381773.pdf
PPTX
Classification Systems_TAXONOMY_SCIENCE8.pptx
PDF
VARICELLA VACCINATION: A POTENTIAL STRATEGY FOR PREVENTING MULTIPLE SCLEROSIS
PPTX
cpcsea ppt.pptxssssssssssssssjjdjdndndddd
PPT
protein biochemistry.ppt for university classes
PPTX
2. Earth - The Living Planet earth and life
ognitive-behavioral therapy, mindfulness-based approaches, coping skills trai...
Introduction to Fisheries Biotechnology_Lesson 1.pptx
Vitamins & Minerals: Complete Guide to Functions, Food Sources, Deficiency Si...
Microbiology with diagram medical studies .pptx
Protein & Amino Acid Structures Levels of protein structure (primary, seconda...
Formation of Supersonic Turbulence in the Primordial Star-forming Cloud
The World of Physical Science, • Labs: Safety Simulation, Measurement Practice
Mastering Bioreactors and Media Sterilization: A Complete Guide to Sterile Fe...
Taita Taveta Laboratory Technician Workshop Presentation.pptx
SEHH2274 Organic Chemistry Notes 1 Structure and Bonding.pdf
Phytochemical Investigation of Miliusa longipes.pdf
microscope-Lecturecjchchchchcuvuvhc.pptx
Unveiling a 36 billion solar mass black hole at the centre of the Cosmic Hors...
An interstellar mission to test astrophysical black holes
bbec55_b34400a7914c42429908233dbd381773.pdf
Classification Systems_TAXONOMY_SCIENCE8.pptx
VARICELLA VACCINATION: A POTENTIAL STRATEGY FOR PREVENTING MULTIPLE SCLEROSIS
cpcsea ppt.pptxssssssssssssssjjdjdndndddd
protein biochemistry.ppt for university classes
2. Earth - The Living Planet earth and life

FASTTypeScript metamodel generation using FAST traits and TreeSitter project