Xsemantics is a DSL (implemented in Xtext itself) for writing type systems, reduction rules, interpreters (and in general relation rules) for languages implemented in Xtext. A system definition in Xsemantics is a set of judgment rules which have a conclusion and a set of premises; these rules can act on any Java object, though, typically, they will act on EObjects which are elements of your Xtext language. Xsemantics then generates Java code that can be used in your language implemented in Xtext for scoping and validation (it also generates a validator in Java).
Xsemantics' language relies on Xbase, so that you have a rich syntax for the rules of your system, and you have access to all Java! You might want to take a look at Xbase language reference before you start using Xsemantics.
Xsemantics is thought to be used by people who are at least a little familiar with formal type systems and operational semantics: it aims at providing a syntax which is close to the way deduction rules are written in a formal setting. Actually, Xsemantics rules are written in the other direction with respect to standard deduction rules: the conclusion come before the premises; this is just to make IDE tooling work better, and to give a more "programming" style to rules.
In the following we will first give a brief description of the shape of syntactic elements of Xsemantics, and then we will continue with some examples.