Visualization of a Kodkod Solution

View: New views
4 Messages — Rating Filter:   Alert me  

Visualization of a Kodkod Solution

by chrissoalloyuser :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

is there a way to visualize a Kodkod "Solution" object with the Alloy
Visualizer ?

Thanks in advance.

Regards
  Christian


Re: Visualization of a Kodkod Solution

by Felix Chang-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, 20 Mar 2008, chrissoalloyuser wrote:
> is there a way to visualize a Kodkod "Solution"
> object with the Alloy Visualizer ?

Dear Christian:

Not directly, since the Alloy Analyzer's visualization scheme
depends on a user-provided high level structure among
the atoms. (Eg. signatures extend other signatures...
fields have well-definde types...)

(If you don't care about inheritance hierachy or types,
then Alloy Analyzer's visualizer doesn't give you anything
on top of just writing each Kodkod atom as a Dot node,
and each Kodkod tuple as a Dot edge,
and just run AT&T GraphViz Dot on it)

What you can do is take the Kodkod solution object,
and decide for yourself (based on your particular
problem domain) the sigs that each atoms belong to,
and the types and fields that each tuple belong in.
Then you can construct a legal Alloy XML file
that represent this instance.

Then you can use Alloy's visualizer to visualize the XML.

Please see the various examples in alloy4.jar
for how to read/write XML files and launch the visualizer.

Sincerely,
Felix Chang
Alloy4 Developer



Re: Visualization of a Kodkod Solution

by chrissoalloyuser :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

--- In alloy-discuss@..., Felix Chang <fschang@...> wrote:

>
> On Thu, 20 Mar 2008, chrissoalloyuser wrote:
> > is there a way to visualize a Kodkod "Solution"
> > object with the Alloy Visualizer ?
>
> Dear Christian:
>
> Not directly, since the Alloy Analyzer's visualization scheme
> depends on a user-provided high level structure among
> the atoms. (Eg. signatures extend other signatures...
> fields have well-definde types...)
>
> (If you don't care about inheritance hierachy or types,
> then Alloy Analyzer's visualizer doesn't give you anything
> on top of just writing each Kodkod atom as a Dot node,
> and each Kodkod tuple as a Dot edge,
> and just run AT&T GraphViz Dot on it)
>
> What you can do is take the Kodkod solution object,
> and decide for yourself (based on your particular
> problem domain) the sigs that each atoms belong to,
> and the types and fields that each tuple belong in.
> Then you can construct a legal Alloy XML file
> that represent this instance.
>
> Then you can use Alloy's visualizer to visualize the XML.
>
> Please see the various examples in alloy4.jar
> for how to read/write XML files and launch the visualizer.
>
> Sincerely,
> Felix Chang
> Alloy4 Developer
>

Dear Felix,

thanks for your useful hints. I will try to translate it into an Alloy
XML file. But where can i find the schema definition of the Alloy XML
files ?

Regards
Christian


Re: Re: Visualization of a Kodkod Solution

by Felix Chang-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> thanks for your useful hints. I will try to translate it
> into an Alloy XML file. But where can i find the schema
> definition of the Alloy XML files ?

I've updated the XSD to reflect the recent improvements to
the Alloy XML format.  Both the XSD and a brief explaination
can be found here: http://alloy.mit.edu/alloy4/xmlformat.html

Sincerely,
Felix Chang
Alloy4 Developer

LightInTheBox - Buy quality products at wholesale price