next up previous contents
Next: 3.3 An example of Up: 3.2 HelloWorld Example Previous: 3.2.3 Java code synthesis   Contents

3.2.4 C# code synthesis

To synthesize C# code for the HelloWorld example, execute the following command:

scc -lcsharp HelloWorld.des

HelloWorld.cs is generated and the following message is printed out to the console:

-----
Time spent on compilation:         0.007 (sec)
File(s) generated:                 HelloWorld.cs
-----
Command to compile the source:     mcs -main:HelloWorld HelloWorld.cs (with Mono)
                                   csc /main:HelloWorld HelloWorld.cs (with .Net Framework SDK)
Command to run the compiled code:  mono HelloWorld.exe (with Mono)
                                   HelloWorld.exe (with .Net Framework)
-----

This tells the user how to compile the source and execute the program in Linux and Windows.

The execution result of the C# program is as following:

    Hello World Example
['A'] > e
['B'] > exit

Currently the -ext parameter is not supported for the C# target language. All the action code and guards in the model are ignored.


next up previous contents
Next: 3.3 An example of Up: 3.2 HelloWorld Example Previous: 3.2.3 Java code synthesis   Contents
Thomas Huining Feng
2004-04-05