Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/VictorTaelin/Interaction-Calculus
/ functions
Functions
107 in github.com/VictorTaelin/Interaction-Calculus
⨍
Functions
107
◇
Types & classes
1
↓ 55 callers
Function
ic_alloc
Allocate n consecutive terms in memory. @param ic The IC context @param n Number of terms to allocate @return Location in the heap Does NOT bound chec
src/ic.c:56
↓ 33 callers
Function
ic_make_term
Create a term with the given tag and value. @param tag Term type tag (includes label for SUP, CX, CY) @param val Value/pointer into the heap @return T
src/ic.c:70
↓ 27 callers
Function
expect
src/parse.c:120
↓ 20 callers
Function
ic_make_sup
Helper to create a term with the appropriate superposition tag for a label @param lab Label value (0-3) @param val Value/pointer into the heap @return
src/ic.c:92
↓ 17 callers
Function
ic_make_co0
Helper to create a DP0 term with the appropriate tag for a label @param lab Label value (0-3) @param val Value/pointer into the heap @return The const
src/ic.c:100
↓ 17 callers
Function
ic_make_co1
Helper to create a DP1 term with the appropriate tag for a label @param lab Label value (0-3) @param val Value/pointer into the heap @return The const
src/ic.c:108
↓ 16 callers
Function
parse_error
src/parse.c:108
↓ 15 callers
Function
ic_make_sub
Create a substitution term. @param term The term to convert to a substitution @return The term with its substitution bit set
src/ic.c:77
↓ 14 callers
Function
parse_term
src/parse.c:421
↓ 12 callers
Function
peek_char
src/parse.c:167
↓ 9 callers
Function
next_char
src/parse.c:156
↓ 9 callers
Function
starts_with_dollar
Helper functions
src/parse.c:18
↓ 8 callers
Function
store_term
src/parse.c:175
↓ 6 callers
Function
ic_clear_sub
Remove the substitution bit from a term. @param term The term to clear the substitution bit from @return The term with its substitution bit cleared
src/ic.c:84
↓ 5 callers
Function
find_or_add_global_var
src/parse.c:22
↓ 5 callers
Function
get_var_name
Get a variable name from the table
src/show.c:136
↓ 5 callers
Function
ic_is_era
Check if a term is an erasure @param term The term to check @return True if the term is an erasure, false otherwise
src/ic.c:142
↓ 5 callers
Function
parse_name
src/parse.c:140
↓ 5 callers
Function
skip
src/parse.c:192
↓ 4 callers
Function
ic_make_era
Helper to create an erasure term @return An erasure term (ERA tag with no value)
src/ic.c:114
↓ 4 callers
Function
ic_metal_available
src/main.c:19
↓ 4 callers
Function
ic_normal
Recursive implementation of normal form reduction
src/ic.c:691
↓ 4 callers
Function
ic_whnf
Reduce a term to weak head normal form (WHNF). @param ic The IC context @param term The term to reduce @return The term in WHNF
src/ic.c:554
↓ 4 callers
Function
pop_lexical_binder
src/parse.c:52
↓ 4 callers
Function
push_lexical_binder
src/parse.c:40
↓ 3 callers
Function
add_variable
Add a variable to the table and return its name
src/show.c:90
↓ 3 callers
Function
normalize_term
Normalize a term based on mode flags
src/main.c:40
↓ 3 callers
Function
parse_string
src/parse.c:467
↓ 3 callers
Function
parse_uint
src/parse.c:179
↓ 3 callers
Function
print_usage
Print command-line usage
src/main.c:196
↓ 2 callers
Function
consume
Parse helper functions
src/parse.c:96
↓ 2 callers
Function
ic_dup_era
&L{r,s} = *; K -------------- DUP-ERA r <- s <- K
src/ic.c:270
↓ 2 callers
Function
ic_free
Free all resources associated with an IC context. @param ic The IC context to free
src/ic.c:42
↓ 2 callers
Function
ic_make_num
Helper to create a number term @param val The numeric value @return A number term
src/ic.c:121
↓ 2 callers
Function
ic_make_suc
Helper to create a successor term @param val Pointer to the successor node @return A successor term
src/ic.c:128
↓ 2 callers
Function
ic_normal_metal
src/main.c:23
↓ 2 callers
Function
ic_suc
Allocs a Suc node
src/ic.c:177
↓ 2 callers
Function
ic_swi
Allocs a Swi node
src/ic.c:184
↓ 2 callers
Function
process_term
Process and print results of term normalization
src/main.c:70
↓ 2 callers
Function
show_term
Display a term to the specified output stream
src/show.c:397
↓ 2 callers
Function
show_term_namespaced
Display a term to the specified output stream with a prefix for variable names
src/show.c:404
↓ 2 callers
Function
stringify_term
Stringify a term
src/show.c:276
↓ 2 callers
Function
term_to_string_internal
Convert a term to its string representation with optional namespace prefix
src/show.c:359
↓ 1 callers
Function
assign_var_ids
Assign IDs to variables and register duplications
src/show.c:181
↓ 1 callers
Function
benchmark_term
Benchmark normalization performance over 1 second
src/main.c:117
↓ 1 callers
Function
check_utf8
src/parse.c:212
↓ 1 callers
Function
consume_utf8
src/parse.c:217
↓ 1 callers
Function
find_lexical_binder
src/parse.c:58
↓ 1 callers
Function
free_dup_table
Free duplication table
src/show.c:69
↓ 1 callers
Function
free_var_table
Free variable name table
src/show.c:51
↓ 1 callers
Function
ic_app_era
(* a) ----- APP-ERA
src/ic.c:218
↓ 1 callers
Function
ic_app_lam
(λx.f a) -------- APP-LAM x <- a f
src/ic.c:200
↓ 1 callers
Function
ic_app_sup
(&L{a,b} c) ----------------- APP-SUP &L{c0,c1} = c; &L{(a c0),(b c1)}
src/ic.c:227
↓ 1 callers
Function
ic_collapse_dups
src/collapse.c:445
↓ 1 callers
Function
ic_collapse_sups
src/collapse.c:374
↓ 1 callers
Function
ic_default_new
Create a new IC context with default heap and stack sizes. @return A new IC context or NULL if allocation failed
src/ic.c:36
↓ 1 callers
Function
ic_dup_app
!&L{a0,a1} = (f x); K --------------------- DUP-APP a0 <- (f0 x0) a1 <- (f1 x1) !&L{f0,f1} = f; !&L{x0,x1} = x; K
src/collapse.c:226
↓ 1 callers
Function
ic_dup_lam
&L{r,s} = λx.f; K ----------------- DUP-LAM r <- λx0.f0 s <- λx1.f1 x <- &L{x0,x1} &L{f0,f1} = f; K
src/ic.c:295
↓ 1 callers
Function
ic_dup_num
&L{x,y} = N; K -------------- DUP-NUM x <- N y <- N K
src/ic.c:531
↓ 1 callers
Function
ic_dup_sup
&L{x,y} = &R{a,b}; K -------------------- DUP-SUP (if different labels) x <- &R{a0,b0} y <- &R{a1,b1} &L{a0,a1} = a &L{b0,b1} = b K
src/ic.c:352
↓ 1 callers
Function
ic_dup_var
!&L{x0,x1} = x; K ----------------- DUP-VAR x0 <- x x1 <- x K
src/collapse.c:212
↓ 1 callers
Function
ic_era_app
(f *) ----- ERA-APP
src/collapse.c:34
↓ 1 callers
Function
ic_era_lam
λx. ------ ERA-LAM x <-
src/collapse.c:19
↓ 1 callers
Function
ic_new
Create a new IC context with the specified heap and stack sizes. @param heap_size Number of terms in the heap @param stack_size Number of terms in the
src/ic.c:11
↓ 1 callers
Function
ic_suc_era
+ -- SUC-ERA
src/ic.c:423
↓ 1 callers
Function
ic_suc_num
+N --- SUC-NUM N+1
src/ic.c:414
↓ 1 callers
Function
ic_suc_sup
+&L{x,y} --------- SUC-SUP &L{+x,+y}
src/ic.c:431
↓ 1 callers
Function
ic_sup_app
(f &L{x0,x1}) ------------------- SUP-APP !&L{f0,f1} = f &L{(f0 x0),(f1 x1)}
src/collapse.c:86
↓ 1 callers
Function
ic_sup_lam
λx.&L{f0,f1} ----------------- SUP-LAM x <- &L{x0,x1} &L{λx0.f0,λx1.f1}
src/collapse.c:45
↓ 1 callers
Function
ic_sup_sup_x
&R{&L{x0,x1},y} ----------------------- SUP-SUP-X (if R>L) !&R{y0,y1} = y; &L{&R{x0,x1},&R{y0,y1}}
src/collapse.c:127
↓ 1 callers
Function
ic_sup_sup_y
&R{x,&L{y0,y1}} ----------------------- SUP-SUP-Y (if R>L) !&R{x0,x1} = x; &L{&R{x0,x1},&R{y0,y1}}
src/collapse.c:169
↓ 1 callers
Function
ic_sup_swi_s
~N{0:z;+:&0{s0,s1};} --------------------------------- SUP-SWI-S !&L{N0,N1} = N; !&L{Z0,Z1} = Z; &L{~N0{0:z0;+:S0},~N1{0:z1;+:S1}}
src/collapse.c:327
↓ 1 callers
Function
ic_sup_swi_z
~N{0:&L{z0,z1};+:s;} --------------------------------- SUP-SWI-Z !&L{N0,N1} = N; !&L{S0,S1} = S; &L{~N0{0:z0;+:S0},~N1{0:z1;+:S1}}
src/collapse.c:279
↓ 1 callers
Function
ic_swi_era
?*{0:z;+:s;} ------------ SWI-ERA
src/ic.c:479
↓ 1 callers
Function
ic_swi_num
?N{0:z;+:s;} ------------ SWI-NUM (if N==0) z
src/ic.c:455
↓ 1 callers
Function
ic_swi_sup
?&L{x,y}{0:z;+:s;} --------------------------------- SWI-SUP &L{z0,z1} = z; &L{s0,s1} = s; &L{?x{0:z0;+:s0;},?y{0:z1;+:s1;}}
src/ic.c:489
↓ 1 callers
Function
index_to_var_name
Convert an index to an alphabetic variable name (a, b, c, ..., z, aa, ab, ...)
src/show.c:75
↓ 1 callers
Function
init_dup_table
Initialize duplication table
src/show.c:61
↓ 1 callers
Function
init_parser
src/parse.c:130
↓ 1 callers
Function
init_var_table
Initialize variable name table
src/show.c:42
↓ 1 callers
Function
move_term
src/parse.c:81
↓ 1 callers
Function
parse_file
src/parse.c:476
↓ 1 callers
Function
parse_term_alloc
src/parse.c:461
↓ 1 callers
Function
parse_term_app
src/parse.c:285
↓ 1 callers
Function
parse_term_dup
src/parse.c:311
↓ 1 callers
Function
parse_term_era
src/parse.c:358
↓ 1 callers
Function
parse_term_lam
src/parse.c:256
↓ 1 callers
Function
parse_term_let
src/parse.c:392
↓ 1 callers
Function
parse_term_num
src/parse.c:363
↓ 1 callers
Function
parse_term_suc
src/parse.c:368
↓ 1 callers
Function
parse_term_sup
src/parse.c:299
↓ 1 callers
Function
parse_term_swi
src/parse.c:375
↓ 1 callers
Function
parse_term_var
Term parsing functions
src/parse.c:224
↓ 1 callers
Function
register_duplication
Register a duplication in the table
src/show.c:159
↓ 1 callers
Function
resolve_global_vars
src/parse.c:67
↓ 1 callers
Function
stringify_duplications
Stringify duplications
src/show.c:242
↓ 1 callers
Function
term_to_string
Convert a term to its string representation
src/show.c:387
↓ 1 callers
Function
term_to_string_namespaced
Convert a term to its string representation with a prefix for variable names
src/show.c:392
↓ 1 callers
Function
test
Run default test term
src/main.c:189
Function
get_num_val
Helper functions for numeric operations
src/show.c:13
next →
1–100 of 107, ranked by callers