Skip to content

Exelent

Introduction

ExelentLogo

So far, multiple planning languages have been developed to be computable, with PDDL (Planning Domain Definition Language) being widely used for automatic plan computation. JSON descriptions have also been utilized to enable LLMs to define objects or generations. In this context, Exelent (an acronym for 'Execution Language') emerges as a faster and easier declarative language with Pythonic syntax. Designed for describing AI-generated plans and sequences of programmatic steps to reach a solution, Exelent combines simplicity with the familiarity of Python.

Key Properties of Exelent

  • Pythonic Syntax: Exelent uses a Pythonic syntax, making it accessible and familiar to users of Python. This design choice leverages the extensive Python code training datasets of many LLMs, potentially improving results and reducing the need for extensive fine-

  • Efficiency: The minimal use of keywords and dynamic resolution reduces the number of tokens that need to be generated by LLMs, resulting in more efficient and cost-effective requests.

  • Compatibility: Exelent is compatible with all Python functions, including support for multitasking and parallel planning. Additional behaviors are under development to further enhance its capabilities.

  • Ease of Parsing and Extension: Exelent is easy to parse and extend using the built-in ExelentParser or directly with the ast library, which is fully supported.

By incorporating these properties, Exelent aims to provide a robust and efficient solution for AI-driven plan generation and execution.

Syntax

The syntax of Exelent is straightforward. Each file contains a set of plans, which can be built following three

  1. Define a Plan Function: All plans are defined as functions. A plan definition can include arguments specifying the properties of the plan.

  2. Define Types within Each Plan: A type represents a predefined behavior, similar to using loops (e.g., "for" or "while") in imperative programming languages. Types can have properties specified through its arguments.

  3. Define Actions within Each Type: An action corresponds to a function that will be linked during the interpretation of the file. Actions are similar to function calls but without declarations, imports, or definitions.

Note: This section describes the syntax and structures of the Exelent language. However, it is essential to check the functionality support in the Interpreter Capabilities Table for the interpreter you select. We are working on developing a stable and unified interpreter for Exelent.

Following these steps, a standard plan in Exelent will have the following structure:

def <plan>(<properties>):
  with <type>(<properties>):
    <action>()
    <action>()

As an example, this is a hello_world.xlnt file:

# hello_world.xlnt

def hello_world():
  with Sequential():
    print("Hello World!")

Rules and Specifications

Although Exelent look like standard Python programs (and are parsed as such), they must adhere to the following specifications to conform to Exelent:

  1. Rule of Non-Definition: Exelent files do not contain "import" statements, function definitions, or imperative keywords like loops or conditionals. This is because Exelent is a declarative language designed to look like Python. The interpreter is responsible for linking and resolving all functions used in the file. For example:
# The file does not contain any more

def complex_task():
  with Sequential():
    do_task_1("arg1")
    do_task_2(arg2="arg2")

Note: While having files with undefined functions is unusual in other languages, in this time, the interpreter will resolve these functions automaticall, so there is no need to worry.

  1. KeywordCase Rule: Python reserved keywords remain unchanged, but all Exelent-specific keywords start with an uppercase letter. For instance, "Sequential()" is a reserved type in Exelent, so all function/action names must start with a lowercase letter.

  2. Pythonic Syntax: All code must be indented and follow a syntax compatible with Python (version 3.10 or later), including proper tabulation, allowing for easier argument formatting.

Types

Each with statement in Exelent is associated with a predefined type. The built-in types in Exelent, which must be supported by each interpreter, include:

  • Sequential: Executes the following actions in order. If an action fails, it exits and returns an error.
  • Parallel: Executes the following actions concurrently, initializing and resolving their feedback simultaneously.

Conclusion

You have now learned the fundamentals of using Exelent to define and execute plans with Pythonic syntax. By mastering the straightforward rules and leveraging predefined types, you are well-equipped to create efficient and flexible plans that seamlessly integrate with Python functions using Exelent. You can take a look to the interpreter tutorials to start using Exelent.