1{
2  "ENTRY": "ReadNameField",
3
4################################################################
5#Enable DNS callbacks or else ReadNameField is not defined
6  "callbacks": "1",
7
8################################################################
9# This is the network buffer size.  Set to any positive value.
10  "NETWORK_BUFFER_SIZE" :  "10",
11
12################################################################
13# This is the size of the buffer into which the name is copied.
14# Set to any positive value.
15# In the source, NAME_SIZE=254 and NETWORK_BUFFER_SIZE >> NAME_SIZE
16# In the proof, NAME_SIZE >= 4 required for good coverage.
17  "NAME_SIZE":  "6",
18
19################################################################
20# Loop prvReadNameField.0:
21# should be min of buffer size and name size
22# but loop must be unwound at least once, so max of this and 1+1
23  "READLOOP0": "DNS_ReadNameField.0",
24  "READLOOP0_UNWIND": "__eval max(2, min({NETWORK_BUFFER_SIZE}, {NAME_SIZE}+1))",
25
26################################################################
27# Loop prvReadNameField.1:
28# should be min of buffer size and name size
29# but loop must be unwound at least twice, so max of this and 2+1
30  "READLOOP1": "DNS_ReadNameField.1",
31  "READLOOP1_UNWIND": "__eval max(3, min({NETWORK_BUFFER_SIZE}, {NAME_SIZE}))",
32
33################################################################
34
35  "CBMCFLAGS":
36  [
37    "--unwind 1",
38    "--unwindset {READLOOP0}:{READLOOP0_UNWIND},{READLOOP1}:{READLOOP1_UNWIND}"
39  ],
40
41  "OBJS":
42  [
43    "$(ENTRY)_harness.goto",
44    "$(FREERTOS_PLUS_TCP)/source/FreeRTOS_DNS.goto",
45    "$(FREERTOS_PLUS_TCP)/source/FreeRTOS_DNS_Parser.goto"
46  ],
47
48  "DEF":
49  [
50    "NETWORK_BUFFER_SIZE={NETWORK_BUFFER_SIZE}",
51    "NAME_SIZE={NAME_SIZE}",
52    "ipconfigDNS_USE_CALLBACKS={callbacks}",
53    "ipconfigDNS_CACHE_NAME_LENGTH=254"
54  ]
55}
56