Table of Contents

HaQuNa

HeaRTDroid Query Notation is a simple language that can be used in an interactive commandline shell to load, modify, run HMR+ models.

Source code can be downloaded from HeaRTDroid repository

Most recent release can be downloaded from here HaQuNa v. 1.0.7.

You should have at least Java 7 to run HaQuNa.

Interactive mode

To run HaQuNa in interactive mode go to the directory where you saved haquna.jar and type in console

java -cp haquna.jar:. haquna.HaqunaMain

Non-interactive mode

Running scripts

You can run a script, which is a set of commands in HQN notation in non-interactive mode. To run a script that will printout the result to standard output run:

java -cp haquna.jar:. haquna.HaqunaMain script.hqn 

If you wish to run a script, but after that open a console, run

java -cp haquna.jar:. haquna.HaqunaMain --console (or -c) script.hqn

Running inference mode

HaQuNa allows you to run inference for selected models from bash. The result of the reasoning will be printed to standard output. The command-line options of HaQuNa are presented below

java -cp haquna.jar:. haquna.HaqunaMain --model model.hmr \
  --tables ['Table1','Table2'] \                     # mandatory only for foi 
  --inference [ddi|gdi|foi] \                        # optional, default = ddi
  --initial-state [att-name=value, att-name=value] \ # optional
  --conflict-resolution  [all|last|first] \          # optional, default first
  --tokens [on|off] \                                # optional, default off
  --uncertainty [on|off]                             # optional, default on

Language specification

Loading model from file

myModel = new Model('model.hmr')

Loading model from URL

myModel = new Model('http://example.com/model.hmr')

Saving model to file

myModel.save('/path/to/file/')

Running inference

Running scripts

For details on running scripts see Non-interactive mode

load('script.hqn')

Getters for model objects

Getters for particular elements of XTT2 model

Creating components

Modifying XTT2 model

Original model stays intact

State management via Working Memory object