function observeProcessor(engine, program) {
  let result = engine.query(observeLiteral);
  result.forEach((r) => {
    if (r.theta.O === undefined
        || r.theta.ST === undefined
        || r.theta.ET === undefined) {
      // ignoring those undefined ones
      return;
    }
    let observation = r.theta.O;
    let startTime = r.theta.ST;
    let endTime = r.theta.ET;

    if (!(startTime instanceof Value)) {
      throw new Error(stringLiterals([
        'declarationProcessors',
        'observe',
        'invalidStartTimeValue'
      ]));
    }
    if (!(endTime instanceof Value)) {
      throw new Error(stringLiterals([
        'declarationProcessors',
        'observe',
        'invalidEndTimeValue'
      ]));
    }
    let sTime = startTime.evaluate();
    let eTime = endTime.evaluate();
    if (eTime < sTime) {
      throw new Error(stringLiterals([
        'declarationProcessors',
        'observe',
        'invalidTimeOrdering'
      ]));
    }
    engine.scheduleObservation(observation, sTime, eTime);
  });
}
function observeProcessor(engine, program) {
  let result = engine.query(observeLiteral);
  result.forEach((r) => {
    if (r.theta.O === undefined
        || r.theta.ST === undefined
        || r.theta.ET === undefined) {
      
      return;
    }
    let observation = r.theta.O;
    let startTime = r.theta.ST;
    let endTime = r.theta.ET;

    if (!(startTime instanceof Value)) {
      throw new Error(stringLiterals([
        'declarationProcessors',
        'observe',
        'invalidStartTimeValue'
      ]));
    }
    if (!(endTime instanceof Value)) {
      throw new Error(stringLiterals([
        'declarationProcessors',
        'observe',
        'invalidEndTimeValue'
      ]));
    }
    let sTime = startTime.evaluate();
    let eTime = endTime.evaluate();
    if (eTime < sTime) {
      throw new Error(stringLiterals([
        'declarationProcessors',
        'observe',
        'invalidTimeOrdering'
      ]));
    }
    engine.scheduleObservation(observation, sTime, eTime);
  });
}
function observeProcessor ( engine , program ) { let result = engine . query ( observeLiteral ) ; result . forEach ( ( r ) => { if ( r . theta . O === undefined || r . theta . ST === undefined || r . theta . ET === undefined ) { // ignoring those undefined ones return ; } let observation = r . theta . O ; let startTime = r . theta . ST ; let endTime = r . theta . ET ; if ( ! ( startTime instanceof Value ) ) { throw new Error ( stringLiterals ( [ 'declarationProcessors' , 'observe' , 'invalidStartTimeValue' ] ) ) ; } if ( ! ( endTime instanceof Value ) ) { throw new Error ( stringLiterals ( [ 'declarationProcessors' , 'observe' , 'invalidEndTimeValue' ] ) ) ; } let sTime = startTime . evaluate ( ) ; let eTime = endTime . evaluate ( ) ; if ( eTime < sTime ) { throw new Error ( stringLiterals ( [ 'declarationProcessors' , 'observe' , 'invalidTimeOrdering' ] ) ) ; } engine . scheduleObservation ( observation , sTime , eTime ) ; } ) ; }
eslint-disable-next-line no-unused-vars
eslint - disable - next - line no - unused - vars