Alloy Community

User login

How to use the builtin signature String?

 
Posted on: Thu, 06/25/2009 - 18:07
Joined: 2009-03-29
Points: 27
User is offline
How to use the builtin signature String?
Hi all,

Surprisingly I found that the newest release of the Alloy Analyzer supports the builtin signature String, although I have no clue how to use it in the standard way.

For instance, sig A { r : Int } works as expected, but sig A { r : String } does not have any valid instance, to my surprise.

Can someone please clarify this new feature?

Thanks in advance,
hugo
 
Posted on: Thu, 06/25/2009 - 20:11    #1
Joined: 2008-05-15
Points: 334
User is offline
Yes we are preparing (in the near future) to add a limited support
for uninterpreted String literals
For example, in a future version of Alloy4, you would be able to
write formulas like a.name = 'john' && b.name = 'peter'

However, the feature is not finished yet; when it's ready, we will announce it and provide
online examples and documentations for it (just like when we introduced the "seq" sequence type)

(In case you're curious, right now since there are no syntax yet for you
to create String atoms, that means the set of all String atoms is always empty,
and that's why your model says there's no instance)

Sincerely,
Felix Chang
Alloy4 Developer

Syndicate content  

The development of this site is supported by the National Science Foundation under Computing Research Infrastructure Grant No. 0707612.

Theme originally designed by Chris Herberte