Class: MiniKraken::Core::Relation

Inherits:
Specification show all
Defined in:
lib/mini_kraken/core/relation.rb

Overview

Formally, a n-relation over R, where R represents the cartesian product (A1 x A2 x … An) is a subset of R. In other words, a n-relation is a subset of all tuples represented by R. In MiniKraken, a n-relation is an object that indicates whether a given tuple -of length n- is valid (or non valid).

Instance Attribute Summary

Attributes inherited from Specification

#arity, #name

Instance Method Summary collapse

Methods inherited from Specification

#check_arity, #initialize, #inspect, #variadic?

Constructor Details

This class inherits a constructor from MiniKraken::Core::Specification

Instance Method Details

#solver_for(actuals, ctx) ⇒ #resume

Abstract method to override in subclass(es).

Parameters:

  • actuals (Array<Term>)

    Argument count must

  • ctx (Core::Context)

    Runtime context

Returns:

  • (#resume)

    A Fiber-like object that yields Context.

Raises:

  • (NotImplementedError)


18
19
20
# File 'lib/mini_kraken/core/relation.rb', line 18

def solver_for(actuals, ctx)
  raise NotImplementedError
end