Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improving Command Line Flags #136

Open
colin-mcd opened this issue Feb 20, 2023 · 1 comment
Open

Improving Command Line Flags #136

colin-mcd opened this issue Feb 20, 2023 · 1 comment

Comments

@colin-mcd
Copy link
Contributor

Usage right now is

usage: perplc [OPTION ...] INFILE.ppl
  -m            Don't monomorphize (implies -lec)
  -l            Don't linearize (implies -ec)
  -e            Don't eliminate recursive datatypes (implies -c)
  -c            Compile only to PPL code (not to FGG)
  -z            Compute sum-product
  -o OUTFILE    Output to OUTFILE
  -O LEVEL      Optimization level (0 = off, 1 = on)
  -d DTYPE      Defunctionalize recursive datatype DTYPE
  -r DTYPE      Refunctionalize recursive datatype DTYPE

But I think it would be a lot more intuitive if we had flags like -m stop after monomorphization rather than before. That way, if you want to see just the monomorphized code you would do -m, instead of having to remember which stage follows monomorphization. I suggest the following:

usage: perplc [OPTION ...] INFILE.ppl
  -m            Stop after monomorphizing
  -l            Stop after linearizing
  -e            Stop after eliminating recursive datatypes
  -c            Stop after compiling to final-stage PPL code (not to FGG)
  ...
@colin-mcd colin-mcd changed the title ImprovingCommand Line Flags Improving Command Line Flags Feb 20, 2023
@ccshan
Copy link
Contributor

ccshan commented Mar 3, 2023

I like this idea~
I guess each stage of our compiler depends on the previous stages and there is no "optional" stage. (I could imagine replacing a stage by a check that, for instance, the input program is already linear or monomorphic.)

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

No branches or pull requests

2 participants