Advertisement
Guest User

Untitled

a guest
Aug 6th, 2014
260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
F# 0.53 KB | None | 0 0
  1. [<Test>]
  2.   let ``Aliases can occur in restrictions``() =
  3.     let cons =
  4.       @"objects: ?O is_a (300) CLASS where a = X
  5.        condition: a = 5
  6.        restrictions: a = 5"
  7.  
  8.     let ast = runP ConstraintParser cons
  9.     let forTerm = dependenciesToForLang <| Seq.singleton ast
  10.     test <@ forTerm = [For ("1",ObjRef "CLASS",[],
  11.                         [For ("2",AliasProj ("1","X"),[(EQ, Variable "2", Const (Numeric 5.0))],
  12.                           [Dependency (ReteEqualityRestriction ("1","X",Const (Numeric 5.0)))])])] @>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement