Discussion
Loading...

Discussion

  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Leonard Ritter
@lritter@mastodon.gamedev.place  ·  activity timestamp 3 weeks ago

uh. why do i actually do these hard static analysis tasks in C++ and not write them in soufflé, which is much better suited for this? (and integrates with C++)

an adventure begins...

souffle 2.5 ships a dpkg for ubuntu 24.04, which saves me a lot of work.

https://souffle-lang.github.io/interface#detailed-usage documents clearly what to do, but i had to learn myself that support for c++20 and later is broken, i need to build the generated file without -std=c++23 which is no issue.

#devlog

  • Copy link
  • Flag this post
  • Block
Leonard Ritter
@lritter@mastodon.gamedev.place replied  ·  activity timestamp 3 weeks ago

the test .dl program is integrated into my compiler program. the generated soufflé module links into the binary without any additional dependencies. nice.

feeding and querying its relations requires a dynamic string-based dispatch interface which isn't fast enough for per-frame use in a game or simulation, but will do for this program.

#devlog

  • Copy link
  • Flag this comment
  • Block
Leonard Ritter
@lritter@mastodon.gamedev.place replied  ·  activity timestamp 3 weeks ago

I used macros in C++ to define some enums, which is of benefit now, since soufflé supports cpp, and i can use the same include in both domains.

#devlog


#include "dldsl_defines.hh"

.decl TypeKind(id:number, name:symbol)
#define T(NAME, STR, ...) TypeKind(autoinc(), STR):-true.
DLDSL_TYPES(T)
#undef T
#include "dldsl_defines.hh" .decl TypeKind(id:number, name:symbol) #define T(NAME, STR, ...) TypeKind(autoinc(), STR):-true. DLDSL_TYPES(T) #undef T
#include "dldsl_defines.hh" .decl TypeKind(id:number, name:symbol) #define T(NAME, STR, ...) TypeKind(autoinc(), STR):-true. DLDSL_TYPES(T) #undef T
  • Copy link
  • Flag this comment
  • Block
Log in

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.0-rc.3.13 no JS en
Automatic federation enabled
  • Explore
  • About
  • Members
  • Code of Conduct
Home
Login