File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change
1
+ import { CoqCPAST , ValueType } from './parse'
2
+
3
+ const indent = ' '
4
+
5
+ const sanitizeName = ( name : string ) : string =>
6
+ [ ...name ] . filter ( ( x ) => / [ 0 - 9 a - z A - Z ' _ ] / . test ( x ) ) . join ( '' )
7
+
8
+ export const coqCodegen = ( { environment, procedures } : CoqCPAST ) : string => {
9
+ const procedureNameMap = new Map < string , number > ( )
10
+ const sanitizedProcedureNameCollisions = new Map < string , number > ( )
11
+
12
+ const preamble = "From CoqCP Require Import Options Imperative.\n"
13
+
14
+ const environmentCode = ( ( ) => {
15
+ if ( environment === null ) {
16
+ return `Definition environment : Environment := {| arrayType := fun _ => False; arrays := fun _ => [] |}.`
17
+ }
18
+ for ( const [ name , array ] of environment . arrays ) {
19
+
20
+ }
21
+ } ) ( )
22
+ }
You can’t perform that action at this time.
0 commit comments