RDF as a programming substrate: universal late binding decentralized allocation monotonicity and global storage Turtle document consists of a sequence of triples: S P O. Each triple represents a named arc. Each element may be one of: PREFIX:LOCAL Unlike XML, a prefixed name is formed by simple concatenation. Subject and/or object may be "blank nodes", identified with PREFIX _. Each blank node is local to the containing document. Object may also be a "literal": "TEXT" NUMBER = 0 | 1 | 1.2e9 | ... BOOLEAN = true | false Abbreviations: S P X, Y, Z. = S P X. S P Y. S P Z. S P X; Q Y; R Z. = S P X. S Q Y. S R Z. S P []. = S P _:B. S P [ R X; Q Y ]. = S P _:B. _:B R X. _:B Q Y. [ R X; Q Y ] P O. = _:B P O. _:B R X. _:B Q Y. Extension: a "subgraph" can be used in the subject or object: S P { A B C. D E F }. { A B C. D E F } P O. Production rules pattern matching universe of belief expression matching RDF matching assertion dependencies forward chaining why use rule systems? good when problem matches control otherwise, not: merge sort hard AMORD features sub-rules goals -- backward chaining TMS manages dependencies assumptions and retraction justifications provides cache to speed up queries AIR: AMORD in RDF air:Policy A policy consists of a set of actions. air:rule A rule consists of a pattern and some actions. air:variable A variable is an ordinary URI that is declared as such. air:assert An assertion is a set of triples that are added to the universe. Scoping of variables: policies and rules are blocks Rules bind variables; contained actions refer to them Pattern matching is complicated; some predicates are handled specially Actions in a rule depend on the matched graph