arxlang / astx

https://astx.arxlang.org/
Other
1 stars 4 forks source link

OSL Internship 2024-01 Ideas #21

Closed xmnlab closed 7 months ago

xmnlab commented 8 months ago

Project Idea 1: Extending Data Type Support in ASTx

Abstract

The ASTx project, a component of the ArxLang ecosystem, serves as an agnostic framework for constructing and representing Abstract Syntax Trees (ASTs). Its primary objective is to provide a versatile and language-independent structure for ASTs, primarily catering to the needs of the ArxLang project but with the flexibility to be utilized across various programming languages and parsing tools. The current state of ASTx includes features like support for basic AST blocks, control flow elements, integer data types, operators, and visibility and scope handling for objects, along with a symbol table organized by scope.

This proposal aims to significantly extend the data type capabilities of ASTx by introducing a broader spectrum of types. The envisioned expansion includes:

License

BSD 3 Clause: https://github.com/arxlang/astx/blob/main/LICENSE

Code of Conduct

https://github.com/arxlang/astx/blob/main/CODE_OF_CONDUCT.md

Current State

Currently there are already some data types, such as Integer, Float, and Boolean, but we need also to expand these datatypes to Literals and Variables, so we can have a real implementation for each data type and create tests and tutorials for that.

Tasks

Expected Outcomes

References

xmnlab commented 8 months ago

Project Idea 2: Implementing Console-Based AST Representation in ASTx

Abstract

The ASTx framework, integral to the ArxLang project, currently supports visualizing Abstract Syntax Trees (ASTs) using Graphviz, which is highly beneficial for graphical interpretation and debugging. However, this visualization is limited to environments like jupyter notebooks. To enhance the debugging and analysis capabilities of ASTx, particularly in environments like a pdb session, this proposal introduces the development of a console-based AST representation feature.

The core idea of this proposal is to implement a functionality in ASTx that enables the rendering of ASTs directly in the console using ASCII art. The proposed approach involves integrating a library like asciinet or an equivalent ASCII art generation tool, which will transform the AST structure into a textual representation. This textual representation will allow developers to visualize the AST hierarchy and structure directly in their terminals, enhancing the debugging and inspection process in a wide range of development environments.

Key aspects of this proposal include:

This enhancement will significantly improve the utility of ASTx, particularly for developers working in non-GUI environments or those who prefer terminal-based toolchains. It will also facilitate quick and easy inspection of AST structures during development and debugging, without the need for additional graphical tools.

License

BSD 3 Clause: https://github.com/arxlang/astx/blob/main/LICENSE

Code of Conduct

https://github.com/arxlang/astx/blob/main/CODE_OF_CONDUCT.md

Current State

Currently, astx can show a graphical representation of the AST in jupyter notebooks with Graphviz.

Tasks

Expected Outcomes

Details

References