AlloyTools / org.alloytools.alloy

Alloy is a language for describing structures and a tool for exploring them. It has been used in a wide range of applications from finding holes in security mechanisms to designing telephone switching networks. This repository contains the code for the tool.
Other
695 stars 124 forks source link

Wrong typechecking of local let #181

Closed grayswandyr closed 1 year ago

grayswandyr commented 2 years ago

The typing rule for the let construct seems bogus:

sig S {}

one sig e extends S {}

sig T {}

one sig f extends T {}

// "redundancy warning" on f, as expected
run p { some x: S | x = (some univ implies e else f) } 

// no warning, contrary to expectation
run q { some x: S | let d = (some univ implies e else f) | x = d } 
grayswandyr commented 1 year ago

Typing of let addressed in #173