k-user AT lists.cs.illinois.edu
Subject: K-user mailing list
List archive
- From: Stefan Ciobaca <stefan.ciobaca AT gmail.com>
- To: Charles Jacobsen <charlie.jacobsen AT utah.edu>
- Cc: "k-user AT cs.uiuc.edu" <k-user AT cs.uiuc.edu>
- Subject: Re: [K-user] kompile goes into an infinite loop
- Date: Mon, 8 Jul 2013 18:57:05 +0200
- List-archive: <http://lists.cs.uiuc.edu/pipermail/k-user/>
- List-id: <k-user.cs.uiuc.edu>
I've also encountered a similar problem.
It's probably due to ambiguities in
> test1 ~>
> test2 ~>
> test3
As ambiguities are currently not stored in DAG form, test1 ~> test2 ~>
... ~> testn generates an exponential number of parses. You should
paranthesize: test1 ~> (test2 ~> (... ~> testn))) and it should work.
Cheers,
Stefan
On Mon, Jul 8, 2013 at 6:28 PM, Charles Jacobsen
<charlie.jacobsen AT utah.edu>
wrote:
> I set up "unit test" rules for a module. My test module looks like this, but
> with about 16 more complicated tests:
>
> configuration <k>
> test1 ~>
> test2 ~>
> test3
> </k>
>
> syntax K ::= "test1"
> rule <k> test1 => . ... </k>
> when foo(5) ==Int 10
>
> syntax K ::= "test2"
> rule <k> test2 => . ... </k>
> when foo(-1) ==Int 0
>
>
> syntax K ::= "test3"
> rule <k> test3 => . ... </k>
> when foo(0) ==Int 0
>
> kompile runs out of memory with my module (not the one above), probably in
> an infinite loop? If I chain the tests like the following, it kompiles in
> about 20 - 30 seconds!
>
> configuration <k> test1 </k>
>
> syntax K ::= "test1"
> rule <k> test1 => test2 </k>
> when foo(5) ==Int 10
>
> syntax K ::= "test2"
> rule <k> test2 => test3 </k>
> when foo(-1) ==Int 0
>
> syntax K ::= "test3"
> rule <k> test3 => . </k>
> when foo(0) ==Int 0
>
> I was considering pulling up the source code for kompile in eclipse and
> stepping through it, but I thought I would ask first for any pointers to
> setting up the development environment for k.
>
> Thanks in advance guys.
>
> _______________________________________________
> k-user mailing list
> k-user AT cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/k-user
>
- [K-user] kompile goes into an infinite loop, Charles Jacobsen, 07/08/2013
- Re: [K-user] kompile goes into an infinite loop, Stefan Ciobaca, 07/08/2013
Archive powered by MHonArc 2.6.16.