import { BodyBasedExpression } from '../Expression' ; import { OclExecutionContext } from '../../OclExecutionContext' ; oclExpression oclExample export class SqrtExpression extends BodyBasedExpression { evaluate ( visitor , localVariables ? ) { const sqrt = this . getBody ( ) ? this . getBody ( ) . evaluate ( visitor ) : 2 ; const left = this . getSource ( ) . evaluate ( visitor , localVariables ) ; return Math . pow ( left , 1 / sqrt ) ; } }