Are heating and cooling rules part of the syntax?
See original GitHub issueIn the IMP tutorials, we can see the keywords heat
and cool
being used. I haven’t been able to get K to compile rules in this form, however. Particularly, the example uses []
to denote the holes in the evaluation context. Are these labels present in K?
For instance:
rule T:Term + T2:Term => T ~> [] + T2 [heat]
Fails to compile, highlighting the first [
. In the tutorial we see something similar given as an example.
Issue Analytics
- State:
- Created 4 years ago
- Comments:15 (7 by maintainers)
Top Results From Across the Web
Lesson 1.14: Defining Evaluation Order - K framework
The purpose of this lesson is to explain how to use the heat and cool attributes, context and context alias sentences, and the...
Read more >K Overview and SIMPLE Case Study - ScienceDirect.com
This paper gives an overview of the tool-supported K framework for semantics-based programming language design and formal analysis.
Read more >2 A rapid tour of the join-calculus - Moscova
The chemical soup evolves according to two families of rules: Structural rules ↔ are reversible (→ is heating, ← is cooling); they represent...
Read more >Temperature Manipulation in Songbird Brain Implicates the ...
Cooling HVC reduces the number of repetitions of long-repeated syllables and increases the randomness of syllable sequences. In contrast, cooling the downstream ...
Read more >K Framework Distilled - · Formal Systems Laboratory
The research presented in this paper is part of the rewriting logic seman- ... The heating/cooling rules specify that the arguments mentioned in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It’s going to branch based on which rules apply, so it should only need to do two branches.
The transition attribute tells the java backend that this rule is considered a transition in the state graph of the semantics and thus it should try to apply every single rule and generate the complete list of successor states instead of simply choosing the first rule that applies as an optimization. Ultimately we decided that this makes things confusing for users and thus removed the need to do this in the haskell backend, but the haskell backend is still under active development and cannot run every definition that the java backend supports yet. I would advise you to use the java backend for the time being unless you want to try the haskell backend and it works for you out of the box with no errors or bugs. Hence my suggestion to use the attribute on critical pairs in the semantics.
The java and haskell backends definitely contain built-in symbolic execution. If you write rules like:
and you
krun --search
the termif ?A then 1 else 0
, it should generate two output configurations, 1 and 0. It doesn’t generate a compatible value for ?A, it actually stores it in the term being rewritten as a symbolic value and unifies it with the rules being executed while tracking the symbolic constraints.Does that answer your question?