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

Add dev core from-concrete command #1833

Merged
merged 5 commits into from
Feb 10, 2023
Merged

Conversation

janmasrovira
Copy link
Collaborator

@janmasrovira janmasrovira commented Feb 9, 2023

This pr adds a new command that will be useful to debug the translation from source to core.

The available flags are:

 -t,--transforms [Transform]
                           hint: use autocomplete
  --show-de-bruijn         Show variable de Bruijn indices
  --eval                   Evaluate the main function
  --no-io                  Don't interpret the IO effects
  JUVIX_FILE               Path to a .juvix file
  -s,--symbol-name NAME    Print/eval a specific function identifier (default
                           for eval: main)

by default (i.e. if the --eval flag is not given), it will print the core node of all functions in the input file. If the --eval flag is given it will evaluate the main function.
The flag -s can be used if you only want to print or eval a particular function different than main.

@janmasrovira janmasrovira added this to the 0.3 - Valencia milestone Feb 9, 2023
@janmasrovira janmasrovira self-assigned this Feb 9, 2023
@paulcadman
Copy link
Collaborator

We should also remove dev internal core-eval at the same time as this command provides a superset of its features. And add/replace the relevant smoke tests.

@janmasrovira janmasrovira marked this pull request as ready for review February 10, 2023 00:06
@janmasrovira
Copy link
Collaborator Author

We should also remove dev internal core-eval at the same time as this command provides a superset of its features. And add/replace the relevant smoke tests.

done

@paulcadman paulcadman force-pushed the core-from-source-command branch from e2599ac to 5dc464b Compare February 10, 2023 10:02
@paulcadman
Copy link
Collaborator

I'll approve this after the name change.

@janmasrovira janmasrovira force-pushed the core-from-source-command branch from 5dc464b to 5891aa7 Compare February 10, 2023 11:13
@janmasrovira janmasrovira force-pushed the core-from-source-command branch from 5891aa7 to 2062e3f Compare February 10, 2023 11:13
@janmasrovira
Copy link
Collaborator Author

I'll approve this after the name change.

done

@janmasrovira janmasrovira merged commit 207b159 into main Feb 10, 2023
@janmasrovira janmasrovira deleted the core-from-source-command branch February 10, 2023 11:37
@janmasrovira janmasrovira changed the title Add dev core from-source command Add dev core from-concrete command Feb 10, 2023
lukaszcz pushed a commit that referenced this pull request Feb 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants