souffle
souffle copied to clipboard
`inline` causes assertion failure `numeric constant type not set`
Hi,
Consider the following program:
.type typeUllz <: unsigned
.type typeVdou <: unsigned
.decl jdsc(A:typeUllz)
.decl eyzg(A:typeVdou)
.decl xgld(A:unsigned, E:typeVdou, G:unsigned) inline
.decl prxo(A:unsigned, C:typeVdou) inline
.decl weri(A:unsigned)
eyzg(6).
jdsc(6).
xgld(D, A, A) :- eyzg(A), jdsc(D).
prxo(E, E) :- xgld(I, E, I).
weri(B) :- prxo(6, B).
.output weri
I run it with souffle -w example.dl
and get
souffle: /tmp/souffle/src/ast/analysis/typesystem/Type.cpp:332: souffle::ast::NumericConstant::Type souffle::ast::analysis::TypeAnalysis::getPolymorphicNumericConstantType(const souffle::ast::NumericConstant&) const: Assertion `hasValidTypeInfo(nc) && "numeric constant type not set"' failed.
But if I 1) modify the 6
in last rule to A
; or 2) remove any inline
in program; or 3) remove typeUllz
or typeVdou
, the program can execute correctly.
I can reproduce this on 15b114abf8abcc7ef16eb85bf69c88bb7ec58bc3.