Thanks to visit codestin.com
Credit goes to github.com

Skip to content

String variables type not supported in Z3's DataLog engine #1753

@InRoui

Description

@InRoui

Hi,
I'm trying to evaluate this problem using Z3's DataLog engine:

(set-option :fixedpoint.engine datalog)
(define-sort s () String)

(declare-rel edge (s s))
(declare-rel path (s s))

(declare-var a s)
(declare-var b s)
(declare-var c s)

(rule (=> (edge a b) (path a b)) P-1)
(rule (=> (and (path a b) (path b c)) (path a c)) P-2)

(rule (edge "s1" "s2") E-1)
(rule (edge "s2" "s3") E-2)
(rule (edge "s3" "s1") E-3)

(declare-rel cycle (s))
(rule (=> (path a a) (cycle a)))
(query cycle :print-answer true)


My version of Z3 (Z3.4.8.0) aborts with the error: " (error "query failed: Rule contains infinite sorts in rule P-1: path(#1,#0) :- edge(#1,#0). ") unknown" if strings are used.
It works with BitVec and Ints but in my problem I need to use Strings.
If i understand, the String variables type is not supported.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions