Work on kwowledge base

- completed work on variable mask
- bit data struct moved to variable masks header
- knowledge base update also variable mask when adding a rule