loa

Virtual machine for the Logic of Assumptions
git clone git://juanmeleiro.mat.br/loa
Log | Files | Refs

tree.h (372B)


      1 #include <stdio.h>
      2 #include "symbol.h"
      3 
      4 typedef struct tree tree;
      5 
      6 tree*  new_leaf     (symbol);
      7 tree*  new_node     (symbol);
      8 void   set_subtree  (tree*, symbol, tree*);
      9 tree*  get_subtree  (tree*, symbol);
     10 bool   is_leaf      (tree*);
     11 symbol get_head     (tree*);
     12 
     13 void   display_tree (FILE*, tree*);
     14 
     15 /* Guarantees:
     16  * - set(t, k, v), is_leaf(t) || get(t, k) == v;
     17  */