Skip to content

eclipse-fennec/ocl.model

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@emfts/ocl.model

TypeScript OCL (Object Constraint Language) model generated from an Ecore metamodel. Provides type definitions and implementations for OCL 2.4/2.5 AST (Abstract Syntax Tree) nodes.

The metamodel follows the OMG Object Constraint Language specification (v2.4, formal/2014-02-03).

Part of the Eclipse Fennec project.

Installation

npm install @emfts/ocl.model

Usage

import { OclFactory, OclPackage } from '@emfts/ocl.model';

// Build AST nodes via the factory
const expr = OclFactory.eINSTANCE.createOperationCallExp();

The package also exposes OclSwitch, a visitor base class over the full OCL metamodel (with super-type fallback dispatch). Evaluators such as @emfts/ocl.engine extend it:

import { OclSwitch } from '@emfts/ocl.model/OclSwitch';

Development

Build

npm install
npm run build

Regenerate Model from Ecore

npm run generate

This regenerates all TypeScript classes in src/generated/ from the Ecore metamodel in model/ocl.ecore. Generated files are marked with @generated and should not be edited manually.

Deployment & Artifacts

Registry npmjs.com
Package @emfts/ocl.model (public)
Entry points . (model + factory) and ./OclSwitch (visitor base)
Build output dist/ (ESM, tsc) — only dist is published (see files in package.json)
Source https://github.com/eclipse-fennec/ocl.model (default branch main)
Project Eclipse Fennec

Releases are published to the npm registry under the @emfts scope.

License

EPL-2.0 — see LICENSE.

About

OCL Model

Resources

License

Security policy

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors