Some Examples of Business Rules you can Run in the Demo


One can think of the rules as specifications, as models, or as "use cases". They also work as programs. No other coding is needed.   No maintenance of an English dictionary or grammar is needed. You can also write rules in Spanish, French, German and other languages. (If you wish to write in a language other than English, please contact internet.business.logic@gmail.com first.)



Oil Industry Supply Management:
estimated demand some-id in some-region is for some-quantity gallons of some-finished-product in some-month of some-year
in that-month an order for that-finished-product can consist in whole or part of some-base-product
in that-month the refinery some-name has committed to schedule some-amount gallons of that-base-product
we have some-method transportation from refinery that-name to region that-region
----------------------------------------------------------------------------------------------------------------------
for demand that-id for that-finished-product refinery that-name can supply that-amount gallons of that-base-product


Billing:
customer some-cust-number is on the some-type plan effective some-plan-start-date
that-plan-start-date is less than or equal some-current-date
not : customer that-cust-number has switched plans between that-plan-start-date and that-current-date
-----------------------------------------------------------------------------------------------------
on that-current-date the plan in effect for customer that-cust-number is that-type


Knowledge Based Mining of Medical Data:
patient some-number date some-start1 some-fin1 had in-patient treatment for some-condition1
patient that-number date some-start2 some-fin2 had out-patient treatment for some-condition2
the period that-start1 to that-fin1 overlaps with the period that-start2 to that-fin2
-------------------------------------------------------------------------------------------------------------------
patient that-number had in-patient treatment that-condition1 overlapping with out-patient treatment that-condition2


Using a Networked Relational Database, such as Oracle 9i:
  To run this kind of rule, you will need to first change it to point to your own networked Oracle or other SQL database
url:12.345.67.89  dbms:9i  dbname:ibldb tablename:EMP_DEPT  port:1521  id:anonymous  password:oracle
----------------------------------------------------------------------------------------------------
employee some-empnumber some-name works in some-department


Supply Chain:
PO some-POnum to some-vendor requires a shipment by some-date of some-rqty of the part some-partnumber some-name
sum a-sqty : for PO that-POnum shipment some-shipnum was of some-sqty of the part that-partnumber that-name = a-total
----------------------------------------------------------------------------------------------------------------------
for PO that-POnum that-total units of the reqd that-rqty of the part that-partnumber that-name have been shipped so far


PO some-POnum to some-vendor requires a shipment by some-date of some-rqty of the part that-partnumber some-name
for PO that-POnum some-sqty units of the reqd that-rqty of the part that-partnumber that-name have been shipped so far
that-rqty - that-sqty = some-qty
----------------------------------------------------------------------------------------------------------------------
for PO that-POnum that-vendor could ship up to that-qty of the part that-partnumber that-name


Business Case Transaction:
the current user is some-person with userid some-uid and with permission status some-perm
anyuid running with permission status that-perm is allowed to change the Reengineering estimates
the present date and time is some-year/month/day some-time
some-year is a year under consideration for estimates
in some-zone the Reengineering company has a dept some-dept
the net income in $M for that-year to be contributed by that-zone that-dept is some-old-amount
del : for the year that-year the zone that-zone dept that-dept estimates net income $M some-old-amount
add : for the year that-year the zone that-zone dept that-dept estimates net income $M a-new-amount
the next log number is some-num
add : log that-num userid that-uid on that-year/month/day that-time added that-year that-zone that-dept that-new-amount
------------------------------------------------------------------------------------------------------------------------
Change the estimated net income for that-year that-zone for that-dept from that-old-amount to that~new-amount


Semantic Web Ontology:
some-relationship1 is a specialization of some-relationship2
that-relationship2 is a specialization of some-relationship3
------------------------------------------------------------
that-relationship1 is a specialization of that-relationship3



some-person is related through some-relationship to some-other-person
that-relationship is a specialization of some-higher-relationship
----------------------------------------------------------------------------
that-person is related through that-higher-relationship to that-other-person


Ontology Based Interoperability:
some-agent measures some-quantity in some-units
not : the canonical measure of that-quantity is those-units
one unit of that-quantity measured in those-units converts to a canonical some-number some-standard-units
-----------------------------------------------------------------------------------------------------------------------
that-agent sending one unit of that-quantity in those-units should first convert it to that-number those-standard-units




one unit of length measured in miles converts to a canonical some-number1 kilometers
one unit of time measured in hours converts to a canonical some-number2 seconds
that-number1 / that-number2 = some-quotient
that-quotient rounded to 5 places after the decimal point is some-number
-------------------------------------------------------------------------------------
one unit of speed measured in mph converts to a canonical that-number kps


Ontology Class Subsumption:
some-item is in some-classB but not in some-classA
--------------------------------------------------
that-classA does not subsume that-classB


some-classA and some-classB are named differently
some-item is a member of that-classA
not : that-item is a member of that-classB
--------------------------------------------------
that-item is in that-classA but not in that-classB


there is a class named some-classA-name
there is a class named some-classB-name
that-classA-name is not equal that-classB-name
----------------------------------------------------------
that-classA-name and that-classB-name are named differently


International Transfer Pricing:
the scenario some-type uses some-method with controlled seller some-seller1 controlling buyer some-co1 and uncontrolled buyer some-co2
in the scenario that-type the controlling buyer that-co1 purchases items in a quantity some-ctrld-qty
the scenario that-type has a base price some-price and an uncontrolled volume discount some-lo-disc for a quantity some-lo-qty
the scenario that-type has a base price some-price and an uncontrolled volume discount some-hi-disc for a quantity some-hi-qty
that-lo-qty is less than that-hi-qty
interpolating between that-lo-qty that-lo-disc and that-hi-qty that-hi-disc yields some-ctrld-qty and some-ctrld-discount
that-price discounted by that-ctrld-discount % is some-transfer-price
---------------------------------------------------------------------------------------------------------------------------
in the scenario that-type the price for a controlled quantity that-ctrld-qty is that-transfer-price


CIA World Fact Book:
at rank some-rank1 some-country has population some-number million as of some-date1
that-number is greater than 0
at rank some-rank2 that-country has oil-consumption some-amount million-bbl/day as of some-date2
that-amount / that-number = some-quotient
that-quotient * 365 = some-yearly-quotient
that-yearly-quotient rounded to 0 places after the decimal point is some-quantity
------------------------------------------------------------------------------------------------
that-quantity barrels of oil per person per year are consumed in that-country


Car Rental Company:
EU-rent currently owns some-car
not : that-car is currently rented out
car that-car is in the group some-group
car that-car is currently owned by branch some-branch
-----------------------------------------------------------------------------
car that-car in group that-group is currently available at branch that-branch


for demo purposes the current date and time is some-date some-time
EU-rent customer some-Cnumber some-name has rental some-Rnumber starting some-date1 some-time1 ending some-date2 some-time2
that-date that-time is between that-date1 that-time1 and that-date2 that-time2
rental number that-Rnumber is assigned some-car
---------------------------------------------------------------------------------------------------------------------------
that-car is currently rented out


for demo purposes the current date and time is some-date some-time
EU-rent customer some-Cnumber some-name has rental some-Rnumber starting that-date some-time1 ending some-date2 some-time2
not : rental number that-Rnumber has a car assigned to it 
rental that-Rnumber is for a car some-group with pick up at some-branch1 and return at some-branch2
car some-car in group that-group is currently available at branch that-branch1
add : rental number that-Rnumber is assigned that-car
---------------------------------------------------------------------------------------------------------------------------
ASSIGN car that-car in group that-group to rental number that-Rnumber for customer that-Cnumber that-name


Option Pricing Risk Analysis:
some-stock with price $ some-price has an option maturing in some-number months at exercise price $ some-ex-price
the standard deviation ( volatility ) of the value of that-stock is estimated to be some-sigma
the current interest rate is some-rate per month
that-price / that-ex-price = some-ratio
price ratio that-ratio and volatility that-sigma at that-rate for that-number months has d1 some-d1-value
for input that-d1-value the cumulative univariate normal distribution value is some-d1-cumulative
that-price * that-d1-cumulative = some-worth-part1
that-rate * that-number = some-rate-times-time
2.718 raised to the power that-rate-times-time = some-result
that-ex-price * that-result = some-worth-part2a
price ratio that-price-ratio and d1 that-d1-value with volatility that-sigma for that-number months has d2 some-d2
for input that-d2 the cumulative univariate normal distribution value is some-d2-cumulative
that-worth-part2a * that-d2-cumulative = some-worth-part2
that-worth-part1 - that-worth-part2 = some-calculated-value
that-calculated-value rounded to 3 places after the decimal point is some-value
----------------------------------------------------------------------------------------------------------------------
call that-stock current that-price volatility that-sigma that-number months ex price that-ex-price is worth that-value

Please log in to the free IBL demo ID at this site to see examples of running IBL business rules, including the ones listed above.  You can also use the demo ID to write and run your own business rules.
Back to the Executable English LLC home page