User Tools

Site Tools


padl_generator

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
padl_generator [2014/02/16 09:26] – created yannpadl_generator [2025/01/15 21:40] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== PADL Generator ====== ====== PADL Generator ======
  
-Because all PADL creators are builders (as in the Builder design pattern) and must conform to the same interface ''padl.kernel.ICodeLevelModelCreator'' provided by [[PADL]], it is simple to provide a unified entry point for all of them. Also, the creation of interesting models often require the additional steps of:+In general, a code-level model can be obtain for a system through reverse-engineering/parsing using: 
 + 
 +<code> 
 +final ICodeLevelModel codeLevelModel = 
 +   Factory.getInstance().createCodeLevelModel(<Name>); 
 +codeLevelModel.create( 
 +   new <A>Creator( 
 +       <FileRepository>.getInstance(), 
 +       new String[] { <Some files> }), <Recurse in directories>); 
 +</code> 
 + 
 +where: 
 +    * <Name> can be any String; 
 +    * <A>Creator is any class implementing the ICodeLevelModelCreator interface. A creator is the concrete parser or reverse-engineering algorithm that builds a PADL model from some files; 
 +    * <FileRepository> is any class implementing the IFileRepository interface. A file repository allows the meta-model and the creator to access necessary PADL resources (constituents, analyses, etc.) in a platform-independent way; 
 +    * <Some files> are any String pointing towards the files/directories to be parsed, as required by the creator; 
 +    * <Recurse in directories> is a Boolean flag that allow you to specify only the top most directory of a set of source files. 
 + 
 +Because all PADL creators are builders (as in the Builder design pattern) and conform to the same interface ''padl.kernel.ICodeLevelModelCreator'' provided by [[PADL]], it is simple to provide a unified entry point for all of them. Also, the creation of interesting models often require the additional steps of:
   - Annotating the models with information about lines of code;   - Annotating the models with information about lines of code;
   - Annotating the models with information about conditional statements;   - Annotating the models with information about conditional statements;
padl_generator.1392542784.txt.gz · Last modified: (external edit)