mirror of
https://github.com/GrammaticalFramework/comp-syntax-gu-mlt.git
synced 2026-02-08 22:41:05 -07:00
python examples added
This commit is contained in:
40
python/Query.gf
Normal file
40
python/Query.gf
Normal file
@@ -0,0 +1,40 @@
|
||||
abstract Query = {
|
||||
|
||||
flags startcat = Query ;
|
||||
|
||||
cat
|
||||
Query ;
|
||||
Kind ;
|
||||
Property ;
|
||||
Term ;
|
||||
Element ;
|
||||
|
||||
fun
|
||||
QWhich : Kind -> Property -> Query ; -- which numbers are prime
|
||||
QWhether : Term -> Property -> Query ; -- is any number prime
|
||||
QWhat : Element -> Query ; -- what is the factorial of 10
|
||||
|
||||
TAll : Kind -> Term ; -- all numbers
|
||||
TAny : Kind -> Term ; -- any number
|
||||
TElement : Element -> Term ; -- 42
|
||||
|
||||
PAnd : Property -> Property -> Property ; -- even and prime
|
||||
POr : Property -> Property -> Property ; -- even or odd
|
||||
PNot : Property -> Property ; -- not prime
|
||||
|
||||
KProperty : Property -> Kind -> Kind ; -- even number
|
||||
|
||||
-- lexicon
|
||||
|
||||
KNumber : Kind ;
|
||||
|
||||
EInteger : Int -> Element ;
|
||||
PEven, POdd, PPrime : Property ;
|
||||
PDivisible : Term -> Property ;
|
||||
PSmaller, PGreater, PEqual : Term -> Property ;
|
||||
PBetween : Term -> Term -> Property ;
|
||||
|
||||
EFactorial : Element -> Element ;
|
||||
ESum, EProduct, EMinus, EDivided : Element -> Element -> Element ;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user