<HTML>
<XMP>
# KEHOME/kb/ke.def
# Jun/24/2003

#at view = mke;

# context
#========#
attribute isg
	ctype,gtype,utype,ptype,
	ktype,
	formattype,formatverb,meaningtype,
	subject,verb,object;

#===========#
# ke action #
#===========#
COMMAND iss action with subject=ke,predefined;
method  iss action with subject=ke,user defined;

cd	iss COMMAND with purpose="change directory",
	format={do cd od directory:1 done;};
check	iss COMMAND with purpose="check for error",
	format={do check od item:1,... done;};
clock	iss COMMAND with purpose="print date,time,message",
	format={do clock od message:1 done;};
clist	iss COMMAND with purpose="list concepts in subhierarchy",
	format={do clist od concept:1 done;};
csize	iss COMMAND with purpose="count concepts in subhierarchy",
	format={do csize od concept:1 done;};
dbclose	iss COMMAND with purpose="close GDBM database files",
	format={do dbclose od dbname:1 done;};
dbopen	iss COMMAND with purpose="open GDBM database files",
	format={do dbopen od dbname:1 done;};
dbprint	iss COMMAND with purpose="print contents of GDBM database files",
	format={do dbprint od dbname:1 done;};
delete	iss COMMAND with purpose="delete unit from concept",
	format={do delete od concept:1,... from concept:2 done;};
dir	iss COMMAND with purpose="list files in directory (DOS)",
	format={do dir od directory:1 done;};
	# also {! dir done;}
dump	iss COMMAND with purpose="print concept record",
	format={do dump od concept:1,... done;};
dump/ged iss COMMAND with purpose="print standard GED genealogy file",
	format={do dump/ged to file:1 done;};
dump/hidden iss COMMAND with purpose="print hidden concept record",
	format={do dump/hidden od concept:1 done;};
entropy	iss COMMAND with purpose="count words in file and calculate entropy",
	format={do entropy od file:1,... done;};
#"exit"	is statement with purpose="finish processing and exit ke",
#	format={exit;};
explorer iss COMMAND with purpose="edit file system",
	format={do explorer od fsdirectory:1 done;};
factsize iss COMMAND with purpose="display number of facts",
	format={do factsize od concept:1,... done;};
find	iss COMMAND with purpose="find concepts matching wildcard pattern in subhierarchy",
	format={do find od pattern:1 fron concept:2 done;};
find topic iss COMMAND with purpose="find dmoz directory Topics containing phrase",
	format={do find topic od phrase:1 done;};
find title iss COMMAND with purpose="find dmoz directory Topics with Title",
	format={do find title od Title:1 done;};
find term iss COMMAND with purpose="find dmoz directory Topics with term",
	format={do find term od term:1 done;};
factlist iss COMMAND with purpose="list facts",
	format={do factlist od concept:1,... done;};
fsize	iss COMMAND with purpose="count bytes in file",
	format={do fsize od file:1,... done;};
fstatus iss COMMAND with purpose="display type and rwx permissions of file",
	format={do fstatus od file:1,... done;};
ftype   iss COMMAND with purpose="display type of file",
	format={do ftype od file:1,... done;};
getenv	iss COMMAND with purpose="get value of environment variable",
	format={do getenv od variable:1 done;};
glb	iss COMMAND with purpose="display greatest lower bound of concepts",
	format={do glb od concept:1,... done;};
gpath	iss COMMAND with purpose="display genus path to top of hierarchy",
	format={do gpath od concept:1 done;};
help	iss COMMAND with purpose="display help topic",
	format={do help od topic:1,... done;};
hdepth	iss COMMAND with purpose="display distance to bottom of hierarchy",
	format={do hdepth od concept:1,... done;};
hlevel	iss COMMAND with purpose="display distance to top of hierarchy",
	format={do hlevel od concept:1,... done;};
hwalk	iss COMMAND with purpose="execute action on path in hierarchy",
	format={do hwalk od action:1 from concept:2 with path:3 done;};
import ontology iss COMMAND with purpose="import ontology context",
	format={do import ontology od qualifier:1 from url:2 done;};
interpret_line iss COMMAND with purpose="process knit",
	format={do interpret_line od {proposition list:1} done;};
kdepth	iss COMMAND with
	purpose="display distance from concept to bottom of view",
	format={do kdepth od concept:1,... done;};
klevel	iss COMMAND with
	purpose="display distance from concept to top of view",
	format={do klevel od concept:1,... done;};
klist	iss COMMAND with purpose="display list of all concepts in knit",
	format={do klist done;};
ksize	iss COMMAND with purpose="display number of concepts in knit",
	format={do ksize done;};
ls	iss COMMAND with purpose="list files in directory (UNIX)",
	format={do ls done;};
	# also format={do ls with option:1,... od file:2,... done;};
	# also {! ls done;}
lub	iss COMMAND with purpose="display least upper bound of concepts",
	format={do lub od concept:1,... done;};
max	iss COMMAND with purpose="calculate maximum of numeric list",
	format={do max od number:1,... done;};
menu	iss COMMAND with purpose="generate correct sentence syntax for user",
	format={do menu done;};
merge	iss COMMAND with purpose="merge unit|species into concept",
	format={do merge od concept:1,... to concept:2 done;};
min	iss COMMAND with purpose="calculate minimum of numeric list",
	format={do min od number:1,... done;};
mkdir	iss COMMAND with purpose="create new directory",
	format={do mkdir od fsdirectory:1 done;};
nvsub	iss COMMAND with purpose="substitute using pattern-replacement table",
	label=[subject,pattern-replacement table],
	format={do nvsub od string:2 with table:1 done;};
plist	iss COMMAND with purpose="list primitive concepts in hierarchy",
	format={do plist od concept:1,... done;};
print	iss COMMAND with purpose="display concept",
	format={do print od concept:1,... done;};
psize	iss COMMAND with purpose="count primitive concepts in hierarchy",
	format={do psize od concept:1,... done;};
pwd	iss COMMAND with purpose="display current directory name (UNIX)",
	format={do pwd done;};
	# also {! pwd done;}
random	iss COMMAND with purpose="choose random element of list",
	format={do random od concept:1,... done;};
	# also format={do random od concept:1 done;}
read	iss COMMAND with purpose="read knowledge from file",
	format={do read from file:1,... done;};
read directory iss COMMAND with purpose="read filesystem directory hierarchy",
	format={do read hierarchy from fsdirectory:1 to concept:2 done;};
read dmoz iss COMMAND with purpose="read dmoz directory RDF file",
	format={do read dmoz from file:1,... done;};
read input iss COMMAND with purpose="read line from standard input",
	format={do read input done;};
read tap iss COMMAND with purpose="read TAP KB file",
	format={do read tap from file:1,... done;};
	# also {do read tap from file:1,... with tapformat=mcf done;}
	# also {do read tap from file:1,... with tapformat=daml done;}
replace	iss COMMAND with purpose="substitute replacement string for pattern",
	label=[subject,pattern,replacement],
	format={do replace od string:1 from string:2 to string:3 done;};
rmdir	iss COMMAND with purpose="remove empty directory",
	format={do rmdir od directory:1,... done;};
	# also {! rmdir od directory:1,... done;}
simplify lattice iss COMMAND with purpose="simplify context lattice",
	format={do simplify lattice od concept:1 done;};
slist	iss COMMAND with purpose="list species concepts in subhierarchy",
	format={do plist od concept:1,... done;};
ssize	iss COMMAND with purpose="count species concepts in subhierarchy",
	format={do psize od concept:1,... done;};
sum	iss COMMAND with purpose="calculate sum of numeric list",
	format={do sum od number:1,... done;};
	# also format={do sum od ingroup:1 done:};  # Set,list,...
unique	iss COMMAND with purpose="create unique name",
	format={do unique od name:1 done;};  # name_nnn
ulist	iss COMMAND with purpose="list units in subhierarchy",
	format={do ulist od concept:1 done;};
upath	iss COMMAND with purpose="display unit path to bottom of subhierarchy",
	format={do upath od concept:1 done;};
usize	iss COMMAND with purpose="count units in subhierarchy",
	format={do usize od concept:1 done;};
vdump	iss COMMAND with purpose="dump view to persistent database",
	format={do vdump od view:1 to dbdirectory:2 done;};
vload	iss COMMAND with purpose="load view from persistent database",
	format={do vload od view:1 from dbdirectory:2 done;};
vpop	iss COMMAND with purpose="pop current view name off view stack",
	format={view:1 := do vpop done;};
vpush	iss COMMAND with purpose="push current view name on view stack",
	format={do vpush done;};
write	iss COMMAND with purpose="write knowledge to file",
	format={do write od concept:1,... to file:2 done;};
write directory iss COMMAND with purpose="write filesystem directory hierarchy",
	format={do write directory od concept:1 to fsdirectory:2 done;};


#==============#
# ke attribute #
#==============#
variable  iss attribute	with subject=ke;
pattern   iss variable	with wildcard;
pronoun   iss variable	with antecedent subject;
automatic iss attribute	with subject=[relation,method,group],
			     purpose="change automatic declarations";

Assignment iss variable with purpose="record output of last assignment";
Command    iss variable with purpose="record output of last command";
If         iss variable with purpose="record output of last conditional";
Question   iss variable with purpose="record output of last question";
Sentence   iss variable with purpose="record output of last sentence";

DisplayName iss variable with purpose="change concept output   name";
UniqueName  iss variable with purpose="change concept internal name";

CheckComment iss variable with purpose="uncomment check output";
TypeComment  iss variable with purpose="uncomment type output";

charformat	iss variable with purpose="change characteristic output format";
cname		iss variable with purpose="change concept name for input file";
debug		iss variable with purpose="change debug output";
echo		iss variable with purpose="change echo of ke input";
hchar		iss variable with purpose="change characteristic processing";
hcheck		iss variable with purpose="change error check processing";
hfocus		iss variable with purpose="change hierarchy output concepts";
hformat		iss variable with purpose="change hierarchy output format";
hmaxlevel	iss variable with purpose="change hierarchy maximum level up/down";
hmethod		iss variable with purpose="change method processing";
hminfactid	iss variable with purpose="change hierarchy output minimum fact id";
hop		iss variable with purpose="change hierarchy verb processing";
hoseparator	iss variable with purpose="change hierarchy separator",
				default="/";
hreduce		iss variable with purpose="change reduce processing";
hrelation	iss variable with purpose="change relation processing";
hpad		iss variable with purpose="change hierarchy output name pad";
htab		iss variable with purpose="change hierarchy output indent";
kcase		iss variable with purpose="change lower case input option";
kehome		iss variable with purpose="change location of ke files";
keview		iss variable with purpose="change location of ke file systems";
kerror		iss variable with purpose="count input file errors";
kformat		iss variable with purpose="change input format";
klastid		iss variable with purpose="record last new id number (readonly)";
kmapword	iss variable with purpose="change mapping of rdf words";
nameformat	iss variable with purpose="change output format of concept name";
mseparator	iss variable with purpose="change method separator",
				default=",",readonly;
nvseparator	iss variable with purpose="change name value separator",
				default="=";
pseparator	iss variable with purpose="change phrase separator",
				default=" ",readonly;
relseparator	iss variable with purpose="change relation separator",
				default=";";
removehtml	iss variable with purpose="change remove HTML commands option";
roleseparator	iss variable with purpose="change role separator",
				default=":";


#===========#
# statement #
#===========#
#context		iss attribute	with meaning={at space=space:1,time=time:2,view=view:3;};
#s_action	iss statement	with meaning={entity:1 do action:2 = event:3 od aobject:4 done;};
#s_attribute	iss statement	with meaning={concept:1 has attribute:2 = value:3;};
#s_causality	iss statement	with meaning={sentence:1 causes sentence:2; event:1 causes event:2;};
#s_class		iss s_hierarchy	with meaning={concept:1 isa* existent:2;};
#s_conditional	iss statement	with meaning="if sentence:1 then sentence:2 else sentence:3 fi";
#s_definition	iss statement	with meaning={concept:1 is genus:2 with differentia:3;};
#s_differentiation iss s_action	with meaning={concept:1 isd genus:2;};
#s_event		iss statement	with meaning={event:1 do change od eobject:2 from attribute:3=initial:4 to attribute:3=final:5 done;};
#s_group		iss statement	with meaning={unit:1 ismem group:2; group:3 isany unit:4;};
#s_hierarchy	iss statement	with meaning={concept:1 isa genus:2; concept:1 isc species:3;};
#s_identification iss s_action	with meaning={knowledge:1 := man:2 do identify:3 od existent:4 done;};
#s_identity	iss statement	with meaning={alias:1 is concept:2;};
#s_integration	iss s_action	with meaning={concept:1 isi unit:2;};
#s_iteration	iss statement	with meaning="every sentence:1 {proposition list:2;}";
#s_kaction	iss statement	with meaning={entity:1 do kaction:2 = event:3 od aobject:4 done;};
#s_part		iss statement	with meaning="existent:1 haspart existent:2 pplist:3";
#s_relation	iss statement	with meaning={existent:1 isin relation:2 = infon:3;};
#s_meaning	iss statement	with meaning={symbol:1 means referent:2;};

</XMP>
</HTML>
