Getting Started with LogicBlox


Table of Contents

1. Ready? Let's go!
2. Fred's Olde Ice Cream Shoppe
3. Tracking cost, price and sales
4. Manipulating facts
5. More predicates: price and sales
6. Deriving new facts with rules
7. Aggregate all the things!
8. Querying facts
9. Constraints and you
10. What next?

1. Ready? Let's go!

This tutorial will introduce some of the core concepts of LogicBlox development using the LogicBlox REPL (Read-Eval-Print Loop). The goal is to give a quick tour of some of the core features of the LogiQL language, without too much detailed explanation.

The REPL is an interactive command-based environment in which many LogiQL commands can be executed and their results can be inspected immediately. This makes it a great environment to get started with LogicBlox and to explore what it can do. However, the REPL is not just for learning. It is still used daily by many seasoned LogiQL programmers, who use it for debugging purposes, or to try out small fragments of LogiQL.

You see the web-based version of the LogicBlox REPL on your right. Every time you open this tutorial you will be given a fresh workspace. "Workspace" is the LogicBlox term for a database, combining both schema, logic and data. Workspaces created as part of this tutorial can no longer be accessed after you reload this page. It is, however, possible to keep your work by pressing the "Save" button, which will let you download a zip file containing your workspace. In a future session you can use the "Restore" function to upload the zip file and continue working. The "Create" button will create a fresh workspace.