Skip to content

How to write facts based on other facts #66

Description

@vitrun

The following code doesn't work as expected because two invocation of Line('B', 'C') result in different goal functions.

Line = Relation()
LengthOf = Relation()

facts(LengthOf, (Line('B', 'C'), 1))
l = var()
run(1, l, LengthOf(Line('B', 'C'), l))

Though possible, the workaround is not elegant:

g = Line('B', 'C')
facts(LengthOf, (g, 1))
l = var()
run(1, l, LengthOf(g, l))

What's the best practice to state facts based on other facts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions