
Security News
PolinRider: North Korea-Linked Supply Chain Campaign Expands Across Open Source Ecosystems
PolinRider expands across npm, Packagist, Go modules, and Chrome extensions, using hidden loaders to target developer environments.
@isl-lang/isl-core
Advanced tools
ISL Core - Parser, Type Checker, Formatter, Linter, and Verification for the Intent Specification Language
The "thin waist" API for the Intent Specification Language (ISL). This package provides the essential compiler flow for parsing, checking, formatting, linting, and verifying ISL specifications.
| Module | Export | Description |
|---|---|---|
| Parse | parseISL() | Parse ISL source code into an AST |
| Check | check() | Type check and semantic analysis |
| Format | format(), fmt() | Pretty-print AST back to source |
| Lint | lint() | Style and best-practice checks |
| Compile | compile() | Full compilation pipeline |
| Module | Export | Description |
|---|---|---|
| Imports | resolveImports() | Import resolution between ISL files |
| Verification | verification.* | Verify implementations against specs |
| Module | Export | Description |
|---|---|---|
| TestGen | testgen.* | Generate tests from specifications |
Note: Experimental APIs may change in minor versions. Stable APIs follow semver.
npm install @isl-lang/isl-core
# or
pnpm add @isl-lang/isl-core
import { parseISL } from '@isl-lang/isl-core';
const source = `
domain MyDomain {
entity User {
id: UUID
email: String
}
}
`;
const result = parseISL(source);
if (result.errors.length > 0) {
console.error('Parse errors:', result.errors);
} else {
console.log('AST:', result.ast);
}
import { compile } from '@isl-lang/isl-core';
const result = compile(source, {
check: { strict: true },
lint: { rules: { 'naming/entity-pascal-case': true } },
});
console.log('Success:', result.success);
console.log('Diagnostics:', result.check?.diagnostics);
console.log('Lint messages:', result.lint?.messages);
console.log('Formatted:\n', result.formatted);
import { parseISL, check } from '@isl-lang/isl-core';
const { ast } = parseISL(source);
if (ast) {
const checkResult = check(ast, { strict: true });
for (const diag of checkResult.diagnostics) {
console.log(`${diag.severity}: ${diag.message}`);
}
}
import { parseISL, format } from '@isl-lang/isl-core';
const { ast } = parseISL(source);
if (ast) {
const formatted = format(ast, {
indent: ' ',
maxWidth: 80,
sortDeclarations: true,
});
console.log(formatted);
}
import { parseISL, lint, getRules } from '@isl-lang/isl-core';
// See available rules
console.log(getRules());
const { ast } = parseISL(source);
if (ast) {
const result = lint(ast, {
rules: {
'best-practice/require-description': true,
'naming/field-camel-case': true,
},
});
for (const msg of result.messages) {
console.log(`[${msg.ruleId}] ${msg.message}`);
}
}
import { verification } from '@isl-lang/isl-core';
const sourceCode = `
// @isl-bindings
// CreateUser.pre.1 -> guard at L15
// @end-isl-bindings
function createUser(input) {
if (!input.email.includes('@')) { // L15
throw new Error('Invalid email');
}
// ...
}
`;
const result = verification.verify(sourceCode, {
clauses: [
{ id: 'CreateUser.pre.1', type: 'precondition', expression: 'email.contains("@")' },
],
});
console.log(verification.formatVerificationSummary(result));
import { parseISL, testgen } from '@isl-lang/isl-core';
const { ast } = parseISL(source);
if (ast) {
const suite = testgen.generateTests(ast, {
framework: 'vitest',
includeBoundary: true,
includeErrors: true,
});
for (const test of suite.tests) {
console.log(`${test.category}: ${test.name}`);
}
}
For tree-shaking, you can import specific modules:
import { check } from '@isl-lang/isl-core/check';
import { format } from '@isl-lang/isl-core/fmt';
import { lint } from '@isl-lang/isl-core/lint';
import { resolveImports } from '@isl-lang/isl-core/imports';
import { verify } from '@isl-lang/isl-core/verification';
import { generateTests } from '@isl-lang/isl-core/testgen';
parseISL(source: string, filename?: string): ParseResultParse ISL source code into an AST.
compile(source: string, options?): CompileResultRun the full compilation pipeline (parse → check → lint → format).
check(ast: DomainDeclaration, options?): CheckResultType check and semantic analysis.
Options:
allowUndefinedTypes: Allow undefined type referencesstrict: Treat warnings as errorsformat(ast: DomainDeclaration, options?): stringFormat AST back to source code.
Options:
indent: Indentation string (default: 2 spaces)maxWidth: Maximum line width (default: 80)sortDeclarations: Sort declarations alphabeticallylint(ast: DomainDeclaration, options?): LintResultCheck for style and best-practice issues.
Options:
rules: Enable/disable specific rulesseverities: Override rule severitiesverification.verify(sourceCode: string, spec: SpecInfo, options?): VerificationResultVerify implementation code against ISL specification.
testgen.generateTests(ast: DomainDeclaration, options?): TestSuiteGenerate test cases from behavior specifications.
import { VERSION, API_VERSION } from '@isl-lang/isl-core';
console.log(`Version: ${VERSION}`); // "0.1.0"
console.log(`API Version: ${API_VERSION}`); // 1
MIT
FAQs
ISL Core - Parser, Type Checker, Formatter, Linter, and Verification for the Intent Specification Language
The npm package @isl-lang/isl-core receives a total of 12 weekly downloads. As such, @isl-lang/isl-core popularity was classified as not popular.
We found that @isl-lang/isl-core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
PolinRider expands across npm, Packagist, Go modules, and Chrome extensions, using hidden loaders to target developer environments.

Security News
Open source attacks are accelerating as AI coding agents pull in dependencies faster, with less human review.

Research
/Security News
Malicious Chrome and Firefox extensions posed as free VPNs while stealing clipboard data through later extension updates.