Semantics and Type Theory of S-Net.