GithubHelp home page GithubHelp logo

Comments (7)

nikivazou avatar nikivazou commented on July 17, 2024

@ranjitjhala I believe that the problem here is that there is no checking that qualifiers are bool (or prop) values, neither at liquidHaskell not at fixpoint. Shouldn't we be checking that?

For example, if you instead had tv r as a refinement, sort-check will fail:

constant tv : func(1, [RGRef @(0); @(0) ])

constraint: 
  env [r: {v: RGRef a | [] }]
  grd true
  lhs {v : L a | []}
  rhs {v : L a | [ ? (tv([r])) ]}
  id 1 

from liquid-fixpoint.

ranjitjhala avatar ranjitjhala commented on July 17, 2024

Don't follow -- the example below has no qualifiers?

On Thursday, September 10, 2015, Niki Vazou [email protected]
wrote:

@ranjitjhala https://github.com/ranjitjhala I believe that the problem
here is that there is no checking that qualifiers are bool (or prop)
values, neither at liquidHaskell not at fixpoint. Shouldn't we be checking
that?

For example, if you instead had tv r as a refinement, sort-check will
fail:

constant tv : func(1, [RGRef @(0); @(0) ])

constraint:
env [r: {v: RGRef a | [] }]
grd true
lhs {v : L a | []}
rhs {v : L a | [ ? (tv([r])) ]}
id 1


Reply to this email directly or view it on GitHub
#98 (comment)
.

Ranjit.

from liquid-fixpoint.

nikivazou avatar nikivazou commented on July 17, 2024

It does not have qualifiers. But checking that tv r :: bool fails.

If we were checking that the body of the qualifier is a bool then the initial example would create a proper error, instead of crashing at Z3.

Is there a reason why we do not check well-formedness of qualifiers?

from liquid-fixpoint.

ranjitjhala avatar ranjitjhala commented on July 17, 2024

Well, the reason is just that the qualifiers are implicitly checked when
they are instantiated -- so they better be BOOL when you instantiate
them, or else they are not a valid instantiation. So I'm puzzled as to why
this should get past the instantiation. (This plus maybe some BAD reasons
due to our earlier hacky handling of polymorphism...)

On Thursday, September 10, 2015, Niki Vazou [email protected]
wrote:

It does not have qualifiers. But checking that tv r :: bool fails.

If we were checking that the body of the qualifier is a bool then the
initial example would create a proper error, instead of crashing at Z3.

Is there a reason why we do not check well-formedness of qualifiers?


Reply to this email directly or view it on GitHub
#98 (comment)
.

Ranjit.

from liquid-fixpoint.

nikivazou avatar nikivazou commented on July 17, 2024

Ok, I will check why it got through instantiation. Other than that, wouldn't it be better if we check well-formedness of qualifiers at liquidHaskell level, so that we provide better error messages there?

An error at instantiation will still happen at fixpoint, so we cannot provide good error messages.

from liquid-fixpoint.

nikivazou avatar nikivazou commented on July 17, 2024

Fix with #451

from liquid-fixpoint.

ranjitjhala avatar ranjitjhala commented on July 17, 2024

Thanks @nikivazou !!

On Sep 15, 2015, at 12:52 AM, Niki Vazou [email protected] wrote:

Closed #98.


Reply to this email directly or view it on GitHub.

from liquid-fixpoint.

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.