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

Create libanalysis for Orange Mini #34

Open
rfratto opened this issue Jan 22, 2017 · 0 comments
Open

Create libanalysis for Orange Mini #34

rfratto opened this issue Jan 22, 2017 · 0 comments
Milestone

Comments

@rfratto
Copy link
Contributor

rfratto commented Jan 22, 2017

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.

@rfratto rfratto changed the title Create code analysis and type resolution phase Create libanalysis for Orange Mini Jan 22, 2017
@rfratto rfratto added this to the Orange Mini milestone Jan 22, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant