Skip to content
Kim Se-Won edited this page Dec 16, 2015 · 30 revisions

Welcome to the calcium wiki!

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.

Analysis Overview

Language support

Currently, calcium can analyze programs written in ES5. It additionally supports some ES6 features including block scope, arrow function, rest parameter, destructuring, default values.

Abstraction

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.

Constraints

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.

For more information on