---
# System prepended metadata

title: A new declarative front-end based on field operations
tags: [cycle 5]

---

# A new declarative front-end based on field operations

###### tags: `cycle 5`

The new execution model has a well-defined representation (Iterator IR) and a work-in-progress reference C++ implementation, but a new declarative front-end is still missing. In the last weeks there have been multiple discussions and prototyping work evaluating different front-end ideas which have converged towards a front-end based on the concept of `Fields` and operators dealing with fields. In this vision, a `Field` is the main concept presented to the users and it is defined as a mapping from indices (e.g. in _I_, _J_, _K_, _Vertex_, etc.) to values (e.g. `int`, `float`, `Tuple[int, ...]`, etc).

Two compatible approaches have emerged to express operations between Fields. During this project a complete and clear specification of the frontend syntax (with examples) is written that is then presented to actual users (i.e. domain scientists) to gather feedback, fix any unclear issues and to evaluate the two approaches. This part should be finished during the first half of the cycle.

Once the specification is finalized, we will implement an embedded version of the front-end, test it against the examples, and discuss the details of the lowering procedure to generate the iterator IR defined in previous cycles. ([Iterator IR](https://github.com/GridTools/concepts/wiki/Iterator-View)). The embedded front-end, i.e. an implementation that is executable in native python without any code-generation, can then serve as a reference implementation for testing, but also for users to facilitate debugging without requiring compiler knowledge.

## Goal

- Finalized specification of the frontend
    - Concepts: Define the semantic of all operations using formal mathematic notation.
    - API: As the frontend is embedded the specification of all interfaces and the concepts they model is sufficient.
- Embedded frontend implementation
- All details regarding lowering to the iterator IR discussed
- Shaped project to connect the frontend to the work-in-progress C++ implementation

## No Goals

- The implementation does not need to be fast.
- The actual lowering to the iterator IR is not part of this project and will be tackled in the following cycle.

## Potential Rabbit Holes

While there is consensus that a Field based frontend can be lowered sorting out all details is a potential rabbit hole.

## Appetite

1 cycle, 2-3 developers