Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple Inference Predicates #7

Open
mwillsey opened this issue Sep 12, 2014 · 3 comments
Open

Multiple Inference Predicates #7

mwillsey opened this issue Sep 12, 2014 · 3 comments

Comments

@mwillsey
Copy link

where 
    q = do
      use <- relationPredicateFromName "use" 
      def <- relationPredicateFromName "def" 
      succ <- relationPredicateFromName "succ" 
      live <- inferencePredicate "live"
      live2 <- inferencePredicate "live2"
      let l  = LogicVar "l"
          l' = LogicVar "l'"
          t  = LogicVar "t"
          t' = LogicVar "t'"
      (live, [l,t]) |- [ lit use [l,t] ]
      (live, [l,t]) |- [ lit live [l',t]
                       , lit succ [l, l']
                       , negLit def [l, t] ]
      (live2, [l,t]) |- [ lit live [l,t] ]
      issueQuery live2 [l,t]

Hi there, I seem to be having some trouble with inference predicates that require other inference predicates. In the above code, if I issue the query for live instead of live2 everything works fine, and it actually generates liveness. If, however, I query for live2, the database produces nothing. Any idea as why this might be?

@travitch
Copy link
Owner

Wow, that looks like a bad bug. I'll take a look at it.

@mwillsey
Copy link
Author

Interestingly enough, your WorkForTest.hs doesn't seen to be affected, even though it does the same thing with worksFor and worksForYoung in q2. That makes me think there was something different/wrong about my code, but for the life of me I can't figure out what.

@travitch
Copy link
Owner

Thanks for the report. It looks like there was a bug in the stratification code. Can you try now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants