graalvm-truffle-implementer
Skill17 starsChanged 9 months agoApache-2.0View on GitHub
Implements language runtimes using GraalVM Truffle framework. Use when:
In this repository98 other files it gives its agents.
- abstract-interpretation-engineSkill
- abstract-machineSkill
- acsl-annotation-assistantSkill
- actor-model-implementerSkill
- algebraic-effectsSkill
- alias-and-points-to-analysisSkill
- axiomatic-semanticsSkill
- bidirectional-type-checkingSkill
- bisimulation-checkerSkill
- capability-systemSkill
- closure-converterSkill
- common-subexpression-eliminatorSkill
- concurrency-verifierSkill
- constant-propagation-passSkill
- contextual-equivalenceSkill
- control-flow-analysisSkill
- coq-proof-assistantSkill
- cps-transformerSkill
- dafny-verifierSkill
- dataflow-analysis-frameworkSkill
- dead-code-eliminatorSkill
- defunctionalizationSkill
- denotational-semantics-builderSkill
- dependent-type-implementerSkill
- dsl-embeddingSkill
- effect-handlers-implementerSkill
- effect-systemSkill
- effect-type-systemSkill
- escape-analysisSkill
- existential-typesSkill
- ffi-designerSkill
- fuzzer-generatorSkill
- gadt-implementerSkill
- garbage-collector-implementerSkill
- gradual-typing-implementerSkill
- higher-order-abstract-syntaxSkill
- hoare-logic-verifierSkill
- incremental-computationSkill
- information-flow-analyzerSkill
- inline-expanderSkill
- interprocedural-analysisSkill
- invariant-generatorSkill
- jit-compiler-builderSkill
- lambda-calculus-interpreterSkill
- language-server-protocolSkill
- lean-proverSkill
- lexer-generatorSkill
- linear-type-implementerSkill
- liveness-analysisSkill
- llvm-backend-generatorSkill
- lock-free-data-structureSkill
- loop-optimizerSkill
- loop-termination-proverSkill
- macro-expanderSkill
- memory-allocatorSkill
- message-passing-systemSkill
- mlir-dialect-designerSkill
- model-checkerSkill
- module-systemSkill
- monad-transformerSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 59
Start with correct interpreter, optimize later
- Distinctive: line 60
Use profiles to guide specialization
- Distinctive: line 63
Use Truffle libraries when available
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
GraalVM Truffle Implementer
Implements language runtimes using the GraalVM Truffle framework for high-performance interpretation.
When to Use
- Building interpreters for existing languages
- Creating new programming languages
- Achieving JIT performance without compilation
- Building polyglot applications
- Embedding multiple languages together
What This Skill Does
- Creates AST interpreters - Tree-walking interpreters
- Implements Truffle nodes - Specializable nodes
- Adds profiling - Runtime profiling for optimization
- Enables JIT compilation - Automatic JIT via Graal
Key Concepts
| Concept | Description |
| AST interpreter | Tree-walking execution |
| Node specialization | Type-specific fast paths |
| Polymorphic inline cache | Cached type information |
| Assumption | Compilation hint |
| TruffleLanguage | Language registration |
Optimization Techniques
| Technique | Description |
| Specialization | Type-specific nodes |
| Inlining | Inline function calls |
| Assumptions | Stable property hints |
| Deoptimization | Fall back to interpreter |
Tips
- Start with correct interpreter, optimize later
- Use profiles to guide specialization
- Implement all operations at least twice
- Handle deoptimization gracefully
- Use Truffle libraries when available
Related Skills
lambda-calculus-interpreter- Basic interpretationjit-compiler-builder- JIT compilationgarbage-collector-implementer- Memory managementabstract-interpretation-engine- Static analysis
Canonical References
| Reference | Why It Matters |
| Wöß et al., "Truffle: A Self-Optimizing Runtime System" (2014) | Truffle paper |
| GraalVM Documentation | Official docs |
| SimpleLanguage Tutorial | Reference implementation |
| Writing RPython in Truffle | Advanced patterns |
Tradeoffs and Limitations
Approaches
| Approach | Pros | Cons |
| Pure Truffle | Fast, simple | JVM required |
| TruffleRuby | Fast Ruby | Complex |
| Guest language | Existing langs | Less control |
Limitations
- Requires JVM (GraalVM)
- Memory overhead for AST
- Startup time
- Complex debugging
- Learning curve
Research Tools & Artifacts
Real-world Truffle implementations:
| Tool | Why It Matters |
| TruffleRuby | Fast Ruby implementation |
| GraalJS | JavaScript on Graal |
| FastR | R implementation |
| SimpleLanguage | Reference implementation |
| Sulong | LLVM on Truffle |
Key Languages
- TruffleRuby: Fast Ruby via Truffle
- GraalPython: Python on Graal
Research Frontiers
Current Truffle research:
| Direction | Key Papers | Challenge |
| Self-optimization | "Truffle" paper | Auto-optimization |
| Specialization | "Specialization" (2018) | Type specialization |
| Partial evaluation | "Partial Evaluation" | AOT compilation |
Hot Topics
- Native image: NativeImage compilation
- Polyglot: Multi-language interop
Implementation Pitfalls
Common Truffle bugs:
| Pitfall | Real Example | Prevention |
| Deopt loops | Specialization thrashing | Profile carefully |
| Memory | AST node overhead | Reuse nodes |
| Assumption | Assumption violated | Check assumption |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

