Comments (3)
The example still does not work correctly, although there are no parse errors anymore.
For the following program, Nemo derives C(a, 13)
:
A(a, 5) .
B(a, 8) .
C(?x, ?y) :- A(?x, ?z), B(?x, ?v), ?y = ?z + ?v, ?y > 10 .
@output C .
But when I add * 5
in the head, then no C
-facts are derived:
C(?x, ?y * 5) :- A(?x, ?z), B(?x, ?v), ?y = ?z + ?v, ?y > 10 .
The following rule without the assignment for ?y
works as expected:
C(?x, ?y * 5) :- A(?x, ?y), ?y > 3 .
(Using Nemo 0.5.2-dev from the main branch (89b3625) and rustc 1.82.0-nightly (8b3870784), but this also happens in the web interface on 0.5.1.)
from nemo.
A minimal example of that bug would be
T(1).
R(?y + 1) :- T(?x), ?y = ?x + 1.
@output R .
from nemo.
@aannleax my hunch here would be that the constructors are evaluated in the wrong order:
positive_constructors: [
Constructor { variable: Universal("_CONSTRUCT_0"), term: Addition
├─ Variable(Universal("y"))
└─ GroundTerm(AnyDataValue(Long(LongDataValue(1))))
},
Constructor { variable: Universal("y"), term: Addition
├─ Variable(Universal("x"))
└─ GroundTerm(AnyDataValue(Long(LongDataValue(1))))
}]
from nemo.
Related Issues (20)
- Build apple release binaries in CD HOT 1
- Update Publications in README and add CITATION.cff file
- Redesign parser and rule model
- Integrate new parser into Nemo Language Server
- Translation from new logical model into the chase model HOT 1
- Remove old parser and rule model code
- Fix clippy and doc-test issues due to new version HOT 1
- Integrate Import/Export code with new logical model HOT 1
- Make test cases for each error message
- Use new logical/chase model in tracing
- Fix reported positions by the parser of non-ascii characters
- Improve error messages generated from the parser error tree
- Get unit tests running again
- Use new parser in Python API, the Rust Crate and CLI
- More efficient dictionaries for data that has a "frequent" part
- Support tuples (including function terms) in dictionary
- Check correct Generation of DocumentSymbols in Language Server for new Parser
- Miri complains about pointer dereferencing in `nom_locate` HOT 2
- LSP: Error reporting should report the whole span instead of only the first position HOT 1
- Wasm Code should use new error reporting
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nemo.