Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var EndOfStream = errors.New("end of stream")
The constant value reports that End Of Stream
Functions ¶
This section is empty.
Types ¶
type Generator ¶
Generator is σ-expressions that define ground facts for the application context. Typically, Generator fetches ground facts from external storage.
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
VM returns Reader as a result of σ-application. VM associates reader object with goal of the application (σ-stream) that allows a client to use `interface{ Read([]any) error }` as lazy consumer of the relation.
type Stream ¶
type Stream interface { // init stream & read head Init(*Heap) error // continue stream reading Read(*Heap) error }
Stream of relations is core abstraction used by the VM. Stream produces lazy sequence of relations (tuples).
for err := stream.Init(&h); err == nil; err = stream.Read(&h) { ... }
Click to show internal directories.
Click to hide internal directories.