pushed the problem of Herbrand construction down 1 layer
This commit is contained in:
parent
ae2f4d7552
commit
97c9e2d34b
@ -57,7 +57,10 @@ computeHerbrand db =
|
|||||||
maybe newFacts (amalgamateRelationSub newFacts) $ lookupRelation db relationName
|
maybe newFacts (amalgamateRelationSub newFacts) $ lookupRelation db relationName
|
||||||
amalgamateRelationSub :: NewFacts -> Relation -> NewFacts
|
amalgamateRelationSub :: NewFacts -> Relation -> NewFacts
|
||||||
amalgamateRelationSub newFacts relation =
|
amalgamateRelationSub newFacts relation =
|
||||||
newFacts
|
foldr amalgamateRule newFacts (_rules relation) where
|
||||||
|
amalgamateRule :: RelationRule -> NewFacts -> NewFacts
|
||||||
|
amalgamateRule rule newFacts =
|
||||||
|
newFacts
|
||||||
computeHerbrandSub :: Map Text Relation -> Map Text Relation
|
computeHerbrandSub :: Map Text Relation -> Map Text Relation
|
||||||
computeHerbrandSub facts =
|
computeHerbrandSub facts =
|
||||||
maybe facts computeHerbrandSub (updateFacts facts)
|
maybe facts computeHerbrandSub (updateFacts facts)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user