There should be integer type with exact bit width in my language. Therefore I have types like int<1>, int<2>, int<3> and so on. I just defined one concept with an integer attribute. The subtyping hierarchy is as expected int<1> :<=: int<2> :<=: int<3> ...
It's easy to define this as a subtyping rule, which leads on the one hand to the expected behavior. But on the other hand it results to endless type checking run times for some models. This wasn't a big surprise, since I wrote something like 'return int<width + 1>' in the subtyping rule. This will end up in an infinite recursion.
So tried to represent this by a replacement and a comparision rule. But I failed. I don't really understand how this rules a executed compared with the subtyping rule.
Can anybody give me an example how he/she would express something like this in any type rule?