vmware / differential-datalog

DDlog is a programming language for incremental computation. It is well suited for writing programs that continuously update their output in response to input changes. A DDlog programmer does not write incremental algorithms; instead they specify the desired input-output mapping in a declarative manner.
MIT License
1.38k stars 119 forks source link

`ddlog -o` option has weird behavior #1163

Open blp opened 2 years ago

blp commented 2 years ago

ddlog --help says the following about -o:

  -o DIR   --output-dir=DIR                 Output directory (default based on program name).

To me, this means that the output directory is based on the program name by default. Sure enough, if I run ddlog -i foo.dl I end up with output in foo_ddlog. Cool.

So, if I run ddlog -i foo.dl -o bar, I'll get an output directory not based on the program name but named bar instead, right? No. Actually it's still based on the program name, just nested inside the bar directory:

[blp@sigxcpu]$ ddlog -i foo.dl -o bar
Finished compiling "foo.dl" in 0.76s
[blp@sigxcpu]$ ls bar/
foo_ddlog
[blp@sigxcpu]$ 

This doesn't do what I expect. I don't know whether the implementation is wrong (so that the code should be changed to do what I expect) or the usage message is wrong (so that the usage message should be changed to something like "output base directory (default is .)".

mihaibudiu commented 2 years ago

Yes, I would rephrase the message "directory where output is placed".

ryzhyk commented 2 years ago

agreed