<?php
require '../FirstOrderLogicProp.inc.php';
class MyLogic extends FirstOrderLogicProp {
function MyLogic () { parent::FirstOrderLogicProp(); }
function write () { $cun = parent::isConjunctiveForm() ? 'YES' : 'no'; $dis = parent::isDisjunctiveForm() ? 'YES' : 'no'; echo "Formula: "; parent::write(FALSE); echo "\nis disjunctive ? $dis\n"; echo "is cunjunctive ? $cun\n"; }
}
$logic = &new MyLogic;
$formula = '! ( A -> B) & (A <-> B)';
$logic->parse($formula); $logic->write();
echo "\nExpanded:\n"; $logic->expand(); $logic->writeLn();
echo "\nCleaned:\n"; $logic->clean(); $logic->writeLn();
?>
|