-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Kim Se-Won edited this page Dec 16, 2015
·
30 revisions
Calcium is a code analysis engine for JavaScript content assist.
- It generates and solves inclusion-based constraints on types.
- It provides several functions that look into the analysis results.
- Those query results can be used to provide some content assist in editors.
Currently, calcium can analyze programs written in ES5. It additionally supports some ES6 features including block scope, arrow function, rest parameter, destructuring, default values.
Calcium abstracts data to their types.
- abstract all numbers into number type ( similar for other primitive data )
- null and undefined are ignored.
- abstract all of the objects from one constructor into one object type
- abstract all of the function instances at one location into one function type if they have the same abstract scope.
On each of statements and expressions, we generate constraints and types are propagated according to the constraints. We do not present all the details of constraint generation. However, you can get some idea from Domains we use in the analysis.
- analysis design, see Domains.
- how to query its analysis result, see Query APIs.
- calcium plugin for webida, see Calcium plugin.
- future plans, see Future Plan.