1 / 8

Smalltalk / Squeak Trait Declaration Alias,Exclusion by method/selector-signature

Smalltalk / Squeak Trait Declaration Alias,Exclusion by method/selector-signature Trait Requirements by method/selector-signature Trait Processing dynamic linking. C# 1.0/2.0 (C-like) Alias,Exclusion --> enhanced with argument-types --> enhanced with argument- and return types

Télécharger la présentation

Smalltalk / Squeak Trait Declaration Alias,Exclusion by method/selector-signature

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Smalltalk / Squeak Trait Declaration Alias,Exclusion by method/selector-signature Trait Requirements by method/selector-signature Trait Processing dynamic linking C# 1.0/2.0 (C-like) Alias,Exclusion --> enhanced with argument-types --> enhanced with argument- and return types recursive flattening / preprocessing

  2. Enhancements for C# 1.0/2.0 (C-like) • Automatic library extraction/insertion (-->) • PreCompiler Checks for override/virtual/new (simplified) • Generic boundaries/constraints tests valid if: constraints(class) >= sum(constraints(used traits)) • Generic types/placeholder tests valif if: gtypes(class) >= sum(gtypes(used traits)) • Trait-Interface propagation(-->)

  3. Done so far • Modular Generic Parser (understands most code-features of C-like languages, eg. Java) • Detailed object-data extraction by the parser • Extendable code flattening (mostly language independant) • Code manipulation outside the ST image ("external environment") • Code covered by approx. 400 tests

  4. Currently "Missing" • Lookup of classes / traits / methods / libraries / ... ignore the namespaces (eg. Csharp)Current simplified lookup is done by first-match in the environment • Interface propagation does no existence-check in the current environment (developer responsibility) • Parsing of method body • Csharp only: Rel-expressions in Constructor-call not supported, eg public myconstructor(int i1, int i2) : base(i1<i2) {... }

  5. Future Extensions • Aliasing for generic types/placeholders in trait, declaration and requirements with a followed code tranformation • Constraints for requirements (generic methods only) • More restrictive parser (code correctness) • better Precompiler checks (eg. return types) • ...

  6. xCompilationUnit, eg: CSharp code-repository internal/external Environment read/init and parse xCompilationUnit generation TraitPreprocessor Flattening, ... mirrored code-repository Flattened Environment mirror & write (only if no errors occured) flattened code-repository

  7. Environment (singleton) InternalEnvironment (singleton) (included by default) ExternalEnvironmentS ... LOOKUP CodeObjects / TraitFlattener / ...

  8. xCompilationUnit [ or PathElement, ... ] TraitFlattener (Visitor) [ or: FileReader, FileWriter, FileMirror, ... ]

More Related