P Project File

The P compiler does not support advanced project management features like separate compilation and dependency analysis (coming soon). The current project file interface is a simple mechanism to provide all the required inputs to the compiler in XML format. The P project file below is taken from the TwoPhaseCommit example in Tutorials.

<!-- P project file for the Two Phase Commit example -->
<!-- Add the dependencies for the Timer machine -->
<!-- Add the dependencies for the FailureInjector machine -->
The <InputFiles> block provides all the P files that must be compiled together for this project. In <PFile>, you can either specify the path to the P file or to a folder and the P compiler includes all the files in the folder during compilation. The <Target> block specifies the target language for code generation (options are: CSharp, C, RVM and we are adding support for Java). The <ProjectName> block provides the name for the project which is used as the output file name. The <OutputDir> block provides the output directory for the generated code. Finally, <IncludeProject> block provides path to other P projects that must be included as dependencies during compilation. The P compiler simply recursively copies all the P files in the dependency projects and compiles them together. This feature provides a way to split the P models for a large system into sub projects that can share models.