Advertisement
Guest User

LoL

a guest
May 24th, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. 1)cate note sunt cantate in acelasi timp (timestamp,masura,partea)
  2.  
  3. (length$ (find-all-facts ((?f1 note) (?f2 note)) (and (and (= ?f1:timestamp ?f2:timestamp) (= ?f1:masura ?f2:masura)) (= ?f1:partea ?f2:partea))))
  4.  
  5.  
  6. 2)cate note sunt de un fel (nota) (do re mi fa sol la si do) , notele sunt de la A la H
  7.  
  8.  
  9. (length$ (find-all-facts (?f note) (= f:nota "A")))
  10. (length$ (find-all-facts (?f note) (= f:nota "B")))
  11. (length$ (find-all-facts (?f note) (= f:nota "C")))
  12. (length$ (find-all-facts (?f note) (= f:nota "D")))
  13. (length$ (find-all-facts (?f note) (= f:nota "H")))
  14.  
  15.  
  16.  
  17.  
  18. 3)cate note de o anumita lungima exista(duratie 1 ,0.5 , 0.125 , 0.03125 ) )
  19.  
  20. (length$ (find-all-facts (?f note) (= f:duratie 1)))
  21. (length$ (find-all-facts (?f note) (= f:duratie 0.5)))
  22. (length$ (find-all-facts (?f note) (= f:duratie 0.125)))
  23. (length$ (find-all-facts (?f note) (= f:duratie 0.03125)))
  24.  
  25.  
  26.  
  27.  
  28. BIO:
  29. https://www.csie.ntu.edu.tw/~sylee/courses/clips/bpg/node9.7.8.3.html - functia find-all-facts
  30. https://stackoverflow.com/questions/25953986/clips-counting-facts-or-template-instances-that-match-the-pattern - intrebare si functia find-all-facts
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement