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

error:interpret examples #38

Open
scxjyjy opened this issue Jul 5, 2024 · 19 comments
Open

error:interpret examples #38

scxjyjy opened this issue Jul 5, 2024 · 19 comments

Comments

@scxjyjy
Copy link

scxjyjy commented Jul 5, 2024

image
i follow the readme,but it‘s wrong!

@DKLoehr
Copy link
Collaborator

DKLoehr commented Jul 5, 2024

Are you using the most recent version of the code? This is failing to parse ‘<<‘ on like 6, but that’s not there anymore — it got replaced with ‘<‘ a long time ago.

@scxjyjy
Copy link
Author

scxjyjy commented Jul 6, 2024

Are you using the most recent version of the code? This is failing to parse ‘<<‘ on like 6, but that’s not there anymore — it got replaced with ‘<‘ a long time ago.

I am not using the latest version because I want to reproduce the regex example from the FLM paper, but I can't find it in the latest version.

@scxjyjy
Copy link
Author

scxjyjy commented Jul 6, 2024

Sequence Abstractions for Flexible, Line-Rate Network Monitoring,I want to reproduce the examples from this paper. Could you please tell me which branch I should use to successfully replicate them?

@DKLoehr
Copy link
Collaborator

DKLoehr commented Jul 6, 2024

It looks like the link in the paper is pointing to the SpecRegex branch, which would explain where the extra << is coming from. I’m guessing that somehow either the example files on that branch never got updated, or you’re using the main branch of lucid on the files from the SpecRegex branch.

For the puppies if getting lucid set up, you can probably try using the tutorial files from the main branch instead. Presumably the SpecRegex files which are directly related to the paper will work out-of-the-box. It would be nice if @aj3189 has the time to ensure all of SpecRegex is up-to-date with the rest of lucid, although it’s also a good idea to keep a dedicated branch for paper artifacts, so perhaps we should freeze SpecRegex (after making sure it all works) and create another branch that’s more up-to-date.

@scxjyjy
Copy link
Author

scxjyjy commented Jul 6, 2024

It looks like the link in the paper is pointing to the SpecRegex branch, which would explain where the extra << is coming from. I’m guessing that somehow either the example files on that branch never got updated, or you’re using the main branch of lucid on the files from the SpecRegex branch.

For the puppies if getting lucid set up, you can probably try using the tutorial files from the main branch instead. Presumably the SpecRegex files which are directly related to the paper will work out-of-the-box. It would be nice if @aj3189 has the time to ensure all of SpecRegex is up-to-date with the rest of lucid, although it’s also a good idea to keep a dedicated branch for paper artifacts, so perhaps we should freeze SpecRegex (after making sure it all works) and create another branch that’s more up-to-date.

Thank you. Where can I find the latest usage instructions for Lucid? I'd like to try updating the regex code myself.

@DKLoehr
Copy link
Collaborator

DKLoehr commented Jul 6, 2024

Off the top of my head, I’d start by doing the tutorial on the main branch to get a feel for lucid (if you haven’t already). Then you can look at the wiki and several of the examples to learn about the language features (examples/interp_tests is good for this). Note that the language features page on the is intended more as a reference than a tutorial.

You could try merging the SpecRegex branch into main on your computer, but I’m not sure how easy it would be. If you want to try fixing things manually, I can at least tell you that the error in your first post was caused by a syntax change where we changed e.g. int<<32>> into int<32>.

@scxjyjy
Copy link
Author

scxjyjy commented Jul 7, 2024

Off the top of my head, I’d start by doing the tutorial on the main branch to get a feel for lucid (if you haven’t already). Then you can look at the wiki and several of the examples to learn about the language features (examples/interp_tests is good for this). Note that the language features page on the is intended more as a reference than a tutorial.

You could try merging the SpecRegex branch into main on your computer, but I’m not sure how easy it would be. If you want to try fixing things manually, I can at least tell you that the error in your first post was caused by a syntax change where we changed e.g. int<<32>> into int<32>.
I am very sorry to bother you, but after reading the relevant content on the wiki, I still can't find a solution for some of the syntax issues. I have taken a screenshot of the content. Could you help point them out?
image
image
I need to delete keywords like entry and exit, but the wiki doesn't provide information on this. I'm not sure about it.and re is wrong too.

@scxjyjy
Copy link
Author

scxjyjy commented Jul 8, 2024

I am very sorry to bother you, but after reading the relevant content on the wiki, I still can't find a solution for some of the syntax issues. I have taken a screenshot of the content. Could you help point them out?
image
image

I need to delete keywords like entry and exit, but the wiki doesn't provide information on this. I'm not sure about it.and re is wrong too.

@DKLoehr
Copy link
Collaborator

DKLoehr commented Jul 8, 2024

Hmm, unfortunately I don’t think we have any docs on updating code from an arbitrary previous version of Lucid. I pinged @aj3189, perhaps he can help.

@scxjyjy
Copy link
Author

scxjyjy commented Jul 8, 2024

Hmm, unfortunately I don’t think we have any docs on updating code from an arbitrary previous version of Lucid. I pinged @aj3189, perhaps he can help.

Alright, thank you for your assistance. I'll wait to hear from @aj3189.

@aj3189
Copy link
Collaborator

aj3189 commented Jul 8, 2024

hi @scxjyjy thanks for looking into the code. I was able to recreate your error buy running make on the "main" branch, then changing branches to the "SpecRegex" branch, and then trying to run the histogram file. To avoid this, you have to run make whenever you change branches, as the compiler passes change and the main branch is a little ahead of the SpecRegex branch with some syntax changes, which is why you're getting syntax errors.

@scxjyjy
Copy link
Author

scxjyjy commented Jul 9, 2024

image
hi@aj3189 Thank you for your response. I just want to reproduce the regex P4 code to help me understand the paper. At the same time, I want to see if there are techniques in the generated P4 code to handle the limitation that a pipe can only operate on one register at a time. However, I am unable to reproduce the steps as you mentioned, which is causing me frustration.

@scxjyjy
Copy link
Author

scxjyjy commented Jul 9, 2024

After using make on GitHub to generate dptc, there are no syntax errors, but it still reports an error.
image

@scxjyjy
Copy link
Author

scxjyjy commented Jul 9, 2024

After using make on GitHub to generate dptc, there are no syntax errors, but it still reports an error. image

image

@aj3189
Copy link
Collaborator

aj3189 commented Jul 9, 2024

Hi, sorry the repo is a little messy. That file you are running was a test file for use in the interpreter, though I can see the confusion is easy to make. All of the examples from the paper are in the subfolders that have the same names as the headings in the paper table from section 9. So, for the DHCP example from the paper, we ran first the simple RIP (control) program at examples/regex/rip_added/rip_single_updated.dpt as a baseline and then the DHCP anomaly at examples/regex/rip_added/lucidRegex_DHCP.dpt, which has the regex added. The Chain Replication control and two examples are in the chain_replication folder, and so on. Note that some have an original version and a version with "_fixed", that means we had to fix (usually) a syntax error, such as combining the entry event to avoid the error you encountered.

@scxjyjy
Copy link
Author

scxjyjy commented Jul 9, 2024

hi@aj3189,If errors are difficult to resolve, could you provide a copy of the P4 code generated after compiling examples/regex/lucidRegex_DHCP.dpt? I would like to analyze the p4 code to see if it can help me. Thank you.

@aj3189
Copy link
Collaborator

aj3189 commented Jul 9, 2024

hi@aj3189,If errors are difficult to resolve, could you provide a copy of the P4 code generated after compiling examples/regex/lucidRegex_DHCP.dpt? I would like to analyze the p4 code to see if it can help me. Thank you.

Wow, we commented at exactly the same time. I've never seen that. See my other comment and post again if it doesn't help. Thanks again!

@aj3189
Copy link
Collaborator

aj3189 commented Jul 9, 2024

hi@aj3189,If errors are difficult to resolve, could you provide a copy of the P4 code generated after compiling examples/regex/lucidRegex_DHCP.dpt? I would like to analyze the p4 code to see if it can help me. Thank you.

If you don't care about adding the "simple_RIP" control, then the file at examples/regex/pseudocode/lucidRegex_DHCP.dpt is probably what you want.

@scxjyjy
Copy link
Author

scxjyjy commented Jul 10, 2024

hi@aj3189,If errors are difficult to resolve, could you provide a copy of the P4 code generated after compiling examples/regex/lucidRegex_DHCP.dpt? I would like to analyze the p4 code to see if it can help me. Thank you.

Wow, we commented at exactly the same time. I've never seen that. See my other comment and post again if it doesn't help. Thanks again!
lol,I sent the message yesterday and then went to rest. What a coincidence.

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

3 participants