Code Monkey home page Code Monkey logo

Comments (20)

Gbury avatar Gbury commented on May 21, 2024

You're absolutely right: there are some smtlib logics which are missing from this list :

| "AUFLIA" -> merge [core; ints; arrays]

I wrote the list using the smtlib website as reference, mainly:

Dolmen exits because it cannot set the correct typing environment when trying to typecheck the assert, due to the logic missing from the list of known logics, but clearly the error message can and will be improved. That being said, I think this is the right behaviour (i.e. failing if the logic is not known), compared to setting no theory at all, or setting all (which is quite not possible because the three arithmetic theories are mutually exclusive).

from dolmen.

c-cube avatar c-cube commented on May 21, 2024

do you mean LIA and LRA are exclusive? or the nonlinear ones?

I think issuing a warning and defaulting to "all logics supported" would be best.

from dolmen.

quicquid avatar quicquid commented on May 21, 2024

There's also (set-logic ALL) which selects all supported logics. Unfortunately, this depends on the solver.

from dolmen.

Gbury avatar Gbury commented on May 21, 2024

do you mean LIA and LRA are exclusive? or the nonlinear ones?

Smtlib makes a difference between logics (e.g. UF, etc..), and theories (e.g. Arrays, Core, FixedSixeBitVectors, etc...). Basically, logics describe a set of theories (+ some extensions and restrictions).

In the case of arithmetics, there are three logics:

Unfortunately, these three logics cannot be used concurrently because they overlap and define different syntactic sugar. Which is a problem for choosing a "default" theory, :/

from dolmen.

c-cube avatar c-cube commented on May 21, 2024

Where is the sugar different between Ints and RealsInts, for example?

My intuition would be that RealsInts is the right default.

from dolmen.

Gbury avatar Gbury commented on May 21, 2024

There's also (set-logic ALL) which selects all supported logics. Unfortunately, this depends on the solver.

Oh, I forgot that one. In that case I guess the default could be to use the RealsInts theory which is bigger than Ints or Reals.

from dolmen.

quicquid avatar quicquid commented on May 21, 2024

Wouldn't it require something like merge [core; reals_ints; arrays; bv] (and depending on what other theories are supported)?

from dolmen.

Gbury avatar Gbury commented on May 21, 2024

Where is the sugar different between Ints and RealsInts, for example?

Well, that's the annoying part about the spec of the SMTLIB, a lot of things are hidden in the :extensions descriptions of the logics rather than the theories, but you can for isntance look at the extension of AUFLIRA for some of the syntactic sugar of RealsInts : http://smtlib.cs.uiowa.edu/logics-all.shtml#AUFLIRA

from dolmen.

Gbury avatar Gbury commented on May 21, 2024

Wouldn't it require something like merge [core; reals_ints; arrays; bv] (and depending on what other theories are supported)?

Yes, the default case could look like this rather than throwing an exception, though it would probably be done on the side of the caller to better emit a warning.

from dolmen.

Gbury avatar Gbury commented on May 21, 2024

Also, does anyone have access to an exhasutive list of the smtlib logics somewhere ? that would be useful to avoid similar problems, :)

from dolmen.

quicquid avatar quicquid commented on May 21, 2024

Unfortunately not - moreover, the logic declaration is supposed to change significantly with smtlib 3.0 (which is still a while away).

from dolmen.

c-cube avatar c-cube commented on May 21, 2024

SMTLIB 3.0 is not there yet, and dolmen is versioned anyway. A lot of smt2 files will stay there for a long time imho.

from dolmen.

Gbury avatar Gbury commented on May 21, 2024

Well, the parser are now versioned (as soon as I merge the relevant PR), but I haven't yet versioned the typechecker theories.

from dolmen.

c-cube avatar c-cube commented on May 21, 2024

If there's still a unique typechecker that is configured depending on the input format, I imagine it'd be more about mappings from (smt2.set-logic …) and (smt3.set-logic …) to a set of theories to be merged, than actual versioning?

from dolmen.

Gbury avatar Gbury commented on May 21, 2024

Yes, the core of the typechecker is unlikely to change (after all, it basically type-checks first order which will not change), only the theories need to be versioned, which should be doable reasonably.

from dolmen.

quicquid avatar quicquid commented on May 21, 2024

I ran dolmen on some of my hand-written files and saw that other logics are also missing: ALIA, UFDT, AUFDTLIA. They do not occur in Cesare's all logics lists though - I'm mostly composing features from QF_, A, UF, DT, LIA, LRA, NIA, NRA and BV where the order in the string is the order given here (I'm not sure about BV though).

from dolmen.

Gbury avatar Gbury commented on May 21, 2024

I'm not seing instances of the DT theory ina any logic described on the smtlib website (excluding that one, what is missing is mainly some combination I just hadn't seen on the list), is it an official theory/logic component, or just a convenient way to activate datatype reasoning (according to the standard the typechecking of datatypes seems to always be mandatory) ?

from dolmen.

c-cube avatar c-cube commented on May 21, 2024

I think the combinatorial explosion of logics has been made too clear with the addition of DT, so no one tried to name all the combinations of old logics with DT 🤷‍♂️

from dolmen.

Gbury avatar Gbury commented on May 21, 2024

Right... would there be a nice enough algorithm for splitting a logic into a list of theories ?

from dolmen.

Gbury avatar Gbury commented on May 21, 2024

The last commit should have closed this issue, ^^

from dolmen.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.