k-user AT lists.cs.illinois.edu
Subject: K-user mailing list
List archive
- From: Dorel Lucanu <dlucanu AT info.uaic.ro>
- To: k-user AT cs.uiuc.edu
- Subject: Re: [K-user] How does <k> rules work?
- Date: Tue, 20 Aug 2013 08:55:07 +0300
- List-archive: <http://lists.cs.uiuc.edu/pipermail/k-user/>
- List-id: <k-user.cs.uiuc.edu>
You may use the stepper:
krun rourProgram.lang --debug
Type "help" in order to get the commands of the stepper.
However, before using the stepper tag the rules of interest as transitions:
rule ... [transition]
Alternatively, more flxible, you may use different tags for your rules
rule ... [tag1]
rule ... [tag2]
and kompile the definition with "transition" option:
kompile lang.k -- transition="tag1" // only the rules tagged with "tag1" are compiled as transitions
kompile lang.k -- transition="tag1 tag2" // only the rules tagged with "tag1" and "tag2" are compiled as transitions
On running step apply rules until the first transition is executed.
Dorel
On 8/19/13 10:41 PM, Ömer Sinan Ağacan wrote:
Thanks, I think I understand it now. When I wrap a rule with <k> ...
</k>, it matches with the whole k configuration, not some part of
it(unlike unwrapped rules).
So at this point I'm having trouble with debugging my K program, is
there a way to trace what is current configurations, and which rule
applied etc. for each computational step until the program stucks?
---
Ömer Sinan Ağacan
http://osa1.net
_______________________________________________
k-user mailing list
k-user AT cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/k-user
- [K-user] How does <k> rules work?, Ömer Sinan Ağacan, 08/19/2013
- Re: [K-user] How does <k> rules work?, Traian Florin Șerbănuță, 08/19/2013
- Re: [K-user] How does <k> rules work?, Ömer Sinan Ağacan, 08/19/2013
- Re: [K-user] How does <k> rules work?, Dorel Lucanu, 08/20/2013
- Re: [K-user] How does <k> rules work?, Ömer Sinan Ağacan, 08/19/2013
- Re: [K-user] How does <k> rules work?, Traian Florin Șerbănuță, 08/19/2013
Archive powered by MHonArc 2.6.16.