question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

What does #False executing krun mean?

See original GitHub issue

When executing krun on a sample program for a lambda calculus, I get #False as an output. What does this mean?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dwightguthcommented, May 13, 2019

.K is the unit of the list type that the K sort represents whose cons operator is ~>. We allow users to write terms of sort K as if they were an associative list, but it’s actually implemented as a cons list under the hood and matching elements off the tail is not supported (for that, you need the List sort).

I don’t believe we have a way to output the entire configuration instead of a substitution, but if you write a pattern that completes to the top cell with no anonymous variables, you can of course infer the entire configuration from the substitution.

#And means that there are multiple variables in the substitution and the conjunction of all of them is a single search result. #True means that the pattern matched but generated the empty substitution. A term like isKResult(V0) ==K true in the substitution means that you have some symbolic term that ended up in the output substitution but was unable to be fully resolved.

1reaction
dwightguthcommented, May 9, 2019

I figured out why you’re seeing this behavior. This is actually the correct behavior of krun for this scenario, although in this case it is occurring due to what I believe to be a bug in your semantics, which you should now be able to fix.

The problem here is the rule rule fail ~> _ => fail. This rule desugars into the following:

rule <T> <k> fail ~> Var1 ~> Var2 </k> </T> => <T> <k> fail ~> Var2 </k> </T>

In this case, if Var1 and Var2 are both .K, then this is equivalent to the following rule:

rule <T> <k> fail </k> </T> => <T> <k> fail </k> </T>

As you can see, this is rewriting the current term to itself. In this case, because the configuration is not changing at all, krun was able to detect that rewriting didn’t terminate, and so it returned #False, indicating that there exist no output states for this input configuration. Perhaps there should be a nicer message here, but krun is technically behaving soundly.

I believe what you meant to write was the following:

rule <k> fail ~> K:K => fail </k> requires K =/=K .K

Read more comments on GitHub >

github_iconTop Results From Across the Web

Running Automated Tasks with a CronJob - Kubernetes
It stands for the deadline in seconds for starting the job if it misses its scheduled time for any reason. After the deadline,...
Read more >
KRun - KIO - KDE API Reference
Opens files with their associated applications in KDE. To open files with their associated applications in KDE, use KRun. It can execute any...
Read more >
[Bug] krun gives different output than kore-exec · Issue #1594 ...
When running the following definition, I expect the second assume to fail. The assertion should never be reached. module TEST imports INT syntax...
Read more >
Lesson 1.9: Unparsing and the format and color attributes
Parsing, Execution, and Unparsing. When you use krun to interpret a program, the tool passes through three major phases. In the first, parsing,...
Read more >
CREATE TASK - Snowflake Documentation
FALSE ensures only one instance of a particular DAG is allowed to run at a time. The next run of a root task...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found