Dyna
Tutorial
Hello World
Shortest Path in a Graph
When Things Go Wrong
What is Dyna?
The Basics of Dyna
Counting Words in a Corpus
User Manual
Pragmas
Builtins
Specification of the Dyna Language
Introduction
How to read this specification
Terms (i.e., ground terms)
Patterns (i.e., non-ground terms)
Dynabases
Inspecting and modifying dynabases
Dyna programs
Concrete syntax
Standard library
Analyzing program execution
Controlling program execution
Foreign dynabases
Appendices
Bibliography
Dyna
Docs
»
Tutorial
Edit on GitHub
Tutorial
ΒΆ
Warning
This tutorial is incomplete.
Hello World
Running Hello World
The Interactive Interpreter
Shortest Path in a Graph
Encoding the Input
Run the program
Explaining Answers
Understanding The Program
Inference Rules
Inference Rules As Equations
Why These Particular Equations?
Deriving The Graph From Rules
Endnotes
When Things Go Wrong
Impossible Requests
Non-Termination
Productive Nontermination
Fixing The Fib Example
Counting To Infinity
What is Dyna?
High-Level Languages
Declarative Languages
The Basics of Dyna
Defining Items in Dyna
Watch Out for Errors
Dyna is Dynamic
Defining an Item over Multiple Lines
Retracting a Rule
Rearranging Rules
Items with Variables
Some More Examples with Variables
Functors with Multiple Arguments
Writing a Program in Dyna
What is a Dyna Program?
The Help Command
Counting Words in a Corpus
The Brown Corpus
Loading the Brown Corpus into Dyna
Counting Words
Querying Dyna
Rules with Conditions
Creating Probabilities from Unigram Counts
Finding the Most Frequent Word
Computing Bigram Probabilities
VQuery and Trace
Another Way of Writing Some Rules
Read the Docs
v: latest
Versions
latest
0.4.0
Downloads
PDF
HTML
Epub
On Read the Docs
Project Home
Builds
Free document hosting provided by
Read the Docs
.