5 Phase Transitions
(require planning/examples/phase-transition) | |
package: planning |
In chemistry, a phase transition is a change from one state of matter to
another. Matter can exist in multiple phases —
procedure
(state-of-matter? v) → boolean?
v : any/c
value
value
value
value
value
value
value
value
value
> (set-act (set liquid) freeze) (set #<state-of-matter:solid>)
> (set-act (set solid) evaporate) set-act: contract violation;
The action must be applicable to the set.
set: (set #<state-of-matter:solid>)
action: (set-action #:additions (set
#<state-of-matter:gas>) #:cost 1 #:deletions (set
#<state-of-matter:liquid>) #:obstructions (set)
#:requirements (set #<state-of-matter:liquid>))
in: (->i
((set set?) (action set-action?))
#:pre/name
(set action)
"The action must be applicable to the set."
(set-action-applicable? action set)
(_ set?))
contract from:
<pkgs>/planning/set/action.rkt
blaming: top-level
(assuming the contract is correct)
at: <pkgs>/planning/set/action.rkt:7:3
value
value
value
value
value
value
> (set-act (set solid) partially-melt) (set #<state-of-matter:liquid> #<state-of-matter:solid>)