Get the latest tech news

Compositional Datalog on SQL: Relational Algebra of the Environment


I spent some time before making Datalogs that translated into SQL. https://www.philipzucker.com/tiny-sqlite-datalog/

It is a basic trick that I vaguely associated with finally tagless that you can remove the middle man of the AST when you have an expression datatype and instead just use combinators which are basically partially applied versions of the interpreter to the expressions interp myexp : database -> env -> set[env]. souffle /tmp/test.dl Takes ~0.2s in interpreted mode, ~0.1s in compiled mode.-j parallelization doesn’t seem to help much (too small?) Then i can directly interpet the relation algebra, do optimizations finally tagless style or interpret into SQL.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of environment

environment

Photo of SQL

SQL

Photo of relational algebra

relational algebra

Related news:

News photo

Astronomers detect the brightest fast radio burst of all time | The dazzling “RBFLOAT” radio burst, originating in a nearby galaxy, offers the clearest view yet of the environment around these mysterious flashes.

News photo

Countrywide natural experiment links built environment to physical activity

News photo

Countrywide Natural Experiment Links Built Environment To Physical Activity