Query Executor¶
The Query Executor lets you run ASP (Answer Set Programming) queries against the encoded knowledge base directly from the dashboard.
Opening the Query Executor¶
The Query Executor appears in the Editor Area when you navigate to the query view. Access it through the Command Palette (Ctrl+K) by selecting "Query".
Running a Query¶
Interactive mode:
- Select a world from the dropdown (e.g., Mechaber, Rema, Base SA)
- Type a Clingo query pattern in the input field. Examples:
world(X)— list all worldsholds(sakana(M), W)— find all sakana (danger) rulingsholds(issur(basar_bechalav, M), W)— find basar bechalav prohibitions- Press Enter or click the Play button to execute
- Results appear below the input
File mode:
- Click the file selector to switch to file execution mode
- Choose an LP file from your session's artifacts
- Click Play to execute the file
- Results display below
Reading Results¶
The results panel shows:
- Result count: How many answer sets or atoms matched
- Execution time: How long the query took
- Pattern echo: The query you ran
- Results list: Each matching atom or answer set
If the query fails, an error message explains what went wrong (e.g., syntax error, undefined predicate).
Keyboard Shortcut¶
Press Ctrl+Enter to execute the current query from anywhere in the dashboard. This shortcut works even when your cursor is in a text field.
Tips¶
- Start with broad queries (
world(X)) to explore the knowledge base - Narrow down with specific predicates found in the Ontology panel
- Check predicate signatures in the Ontology Sidebar before writing queries
- Query history is preserved — your last 20 queries are saved
Related¶
- Ontology Sidebar for predicate signatures
- Validation Views for analyzing query results