Impose a lone attribute to be empty in Alloy -


i wondering if there's way, in fact, force attribute of signature empty. tried way seems not work:

sig c {  myattribute: lone type } 

sig type { att1: int att2: ..... etc.. }

fact {     c: c|          (my condition)          <=>         (             no c.myattribute         ) } 

as can think defing structure abstract signature way:

abstract sig generaltype {} 1 sig empty extends generaltype {} sig notempty extends generaltype {...arguments (att1,2....} 

the existing code should work given right my condition. (wmeyer indeed correct in suggesting that.)

you can test constraint make sure behaving expect:

sig type { }  sig c {     myattribute: lone type }  fact {     c: c | no c.myattribute }  run { } 5  check {     c: c | no c.myattribute } 5 

Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -