I really like designing Alloy models by simply listing the constraints and then running the Alloy Analyzer: Find the instances that satisfy the constraints.
But it occurred to me that mapping such constraint-centric Alloy models into programming language code might be difficult. There probably isn’t going to be a one-to-one mapping of Alloy constraint expressions to, say, Java statements. Indeed, mapping a list of Alloy constraint expressions to Java code is likely be quite difficult.
If there is a huge semantic/syntactic gap between the Alloy expressions and the programming language code, then isn’t the benefit of Alloy diminished?
Would it be better to not design constraint-centric Alloy models? Would it be better to instead design algorithmic-centric Alloy models (i.e., make Alloy models that look like programming language code), to decrease the semantic/syntactic gap?
I am eager to hear your thoughts on this.