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

Generalize matching #78

Open
wants to merge 33 commits into
base: master
Choose a base branch
from
Open

Generalize matching #78

wants to merge 33 commits into from

Conversation

lucaspena
Copy link
Contributor

No description provided.

lucaspena added 30 commits June 10, 2020 11:53
@lucaspena lucaspena requested a review from h0nzZik June 17, 2020 17:48
@@ -120,4 +121,19 @@ module TEST-MATCH-ASSOC
)
)
.Declarations
// Match multiple occurances of a variable
rule test("match-assoc", 10)
=> symbol c ( Data ) : Data
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this work? I thought that #matchAssoc, which is a function, is evaluated before the symbol declaration.

@@ -140,12 +140,15 @@ only in this scenario*.
```k
syntax Variable ::= VariableName "{" Sort "}" [klabel(sortedVariable)]
syntax SetVariable ::= SharpName [klabel(setVariable)]
syntax Context ::= VariableName "[" Pattern "]" [klabel(context)]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this represent? I thought a context is a pattern with a 'hole', which is a variable. So, does VariableName design the variable which plays the role of hole in the Pattern?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, please explain the meaning of VariableName here.

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

Successfully merging this pull request may close these issues.

2 participants