• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. bcdp

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 143
  • Views 12683
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

bcdp

tweeks
tweeks over 10 years ago

bcdp is a curious function.

The documentation says it "checks if an object is a binary primitive function", without being too specific about exactly what that means.

The example given is:

bcdp(getd('plus)) => t
bcdp('plus) => nil

Which just shows that bcdp can tell the difference between a symbol and a procedure.  But what's the difference between bcdp and procedurep or isCallable?  Are they the same?

The documentation's brief description suggests bcdp is only true for "primitive" functions like primops.  My experiments in IC616-ISR8 support this interpretation: indeed, bcdp is true of every primop.  bcdp is also true of every syntax form (getFunType => syntax).  However, and rather surprisingly, bcdp is true of some other things as well:

ILS-<2> define builtins (list gets vi abs)
builtins
ILS-<2> mapcar getFunType builtins
(macro nlambda lambda)
ILS-<2> forall b builtins (bcdp b)
t

You can find other cases where bcdp is nil for macros, nlambdas, and lambdas, but I find it curious that there are "false positives".  In what sense is a macro like gets a "binary primitive function"? 

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 10 years ago

    Tom,

    bcdp is quite simple. Any SKILL function which is implemented in C rather than SKILL is binary, and that's what bcdp is returning. So it's things like primop, macro, lambda, syntax (in terms of what getd returns).

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information