Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abstract Concepts #32

Closed
quenio opened this issue Mar 22, 2017 · 0 comments
Closed

Abstract Concepts #32

quenio opened this issue Mar 22, 2017 · 0 comments

Comments

@quenio
Copy link
Owner

quenio commented Mar 22, 2017

Abstract concepts are only inherited and they are never instantiated directly. They may also contain derived attributes whose definition is deferred to the sub-classes.

In CML, a concept may be defined as abstract by using the "abstract" keyword before the "concept" keyword.

During code generation, no code needs to be generated to allow their direct instantiation of abstract concepts by clients.

Acceptance criteria:

  • The "abstract" keyword can be used in CML before the "concept" keyword to define a concept as abstract.
  • In the CMLC target, the abstract concepts will have create methods and constructors that accept the instances representing the inherited classes as parameters. Concrete concepts will instead instantiate the base classes in the constructor.
  • In the POJ target, the abstract concepts will be declared as abstract. The ancestors will be just inherited.
@quenio quenio added this to In Progress in CML Compiler Bootstrapping Mar 22, 2017
quenio pushed a commit that referenced this issue Mar 24, 2017
quenio pushed a commit that referenced this issue Mar 24, 2017
@quenio quenio moved this from In Progress to Done in CML Compiler Bootstrapping Mar 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

1 participant