[K-Bug] Diferent behavior using `krun input` and `krun -cPGM`

Open
#3,166 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Domain
cli

Research direction

Start with the krun input path and compare it with the krun -cPGM='bar()' path, using the provided test.k definition and in file. Run kompile test.k, then both krun commands to reproduce the parser error. Done means file input produces the same result as the -cPGM form, including the shown output.

Written by the indexing model from the issue text.

Description

frontend
What component is the issue in?

Front-End

Which command
  • kompile
  • kast
  • krun
  • kprove
  • kprovex
  • ksearch
What K Version?

v5.5.97-0-gb45441ceea

Operating System

MacOS (Apple Silicon/AMD)

K Definitions (If Possible)
module TEST-SYNTAX
  syntax Foo ::= foo()
endmodule

module TEST
  imports TEST-SYNTAX

  syntax Foo ::= bar()
endmodule
Steps to Reproduce
kompile test.k
echo 'bar()' > in
krun in
Expected Results

The expected result is the same as if we execute krun -cPGM='bar()':

<k>
  bar ( ) ~> .
</k>

However, we have a parser error:

[Error] Inner Parser: Scanner error: unexpected character sequence 'b'.
	Source(/Users/robertorosmaninho/rv/k-training/issue-example/./in)
	Location(1,1,1,2)
	1 |	bar()
	  .	^
[Error] kparse:
/Users/robertorosmaninho/rv/k/k-distribution/target/release/k/bin/kast --output
kore --definition ./ex1-kompiled in
[Error] krun: kparse --definition ./ex1-kompiled in
Dominant language
Python
Stars
591
Forks
163
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from runtimeverification/k

All issues in runtimeverification/k

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.