Skip to content
This repository was archived by the owner on Oct 14, 2018. It is now read-only.

Create libanalysis for Orange Mini #34

@rfratto

Description

@rfratto

libanalysis needs to be populated with code that does the following: given a set of Orange Modules, it should check each module for type errors. If the program is well typed, type info should be generated for each module.

Type info has a set of contexts, which contain the types of nodes inside that context. Aside from the global context, a new context is generated for each construct that is generic. Contexts are stored in a hierarchy, since generic functions/classes/etc can be nested.

A context has:

  • an id
  • the list of types that would resolve the generic class/interface/etc
  • the parent id
  • the type table for this context

A row in the type table has:

  • a node id
  • the type of the node

Referencing functions, classes, etc outside of the current Orange Module (e.g., in another file or library) are not added to the type info for the current module, but the types that are returned by those nodes are still used. If those nodes outside of the current module haven't had their types generated yet, they will determined at this point.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions