# EvgSkv/logica

Logica is a logic programming language that compiles to SQL. It runs on DuckDB, Google BigQuery, PostgreSQL and SQLite.

Repository: https://github.com/EvgSkv/logica
Canonical: https://ross.abutalabs.com/products/logica
Homepage: https://logica.dev
Language: Jupyter Notebook
License: Apache-2.0
License Family: permissive
Topics: datalog, sql, bigquery, language, prolog-implementation, prolog, logica, postgresql, sqlite, trino, presto, logic-programming
Last push: 2026-08-23T06:51:56+00:00

## Health v2 (maintenance only)
Score: 77/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 35, longevity 100
- inputs: {"age_days": 2154, "days_push": 10, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2130, forks 112 (observed 2026-08-28T04:06:17.117859+00:00)

## What it is
Logica is an open-source declarative logic programming language in the Datalog family that compiles to SQL. It lets users write logic-style predicates that run on DuckDB, Google BigQuery, PostgreSQL, SQLite, Trino and Presto engines.

## Use cases
- write bigquery queries with logic programming syntax
- compile datalog rules to sql
- run logic programs on postgres or sqlite
- learn logic programming applied to data analysis
- replace complex nested sql queries with declarative predicates
- run datalog-style analytics on duckdb locally

## When to choose
- you prefer logic programming syntax over sql for data queries
- your data lives in BigQuery, PostgreSQL, SQLite or DuckDB
- you want to learn Datalog with real big-data backends
- your SQL queries have complex non-trivial logic

## When to avoid
- your team is SQL-only and won't learn a new language
- you need a SQL engine or dialect not supported by Logica
- you need mature tooling and a large ecosystem around your query language

## Facets
- artifact type: cli-tool
- maturity: active
- function: compiler, programming-language, database, parser
- domain: programming-languages, databases, data-science, big-data, analytics
- platform: python, cli, cross-platform
- tags: datalog, logic-programming, sql, bigquery, duckdb, postgresql, sqlite, prolog, query-language, datawarehousing

## Member repositories
- EvgSkv/logica (main) score 77

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:17.117859+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:52:20.892544+00:00, confidence not recorded.
  - readme: https://github.com/EvgSkv/logica (fetched 2026-08-28T04:06:17.117859+00:00, sha 6ba67fdc988d)
  - homepage: https://logica.dev (fetched 2026-08-29T10:32:13.180931+00:00, sha 8470cc13d5f3)
  - registry_pypi: https://pypi.org/pypi/logica/json (fetched 2026-08-29T10:32:13.183804+00:00, sha 123387648374)
- Data as of 2026-08-30T08:39:29.467469+00:00.
