differential-datalog
differential-datalog copied to clipboard
Add an "import" cli command
This should load the contents of another CLI command file.
If we do this we have to think about what "exit" means in an imported script.
More info on this issue:
This will allow .dat
files to import commands from other .dat
files, which
will improve the record/replay infrastructure. For example, at the moment, to
replay a program from a snapshot, both the snapshot and subsequent commands must
be in the same file. With this feature, the replay file can simply import the
snapshot file.
Another use case is when using the interactive command prompt for debugging. The user may want to load a large number of commands from a file and then type a few commands manually to change or dump some of the relations.
There is another very important use case: when you test multiple programs as modules you can import their command files. The Souffle tests work like that.
Good point. This means that the import command will have to support namespace argument.
I'm working on this and approximately halfway though already. I hope to finish it within a week or so.