Title: The Compose Project
1The Compose Project
- dev_at_trese/composestar
- ant rebuild test
2Overview
- Basic project information
- Project file structure
- Compose compiletime control flow
- Platforms in detail
- Build environment
- Debugging
3Basic project information
- Hosted on SourceForge
- http//composestar.sf.net
- http//sf.net/projects/composestar
- Wiki
- http//janus.cs.utwente.nl8000/twiki/bin/view/Com
poser/ - Useful developer info
- http//janus.cs.utwente.nl8000/twiki/bin/view/Com
poser/ComposeStarDevelopment
4Used development tools
- Eclipse JDT ( http//eclipse.org )
- Ant ( http//ant.apache.org )
- ANTLR ( http//antlr.org )
- jUnit ( http//junit.org )
- For QA
- Findbugs ( http//findbugs.sf.net )
- Checkstyle ( http//checkstyle.sf.net )
- Custom build tools
- Mainly ant tasks
- StarLight uses a number of extra tools
5Project file structure
- Core
- Compiletime
- Development
- Plugin
- CwC
- Compiletime
- Examples
- Testing
- Java
- Compiletime
- Examples
- Installer
- Plugin
- Testing
- Runtime
- StarLight
- Development
- Documentation
- Examples
- Libraries
- Setup
- Source
- Compiletime
-
- various .NET projects
Compiletime implementation in Java
Example projects and specific test cases
Development support tools
6Compose compiletime control flow
- Master
- Module execution handled by TASMAN component
- Per platform configuration TASMANConfig.xml
- StarLight
- Uses MSBuild
- Various modules executed outside master
- Compose/C
- master called between preprocessing and
compiling
7Very basic flow
COPPER
Harvester
REXREF
LOLA
SANE
FILTH
DEPART
FIRE
SIGN
CORE
SECRET
Pre-weaving
Weaver
Post-weaving
8Platforms in detail Core
- Dependencies
- Groove ( http//groove.sf.net )
- Kernel Prolog (http//www.binnetcorp.com/kprolog
) - Log4j
- Platform independent modules
9Platforms in detail C
- Dependencies
- WeaveC (with a few modifications distribution
restrictions) - Source based weaving
- Input preprocessed C files
- Inlining of filter code
- Usage commandline tool
- Missing filter types
- Error Exception Meta
- Weird things
- Files are treated as LAMA Types
- Directories form the name space
- Internals/externals do not really exist
10Platforms in detail C Custom Filter Types
- See Composestar.CwC.Filters.CustomCwCFilters
- Requires code generator for each custom action
- Commandline argument --custom-filter
ltfilegtltclassnamegt - ltfilegt is the jar file that contains the custom
filters - ltclassnamegt is the FQN of the CustomCwCFilters
implementations - Example Memoize example
11Platforms in detail Java
- Dependencies
- Javassist
- Runtime interpreter
- Weaving on byte code (hooks to the RT)
- Input plain java files
- Usage from Eclipse as a Compose/Java project
- Can also be used from the commandline, but
requires a BuildConfiguration.xml
12Platforms in detail Java Custom Filter Types
- Requires runtime implementations with proper
annotations - See Composestar.Java.FLIRT.Annotations,
Composestar.Java.FLIRT.Actions,
Composestar.Java.FLIRT.Filters - Automatically found when listed as a projects
dependency in Eclipse - Example Bookshelf example
13Platforms in detail StarLight
- Dependencies
- Cecil
- XML Beans
- VisualStudio SDK
- MSBuild
- .NET SDK
- Inlining of filter code using CIL
- Input assemblies
- Usage msbuild project
- Also used by VisualStudio
14Platforms in detail StarLight
- Partially implemented as MSBuild tasks
- Runtime Behavioral Conflict Detection (depends on
SECRET) - Missing functionality
- No Meta filter type
- Limited signature modification
15Platforms in detail StarLight Custom Filter
Types
- Runtime action execution, or
- Pure CIL inlining
- See StarLight.Filters and StarLight.Weaving.
projects - Automatically detected when listed as a project
dependency - Examples CustomFilters, Memoize
16Build Environment
- Ant build files
- Customized ant environment
- Includes various 3rd party and custom ant tasks
- Core/build.batsh
- Central entry point for project building
- Core/build.ini
- Misc. build settings
17Common build targets
- ant X or Core/build.bat X
- Clean
- Build
- Rebuild
- ( clean, build)
- Install
- Publish the current build to the system
- Test
- Execute various tests or even the complete system
test - build.bat required
- Clean, build, install, test
- Required before commiting changes
18Build Environment
- ant p
- Show other public build targets for the current
(sub)project - Build.bat qa
- Execute findbugs and checkstyle tasks
- Produces QA reports in the qa directory
19Eclipse projects
- Core\Compiletime -gt ComposestarCORE
- CwC\Compiletime -gt ComposestarCwC
- Java\Compiletime -gt ComposestarJava
- Java\Runtime2 -gt ComposestarJavaRT
- StarLight\Source\Compiletime -gt StarLight
- Eclipse plugins
- Core\Plugin\Eclipse
- Depends on ComposestarCORE are registered
plugin. Registered by ant install in the
configured eclipse - Java\Plugin\Eclipse
- Depends on the core plugin
20System Test
- Unit tests
- System configuration file validation
- XSD Schema validation
- Compile and execute examples
- Compare execution output with correct.txt
21Continuous Integration Cruisecontrol
- http//ewi650.ewi.utwente.nl8080/cruisecontrol/
22Additional Quality Assurance
- Findbugs
- Static (byte)code analysis
- http//findbugs.sf.net
- Checkstyle
- Mostly coding style analysis
- http//checkstyle.sf.net
- Currently not enforced
23Debugging Compiletime debugging
- Debug directly in Eclipse
- Use an existing example
- compile it once before starting to debug
- Create a Java Application run profile
- Select the correct Master for the platform
- Set the current directory to the examples base
directory - Set additional commandline arguments
- C recreate the full commandline
- StarLight obj/starlight.xml
- Java BuildConfiguration.xml
24Debugging Java runtime
- Directly in eclipse
- Set up a run profile for the example to test
- Make sure to complete the classpath
- Use ComposestarJavaRT and active project
- Configure the source lookup path to include the
examples sources
25Debugging C and StarLight programs
- Use standard debugging tools
- C for example gbd
- StarLight GuiDebug included with the .NET SDK
- C\Program Files\Microsoft Visual Studio
8\SDK\v2.0\GuiDebug
26Debugging StarLight weaving
- Debug it like any normal MSBuild task project
- I dont know the specifics
27The End
28Compose TODO List
- Note mostly related to the new canonical
notation, which adds more functionality - Reasoning limited to target/selector as
distinguishable messages - Distinguishable messages using other properties
are ignored - CORE
- Not all inconsistencies are found?
- INLINE
- Resource operations are not collected, used to
pass on the the weaver for runtime conflict
detection
29Compose TODO List
- StarLight weaver doesnt support all filter type
arguments - Filter.target and filter.selector are used