Skip to content

Instantly share code, notes, and snippets.

@sakapon
Last active December 16, 2016 10:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sakapon/f32b48c1aea3357ae3d37460552043da to your computer and use it in GitHub Desktop.
Save sakapon/f32b48c1aea3357ae3d37460552043da to your computer and use it in GitHub Desktop.
Blaze.Propositions.Formula Facade
namespace Blaze.Propositions
{
public abstract class Formula
{
// (中略)
public static Formula True { get; } = new ConstantFormula(true);
public static Formula False { get; } = new ConstantFormula(false);
public static VariableFormula<TStatement> Variable<TStatement>(TStatement statement) => new VariableFormula<TStatement>(statement);
public static Formula Imply(Formula v1, Formula v2) => new ImplicationFormula(v1, v2);
public static Formula Equivalent(Formula v1, Formula v2) => new EquivalenceFormula(v1, v2);
public static Formula operator !(Formula v) => new NegationFormula(v);
public static Formula operator &(Formula v1, Formula v2) => new AndFormula(v1, v2);
public static Formula operator |(Formula v1, Formula v2) => new OrFormula(v1, v2);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment