Skip to content

AntoniRL/agentar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

121 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Agentar

Agentar is an agent-oriented programming language (AOP) for modeling intelligent behavior.
Status: Early development stage


Installation

1️. Requirements

  • Python 3.8+
  • (Optional) Java 11+ – required only if you want to generate parsers directly using ANTLR

2️. Recommended: Virtual Environment (e.g. venv-agentar)

Create a virtual environment (Linux):

python3 -m venv venv-agentar

Activate and deactivate (Linux):

source venv-agentar/bin/activate

deactivate

3. Initialize the Agentar package.

Clone the repository

git clone https://github.com/AntoniRL/agentar.git

Run these commands inside the agentar folder (where setup.py is located) and with the virtual environment activated.

Before installation, make sure pip and setuptools are up to date:

pip install --upgrade pip setuptools wheel

Then install Agentar in editable (development) mode:

pip install -e .

*Re-run this command every time you change the project’s structure.

4. Usage.

  • Generate the parser and lexer (only after modifying the .g4 grammar file)
./scripts/generate_parser.sh
  • Run the interpreter
agentar run examples/helloAgentar.agar
agentar --help 
  • Run the visualization (GUI) All programs located in GUI folder, for example:
python GUI/exampleGui.py
  • Generate the parser in Java (useful for testing and visualizing the parse tree)

    Requires:

    • Java (version 11 or higher)
    • plik antlr-4.13.1-complete.jar (curl -O https://www.antlr.org/download/antlr-4.13.1-complete.jar)

    Then run:

    antlr4 -Dlanguage=Java -o java_tree grammar/Agentar.g4
    find java_tree/grammar -name "*.java" | xargs javac -cp ".:antlr-4.13.1-complete.jar"
    java -cp ".:../antlr-4.13.1-complete.jar:java_tree/grammar" org.antlr.v4.gui.TestRig Agentar program -gui examples/test.agar

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors