nemo icon indicating copy to clipboard operation
nemo copied to clipboard

Public API for adding sources `Program`s

Open matzemathics opened this issue 1 year ago • 1 comments

It would be nice if one could programmatically add sources to a Program, which may not be backed by a file, but by an arbitrary stream of tuples (maybe generated ones). Especially for the python integration this would be beneficial, eg.:

program = load_string('result(?value) :- data("key", ?value).')
program.add_souces("data", [["something", 1], ["key", 42]])

matzemathics avatar Aug 24 '23 13:08 matzemathics