Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inline causes assertion failure numeric constant type not set #2355

Open
DerZc opened this issue Nov 6, 2022 · 1 comment
Open

inline causes assertion failure numeric constant type not set #2355

DerZc opened this issue Nov 6, 2022 · 1 comment

Comments

@DerZc
Copy link

DerZc commented Nov 6, 2022

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.

@langston-barrett
Copy link
Contributor

I can reproduce this on 15b114a.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants