From: Petra D. <Pet...@ec...> - 2011-10-12 13:30:30
|
Hello Urmas, > Is there any tutorial how to animate the specification using CZT? I am not really familiar with animation but I hope I can help you to get started. I am not aware of a tutorial but ZLive, the animator, provides quite good help messages. Once you've started ZLive, you can type "help" and it will tell you what you can do. > For example i have simple specification like > > ┌AddAB > a?, b?, c!: ℕ > | > c! = a?+b? > └ > > > > I would like to get output 3 if i provide inputs 1 and 2. I put your little spec into file test.utf8, then started ZLive and typed: load test.utf8 eval AddAB \land [a?, b? : \nat | a? = 1 \land b? = 2] As you can see, I used the schema calculus to constrain AddAB to the inputs you are interested in. I don't know whether that's the normal way to do it but it seems to work. The output of ZLive is \{ \lblot a? == 1 , b? == 2 , c! == 3 \rblot \} and you can see that c! must be 3. > is it possible to animate the specification using command line? You can use ZLive as a command line tool by executing: java -jar czt.jar zlive > Is it possible to store outputs in output file and read inputs from > input file? In my example above, I already used input files. I don't know whether it is possible to store outputs but have a look at the help messages provided and you might find out. Hope this helps, Petra |