| 1 | package AI::Prolog::ChoicePoint; | ||
| 2 | 14 | $REVISION = '$Id: ChoicePoint.pm,v 1.5 2005/02/20 18:27:55 ovid Exp $'; | |
| 3 | |||
| 4 | 14 | $VERSION = '0.02'; | |
| 5 | 14 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 14 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 14 | ▶ | use Hash::Util 'lock_keys'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | 38 | ▶ | sub new { |
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 10 | 38 | my ( $class, $goal, $clause ) = @_; | |
| 11 | 38 | my $self = bless { | |
| 12 | goal => $goal, | ||
| 13 | clause => $clause, | ||
| 14 | } => $class; | ||
| 15 | 38 | lock_keys %$self; | |
| 16 | 38 | return $self; | |
| 17 | } | ||
| 18 | |||
| 19 | 1 | ▶ | sub goal { $_[0]->{goal} } |
|
Subroutine
goal: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 20 | 2 | ▶ | sub clause { $_[0]->{clause} } |
|
Subroutine
clause: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 21 | |||
| 22 | 1 | ▶ | sub to_string { |
|
Subroutine
to_string: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 23 | 1 | my $self = shift; | |
| 24 | 1 | return " ||" . $self->clause->to_string . "|| "; | |
| 25 | } | ||
| 26 | |||
| 27 | 14 | 1; | |
| 28 | |||
| 29 | __END__ | ||