Skip to content

Added suffix '_literal' to boolean literals - #196

Merged
langston-barrett merged 3 commits into
langston-barrett:mainfrom
JuanCortezEclyp:bugfix/boolean_literal_in_generated_datalog_file
Jul 9, 2025
Merged

Added suffix '_literal' to boolean literals#196
langston-barrett merged 3 commits into
langston-barrett:mainfrom
JuanCortezEclyp:bugfix/boolean_literal_in_generated_datalog_file

Conversation

@JuanCortezEclyp

Copy link
Copy Markdown
Contributor

This PR aim to fix the bug mentioned in #195, where souffle throws the following error, when compiling the generated datalog file:
Error: syntax error, unexpected false literal constraint, expecting identifier in file treeedb-c.dl at line 955
.decl false(x: False)

New generated relations:
.type False <: symbol
.decl false_literal(x: False)
false_literal(as(x, False)) :- node(x, "false", _, _, _, _, _, _, _, _, _, _, _).

.type True <: symbol
.decl true_literal(x: True)
true_literal(as(x, True)) :- node(x, "true", _, _, _, _, _, _, _, _, _, _, _).

@JuanCortezEclyp

Copy link
Copy Markdown
Contributor Author

This is my first time I'm writing rust code, this change was mainly made by ChatGPT.
If you think this can be done in other way please let me know

Comment thread treeedbgen-souffle/src/gen.rs
@langston-barrett

Copy link
Copy Markdown
Owner

CI is failing due to #186.

@langston-barrett
langston-barrett merged commit 15469be into langston-barrett:main Jul 9, 2025
2 of 3 checks passed
@langston-barrett

Copy link
Copy Markdown
Owner

Thanks for the contribution, @JuanCortezEclyp!

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

Successfully merging this pull request may close these issues.

2 participants