Questions tagged [datalog]

Datalog is a query and rule language for (deductive) databases that syntactically is a subset of Prolog.

Datalog is a query and rule language for (deductive) databases that syntactically is a subset of Prolog. Compared to Prolog, Datalog has certain restrictions on the syntax of allowable predicates, which mean that any bottom-up calculation is guaranteed to terminate. These restrictions also guarantee that the order of Datalog statements within a program does not affect its functioning. However, unlike Prolog, it is not Turing Complete, and so cannot be used for general purpose programming.

164 questions
0
votes
2 answers

Datomic logical disjunction

I'm sorry if this is painfully obvious, but how do I represent logical disjunction in Datomic? For instance, if I'm looking for an entity whose name is "1" or whose age is less than 5, how would I go about that? Thanks!
Atlas
  • 33
  • 4
0
votes
1 answer

XML Schema for scientific instrumentation time-series logging

Q: I know there is not one perfect answer to all of this nonsense; I am hoping for some experienced insight to narrow down the possible flavors, some general strategy to avoid conversion nightmares, and any ideas on reducing my data-storage…
user2097818
  • 1,821
  • 3
  • 16
  • 34
0
votes
0 answers

map DTD to a Datalog program

Can anyone help me write a Datalog program which is an equivalent of a given DTD. DTD : ]> Also are there any specific rules that we need to follow while…
user2946704
  • 314
  • 2
  • 4
  • 14
0
votes
0 answers

How to add Datalog rules to Pellet reasoner in Jena?

I've multiple personal inference rules in Datalog Form. I can extend Jena GenericRuleReasoner in order to take them into account during the inference step. Here is an example of code to do that : String rules = "[r1: (?e1 st:runningTask…
Fopa Léon Constantin
  • 11,863
  • 8
  • 48
  • 82
0
votes
1 answer

Confusing DES Datalog Syntax Error

When trying to /consult a .dl file in DES Datalog, I'm getting a bizarre syntax error code which I cannot decipher. The entered command and corresponding error message: DES> /consult trike.dl Error: Syntax error: operator expected after…
0
votes
1 answer

Datalog require field `unlock'

While compiling an OCaml application I get the following error: File "/tmp/ocamlpp466ee0", line 308, characters 34-233: Error: Signature mismatch: ... The field `unlock' is required but not provided The field `lock' is required but not…
pafede2
  • 1,626
  • 4
  • 23
  • 40
0
votes
2 answers

pyDatalog: 'object is incompatible with the class queried' when asking a query

I'm working on a program that uses pyDatalog to query an sqlite database. The key table in the database is Event, which is defined as follows: class Event(Base): __tablename__ = 'Event' id = Column('id', Integer, primary_key = True) eventType…
highfellow
  • 35
  • 8
0
votes
1 answer

pyDatalog: is it possible to define multiple independent datalog sessions?

I'm working on some code that assesses data in a database to see if instances in a stream of incoming events comply with a set of protocols. The idea is to use pyDatalog to do this. Ideally, we would like to be able to assess the data against…
highfellow
  • 35
  • 8
0
votes
1 answer

Datalog-find duplicates

I would like to create a constraint that filters all duplicate rows in a nxn matrix, where every field consists of either 0 or 1. The matrix can be up to 10x10 rows and columns. E.g. we have the following 4x4 matrix: 0 1 0 1 1 1 1 0 0 1 0 1 1 0 1…
enne87
  • 2,221
  • 8
  • 32
  • 61
0
votes
1 answer

C++ recursively passing by parameter memory issue

I have an object in my code called a "schemeList" that looks like this: class scheme; class schemeList { friend class scheme; private: scheme * head; schemeList * tail; public: schemeList(); Token addScheme(vector
user1311736
  • 83
  • 2
  • 2
  • 7
0
votes
1 answer

Multiple sensor data logging in Android

I am working on a datalog application to log data of all the sensor's available on the android device. I wanted to know which is an efficient way? Registering a single listener for all the sensors or individual listeners to each…
Dheepak
  • 1,381
  • 2
  • 11
  • 14
-1
votes
1 answer

can orbitdb be used as key-value store backend for datalog database? like datahike?

orbitdb has docs store - but this querying is too low level there is aviondb - but mongo querying is also lower level than SQL or datalog can orbitdb be used as a key-value store for a high-level datalog database? like datahike?
-1
votes
1 answer

datahike clojurescript branch cljs-206 broken - how to run datahike with clojurescript?

seems groundedSAGE has rewritten history none of the commits in his forks exist https://github.com/replikativ/datahike/blob/90891e21cdfde6386861602d9f8231a3307da77d/deps.edn how to run datahike right now with clojurescript?
-2
votes
1 answer

Datalog code not working in DrRacket

I am trying to run this prolog code in DrRacket: http://www.anselm.edu/homepage/mmalita/culpro/graf1.html #lang datalog arc(a,b). arc(b,c). arc(a,c). arc(a,d). arc(b,e). arc(e,f). arc(b,f). arc(f,g). pathall(X,X,[]). pathall(X,Y,[X,Z|L]):-…
rnso
  • 23,686
  • 25
  • 112
  • 234
1 2 3
10
11