Reasoning in complex environments with the SelectScript declarative language

André Dietrich, Sebastian Zug, Luigi Nardi, Jörg KaiserarXiv 2015

Introduction

In robotics and cyber-physical systems, simulation environments and world models often rely on heterogeneous APIs and data structures. Extracting high-level information—such as identifying specific objects or calculating optimal paths—typically requires verbose imperative code in languages like Python or C++. This manual state management and nested looping create a significant barrier to interoperability. This paper presents an extension of SelectScript, a declarative, SQL-like Domain-Specific Language (DSL), designed to treat robotic reasoning and search problems as database queries.

Methodology: Hierarchical Querying

SelectScript simplifies data retrieval by abstracting simulation states into queryable tables. To address complex reasoning, the authors introduced hierarchical queries inspired by Oracle’s SQL dialect.

Key technical features include:

  • Recursive Syntax: The implementation of START WITH (initial conditions), CONNECT BY (state transitions), and STOP WITH (termination criteria for continuous spaces).
  • Search Strategy Abstraction: Users can decouple logic from execution by specifying search algorithms via keywords. For instance, adding MEMORIZE enables bidirectional search, while NO CYCLE or UNIQUE manages graph traversal efficiency.
  • Visual Abstraction: The language supports output transformations such as AS OccupancyGrid, allowing raw simulation data to be formatted directly for other planners or human-readable visualizations.

Experimental Environments

The language was evaluated across three distinct simulation paradigms to test its versatility in data exploration and logical reasoning.

Evolution of a chaotic particle simulation in the Open Dynamics Engine (ODE) at different time steps (t=10, 100, 250).
  1. Open Dynamics Engine (ODE): A chaotic particle simulation used to demonstrate basic data exploration, such as generating mass distribution heat maps.
  2. Towers of Hanoi: A benchmark for recursive reasoning and the efficiency of different search strategies.
  3. OpenRAVE: A high-fidelity 3D industrial simulation featuring a mobile YouBot, serving as the primary testbed for complex path planning.

Results and Path Planning

The declarative approach yielded significant performance and productivity gains. In the Towers of Hanoi benchmark, transitioning from a standard nested query to a hierarchical CONNECT BY query with bidirectional search (MEMORIZE) reduced execution time from 10.09 seconds to 0.17 seconds.

Path planning for a YouBot in an OpenRAVE simulation environment, showing start and target positions.

In the OpenRAVE environment, a single SelectScript query successfully implemented a path planner. The system identified 1,000 valid paths while simultaneously managing collision detection and distance constraints. This demonstrates that viewing a search tree as a virtual table allows complex navigation tasks to be solved through simple row filtering.

Conclusion and Future Work

SelectScript effectively separates the what (the goal) from the how (the algorithm), reducing the cognitive load required to interface with complex robotic APIs. While the current Python-based interpreter faces performance bottlenecks in massive search spaces, future work aims to port the system to C and integrate it more deeply with the Robot Operating System (ROS). Additionally, the authors plan to explore probabilistic reasoning to handle uncertainty in real-world environments.

Summary updated

Abstract

SelectScript is an extendable, adaptable, and declarative domain-specific language aimed at information retrieval from simulation environments and robotic world models in an SQL-like manner. In this work we have extended the language in two directions. First, we have implemented hierarchical queries; second, we improve efficiency enabling manual design space exploration on different "search" strategies. We demonstrate the applicability of such extensions in two application problems; the basic language concepts are explained by solving the classical problem of the Towers of Hanoi and then a common path planning problem in a complex 3D environment is implemented.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
Towers of Hanoi · 3 disksSelectScript vanilla approach with nested `move` functionsRuntime10.09 sec sRAM=8 GB · disks=3 · execution=one-core sequential · processor=Intel Core i5-4200U
Source quote
L572: iterate over all possible configurations.{(Runtime: \SI{10.09}{sec}})}]
BibTeX
@misc{dietrich2015reasoning,
  author = {André Dietrich and Sebastian Zug and Luigi Nardi and Jörg Kaiser},
  title = {{Reasoning in complex environments with the SelectScript declarative language}},
  year = {2015},
  eprint = {1508.04159},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1508.04159},
}
Figure