HarvardPL / formulog

Datalog with support for SMT queries and first-order functional programming
https://harvardpl.github.io/formulog/
Apache License 2.0
155 stars 10 forks source link

Interpreter bug: destructor assumes term is a constructor #72

Closed aaronbembenek closed 1 year ago

aaronbembenek commented 1 year ago

This program causes the Formulog interpreter to crash:

rel foo(bool smt)

foo(`true`).

rel not_ok

not_ok :- foo(`#x[i32] #= _`).

rel ok

ok :- !not_ok.

The code for a destructor assumes that its term is a Constructor object, whereas here it is a primitive (bool).