func TestUnderstand(t *testing.T) { //fmt.Printf(src) for _, r := range src { s := see.SeeCircuit(see.NewSrcString(r)) t := Understand(s) printf2(t.Print("", "\t")) } }
func (See) Materialize() be.Reflex { reflex, _ := plumb.NewEyeCognizer( func(eye *plumb.Eye, dvalve string, dvalue interface{}) { if dvalve != "Source" { return } eye.Show("Seen", es.SeeCircuit(es.NewSrcString(plumb.AsString(dvalue)))) }, "Source", "Seen", ) return reflex }
func (fty Faculty) UnderstandFile(file string) { text, err := ioutil.ReadFile(file) if err != nil { println(file) panic(err) } src := see.NewSrcString(string(text)) for { s := see.SeeCircuit(src) if s == nil { break } fty.interpretCircuit(Understand(s)) } }