| Did you know ... | Search Documentation: |
| Pack starlog -- COMPREHENSIVE_COMBINATIONS.md |
"Complete A:...a is b:...B and A•a is b•B. with any combination of :,• [], arithmetic expression or &"
This implementation provides comprehensive demonstrations and tests for dual expressions with all possible combinations of Starlog operators.
A comprehensive demonstration file that shows 22 different patterns of dual expressions using:
:)•)&)A comprehensive test suite with 24 tests covering all operator combinations and edge cases.
:)(a : A) is (B : b) → A = b, B = a((a : "x") : A) is (B : (b : "y"))((a : x) : A) is (B : (y : z))•) → A = b, B = a`&) → A = [2], B = [1]` → A = [3], B = [1,2]`
10. Complex: ([a,b] & A) is (B & [c,d]) → A = [c,d], B = [a,b]`
11. String: (a : x) is (a : x)
12. Atom: `(a • x) is (a • x)
13. List: ([1,2] & [3]) is ([1,2] & [3])`
14. Standalone: X is 1 + 2 → X = 3
15. Mixed with Starlog: `L is [1] & [2], N is 1 + 2`
16. Empty list: `([] & A) is (B & [1]) → A = [1], B = []
17. Empty list as identity: ([] & A) is ([] & [x]) → A = [x]`
18. Deeply nested strings: (((a : b) : c) : A) is (B : ((d : e) : f))
19. Deeply nested lists: `((([1] & [2]) & [3]) & A) is (B & (([4] & [5]) & [6]))`
20. Variable in middle: `([1,2] & A & [5,6]) is ([1,2] & [3,4] & [5,6]) → A = [3,4]
21. Multiple variables: (a : A) is (B : b) → A = b, B = a`
22. Mixed list and string: Sequential use of different operators
23. Mixed atom and list: Sequential use of • and &
24. All operators in sequence: Using :, •, &, and arithmetic in one test
:, •, &) are demonstrated in dual expressionsAll 24 tests pass successfully, demonstrating that:
Run the demonstration:
swipl -s demo_comprehensive_combinations.pl
Run the tests:
swipl -s tests/test_comprehensive_combinations.pl
This implementation completes the requirement "A:...a is b:...B and A•a is b•B. with any combination of :,• [], arithmetic expression or &" by providing: