---
# System prepended metadata

title: '[GT4Py] ITIR pass to replace invalid identifiers'
tags: [shaping-archive]

---

# [GT4Py] ITIR pass to replace invalid identifiers

###### tags: `cycle 18` <!-- Change to the current cycle number -->

- Shaped by: Edoardo
- Appetite (FTEs, weeks): 2
- Developers: <!-- Filled in at the betting table unless someone is specifically required here -->

## Problem
<!-- The raw idea, a use case, or something we’ve seen that motivates us to work on this -->
The ITIR pass for Static Single Assignment (SSA) needs to generate unique identifiers. It currently uses the unicode symbol "ᐞ", to append a suffix for each unique access. This symbol will then appear in the ITIR, which will be parsed by different backends.
The problem is that this symbol is not available in the target language of some backends (e.g. C/C++).

Another source of the same problem could be that user-written code has valid identifiers in Python, but not in a backend.

## Appetite
<!-- Explain how much time we want to spend and how that constrains the solution -->

## Solution
<!-- The core elements we came up with, presented in a form that’s easy for people to immediately understand -->
The proposal is to implement an ITIR pass that will replace all invalid symbols. At this aim, we should come up with a scheme that maps the invalid Python identifiers to a more common character set and reuse that pass across all backends.

## Rabbit holes
<!-- Details about the solution worth calling out to avoid problems -->

## No-gos
<!-- Anything specifically excluded from the concept: functionality or use cases we intentionally aren’t covering to fit the ## appetite or make the problem tractable -->
