# taheri-az/temporal-logic-aware-frontier-based-exploration architecture

> Architecture diagram of the GitHub repository taheri-az/temporal-logic-aware-frontier-based-exploration, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/taheri-az/temporal-logic-aware-frontier-based-exploration
- Repository: https://github.com/taheri-az/temporal-logic-aware-frontier-based-exploration

## Overview

This repository is a research prototype for robot exploration in an unknown grid while satisfying a syntactically co-safe LTL task. The principal workflow starts in `main.py`: it loads the configured map and task, builds a grid and task-aware product automaton, repeatedly reveals nearby cells, searches for a satisfying route, and otherwise selects and follows a scored frontier path. It then renders the trajectory as a video. The graph separates orchestration, task reasoning, exploration planning, and scenario/visualization. Helper internals are only partially excerpted, so unshown internal calls are omitted.

Main entry points: [`main.py`](https://github.com/taheri-az/temporal-logic-aware-frontier-based-exploration/blob/master/main.py) (Exploration runner), [`explore_visual.py`](https://github.com/taheri-az/temporal-logic-aware-frontier-based-exploration/blob/master/explore_visual.py) (Trajectory animation), [`Helper.py`](https://github.com/taheri-az/temporal-logic-aware-frontier-based-exploration/blob/master/Helper.py) (LTL-to-DFA translation), [`config.py`](https://github.com/taheri-az/temporal-logic-aware-frontier-based-exploration/blob/master/config.py) (Map and task configuration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["Runtime orchestration"]
  node_runner["Exploration runner<br/>[main.py]"]
end

subgraph group_task["Temporal task reasoning"]
  node_dfa["LTL-to-DFA translation<br/>[Helper.py]"]
  node_product["Product automaton<br/>[Helper.py]"]
  node_commit["Commit-state analysis<br/>[Helper.py]"]
  node_progress["DFA progression<br/>[Helper.py]"]
end

subgraph group_exploration["Grid exploration"]
  node_gridmodel["Grid construction<br/>[Helper.py]"]
  node_sensor["Range observations<br/>[Helper.py]"]
  node_frontiers["Frontier detection<br/>[Helper.py]"]
  node_frontier_score["Frontier scoring<br/>[Helper.py]"]
  node_path_search["Accepting path search<br/>[Helper.py]"]
end

subgraph group_scenario["Scenario and output"]
  node_scenario["Map and task configuration<br/>[config.py]"]
  node_visualizer["Trajectory animation<br/>[explore_visual.py]"]
  node_video["Exploration video"]
end

node_operator(("Run command"))
node_spot["Spot translator"]

node_operator -->|"runs"| node_runner
node_runner -->|"loads parameters"| node_scenario
node_runner -->|"builds grid"| node_gridmodel
node_runner -->|"translates formula"| node_dfa
node_dfa -->|"translates LTL"| node_spot
node_runner -->|"builds product"| node_product
node_runner -->|"computes states"| node_commit
node_runner -->|"reveals cells"| node_sensor
node_runner -->|"detects frontiers"| node_frontiers
node_runner -->|"scores frontiers"| node_frontier_score
node_runner -->|"searches route"| node_path_search
node_runner -->|"updates DFA state"| node_progress
node_runner -->|"renders trajectory"| node_visualizer
node_visualizer -->|"saves video"| node_video
node_visualizer -->|"loads standalone map"| node_scenario

click node_runner "https://github.com/taheri-az/temporal-logic-aware-frontier-based-exploration/blob/master/main.py"
click node_gridmodel "https://github.com/taheri-az/temporal-logic-aware-frontier-based-exploration/blob/master/Helper.py"
click node_sensor "https://github.com/taheri-az/temporal-logic-aware-frontier-based-exploration/blob/master/Helper.py"
click node_frontiers "https://github.com/taheri-az/temporal-logic-aware-frontier-based-exploration/blob/master/Helper.py"
click node_frontier_score "https://github.com/taheri-az/temporal-logic-aware-frontier-based-exploration/blob/master/Helper.py"
click node_path_search "https://github.com/taheri-az/temporal-logic-aware-frontier-based-exploration/blob/master/Helper.py"
click node_dfa "https://github.com/taheri-az/temporal-logic-aware-frontier-based-exploration/blob/master/Helper.py"
click node_product "https://github.com/taheri-az/temporal-logic-aware-frontier-based-exploration/blob/master/Helper.py"
click node_commit "https://github.com/taheri-az/temporal-logic-aware-frontier-based-exploration/blob/master/Helper.py"
click node_progress "https://github.com/taheri-az/temporal-logic-aware-frontier-based-exploration/blob/master/Helper.py"
click node_scenario "https://github.com/taheri-az/temporal-logic-aware-frontier-based-exploration/blob/master/config.py"
click node_visualizer "https://github.com/taheri-az/temporal-logic-aware-frontier-based-exploration/blob/master/explore_visual.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_runner toneBlue
class node_dfa,node_product,node_commit,node_progress toneAmber
class node_gridmodel,node_sensor,node_frontiers,node_frontier_score,node_path_search toneMint
class node_scenario,node_visualizer,node_video toneRose
class node_operator,node_spot toneIndigo
```

## Components

### Runtime orchestration

- [Exploration runner](https://github.com/taheri-az/temporal-logic-aware-frontier-based-exploration/blob/master/main.py): `main.py`

### Temporal task reasoning

- [LTL-to-DFA translation](https://github.com/taheri-az/temporal-logic-aware-frontier-based-exploration/blob/master/Helper.py): `Helper.py`
- [Product automaton](https://github.com/taheri-az/temporal-logic-aware-frontier-based-exploration/blob/master/Helper.py): `Helper.py`
- [Commit-state analysis](https://github.com/taheri-az/temporal-logic-aware-frontier-based-exploration/blob/master/Helper.py): `Helper.py`
- [DFA progression](https://github.com/taheri-az/temporal-logic-aware-frontier-based-exploration/blob/master/Helper.py): `Helper.py`

### Grid exploration

- [Grid construction](https://github.com/taheri-az/temporal-logic-aware-frontier-based-exploration/blob/master/Helper.py): `Helper.py`
- [Range observations](https://github.com/taheri-az/temporal-logic-aware-frontier-based-exploration/blob/master/Helper.py): `Helper.py`
- [Frontier detection](https://github.com/taheri-az/temporal-logic-aware-frontier-based-exploration/blob/master/Helper.py): `Helper.py`
- [Frontier scoring](https://github.com/taheri-az/temporal-logic-aware-frontier-based-exploration/blob/master/Helper.py): `Helper.py`
- [Accepting path search](https://github.com/taheri-az/temporal-logic-aware-frontier-based-exploration/blob/master/Helper.py): `Helper.py`

### Scenario and output

- [Map and task configuration](https://github.com/taheri-az/temporal-logic-aware-frontier-based-exploration/blob/master/config.py): `config.py`
- [Trajectory animation](https://github.com/taheri-az/temporal-logic-aware-frontier-based-exploration/blob/master/explore_visual.py): `explore_visual.py`
- **Exploration video**

### Other components

- **Run command**
- **Spot translator**

## Connections

- Run command → Exploration runner: runs (evidence: `README.md`)
- Exploration runner → Map and task configuration: loads parameters (evidence: `main.py`)
- Exploration runner → Grid construction: builds grid (evidence: `main.py`)
- Exploration runner → LTL-to-DFA translation: translates formula (evidence: `main.py`)
- LTL-to-DFA translation → Spot translator: translates LTL (evidence: `Helper.py`)
- Exploration runner → Product automaton: builds product (evidence: `main.py`)
- Exploration runner → Commit-state analysis: computes states (evidence: `main.py`)
- Exploration runner → Range observations: reveals cells (evidence: `main.py`)
- Exploration runner → Frontier detection: detects frontiers (evidence: `main.py`)
- Exploration runner → Frontier scoring: scores frontiers (evidence: `main.py`)
- Exploration runner → Accepting path search: searches route (evidence: `main.py`)
- Exploration runner → DFA progression: updates DFA state (evidence: `main.py`)
- Exploration runner → Trajectory animation: renders trajectory (evidence: `main.py`)
- Trajectory animation → Exploration video: saves video (evidence: `explore_visual.py`)
- Trajectory animation → Map and task configuration: loads standalone map (evidence: `explore_visual.py`)
