ClickDeduce is a tool for learning about and creating evaluation and type-checking rules for simple programming languages.
There are four kinds of terms in ClickDeduce (examples are from the LArith language):
Num, Plus, Times.
NumV.
IntType.
Num requires a literal
for what number to represent and Var requires a literal for the name of the variable.
The interface is divided into two main parts: the tree view and the controls.
This shows the current state of the expression tree. Each node in the tree represents a single expression.
You can pan and zoom the tree by dragging and scrolling.
To select an expression, click on the "Enter Expression..." text box and type in the
name of the expression you want to select, then press Enter.
Selected: ?
Some expressions have literal fields that can be edited.
For example in the Num, Bool, and Var expressions.
To edit a literal, select the text box and type in the new value,
then press Enter or TAB to confirm the change and move to the next field.
While hovering over any node in the tree view, it will be highlighted and you can right-click to open a context menu.
The context menu has options for copying and deleting the selected node. You can also paste a previously copied node on top of the selected node.
The selected language determines the set of expressions available to use in the tree view. Generally, languages further down the list have more expressions available.
If you have an existing tree, you can change the language to any other language which contains the expressions you are currently using. Otherwise, you will need to reset the tree to use a different language.
There are three view modes:
To the right of the main controls is a list of tasks for the selected language. They are designed to introduce you to features of the languages. Completing an expression that matches the condition described in the task will mark it as completed, turning it green. Try to complete some of the tasks for a language before moving on to the next one.
While creating different expressions, you may want to reuse parts of them later. The "Send to Toolbox" button in the context menu will add the selected expression to the toolbox. Later, you can drag expressions from the toolbox into the tree to reuse them.
Back to ClickDeduce