Skip to content

Conversation

lucaspena
Copy link
Contributor

No description provided.

@lucaspena lucaspena requested a review from nishantjr February 6, 2020 00:45
prover/build Outdated
# 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')
Copy link
Member

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.

```k
syntax Variable ::= VariableName "{" Sort "}" [klabel(sortedVariable)]
syntax Variable ::= VariableName "{" Sort "}" [klabel(sortedVariable)]
syntax SetVariable ::= VariableName "{{" Sort "}}" [klabel(sortedSetVariable)]
Copy link
Member

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).

Copy link
Contributor Author

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

Copy link
Member

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.

Copy link
Contributor Author

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.

</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 ) )
Copy link
Collaborator

@h0nzZik h0nzZik Feb 6, 2020

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?

Copy link
Contributor Author

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?

Copy link
Collaborator

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.

Copy link
Collaborator

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).

Copy link
Member

@nishantjr nishantjr left a comment

Choose a reason for hiding this comment

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

Looks good.

// Vernacular
syntax CoqSentence ::= CoqDefinition
| CoqInductive
// | CoqCoInductive
Copy link
Member

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?

Copy link
Member

@nishantjr nishantjr left a 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 "."
Copy link
Member

Choose a reason for hiding this comment

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

And 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.

3 participants