-
Notifications
You must be signed in to change notification settings - Fork 4
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
Coq lang #38
base: master
Are you sure you want to change the base?
Conversation
prover/build
Outdated
|
||
# Functional tests | ||
# ---------------- | ||
|
||
# prover_kore.tests(inputs = glob('t/*.kore'), implicit_inputs = glob('t/definitions/*.kore'), flags = '-cCOMMANDLINE=.CommandLine') | ||
# prover_smt .tests(inputs = glob('t/*.smt2'), flags = '-cCOMMANDLINE=.CommandLine') | ||
|
||
prover_coq .tests(inputs = glob('t/*.v'), flags = '-cCOMMANDLINE=.CommandLine') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's move each test format to its own directory.
prover/lang/kore-lang.md
Outdated
@@ -135,11 +137,13 @@ is to be used for generating fresh variables. *The second variety must be used | |||
only in this scenario*. | |||
|
|||
```k | |||
syntax Variable ::= VariableName "{" Sort "}" [klabel(sortedVariable)] | |||
syntax Variable ::= VariableName "{" Sort "}" [klabel(sortedVariable)] | |||
syntax SetVariable ::= VariableName "{{" Sort "}}" [klabel(sortedSetVariable)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we be moving away from having the sort attached to the variable if we are moving towards AML?
Maybe we want: syntax SetVariable ::= "#" VariableName
, and axiom \implies(#X, Int)
as a local declaration (or part of the claim).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this break any existing tests? It's definitely a change that won't affect anything for the Coq translation though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we don't use set variables yet, I don't think anything would break? It should be \typeof(#X, Int)
not implies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops sorry, I thought you were talking about all variables. I'll fix this for set variables.
prover/t/Logic.v.expected
Outdated
</goals> | ||
<declarations> | ||
<declaration> | ||
axiom \equals ( AndComm , \lambda { A { Term } , B { Term } , H { Term } , .Patterns } \or ( \exists { H0 , H1 , .Patterns } \and ( \equals ( H , conj ( H0 , H1 , .Patterns ) ) , conj ( H1 , H0 , .Patterns ) , .Patterns ) , .Patterns ) ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the current master, axioms in has always names attached: axiom ax0 : \equals[...]
. Could you use getFreshGlobalAxiomName()
from KORE-HELPERS
to generate the names?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, but should we remove the ability to have non-named axioms if we want to make named axioms standard?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should remove it. I will create an issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ad named axioms: you forgot to update the test files (*.expected
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
@@ -101,8 +101,8 @@ module COQ | |||
| CoqInductive | |||
// | CoqCoInductive |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason to keep these commented lines?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I'm guessing you found a way to do the type checking and infering the type at the same time since you've dropped the (* hasType ... *)
syntax
syntax CoqDefinition ::= "Definition" CoqIdent ":=" CoqTerm "(*" "hasType" CoqTerm "*)" "." | ||
| "Definition" CoqIdent CoqBinders ":" CoqTerm ":=" CoqTerm "(*" "hasType" CoqTerm "*)" "." | ||
syntax CoqDefinition ::= "Definition" CoqIdent ":" CoqTerm ":=" CoqTerm "." | ||
// | "Definition" CoqIdent CoqBinders ":" CoqTerm ":=" CoqTerm "." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And here?
No description provided.