Sure, with respect to the language used in the original post, modal logic can be used as a formal basis for how we derive meaning from phrases like 'must' and 'never'. This has a lot of overlap with the field of deontology, which is a subset of moral philosophy which looks more closely at moral dutys and obligations. There are quite a few different theorys worth exploring in moral philosophy beyond just the deontological one, so I'd recommend starting with classical perspectives like that of Kant and making your own way from there.