Closed QWYNG closed 1 year ago
Thanks for your interest in K!
That particular language definition is not designed to work with the Haskell backend for K; it uses the substitution module which isn't implemented for that backend (that's the cause of the "missing hook" error you see). You should be able to use the LLVM backend to complete the lesson, so I'm going to close this issue for now.
Please let us know if there's anything else we can help you with, and feel free to reopen this issue if you run into problems with this lesson again!
@Baltoli
Thank you for your help!
But llvm backend does not seem to kompile /k-distribution/pl-tutorial/1_k/5_types/lesson_9/lambda.k
⋊> ~/p/1/5/lesson_9 on master ↑ kompile lambda.k --backend llvm
[Error] Compiler: Found existential variable not supported by concrete backend.
Source(/Users/qwyng/k/k-distribution/pl-tutorial/1_k/5_types/lesson_9/lambda.k)
Location(41,31,41,33)
41 | rule <k> lambda X:Id . E => ?T:Type -> E ~> setTenv(TEnv) ...</k>
. ^~
[Error] Compiler: Found existential variable not supported by concrete backend.
Source(/Users/qwyng/k/k-distribution/pl-tutorial/1_k/5_types/lesson_9/lambda.k)
Location(42,33,42,35)
42 | <tenv> TEnv => TEnv[X <- ?T] </tenv>
. ^~
[Error] Compiler: Found existential variable not supported by concrete backend.
Source(/Users/qwyng/k/k-distribution/pl-tutorial/1_k/5_types/lesson_9/lambda.k)
Location(44,39,44,41)
44 | rule T1:Type T2:Type => T1 = (T2 -> ?T:Type) ~> ?T
. ^~
[Error] Compiler: Found existential variable not supported by concrete backend.
Source(/Users/qwyng/k/k-distribution/pl-tutorial/1_k/5_types/lesson_9/lambda.k)
Location(44,51,44,53)
44 | rule T1:Type T2:Type => T1 = (T2 -> ?T:Type) ~> ?T
. ^~
[Error] Compiler: Found existential variable not supported by concrete backend.
Source(/Users/qwyng/k/k-distribution/pl-tutorial/1_k/5_types/lesson_9/lambda.k)
Location(57,32,57,34)
57 | rule <k> mu X:Id . E:Exp => (?T:Type -> ?T) E ~> setTenv(TEnv) ...</k>
. ^~
[Error] Compiler: Found existential variable not supported by concrete backend.
Source(/Users/qwyng/k/k-distribution/pl-tutorial/1_k/5_types/lesson_9/lambda.k)
Location(57,43,57,45)
57 | rule <k> mu X:Id . E:Exp => (?T:Type -> ?T) E ~> setTenv(TEnv) ...</k>
. ^~
[Error] Compiler: Found existential variable not supported by concrete backend.
Source(/Users/qwyng/k/k-distribution/pl-tutorial/1_k/5_types/lesson_9/lambda.k)
Location(58,33,58,35)
58 | <tenv> TEnv => TEnv[X <- ?T] </tenv>
. ^~
[Error] Compiler: Had 7 structural errors.
[Warning] Compiler: Could not find main syntax module with name LAMBDA-SYNTAX
in definition. Use --syntax-module to specify one. Using LAMBDA as default.
Ah, I was mistaken - that lesson actually uses an intersection of K features that are no longer supported: https://github.com/runtimeverification/k/commit/6c122465e238d5df71a8b4c2fe71d79ab2089216. This should be documented better; apologies for the confusion!
See #3704 @QWYNG - this is an oversight on our end; please let us know if we can help you further
Hi! I am a beginner in k. I was doing the tutorial and there are some parts that are not working properly. How to fix it?
In
/k-distribution/pl-tutorial/1_k/5_types/lesson_9
Environment
M2 Macs