next up previous contents
Next: A simple example of Up: The AriNET language Previous: AriNET Commands   Contents


A list of the commands

Let us start with a list of AriNET commands given in a tabular form:

Main Commands  
Command Meaning
(defvariable $var_1...var_n$) defining an AriNET variable which can be used in arithmetical networks16
(defconstant $name$ $val$) defining a constant name to be of value $val$.
(defconstraint $expr$) defining a constraint where $expr$ is an equation. This is one of AriNET's most important command as it enables us to design constraints within arithmetical networks.
(defmodule $name$ $params$ $expr$) defining a module (a function) where $expr$ is a constraint.
(set-value! $var$ $val$ $'informant$) * sets the value of the variable $var$ to $val$ where $'informant$ is the one who engaged the action.
(get-value $var$) * asks for the value of $<var>$
(forget-value! $var$ $'informant$) * resets the value of $var$ if $'informant$ is correct regarding the set-value! done previously.
(probe $name$ $var$) displays a message each time the value of $var$ changes17
(reset) * resets the whole environment (i.e erases the arithmetical networks, functions and variables).

Note: The commands with a *, in the meaning column, are accessible trough the GUI as well. (see figures 4 , 5 and 6)

The $expr$ of a (defconstraint $<expr>$) (i.e of a constraint) is constructed using the followings:

\framebox{expr := (1ary-op expr); expr 2ary-op expr; (name expr ...); (expr); var; number}

Where 1ary-op and 2 ary-op are one of the following:

Defconstraint : 1ary-op  
Command Meaning
(sin $<expr>$) sinus of $<expr>$
(cos $<expr>$) cosinus of $<expr>$
(tan $<expr>$) tangent of $<expr>$
(arcsin $<expr>$) $sin^{-1}(expr)$
(arccos $<expr>$) $cos^{-1}(expr)$
(arctan $<expr>$) $tan^{-1}(expr)$
(sqrt $<expr>$) $\sqrt{expr}$
(sqr $<expr>$) $expr^{2}$
(exp $<expr>$) $e^{expr}$
(ln $<expr>$) $ln(expr)$ (natural logarithm)

Defconstraint : 2ary-operations18  
Command Meaning
($<expr>$ + $<expr>$) addition
($<expr>$ - $<expr>$) subtraction
($<expr>$ * $<expr>$) multiplication
($<expr>$ / $<expr>$) division
($<expr>$ = $<expr>$) equality


next up previous contents
Next: A simple example of Up: The AriNET language Previous: AriNET Commands   Contents
dominique 2003-06-02