[Omake] Re: [CUCS Bug 545] "or" and "and" take each argument
to be a _sequence_ of values.
Jason Hickey
jyh at cs.caltech.edu
Wed Jun 28 00:29:01 PDT 2006
Whew. In any case, if I understand, your proposal is to rename and/or,
and then replace them with new definitions. If so, I would suggest the
following.
and(e1, ..., en) == /\_i. [[e_i]]
or(e1, ..., en) == \/_i. [[e_i]]
all(e1 ... en) == /\_i. [[e_i]] ("all" is the current "and")
exists(e1 ... en) == \/_i. [[e_i]] ("exists" is the current "or")
where [[e_i]] is the value of e_i, interpreted as a bool; it is
basically $(if e_i, true, false).
Identities:
- and() = true
- or() = false
- all($(EMPTY)) = true
- exists($(EMPTY)) = false
Some other cases:
- and(true, $(EMPTY), true) = false
- all(true $(EMPTY) true) = true
(the $(EMPTY) is not significant in array formation)
- Forcing the $(EMPTY) to be significant:
X[] =
true
$(EMPTY)
true
all($X) = false
The main issue (otherwise I believe I would be in agreement), is
replacing and/or with backwards-incompatible definitions.
Jason
--
Jason Hickey http://www.cs.caltech.edu/~jyh
Caltech Computer Science Tel: 626-395-6568 FAX: 626-792-4257
More information about the OMake-Devel
mailing list